pub struct PhaseChangeModel {
pub t_liquidus: f64,
pub t_solidus: f64,
pub latent_heat: f64,
pub cp_solid: f64,
pub cp_liquid: f64,
pub density: f64,
}Expand description
Phase change (melting/solidification) model with latent heat.
Implements the enthalpy method for solving phase change problems. The apparent heat capacity is increased in the mushy zone to account for the latent heat release/absorption.
Fields§
§t_liquidus: f64Liquidus temperature (melting point or end of mushy zone) [K].
t_solidus: f64Solidus temperature (start of mushy zone) [K].
latent_heat: f64Latent heat of fusion L [J/kg].
cp_solid: f64Solid-phase specific heat [J/(kg·K)].
cp_liquid: f64Liquid-phase specific heat [J/(kg·K)].
density: f64Material density [kg/m³].
Implementations§
Source§impl PhaseChangeModel
impl PhaseChangeModel
Sourcepub fn new(
t_solidus: f64,
t_liquidus: f64,
latent_heat: f64,
cp_solid: f64,
cp_liquid: f64,
density: f64,
) -> Self
pub fn new( t_solidus: f64, t_liquidus: f64, latent_heat: f64, cp_solid: f64, cp_liquid: f64, density: f64, ) -> Self
Create a new phase change model.
Sourcepub fn liquid_fraction(&self, temp: f64) -> f64
pub fn liquid_fraction(&self, temp: f64) -> f64
Liquid fraction at temperature T (linear in mushy zone).
Sourcepub fn apparent_specific_heat(&self, temp: f64) -> f64
pub fn apparent_specific_heat(&self, temp: f64) -> f64
Apparent (effective) specific heat in the enthalpy method [J/(kg·K)].
In the mushy zone, cp_eff = cp + L/(T_liq - T_sol).
Auto Trait Implementations§
impl Freeze for PhaseChangeModel
impl RefUnwindSafe for PhaseChangeModel
impl Send for PhaseChangeModel
impl Sync for PhaseChangeModel
impl Unpin for PhaseChangeModel
impl UnsafeUnpin for PhaseChangeModel
impl UnwindSafe for PhaseChangeModel
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