CurrentLoop reports the current *per cross-section* (i.e. the actual current)

This commit is contained in:
2020-12-07 09:29:49 -08:00
parent d353026bf9
commit bf3dba7f99
2 changed files with 7 additions and 1 deletions

View File

@@ -250,6 +250,10 @@ impl Torus {
pub fn axis(&self) -> Meters { pub fn axis(&self) -> Meters {
self.normal self.normal
} }
pub fn cross_section(&self) -> Flt {
use crate::consts::PI;
(self.minor_rad * self.minor_rad * PI).into()
}
} }
#[typetag::serde] #[typetag::serde]

View File

@@ -135,7 +135,9 @@ impl AbstractMeasurement for CurrentLoop {
CurrentSample(1, directed_current, current) CurrentSample(1, directed_current, current)
}); });
let mean_directed_current = directed_current / (volume as Flt); let mean_directed_current = directed_current / (volume as Flt);
format!("I({}): {:.2e}", self.name, mean_directed_current) let cross_section = self.region.cross_section() / (state.feature_size() * state.feature_size());
let cross_sectional_current = mean_directed_current * cross_section;
format!("I({}): {:.2e}", self.name, cross_sectional_current)
} }
} }