pub struct SiMP {
pub penalty: f64,
pub material: MaterialParams,
pub volume_fraction: f64,
pub filter_radius: f64,
pub grid: GridSize,
pub density: Vec<f64>,
}Expand description
Solid Isotropic Material with Penalization (SIMP) model.
SIMP interpolates material stiffness as E(ρ) = E_void + ρ^p * (E_solid - E_void).
The penalization parameter p discourages intermediate densities.
Fields§
§penalty: f64Penalization exponent.
material: MaterialParamsMaterial parameters.
volume_fraction: f64Volume fraction target.
filter_radius: f64Filter radius for density filtering.
grid: GridSizeGrid size.
density: Vec<f64>Current density field (length = grid.n_elem()).
Implementations§
Source§impl SiMP
impl SiMP
Sourcepub fn new(
grid: GridSize,
volume_fraction: f64,
penalty: f64,
filter_radius: f64,
material: MaterialParams,
) -> Self
pub fn new( grid: GridSize, volume_fraction: f64, penalty: f64, filter_radius: f64, material: MaterialParams, ) -> Self
Creates a new SIMP model with uniform initial density equal to volume_fraction.
Sourcepub fn interpolated_stiffness(&self, rho: f64) -> f64
pub fn interpolated_stiffness(&self, rho: f64) -> f64
Computes the interpolated Young’s modulus for a given density.
E(ρ) = E_void + ρ^p * (E_solid - E_void)
Sourcepub fn stiffness_sensitivity(&self, rho: f64) -> f64
pub fn stiffness_sensitivity(&self, rho: f64) -> f64
Computes the derivative of interpolated stiffness with respect to density.
dE/dρ = p * ρ^(p-1) * (E_solid - E_void)
Sourcepub fn stiffness_field(&self) -> Vec<f64>
pub fn stiffness_field(&self) -> Vec<f64>
Returns vector of interpolated stiffnesses for current density field.
Sourcepub fn sensitivity_field(&self) -> Vec<f64>
pub fn sensitivity_field(&self) -> Vec<f64>
Returns sensitivities dE/dρ for current density field.
Sourcepub fn compliance_sensitivity(&self, element_strain_energy: &[f64]) -> Vec<f64>
pub fn compliance_sensitivity(&self, element_strain_energy: &[f64]) -> Vec<f64>
Computes element-wise compliance sensitivity given element displacements.
dc/dρ_e = -p * ρ_e^(p-1) * (E_solid - E_void) * u_e^T * K_e_unit * u_e
Sourcepub fn current_volume(&self) -> f64
pub fn current_volume(&self) -> f64
Computes current volume fraction.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SiMP
impl RefUnwindSafe for SiMP
impl Send for SiMP
impl Sync for SiMP
impl Unpin for SiMP
impl UnsafeUnpin for SiMP
impl UnwindSafe for SiMP
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> 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>
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.