Skip to content

Commit

Permalink
Added dynamic pressure
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanKell committed Jun 10, 2015
1 parent 0156c83 commit 0421a57
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Binary file modified GameData/SolverEngines/Plugins/ModuleAnimateEmissive.dll
Binary file not shown.
Binary file modified GameData/SolverEngines/Plugins/SolverEngines.dll
Binary file not shown.
9 changes: 4 additions & 5 deletions SolverEngines/EngineSolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace SolverEngines
public class EngineSolver
{
//freestream flight conditions; static pressure, static temperature, static density, and mach number
public double alt, p0, t0, eair0, vel, M0 = 0, rho, mach;
public double alt, p0, t0, eair0, vel, M0 = 0, rho, mach, Q;
public bool oxygen = false;

//total conditions behind inlet
Expand Down Expand Up @@ -56,6 +56,7 @@ virtual public void SetFreestreamAndInlet(EngineThermodynamics ambientTherm, Eng
oxygen = hasOxygen;
vel = velocity;
mach = inMach;
Q = 0.5d * rho * vel * vel;

P1 = inletTherm.P;
T1 = inletTherm.T;
Expand All @@ -68,10 +69,8 @@ virtual public void SetFreestreamAndInlet(EngineThermodynamics ambientTherm, Eng
Cv_c = inletTherm.Cv;
R_c = inletTherm.R;


M0 = vel / Math.Sqrt(gamma_c * R_c * t0);

eair0 = Math.Sqrt(gamma_c / R_c / t0);
eair0 = Math.Sqrt(gamma_c / (R_c * t0));
M0 = vel / eair0;
}

/// <summary>
Expand Down

0 comments on commit 0421a57

Please sign in to comment.