Skip to main content

Pressure

Struct Pressure 

Source
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>

Source

pub fn load(csv_pressure: String) -> Result<Self, PressureError>

Loads the pressure data

Source

pub fn decompress(path: PathBuf) -> Result<String, PressureError>

Source

pub fn load_pressure(contents: String) -> Result<Self, PressureError>

Loads the pressure from a csv bz2-compressed file

Source

pub fn load_geometry(contents: String) -> Result<Self, PressureError>

Loads the areas and coordinates vector from a csv file

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn x_iter(&self) -> impl Iterator<Item = f64> + '_

Source

pub fn x_range(&self) -> (f64, f64)

Returns the range of the x cooordinate

Source

pub fn y_iter(&self) -> impl Iterator<Item = f64> + '_

Iterator over the y coordinate

Source

pub fn xy_iter(&self) -> impl Iterator<Item = (f64, f64)> + '_

Iterator over the (x,y) coordinates

Source

pub fn segment_xy(&self, sid: usize) -> impl Iterator<Item = (f64, f64)> + '_

Iterator over the (x,y) coordinates of a given segment

Source

pub fn segment_pa(&self, sid: usize) -> impl Iterator<Item = (f64, f64)> + '_

Iterator over the pressure and areas of a given segment

Source

pub fn y_range(&self) -> (f64, f64)

Returns the range of the y cooordinate

Source

pub fn z_iter(&self) -> impl Iterator<Item = f64> + '_

Iterator over the z coordinate

Source

pub fn z_range(&self) -> (f64, f64)

Returns the range of the z cooordinate

Source

pub fn to_local(&mut self, sid: usize) -> Result<&mut Self, PressureError>

Transforms the coordinates into the segment local coordinate system

Source

pub fn from_local(&mut self, sid: usize) -> &mut Self

Transforms the coordinates into the OSS

Source

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>

Source

pub fn total_force(&self) -> f64

Returns the sum of the z forces of all the segments

Source

pub fn pa_iter(&self) -> impl Iterator<Item = (&f64, &f64)>

Iterator over the pressures and areas

Source

pub fn paijk_iter(&self) -> impl Iterator<Item = (&f64, &[f64; 3])>

Iterator over the pressures and area vectors

Source

pub fn p_aijk_xyz(&self) -> impl Iterator<Item = (&f64, &[f64; 3], &[f64; 3])>

Iterator over the pressures, area vectors and coordinates

Source

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

Source

pub fn segment_area(&self, sid: usize) -> f64

Return the area of a given segment

Source

pub fn segments_area(&self) -> Vec<f64>

Return the area of each segment

Source

pub fn mirror_area(&self) -> f64

Return the mirror area

Source

pub fn forces(&mut self, sid: usize) -> Result<Vec<[f64; 3]>, PressureError>

Returns the vectors of forces of a given segment

Source

pub fn average_pressure(&self, sid: usize) -> f64

Returns the average pressure over a given segment

Source

pub fn asm_differential_pressure(&self, sid: usize) -> (f64, Vec<f64>)

Returns the average ASM different pressure over a given segment

Source

pub fn pressure_var(&mut self, sid: usize) -> f64

Returns the pressure variance over a given segment

Source

pub fn pressure_std(&mut self, sid: usize) -> f64

Returns the pressure standard deviation over a given segment

Source

pub fn segments_average_pressure(&mut self) -> Vec<f64>

Returns the average pressure over each segment

Source

pub fn segments_pressure_var(&mut self) -> Vec<f64>

Returns the pressure variance over each segment

Source

pub fn segments_pressure_std(&mut self) -> Vec<f64>

Returns the pressure standard deviation over each segment

Source

pub fn mirror_average_pressure(&mut self) -> f64

Returns the average mean pressure over all segment

Source

pub fn mirror_average_pressure_var(&mut self) -> f64

Returns the average pressure variance over all segment

Source

pub fn mirror_average_pressure_std(&mut self) -> f64

Returns the average pressure standart deviation over all segment

Source

pub fn mirror_average_pressure_within(&self, radius: f64) -> f64

Returns the average mean pressure over all segment within the given radius

Source

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

Source

pub fn mirror_average_pressure_var_within(&self, radius: f64) -> f64

Returns the average pressure variance over all segment within the given radius

Source

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

Source

pub fn center_of_pressure( &mut self, sid: usize, ) -> Result<[f64; 3], PressureError>

Returns the center of pressure of a given segment

Source

pub fn segment_force(&mut self, sid: usize) -> Result<[f64; 3], PressureError>

Returns the sum of the forces of a given segment

Source

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

Source

pub fn segments_force(&mut self) -> Result<[f64; 3], PressureError>

Returns the sum of the forces of all the segments

Source

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

Source

pub fn pressure_map(&mut self, cfd_case_path: PathBuf)

Display the pressure map

Trait Implementations§

Source§

impl<M> Default for Pressure<M>

Source§

fn default() -> Pressure<M>

Returns the “default value” for a type. Read more
Source§

impl MirrorProperties for Pressure<M1>

Source§

impl MirrorProperties for Pressure<M2>

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V