aboutsummaryrefslogtreecommitdiffstats
path: root/engine.c
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-03-01 21:15:44 -0500
committerSam Anthony <sam@samanthony.xyz>2025-03-01 21:15:44 -0500
commit5b0892ea37fa5ea7875ee59c36b456daf5c07778 (patch)
tree7bd816f665352befec1b59c1e0c75b8600d56bb9 /engine.c
parent7a3532a160824909863977066193559261efb500 (diff)
downloadvolute-5b0892ea37fa5ea7875ee59c36b456daf5c07778.zip
factor compressor efficiency into outlet temperature
Diffstat (limited to 'engine.c')
-rw-r--r--engine.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/engine.c b/engine.c
index f5d8917..11849a3 100644
--- a/engine.c
+++ b/engine.c
@@ -46,11 +46,13 @@ Temperature
comp_outlet_temperature(const Engine *e) {
Temperature t1;
Pressure p1, p2;
+ double exp;
t1 = e->ambient_temperature;
p1 = e->ambient_pressure;
p2 = comp_outlet_pressure(e);
- return t1 * pow(p2/p1, (GAMMA_AIR-1.0)/GAMMA_AIR);
+ exp = (GAMMA_AIR - 1.0) / GAMMA_AIR;
+ return t1 * pow(p2/p1, exp) / e->comp_efficiency;
}
Temperature