Skip to content

Commit

Permalink
Merge pull request #111 from Starwaster/master
Browse files Browse the repository at this point in the history
Compensated for PhysicsGlobals.ConductionFactor
  • Loading branch information
Starwaster committed Oct 24, 2015
2 parents bc56fb4 + 160a002 commit ab6ab19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/Tanks/ModuleFuelTanks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ private IEnumerator CalculateTankLossFunction (float deltaTime)
//Equation: (0.2/ 0.1/205 + 0.1/0.02)
double q = deltaTemp / ((tank.wallThickness / (tank.wallConduction * area)) + (tank.insulationThickness / (tank.insulationConduction * area)));
q *= 0.001d; // convert to kilowatts
q /= PhysicsGlobals.ConductionFactor; // Turns out we have to compensate for this after all
massLost = q / tank.vsp;
#if DEBUG
// Only do debugging displays if compiled for debugging.
Expand Down Expand Up @@ -416,7 +417,8 @@ private IEnumerator CalculateTankLossFunction (float deltaTime)
fluxLost *= part.thermalMass / (part.thermalMass - part.resourceThermalMass); // Remove extra flux to nullify resource thermal mass

// subtract heat from boiloff
// Nullified conduction factors. <-(removed that; will look at adding it back in if necessary)
// Reduced incoming flux by conductionFactor. Compensate again here or we won't cool down the tank enough.
fluxLost *= PhysicsGlobals.ConductionFactor;
part.AddThermalFlux(fluxLost * tank.vsp * deltaTimeRecip);
}
else if (tank.loss_rate > 0 && tank.amount > 0)
Expand Down

0 comments on commit ab6ab19

Please sign in to comment.