pub struct Pressure<M>{ /* private fields */ }Expand description
Mirror segments surface pressure
Analyze segments surface wind pressure from pressure files either M1p_M1p_*.csv.bz2 or M2p_M2p_*.csv.bz2 for M1 or M2, respectively.
Implementations§
Source§impl<M> Pressure<M>
impl<M> Pressure<M>
Sourcepub fn load(csv_pressure: String) -> Result<Self, PressureError>
pub fn load(csv_pressure: String) -> Result<Self, PressureError>
Loads the pressure data
pub fn decompress(path: PathBuf) -> Result<String, PressureError>
Sourcepub fn load_pressure(contents: String) -> Result<Self, PressureError>
pub fn load_pressure(contents: String) -> Result<Self, PressureError>
Loads the pressure from a csv bz2-compressed file
Sourcepub fn load_geometry(contents: String) -> Result<Self, PressureError>
pub fn load_geometry(contents: String) -> Result<Self, PressureError>
Loads the areas and coordinates vector from a csv file
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn x_iter(&self) -> impl Iterator<Item = f64> + '_
Sourcepub fn xy_iter(&self) -> impl Iterator<Item = (f64, f64)> + '_
pub fn xy_iter(&self) -> impl Iterator<Item = (f64, f64)> + '_
Iterator over the (x,y) coordinates
Sourcepub fn segment_xy(&self, sid: usize) -> impl Iterator<Item = (f64, f64)> + '_
pub fn segment_xy(&self, sid: usize) -> impl Iterator<Item = (f64, f64)> + '_
Iterator over the (x,y) coordinates of a given segment
Sourcepub fn segment_pa(&self, sid: usize) -> impl Iterator<Item = (f64, f64)> + '_
pub fn segment_pa(&self, sid: usize) -> impl Iterator<Item = (f64, f64)> + '_
Iterator over the pressure and areas of a given segment
Sourcepub fn to_local(&mut self, sid: usize) -> Result<&mut Self, PressureError>
pub fn to_local(&mut self, sid: usize) -> Result<&mut Self, PressureError>
Transforms the coordinates into the segment local coordinate system
Sourcepub fn from_local(&mut self, sid: usize) -> &mut Self
pub fn from_local(&mut self, sid: usize) -> &mut Self
Transforms the coordinates into the OSS
Sourcepub fn local_radial_filter(
&self,
sid: usize,
r_in: Option<f64>,
r_out: Option<f64>,
) -> impl Iterator<Item = bool> + '_
pub fn local_radial_filter( &self, sid: usize, r_in: Option<f64>, r_out: Option<f64>, ) -> impl Iterator<Item = bool> + '_
Filter that is apply locally to segment sid selecting samplea within the radii r_in<0> and r_out<exo_radius>
Sourcepub fn total_force(&self) -> f64
pub fn total_force(&self) -> f64
Returns the sum of the z forces of all the segments
Sourcepub fn pa_iter(&self) -> impl Iterator<Item = (&f64, &f64)>
pub fn pa_iter(&self) -> impl Iterator<Item = (&f64, &f64)>
Iterator over the pressures and areas
Sourcepub fn paijk_iter(&self) -> impl Iterator<Item = (&f64, &[f64; 3])>
pub fn paijk_iter(&self) -> impl Iterator<Item = (&f64, &[f64; 3])>
Iterator over the pressures and area vectors
Sourcepub fn p_aijk_xyz(&self) -> impl Iterator<Item = (&f64, &[f64; 3], &[f64; 3])>
pub fn p_aijk_xyz(&self) -> impl Iterator<Item = (&f64, &[f64; 3], &[f64; 3])>
Iterator over the pressures, area vectors and coordinates
Sourcepub fn segment_p_aijk_xyz(
&self,
sid: usize,
) -> impl Iterator<Item = (&f64, &[f64; 3], &[f64; 3])>
pub fn segment_p_aijk_xyz( &self, sid: usize, ) -> impl Iterator<Item = (&f64, &[f64; 3], &[f64; 3])>
Iterator over the pressures, area vectors and coordinates for the given segment
Sourcepub fn segment_area(&self, sid: usize) -> f64
pub fn segment_area(&self, sid: usize) -> f64
Return the area of a given segment
Sourcepub fn segments_area(&self) -> Vec<f64>
pub fn segments_area(&self) -> Vec<f64>
Return the area of each segment
Sourcepub fn mirror_area(&self) -> f64
pub fn mirror_area(&self) -> f64
Return the mirror area
Sourcepub fn forces(&mut self, sid: usize) -> Result<Vec<[f64; 3]>, PressureError>
pub fn forces(&mut self, sid: usize) -> Result<Vec<[f64; 3]>, PressureError>
Returns the vectors of forces of a given segment
Sourcepub fn average_pressure(&self, sid: usize) -> f64
pub fn average_pressure(&self, sid: usize) -> f64
Returns the average pressure over a given segment
Sourcepub fn asm_differential_pressure(&self, sid: usize) -> (f64, Vec<f64>)
pub fn asm_differential_pressure(&self, sid: usize) -> (f64, Vec<f64>)
Returns the average ASM different pressure over a given segment
Sourcepub fn pressure_var(&mut self, sid: usize) -> f64
pub fn pressure_var(&mut self, sid: usize) -> f64
Returns the pressure variance over a given segment
Sourcepub fn pressure_std(&mut self, sid: usize) -> f64
pub fn pressure_std(&mut self, sid: usize) -> f64
Returns the pressure standard deviation over a given segment
Sourcepub fn segments_average_pressure(&mut self) -> Vec<f64>
pub fn segments_average_pressure(&mut self) -> Vec<f64>
Returns the average pressure over each segment
Sourcepub fn segments_pressure_var(&mut self) -> Vec<f64>
pub fn segments_pressure_var(&mut self) -> Vec<f64>
Returns the pressure variance over each segment
Sourcepub fn segments_pressure_std(&mut self) -> Vec<f64>
pub fn segments_pressure_std(&mut self) -> Vec<f64>
Returns the pressure standard deviation over each segment
Sourcepub fn mirror_average_pressure(&mut self) -> f64
pub fn mirror_average_pressure(&mut self) -> f64
Returns the average mean pressure over all segment
Sourcepub fn mirror_average_pressure_var(&mut self) -> f64
pub fn mirror_average_pressure_var(&mut self) -> f64
Returns the average pressure variance over all segment
Sourcepub fn mirror_average_pressure_std(&mut self) -> f64
pub fn mirror_average_pressure_std(&mut self) -> f64
Returns the average pressure standart deviation over all segment
Sourcepub fn mirror_average_pressure_within(&self, radius: f64) -> f64
pub fn mirror_average_pressure_within(&self, radius: f64) -> f64
Returns the average mean pressure over all segment within the given radius
Sourcepub fn mirror_average_pressure_by(
&self,
select: impl Iterator<Item = bool>,
) -> f64
pub fn mirror_average_pressure_by( &self, select: impl Iterator<Item = bool>, ) -> f64
Returns the average mean pressure over all segment with data filtered with select
Sourcepub fn mirror_average_pressure_var_within(&self, radius: f64) -> f64
pub fn mirror_average_pressure_var_within(&self, radius: f64) -> f64
Returns the average pressure variance over all segment within the given radius
Sourcepub fn mirror_average_pressure_var_by(
&self,
p_mean: f64,
select: impl Iterator<Item = bool>,
) -> f64
pub fn mirror_average_pressure_var_by( &self, p_mean: f64, select: impl Iterator<Item = bool>, ) -> f64
Returns the average pressure variance over all segment with data filtered with select
Sourcepub fn center_of_pressure(
&mut self,
sid: usize,
) -> Result<[f64; 3], PressureError>
pub fn center_of_pressure( &mut self, sid: usize, ) -> Result<[f64; 3], PressureError>
Returns the center of pressure of a given segment
Sourcepub fn segment_force(&mut self, sid: usize) -> Result<[f64; 3], PressureError>
pub fn segment_force(&mut self, sid: usize) -> Result<[f64; 3], PressureError>
Returns the sum of the forces of a given segment
Sourcepub fn segment_pressure_integral(
&mut self,
sid: usize,
) -> Result<([f64; 3], ([f64; 3], [f64; 3])), PressureError>
pub fn segment_pressure_integral( &mut self, sid: usize, ) -> Result<([f64; 3], ([f64; 3], [f64; 3])), PressureError>
Returns the center of pressure and the force and moment applied at this location for a given segment
Sourcepub fn segments_force(&mut self) -> Result<[f64; 3], PressureError>
pub fn segments_force(&mut self) -> Result<[f64; 3], PressureError>
Returns the sum of the forces of all the segments
Sourcepub fn sum_vectors<'a>(
&'a mut self,
vec: impl Iterator<Item = &'a [f64; 3]>,
) -> [f64; 3]
pub fn sum_vectors<'a>( &'a mut self, vec: impl Iterator<Item = &'a [f64; 3]>, ) -> [f64; 3]
Returns the sum of the vectors in Iterator
Sourcepub fn pressure_map(&mut self, cfd_case_path: PathBuf)
pub fn pressure_map(&mut self, cfd_case_path: PathBuf)
Display the pressure map
Trait Implementations§
Auto Trait Implementations§
impl<M> Freeze for Pressure<M>
impl<M> RefUnwindSafe for Pressure<M>where
M: RefUnwindSafe,
impl<M> Send for Pressure<M>where
M: Send,
impl<M> Sync for Pressure<M>where
M: Sync,
impl<M> Unpin for Pressure<M>where
M: Unpin,
impl<M> UnsafeUnpin for Pressure<M>
impl<M> UnwindSafe for Pressure<M>where
M: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.