pub struct MechanicalAnalyzer { /* private fields */ }Expand description
Mechanical analyzer for mechanical engineering analysis
Implementations§
Source§impl MechanicalAnalyzer
impl MechanicalAnalyzer
Sourcepub fn attach_physics_simulation(
&mut self,
lib: Option<Arc<Mutex<PhysicsSimulationLibrary>>>,
)
pub fn attach_physics_simulation( &mut self, lib: Option<Arc<Mutex<PhysicsSimulationLibrary>>>, )
Attach the Phase 2 physics-simulation library for coupled dynamics.
Sourcepub fn initialize(&mut self) -> Result<(), EngineeringError>
pub fn initialize(&mut self) -> Result<(), EngineeringError>
Initialize MechanicalAnalyzer; Ok when ready.
Sourcepub fn validate_model(
&self,
model: &EngineeringModel,
) -> Result<(), EngineeringError>
pub fn validate_model( &self, model: &EngineeringModel, ) -> Result<(), EngineeringError>
Structural validation: rejects models with no dimensions.
Sourcepub fn analyze(
&mut self,
model: &EngineeringModel,
analysis_type: AnalysisType,
) -> Result<AnalysisResults, EngineeringError>
pub fn analyze( &mut self, model: &EngineeringModel, analysis_type: AnalysisType, ) -> Result<AnalysisResults, EngineeringError>
Performs mechanical/structural analysis across the model.
Delegates to StructuralAnalyzer::analyze which executes real first-principles
strength-of-materials and finite-element solves (LinearStatic, Buckling,
NonlinearStatic, LinearDynamic, NonlinearDynamic).
Sourcepub fn fem_static(
&self,
model: &FeModel,
) -> Result<FeStaticResult, EngineeringError>
pub fn fem_static( &self, model: &FeModel, ) -> Result<FeStaticResult, EngineeringError>
Real finite-element linear-static solve of an explicit fem::FeModel.
Sourcepub fn analyze_kinematics(
&mut self,
initial_position: f64,
initial_velocity: f64,
acceleration: f64,
time_steps: &[f64],
) -> Result<KinematicsResults, EngineeringError>
pub fn analyze_kinematics( &mut self, initial_position: f64, initial_velocity: f64, acceleration: f64, time_steps: &[f64], ) -> Result<KinematicsResults, EngineeringError>
Basic kinematic time-history analysis with constant acceleration.
For each time step t:
- position(t) = x₀ + v₀·t + ½·a·t²
- velocity(t) = v₀ + a·t
- acceleration(t) = a (constant)
Sourcepub fn analyze_dynamics(
&mut self,
mass: f64,
force: f64,
initial_velocity: f64,
time_steps: &[f64],
) -> Result<DynamicsResults, EngineeringError>
pub fn analyze_dynamics( &mut self, mass: f64, force: f64, initial_velocity: f64, time_steps: &[f64], ) -> Result<DynamicsResults, EngineeringError>
Dynamics time-history analysis from Newton’s second law (F = m·a).
- acceleration a = force / mass (constant)
- velocity(t) = v₀ + a·t
- position(t) = ½·a·t² + v₀·t
Energy is reported in the constant-applied-force potential convention
(PE = −F·x) so that the total mechanical energy KE + PE = ½·m·v₀² is
conserved across the whole history (verifiable in tests).
Auto Trait Implementations§
impl Freeze for MechanicalAnalyzer
impl RefUnwindSafe for MechanicalAnalyzer
impl Send for MechanicalAnalyzer
impl Sync for MechanicalAnalyzer
impl Unpin for MechanicalAnalyzer
impl UnsafeUnpin for MechanicalAnalyzer
impl UnwindSafe for MechanicalAnalyzer
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 more