pub struct CoordinateTransform<S: Scalar> {
pub s: S,
}Expand description
Coordinate transformation for moving boundary problems.
Maps physical domain [0, s(t)] to fixed computational domain [0, 1]. This avoids remeshing as the boundary moves.
Fields§
§s: SCurrent boundary position
Implementations§
Source§impl<S: Scalar> CoordinateTransform<S>
impl<S: Scalar> CoordinateTransform<S>
Sourcepub fn physical_to_computational(&self, x: S) -> S
pub fn physical_to_computational(&self, x: S) -> S
Transform physical coordinate x to computational ξ. ξ = x / s(t)
Sourcepub fn computational_to_physical(&self, xi: S) -> S
pub fn computational_to_physical(&self, xi: S) -> S
Transform computational coordinate ξ to physical x. x = ξ * s(t)
Sourcepub fn transform_d1(&self, du_dxi: S) -> S
pub fn transform_d1(&self, du_dxi: S) -> S
Transform first derivative: ∂u/∂x = (1/s) ∂u/∂ξ
Sourcepub fn transform_d2(&self, d2u_dxi2: S) -> S
pub fn transform_d2(&self, d2u_dxi2: S) -> S
Transform second derivative: ∂²u/∂x² = (1/s²) ∂²u/∂ξ²
Sourcepub fn convection_coefficient(&self, dsdt: S, xi: S) -> S
pub fn convection_coefficient(&self, dsdt: S, xi: S) -> S
Additional convective term from moving boundary.
When using transformed coordinates, the heat equation becomes: ∂u/∂t = α/s² ∂²u/∂ξ² + (ds/dt * ξ / s) ∂u/∂ξ
This returns the coefficient for the convective term.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for CoordinateTransform<S>where
S: Freeze,
impl<S> RefUnwindSafe for CoordinateTransform<S>where
S: RefUnwindSafe,
impl<S> Send for CoordinateTransform<S>
impl<S> Sync for CoordinateTransform<S>
impl<S> Unpin for CoordinateTransform<S>where
S: Unpin,
impl<S> UnsafeUnpin for CoordinateTransform<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for CoordinateTransform<S>where
S: UnwindSafe,
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<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>
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 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>
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