pub struct BarElement1D {
pub e: f64,
pub a: f64,
pub length: f64,
pub nodes: [usize; 2],
}Expand description
A 1D two-node bar element with constant cross-section.
Fields§
§e: f64Young’s modulus (Pa)
a: f64Cross-sectional area (m²)
length: f64Element length (m)
nodes: [usize; 2]Global node indices [node_i, node_j]
Implementations§
Source§impl BarElement1D
impl BarElement1D
Sourcepub fn new(e: f64, a: f64, length: f64, node_i: usize, node_j: usize) -> Self
pub fn new(e: f64, a: f64, length: f64, node_i: usize, node_j: usize) -> Self
Create a new 1D bar element.
Sourcepub fn local_stiffness_matrix(&self) -> [[f64; 2]; 2]
pub fn local_stiffness_matrix(&self) -> [[f64; 2]; 2]
Local 2×2 element stiffness matrix.
Sourcepub fn axial_stress(&self, u_i: f64, u_j: f64) -> f64
pub fn axial_stress(&self, u_i: f64, u_j: f64) -> f64
Axial stress in the element given nodal displacements.
Sourcepub fn axial_force(&self, u_i: f64, u_j: f64) -> f64
pub fn axial_force(&self, u_i: f64, u_j: f64) -> f64
Axial force in the element.
Sourcepub fn strain_energy(&self, u_i: f64, u_j: f64) -> f64
pub fn strain_energy(&self, u_i: f64, u_j: f64) -> f64
Strain energy in the element.
Trait Implementations§
Source§impl Clone for BarElement1D
impl Clone for BarElement1D
Source§fn clone(&self) -> BarElement1D
fn clone(&self) -> BarElement1D
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BarElement1D
impl Debug for BarElement1D
Source§impl<'de> Deserialize<'de> for BarElement1D
impl<'de> Deserialize<'de> for BarElement1D
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BarElement1D
impl RefUnwindSafe for BarElement1D
impl Send for BarElement1D
impl Sync for BarElement1D
impl Unpin for BarElement1D
impl UnsafeUnpin for BarElement1D
impl UnwindSafe for BarElement1D
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.