diff options
| author | sam-anthony <samanthony6@protonmail.com> | 2022-01-26 06:37:29 -0330 |
|---|---|---|
| committer | sam-anthony <samanthony6@protonmail.com> | 2022-01-26 06:37:29 -0330 |
| commit | b45ddda0fda44ffb5e4ffbfe94b4d293b06d883e (patch) | |
| tree | b0167611d285da4302b575ae35f93ee4902eb3dd /src/flow_rate.rs | |
| parent | eb55242f08fcd4a9a3fdcc8de1110999614c8813 (diff) | |
| download | volute-b45ddda0fda44ffb5e4ffbfe94b4d293b06d883e.zip | |
basic input handling
Diffstat (limited to 'src/flow_rate.rs')
| -rw-r--r-- | src/flow_rate.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/flow_rate.rs b/src/flow_rate.rs deleted file mode 100644 index f8e15e0..0000000 --- a/src/flow_rate.rs +++ /dev/null @@ -1,32 +0,0 @@ -use crate::{mass::Mass, volume::Volume}; -use std::time::Duration; - -pub struct MassFlowRate { - pub mass: Mass, - pub duration: Duration, -} - -impl MassFlowRate { - pub fn as_kilograms_per_minute(&self) -> f64 { - self.mass.as_kilograms() / (self.duration.as_secs() as f64 / 60.) - } - - pub fn as_pounds_per_minute(&self) -> f64 { - self.mass.as_pounds() / (self.duration.as_secs() as f64 / 60.) - } -} - -pub struct VolumetricFlowRate { - pub volume: Volume, - pub duration: Duration, -} - -impl VolumetricFlowRate { - pub fn as_cubic_metres_per_second(&self) -> f64 { - self.volume.as_cubic_metres() / self.duration.as_secs() as f64 - } - - pub fn as_cubic_feet_per_minute(&self) -> f64 { - self.volume.as_cubic_feet() / (self.duration.as_secs() as f64 / 60.) - } -} |