CurrentLoop reports the current *per cross-section* (i.e. the actual current)
This commit is contained in:
@@ -250,6 +250,10 @@ impl Torus {
|
||||
pub fn axis(&self) -> Meters {
|
||||
self.normal
|
||||
}
|
||||
pub fn cross_section(&self) -> Flt {
|
||||
use crate::consts::PI;
|
||||
(self.minor_rad * self.minor_rad * PI).into()
|
||||
}
|
||||
}
|
||||
|
||||
#[typetag::serde]
|
||||
|
@@ -135,7 +135,9 @@ impl AbstractMeasurement for CurrentLoop {
|
||||
CurrentSample(1, directed_current, current)
|
||||
});
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user