class KerbalDyn::Part::LiquidFuelEngine
Constants
- IspSurfaceGravity
The surface gravity, as used for Isp calculations; this was determined experimentally.
Public Instance Methods
fuel_consumption(tank)
click to toggle source
This is the volume-wise fuel flow. Multiply by 1000.0 to get liters/s instead of m^3/s.
It needs a fuel tank to calculate from, as fuel densities vary by tank.
# File lib/kerbaldyn/part/liquid_fuel_engine.rb, line 46 def fuel_consumption(tank) return self.mass_flow_rate / tank.fuel_density end
gimbal_range()
click to toggle source
# File lib/kerbaldyn/part/liquid_fuel_engine.rb, line 63 def gimbal_range return self['gimbal_range'].to_s end
heat_production()
click to toggle source
# File lib/kerbaldyn/part/liquid_fuel_engine.rb, line 24 def heat_production return self['heatProduction'].to_f end
isp()
click to toggle source
# File lib/kerbaldyn/part/liquid_fuel_engine.rb, line 16 def isp return self['Isp'].to_f end
mass_flow_rate()
click to toggle source
Calculated mass fuel flow.
To calculate the fuel flow in liters, one must multiply by 1000.0 and divide by the fuel tank density
# File lib/kerbaldyn/part/liquid_fuel_engine.rb, line 32 def mass_flow_rate return self.max_thrust / (self.isp * IspSurfaceGravity) end
max_thrust()
click to toggle source
# File lib/kerbaldyn/part/liquid_fuel_engine.rb, line 7 def max_thrust return self['maxThrust'].to_f end
Also aliased as: thrust
min_thrust()
click to toggle source
# File lib/kerbaldyn/part/liquid_fuel_engine.rb, line 12 def min_thrust return self['minThrust'].to_f end
thrust_vectored?()
click to toggle source
# File lib/kerbaldyn/part/liquid_fuel_engine.rb, line 59 def thrust_vectored? return self['thrustVectoringCapable'].to_s.downcase == 'true' end
vac_fuel_consumption(tank)
click to toggle source
This is the volume-wise fuel flow. Multiply by 1000.0 to get liters/s instead of m^3/s.
It needs a fuel tank to calculate from, as fuel densities vary by tank.
# File lib/kerbaldyn/part/liquid_fuel_engine.rb, line 55 def vac_fuel_consumption(tank) return self.vac_mass_flow_rate / tank.fuel_density end
vac_isp()
click to toggle source
# File lib/kerbaldyn/part/liquid_fuel_engine.rb, line 20 def vac_isp return self['vacIsp'].to_f end
vac_mass_flow_rate()
click to toggle source
Calculated mass fuel flow.
# File lib/kerbaldyn/part/liquid_fuel_engine.rb, line 37 def vac_mass_flow_rate return self.max_thrust / (self.vac_isp * IspSurfaceGravity) end