Skip to content

Commit

Permalink
Update solver to fix flow bug, add SFC
Browse files Browse the repository at this point in the history
Update readme too.
  • Loading branch information
NathanKell committed Jul 4, 2015
1 parent 0b61c80 commit 3244185
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions RealFuels/Readme_RF.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ AN OVERVIEW OF FUEL TYPES AND TANK TYPES AND TECH LEVELS/ENGINE TYPES AND UPGRAD

==========
Changelog:
v10.4.3
* Fix an NRE in ullage code in editor.
* Fix a bug with multFlow not being used correctly.

v10.4.2
* Repack to include correct KSPAPIExtensions

Expand Down
5 changes: 3 additions & 2 deletions Source/Engines/SolverRF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,16 @@ public override void CalculatePerformance(double airRatio, double commandedThrot
fxPower = (float)(fuelFlow / maxFlow * ispMult); // FX is proportional to fuel flow and Isp mult.
if (float.IsNaN(fxPower))
fxPower = 0f;

double exhaustVelocity = Isp * 9.80665d;

// apply fuel flow multiplier
double ffMult = fuelFlow * fuelFlowMult;
if (multFlow) // do we apply the flow multiplier to fuel flow or thrust?
fuelFlow = ffMult;
else
Isp *= fuelFlowMult;

double exhaustVelocity = Isp * 9.80665d;
SFC = 3600d / Isp;

thrust = ffMult * exhaustVelocity; // either way, thrust is base * mult * EV

Expand Down

0 comments on commit 3244185

Please sign in to comment.