Immersa.AbstractPrescribedBody — Type
AbstractPrescribedBody <: AbstractBodyAbstract supertype for all bodies whose motion is fully prescribed (not coupled).
Subtypes include AbstractStaticBody (zero motion) and AbstractMovingBody (time-dependent prescribed motion).
Immersa.AbstractStaticBody — Type
AbstractStaticBody <: AbstractPrescribedBodyAbstract supertype for bodies with zero motion. Concrete subtypes: NothingBody, StaticBody.
Immersa.AbstractMovingBody — Type
AbstractMovingBody <: AbstractPrescribedBodyAbstract supertype for bodies with prescribed time-dependent motion. Concrete subtype: MovingBody.
Immersa.NothingBody — Type
NothingBody{}The NothingBody struct defines a trivial, empty static body used as a placeholder when no physical body is present.
Related functions
Functions associated with NothingBody perform no operations:
point_count(::NothingBody): returns 0 (no points).init_body_points!(::BodyPoints, ::NothingBody): does nothing.update_body_points!(::BodyPoints, ::NothingBody, i, t): does nothing.
Immersa.StaticBody — Type
StaticBody{N,T,S<:AbstractVector{T},A<:AbstractVector{SVector{N,T}},U}A real, immobile body defined by fixed positions and spacings, with an optional velocity callback for actuated surfaces.
Fields
x::A: Vector of positions (SVector{N,T}) in N-dimensional space.ds::S: Vector of weights or spacings associated with points.u::U: Velocity callback(u, i, t) -> nothing, called at each step. Defaults to a no-op.
Type parameters
N: Spatial dimension.T: Scalar type (e.g.,Float64).S: Type of vector fords.A: Type of vector forx.U: Type of the velocity callback.
Constructor
StaticBody(x, ds)
StaticBody(x, ds, u)When u is omitted, a no-op callback is used.
Related functions
point_count(body): Returns the number of points on the body.init_body_points!(points, body): InitialisesBodyPointswith the static body's positions, zero velocities, and spacings.update_body_points!(points, body, i, t): No-op; static bodies do not move.
Immersa.PoseTwist2D — Type
PoseTwist2D{T}Describes a 2-D rigid-body pose (position + orientation) and its time derivative (translational and angular velocity).
Fields
c::SVector{2,T}: Centre-of-mass translation.θ::T: Rotation angle.ċ::SVector{2,T}: Translational velocity.θ̇::T: Angular velocity.
Immersa.MovingBody — Type
MovingBody{N,T,S,A,F} <: AbstractMovingBodyA body with prescribed time-dependent motion defined by a user-supplied callback.
Fields
x_ref::A: Reference (initial) positions (Vector{SVector{N,T}}).ds::S: Weights or spacings associated with points.motion!::F: Callback(x, u, i, t) -> nothingthat overwrites positionsxand velocitiesuat stepiand timet.
Constructor
MovingBody(x_ref, ds, motion!)Related functions
point_count(body): Returns the number of points.init_body_points!(points, body): InitialisesBodyPointsfrom the reference shape with zero velocity.update_body_points!(points, body, i, t): Callsmotion!to update positions and velocities.
Immersa.init_body_points! — Function
init_body_points!(points::BodyPoints, body::StaticBody{N,T})Copy the static body's positions and spacings into points and set all velocities to zero.
init_body_points!(points::BodyPoints, body::MovingBody{N,T})Copy the reference positions and spacings into points and set all velocities to zero.
init_body_points!(points::BodyPoints, body::GroupedPrescribedBody)Initialise body points for each sub-body in the group.
Immersa.GroupedPrescribedBody — Type
GroupedPrescribedBody{T<:Tuple{Vararg{AbstractPrescribedBody}}}A composite body that groups multiple AbstractPrescribedBody instances into a single body interface. Operations iterate over all contained bodies.
Fields
bodies::T: Tuple of prescribed bodies.
Related functions
point_count(body): Returns the sum of point counts across all sub-bodies.init_body_points!(points, body): Initialises points for each sub-body.update_body_points!(points, body, i, t): Updates points for each sub-body.
Immersa.point_count — Function
point_count(body::StaticBody) -> IntReturn the number of immersed-boundary points on a StaticBody.
point_count(body::MovingBody) -> IntReturn the number of immersed-boundary points on a MovingBody.
point_count(body::GroupedPrescribedBody) -> IntReturn the total number of immersed-boundary points across all sub-bodies.
point_count(body::GeometricNonlinearBody) -> IntReturn the total number of immersed-boundary points (deforming + prescribed).
Immersa.update_body_points! — Function
update_body_points!(points::BodyPoints, body::MovingBody, i, t)Invoke the body's motion! callback to overwrite positions and velocities at step i and time t.
update_body_points!(::BodyPoints, ::StaticBody, i, t)No-op for static bodies — positions and velocities are unchanged.
update_body_points!(points::BodyPoints, body::GroupedPrescribedBody, i, t)Update body points for each sub-body in the group at step i and time t.