aboutsummaryrefslogtreecommitdiffstats
path: root/engine.c
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-03-02 14:40:09 -0500
committerSam Anthony <sam@samanthony.xyz>2025-03-02 14:40:09 -0500
commit640d079ba6256121c45522e9a5fc0eef8725ff8c (patch)
treefdc77c9e93d103ed928893364b002c2c9c9d34a2 /engine.c
parent9e6a82e0bfe9cf0a884dc110293f497aa21bdb6d (diff)
downloadvolute-640d079ba6256121c45522e9a5fc0eef8725ff8c.zip
calculate mass flow rate at standard conditions
Diffstat (limited to 'engine.c')
-rw-r--r--engine.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/engine.c b/engine.c
index d0a1b38..3e0a792 100644
--- a/engine.c
+++ b/engine.c
@@ -116,3 +116,16 @@ mass_flow_rate(const Engine *e) {
t = e->ambient_temperature;
return (p * v) / (R_AIR * t);
}
+
+/* Mass flow rate through the engine (corrected to standard conditions). */
+MassFlowRate
+mass_flow_rate_corrected(const Engine *e) {
+ Pressure p;
+ Temperature t;
+ VolumeFlowRate v;
+
+ p = STANDARD_PRESSURE;
+ t = STANDARD_TEMPERATURE;
+ v = volume_flow_rate(e);
+ return (p * v) / (R_AIR * t);
+}