diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-03-01 18:53:29 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-03-01 18:53:29 -0500 |
| commit | f7970f9b769369220ed3c607a27081b8ea93e409 (patch) | |
| tree | d36fd0f30ef43f6ca1976307fe189f6b1e18dacd /engine.c | |
| parent | 29a720e61568d6a9b215e804bb4ef999d9f7a7a5 (diff) | |
| download | volute-f7970f9b769369220ed3c607a27081b8ea93e409.zip | |
add pressure ratio output
Diffstat (limited to 'engine.c')
| -rw-r--r-- | engine.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -13,6 +13,21 @@ init_engine(Engine *e) { memset(e, 0, sizeof(*e)); } +/* Pressure ratio across the compressor. */ +double +pressure_ratio(const Engine *e) { + Pressure p1, p2; + + p1 = e->ambient_pressure; + p2 = comp_outlet_pressure(e); + return p2 / p1; +} + +Pressure +comp_outlet_pressure(const Engine *e) { + return e->map + e->intercooler_deltap; +} + VolumeFlowRate volume_flow_rate(const Engine *e) { double n = as_rpm(e->rpm); |