Public Documentation

Documentation for GridPotentialFlow.jl's public interface.

See the Internals section of the manual for internal package docs covering all submodules.

Contents

Index

Public Interface

GridPotentialFlow.PotentialFlowBodyMethod
PotentialFlowBody(
    b::Body{N, C};
    U,
    Ω,
    Γ,
    edges,
    σ
) -> PotentialFlowBody

Constructs a potential flow body with shape b, linear velocity U, rotational velocity Ω, and initial circulation Γ. Edges that should be regularized can be specified in edges and their suction parameter ranges in σ, which defaults to zero for each regularized edge.

source
GridPotentialFlow.VortexType
mutable struct Vortex

Defines a point vortex with x-position x, y-position y, and strength Γ.

Fields

  • x::Float64: x: x-coordinate of the vortex position.

  • y::Float64: y: y-coordinate of the vortex position.

  • Γ::Float64: Γ: Strength of the vortex. Positive if counter-clockwise.

source
GridPotentialFlow.VortexModelType
mutable struct VortexModel{Nb, Ne, TS<:Union{Laplacian, GridPotentialFlow.AbstractPotentialFlowSystem}, TU<:Nodes, TE<:Edges, TF<:ScalarData, TX<:VectorData, ILS<:Union{Nothing, ILMSystem}}

Defines a grid-based vortex model with Nb bodies and Ne edges that are regularized. If isshedding is true, the strengths of the last Ne vortices in vortices can be computed in order to regularized the Ne edges.

Fields

  • g::PhysicalGrid: g: The grid on which the vortex model is defined.

  • bodies::Vector{PotentialFlowBody}: bodies: Bodies in the vortex model.

  • vortices::StructArrays.StructVector{Vortex}: vortices: Point vortices in the vortex model.

  • U∞::Tuple{Float64, Float64}: U∞: Uniform flow in the vortex model.

  • system::Union{Laplacian, GridPotentialFlow.AbstractPotentialFlowSystem}: system: Potential flow system that has to be solved with an AbstractPotentialFlowRHS and an AbstractPotentialFlowSolution to compute the potential flow that governs the vortex model.

  • ilsys::Union{Nothing, ILMSystem}

  • _nodedata::Nodes: Internal fields

  • _edgedata::Edges

  • _bodyvectordata::VectorData

  • _ψ::Nodes

  • _f::ScalarData

  • _w::Nodes

  • _ψb::ScalarData

Examples

(under construction)

source
GridPotentialFlow.VortexModelMethod
VortexModel(
    g::PhysicalGrid,
    bodies::Vector{PotentialFlowBody},
    vortices::StructArrays.StructVector{Vortex},
    U∞::Tuple{Float64, Float64}
) -> VortexModel{_A, _B, _C, Nodes{Dual, _A1, _B1, Float64, Matrix{Float64}}, _D, ScalarData{_A2, T, _B2}} where {_A, _B, _C<:Union{Laplacian, GridPotentialFlow.AbstractPotentialFlowSystem}, _A1, _B1, _D<:Edges, _A2, T<:Number, _B2<:(AbstractVector)}

Constructs a vortex model using the given function.

source
Base.lengthMethod
length(b::PotentialFlowBody) -> Any

Returns the number of surface points in the body b.

source
GridPotentialFlow.getrangeMethod
getrange(
    b::AbstractVector{PotentialFlowBody},
    i::Int64
) -> Any

Returns the subrange of indices in the global set of surface point data corresponding to body i in b.

source
GridPotentialFlow.impulseMethod
impulse(vm)

Computes the impulse associated with the current state vortices and bodies in the vortex model vm. Note that newly inserted vortices should have their strengths set prior to calling this function to be included in the impulse calculation.

source
GridPotentialFlow.impulseMethod
impulse(vm, wphysical, fphysical)

Computes the impulse associated with the vorticity wphysical, the bound vortex sheet strength fphysical, and the velocities of the discrete points of the bodies in vm.

source
GridPotentialFlow.impulseMethod
impulse(sol, vm)

Computes the impulse associated with the body motions in the vortex model vm and the vortex sheet strength in sol. Note that newly inserted vortices should have their strengths set prior to calling this function to be included in the impulse calculation.

source
GridPotentialFlow.setUMethod
setU(
    b::PotentialFlowBody,
    U::Tuple{Float64, Float64}
) -> Tuple{Float64, Float64}

Sets the linear velocity of the body b to U.

source
GridPotentialFlow.setvortexstrengths!Method
setvortexstrengths!(vm, Γ)
setvortexstrengths!(vm, Γ, idx)

Sets the strenghts of the vortices in the vortex model vm to the provided Γ. Indices can be provided in idx to specify the indices of the vortices whose strengths have to be set, in which case the length of Γ must be the same as the number of indices.

source
GridPotentialFlow.solve!Method
solve!(sol, vm)

Solves the saddle point system associated with the vortex model vm and stores the solution in sol. If the vortex model contains bodies with regularized edges and a number of vortices which is greater than or equal to the number of regularized edges, the returned solution contains the computed strengths of the last N vortices in vm, with N the number of regularized edges.

source
GridPotentialFlow.solveMethod
solve(vm)

Solves the saddle point system associated with the vortex model vm and returns the solution. If the vortex model contains bodies with regularized edges and a number of vortices which is greater than or equal to the number of regularized edges, the returned solution contains the computed strengths of the last N vortices in vm, with N the number of regularized edges.

source
GridPotentialFlow.streamfunction!Method
streamfunction!(ψ, vm)

Computes the stream function field ψ on the physical grid for the potential flow associated with the current state of the vortex model vm.

source
GridPotentialFlow.streamfunctionMethod
streamfunction(vm)

Computes and returns the stream function field on the physical grid for the potential flow associated with the current state of the vortex model vm.

source
GridPotentialFlow.subtractcirculation!Method
subtractcirculation!(
    b::AbstractVector{PotentialFlowBody},
    δΓ_vec::AbstractVector
)

Returns the indices in the global set of surface point data of all regularized points in b.

source
GridPotentialFlow.vortexvelocities!Method
vortexvelocities!(Ẋ_vortices, vm, ψ)

Computes and stores in Ẋ_vortices the flow velocity, associated with the discrete vector potential field ψ, as VectorData at the locations of the vortices stored in the vortex model vm.

source
GridPotentialFlow.vortexvelocities!Method
vortexvelocities!(vm)

Returns the flow velocity as VectorData at the locations of the vortices stored in the vortex model vm, accounting for bodies in vm. If the vm has Ne regularized edges and vortices, the strengths of the last Ne vortices will be computed and set in vm and the circulation of the shedded vortices will be subtracted from the bound circulation of each body.

source
GridPotentialFlow.vorticity!Method
vorticity!(wphysical, vm; onlybulk)

Computes the vorticity field w associated with the vortices stored in the vortex model vm on the physical grid. If the extra boolean keyword onlybulk is set to true, the function ignores the vorticity from the last Ne vortices in vm.

source
GridPotentialFlow.vorticityMethod
vorticity(vm)

Computes the vorticity field associated with the vortices stored in the vortex model vm on the physical grid.

source