diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-03-02 11:45:26 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-03-02 11:45:26 -0500 |
| commit | cb8a07bdbcefd18752b66ddca2903606daab639b (patch) | |
| tree | cc5d985090891019b21bd3f3c1910d3cea2c4acb | |
| parent | 5d29835c54d41d5923a34f1f3808b21d48a7ad07 (diff) | |
| download | volute-cb8a07bdbcefd18752b66ddca2903606daab639b.zip | |
fix compressor outlet temperature calculation
| -rw-r--r-- | engine.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -44,7 +44,7 @@ pressure_ratio(const Engine *e) { Temperature comp_outlet_temperature(const Engine *e) { - Temperature t1; + Temperature t1, dt; Pressure p1, p2; double exp; @@ -52,7 +52,9 @@ comp_outlet_temperature(const Engine *e) { p1 = e->ambient_pressure; p2 = comp_outlet_pressure(e); exp = (GAMMA_AIR - 1.0) / GAMMA_AIR; - return t1 * pow(p2/p1, exp) / e->comp_efficiency; + dt = t1 * (pow(p2/p1, exp) - 1.0) / e->comp_efficiency; + + return t1 + dt; } Temperature |