diff options
| author | sam-anthony <samanthony6@protonmail.com> | 2022-03-26 16:30:43 -0230 |
|---|---|---|
| committer | sam-anthony <samanthony6@protonmail.com> | 2022-03-26 16:30:43 -0230 |
| commit | 42f2f6419bbff03931654e52a885b0600eec9b9b (patch) | |
| tree | 97f089dd0132f9a13e22e3654fd8246c3254b3bb /main.go | |
| parent | 0c5d33fc817047ab2c2c9dd3ed6784c032755819 (diff) | |
| download | volute-42f2f6419bbff03931654e52a885b0600eec9b9b.zip | |
pressure ratio
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -54,6 +54,21 @@ var ( selectedPressureUnit = defaultPressureUnitIndex ) +var pressureRatio [numPoints]float32 + +func pressureRatioAt(point int) float32 { + u := pascal + m := manifoldPressure[point].asUnit(u) + a := atmosphericPressure().asUnit(u) + return m / a +} + +func init() { + for i := 0; i < numPoints; i++ { + pressureRatio[i] = pressureRatioAt(i) + } +} + func loop() { g.SingleWindow().Layout( engineDisplacementRow(), @@ -63,6 +78,7 @@ func loop() { volumetricEfficiencyRow(), intakeAirTemperatureRow(), manifoldPressureRow(), + pressureRatioRow(), ). Columns( g.TableColumn("Parameter"), |