Calculating Propellant Mass

Piper

Orbiting Space Addict
Addon Developer
Tutorial Publisher
Donator
Joined
Apr 7, 2008
Messages
356
Reaction score
0
Points
0
Location
Ottawa, Canada
I'm working on a small computer program in VB that calculates the mass of propellant a spacecraft needs from its ISP, empty mass, and the deltaV that's required. I've rearranged the rocket equation, but when I put the numbers in, I get completely wrong results.

The rearranged rocket equation:
P = M * e^(dV/(g*Isp)) - M
whereas P = Propellant Mass
M = Empty Mass
e = 2.718....
dV = DeltaV
g = 9.8m/s^2
Isp = Specific Impulse

According to Orbiter, a spacecraft that weighs 1770kg, has an ISP of 3000 (from a spacecraft.dll file) and a fuel mass of 900 will get a deltaV of about 2900. However, when I put the deltaV, the ISP, and the empty mass into my program, it says the required fuel is only 183kg. Now, I noticed that the equation requires an ISP in seconds, but the pdf for spacecraft.dll says its ISP is in N/kg/s.

How do I convert the ISP from a spacecraft.dll file to the ISP for the rocket equation?
 

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
How do I convert the ISP from a spacecraft.dll file to the ISP for the rocket equation?


are you imputing the the ISP in seconds or by mass?


to convert from seconds to mass isp you go
Specific Impulse (by mass)=9.8066 ISPseconds N·s/kg

I am not sure, but you could check that to see if it works
 

Piper

Orbiting Space Addict
Addon Developer
Tutorial Publisher
Donator
Joined
Apr 7, 2008
Messages
356
Reaction score
0
Points
0
Location
Ottawa, Canada
You leave out the fiddle factor "g" in your equation.
Btw, dimension of ISP should be N/kg*s (or m/s), not N/kg/s.

Doing that just converts the equation into using Exhaust velocity, which I don't have. The g is there to convert the ISP into Exhaust velocity (which is what the rocket equation uses). If I try without g, I got a result of 2872kg of fuel, way too much. As for the units, I figured it was N/kg*s or N*s/kg, but the pdf file for spacecraft.dll said N/kg/s, which is why I put that.
 

Zatnikitelman

Addon Developer
Addon Developer
Joined
Jan 13, 2008
Messages
2,302
Reaction score
6
Points
38
Location
Atlanta, GA, USA, North America
Are you sure your first example there is right? Using Fuel mass of 2,670Kg, dry mass of 1,770Kg, isp of 305.914s (3000 N/kg*s), I get 1233.296 m/s dv.

The equation I use to get the total mass (find fuel mass by subtracting dry from total mass) is
Code:
(e^(dv/ve))/m0=m1 
where:
dv=deltav, 
ve=exhaust velocity 
m0=total mass
m1=dry mass
If you have a Ti-83 Plus or I think Ti-84, I've got both the main equation, and the reverse equation programmed in.
This first is for finding DV from masses and ISP
Code:
Disp "TOTAL MASS"
Input T
Disp "Dry Mass"
Input D
Disp "ISP"
Input I
(ln(T/D))->N
N*(9.80665*I)->V
Disp V

This second is for finding the fuel mass, not the total mass
Code:
Disp "ENTER DV"
Input D
Disp "ENTER ISP"
Input I
Disp "ENTER DRY MASS"
Input M
I*9.80665->I
Me^(D/I)->F
F-M->F
Disp F
Disp "Fuel Mass"
 

Piper

Orbiting Space Addict
Addon Developer
Tutorial Publisher
Donator
Joined
Apr 7, 2008
Messages
356
Reaction score
0
Points
0
Location
Ottawa, Canada
Well, I figured out what the problem was, and for a change, it wasn't me. I had all my math right (expect for putting g in there, it seems it isn't really the ISP that spacecraft.dll uses, but the exhaust velocity which is a related concept). Instead, it seems I found a rather big bug in spacecraft.dll.

When I opened up a test file with the Eris Explorer with no attachments, it showed the correct empty weight of 1770kg, but when I put attachments on it (the atmospheric probes) it still showed 1770kg. At first I thought Burn Time MFD just wasn't adding in the attachments, but when I detached the probes, 400kg was subtracted from the empty mass leaving me with only 570kg when all three were detached.

To check if this was a problem with spacecraft.dll or Burn Time MFD, I did a small test (burned the engines fully and saw what the dV change was in each three scenarios) and indeed the probes masses aren't being added to the main probes mass, and they are being subtracted from the vehicles actual empty mass. Unfortunately this then means my Eris Probe mission is woefully laking in fuel! So much for the realism I was going for ;)
 
Top