Problems

Fluid

ImmersedBodies.gridstepFunction
gridstep(::CartesianGrid)

The spacing between grid vertices.

source
gridstep(::MultiDomainGrid, level=1)

Grid step on the levelth multi domain level.

source
ImmersedBodies.gridsizeFunction
gridsize(grid::CartesianGrid, pts::GridPoints=GridVertices())

Returns the dimensions of an array of points on the grid.

source
gridsize(grid::MultiDomainGrid, pts::GridPoints=GridVertices(), levels=:)

The dimensions of the multi domain grid.

source
ImmersedBodies.extentsFunction
extents(::CartesianGrid) -> ((xmin, xmax), (ymin, ymax))

Minimum and maximum coordinates of the grid.

source
ImmersedBodies.coordsFunction
coords(grid::CartesianGrid, pts::GridPoints=GridVertices())

Returns a tuple of ranges (x, y) such that (x[i], y[j]) is the coordinate of the point at index (i, j).

source
coords(grid::MultiDomainGrid, pts::GridPoints=GridVertices(), levels=:)

Return the coordinates of each CartesianGrid subdomain in levels.

source
coords(grid, func, ...)

Coordinates of the quantity func on grid. func can be one of the following (or the in-place ! versions):

source
ImmersedBodies.fluid_gridFunction
fluid_grid(; [h], xlims, ylims, nlevel)

A cartesian grid with step h, limits xlims and ylims, and nlevel total grids that expand outward. Each grid has the same center point, and grid step h * 2 ^ (level - 1) for level in 1:nlevel. If h is included, return a MultiDomainGrid. Otherwise, return a MultiDomainExtents and the grid step will be automatically computed when passed to Fluid.

source
ImmersedBodies.GridVelocityType
GridVelocity(; center, vel, angle, angular_vel)

The current motion and orientation of the grid relative to the global frame.

Keywords

  • center: The center of rotation.
  • vel: The grid's velocity in the global frame at the center of rotation.
  • angle: The grid's orientation relative to the global frame in radians.
  • angular_vel: The time rate of change of angle.
source
ImmersedBodies.FluidType
Fluid(; grid, Re, freestream_vel, [grid_motion])

Keywords

  • grid::Union{MultiDomainGrid,MultiDomainExtents}: The discretization of the fluid. See fluid_grid.
  • Re: Reynolds number.
  • freestream_vel(t) -> (vx, vy): Freestream velocity as a function of time.
  • grid_motion::GridMotion: Whether the grid is moving relative to the global frame.
source

Bodies

ImmersedBodies.PanelsType
Panels(x::AbstractMatrix, ds::AbstractVector)

The positions xb and lengths ds of panels that influence the fluid. xb has shape (n, 2) and ds has length n.

source
ImmersedBodies.PanelStateType
PanelState(; xb::AbstractMatrix, ds::AbstractVector, ub::AbstractMatrix)

The positions xb, lengths ds, and velocities ub of panels that influence the fluid. xb and ub have shape (n, 2) and ds has length n.

source
ImmersedBodies.BodiesType
Bodies(; bodies::AbstractBody...)

A group of bodies. Keyword arguments specify bodies by their name.

source
ImmersedBodies.panel_rangeFunction
panel_range(bodies::Bodies, body::Symbol)
panel_range(section::PanelSection)

The index range in the panels of the given body.

source
ImmersedBodies.RigidBodyTransformType
RigidBodyTransform(pos, vel, angle, angular_vel)
RigidBodyTransform(; pos, vel, angle, angular_vel)

The transformation of a rigid body at a point in time. Relative to the global frame, the rigid body is at position (x, y) = pos, traveling at velocity (vx, vy) = vel, oriented at angle angle, and rotating at rate angular_vel.

source
ImmersedBodies.MovingRigidBodyType
MovingRigidBody(motion, panels::Panels) :: PresetBody

A non-deforming body with displacement and rotation over time. With zero displacement and zero angle, the body is at panels. motion(t) is the RigidBodyTransform of the body at time t.

source

Time-stepping Scheme

ImmersedBodies.default_schemeFunction
default_scheme([T,] grid; Umax, [cfl])

A default AbstractScheme to hit a target cfl number.

Arguments

  • T::Type{<:AbstractScheme}: The type of scheme to return.
  • grid::Union{CartesianGrid,MultiDomainGrid}: The discretization of the fluid.
  • Umax: The maximum fluid velocity relative to the discretization.
  • cfl: Target CFL number.
source
ImmersedBodies.CNABType
CNAB(; dt, n=2)

An n-step Crank-Nicolson/Adams-Bashforth timestepping scheme with time step dt.

source

Problem

ImmersedBodies.ProblemType
Problem(; fluid::Fluid, bodies::Bodies, scheme::AbstractScheme)
Problem(fluid::Fluid, bodies::Bodies, scheme::AbstractScheme)

A description of the immersed boundary problem to solve.

source

State

ImmersedBodies.StateType
State(prob::Problem; t0=0.0)

The state of the prob system at a certain time step. t0 specifies the time at state.index == 1.

source
ImmersedBodies.boundary_posFunction
boundary_pos(state)
boundary_pos(state, inds)
boundary_pos(state, body::Symbol)

Return the positions of each panel point. In the first form, return all of the points. In the second form, return the points at indices inds. In the last form, return the points for the body named body.

source