API
VEM.AbstractInducedFieldVEM.AbstractRedistributionKernelVEM.AbstractVortexBlobVEM.CartesianMeshVEM.FloatVEM.GaussianVortexBlobVEM.M4PrimeVEM.VelocityFieldVEM.VorticityFieldBase.zeroBase.zeroVEM.advection!VEM.blob_centerVEM.blob_center!VEM.blob_circulationVEM.blob_circulation!VEM.blob_dimensionVEM.blob_radiusVEM.blob_radius!VEM.blob_scalarVEM.cells_per_axisVEM.diffusion!VEM.direct_sumVEM.direct_sum!VEM.field_scalarVEM.induceVEM.induceVEM.interpolate_circulationVEM.mesh_boundsVEM.mesh_dimensionVEM.mesh_nodesVEM.mesh_scalarVEM.node_spacingVEM.nodes_per_axisVEM.population_control!VEM.redistributionVEM.redistribution_weightVEM.support_radius
VEM.AbstractInducedField — Type
AbstractInducedFieldAn abstract type representing the type of field to be induced by a vortex blob.
VEM.AbstractRedistributionKernel — Type
AbstractRedistributionKernelAn abstract type representing a vortex blob redistribution kernel, which defines how weights are assigned based on distance normalized by the vortex blob core radius.
VEM.AbstractVortexBlob — Type
AbstractVortexBlob{Dimension, Scalar <: AbstractFloat}Abstract type representing a vortex blob in Dimension-dimensional space, parameterized by a floating-point type Scalar.
VEM.CartesianMesh — Type
CartesianMesh{Dimension,Scalar<:AbstractFloat}(cells_per_axis::NTuple{Dimension,Int}, spacing::Scalar)A Cartesian mesh for vortex blob methods.
Argumentss
- `cellsperaxis: The number of cells along each axis.
spacing: The spacing between nodes in the mesh.
VEM.GaussianVortexBlob — Type
GaussianVortexBlob(circulation::Union{Scalar,StaticArrays.SVector{Dimension,Scalar}}, center::StaticArrays.SVector{Dimension, Scalar}, radius::Scalar) where {Dimension, Scalar}
GaussianVortexBlob(circulation, center, radius)A smooth vortex blob with a Gaussian vorticity distribution. It is characterized by an amount of circulation it carries, a position and a finite core radius.
Arguments
circulation: The circulation strength of the vortex blob.center: The position of the vortex blob.radius: The core radius of the vortex blob.
Returns
A GaussianVortexBlob instance.
VEM.M4Prime — Type
M4PrimeM4' is a vortex blob redistribution kernel. It is defined by a piecewise function that assigns weights based on the distance from the center of the vortex blob, normalized by the blob's core radius. The M4' kernel has a support radius of 2, meaning that it assigns non-zero weights to points at a distance greater than 2 core radii.
VEM.VelocityField — Type
VelocityField <: AbstractInducedFieldA singleton type representing a velocity field.
VEM.VorticityField — Type
VorticityField <: AbstractInducedFieldA singleton type representing a vorticity field.
Base.zero — Method
zero(::Type{GaussianVortexBlob{Dimension,Scalar}}) where {Dimension, Scalar}Return a GaussianVortexBlob with all data set to 0.
Arguments
GaussianVortexBlob{Dimension,Scalar}: The type of a vortex blob..
Returns
A GaussianVortexBlob instance with zero circulation, center, and radius.
VEM.advection! — Method
advection!(blobs, time, time_step; time_scheme=ODE.RK4())Advance the position of a collection of blobs by a single time step according to the local velocity field induced by the collection. The positions of the blobs are updated in-place.
Arguments
blobs: An iterable collection of vortex blobs.time: The time at the start of a time step.time_step: The time increment over a single step.time_scheme: (Optional) The time integration scheme to use. Defaults toOrdinaryDiffEq.RK4()(classical Runge-Kutta 4th order).
VEM.blob_center! — Method
blob_center!(blob::AbstractVortexBlob, new_center)Update the position of the vortex blob.
Arguments
blob: The vortex blob.new_center: The new vortex blob position.
VEM.blob_center — Method
blob_center(blob::AbstractVortexBlob)Arguments
blob: The vortex blob.
Returns
The position of the vortex blob.
VEM.blob_circulation! — Method
blob_circulation!(blob::AbstractVortexBlob, new_circulation)Update the circulation of the vortex blob.
Arguments
blob: The vortex blob.new_circulation: The new circulation strength.
VEM.blob_circulation — Method
blob_circulation(blob::AbstractVortexBlob)Arguments
blob: The vortex blob.
Returns
The circulation of the vortex blob.
VEM.blob_dimension — Method
blob_dimension(blob::AbstractVortexBlob)Arguments
blob: The vortex blob.
Returns
The spatial dimension of the vortex blob.
VEM.blob_radius! — Method
blob_radius!(blob::AbstractVortexBlob, new_radius)Update the core radius of the vortex blob.
Arguments
blob: The vortex blob.new_radius: The new core radius.
VEM.blob_radius — Method
blob_radius(blob::AbstractVortexBlob)Arguments
blob: The vortex blob.
Returns
The core radius of the vortex blob.
VEM.blob_scalar — Method
blob_scalar(blob::AbstractVortexBlob)Arguments
blob: The vortex blob.
Returns
The floating-point type of the vortex blob data.
VEM.cells_per_axis — Method
cells_per_axis(mesh::CartesianMesh)Get the number of cells per axis in the mesh.
Arguments
mesh: The Cartesian mesh.
Returns
The number of cells per axis in the Cartesian mesh.
VEM.diffusion! — Method
diffusion!(blobs, viscosity, mesh, time, time_step; time_scheme=ODE.RK4())Apply diffusion to the given blobs over a time step using the specified time integration scheme.
Arguments
blobs: A collection of blobs.viscosity: The fluid viscosity.mesh: The Cartesian mesh whose nodes are the locations of the blobs.time: The time at the start of the time step.time_step: The time increment for diffusion.time_scheme: (Optional) The time integration scheme to use, default isODE.RK4().
VEM.direct_sum! — Method
direct_sum!(field, induced_field::AbstractInducedField, blobs, targets)Compute the superposition of fields induced by a collection of blobs at a collection of targets (in-place).
Arguments
field: The superimposed induced field.induced_field: The type of field to be induced by the blobs.blobs: A single blob or an iterable collection of vortex blobs.targets: A single target or an iterable collection of targets.
VEM.direct_sum — Method
direct_sum(induced_field::AbstractInducedField, blobs, targets)Compute the superposition of fields induced by a collection of blobs at a collection of targets (out-of-place).
Arguments
induced_field: The type of field to be induced by the blobs.blobs: A single blob or an iterable collection of vortex blobs.targets: A single target or an iterable collection of targets.
Returns
A vector where each entry corresponds to the superposition of inductions at a target.
VEM.field_scalar — Method
field_scalar(::VelocityField, blob::AbstractVortexBlob)Determine the scalar type of the velocity field induced by a vortex blob.
Arguments
::VelocityField: The type of field that is induced.blob: The vortex blob for which the field is being induced.
Returns
The scalar type of the velocity field induced by the vortex blob.
VEM.induce — Method
induce(::VelocityField, blob::GaussianVortexBlob{2}, target)Compute the velocity induced at target due to a 2D Gaussian vortex blob.
Arguments
VelocityField: The type of field that is induced.blob: The vortex blob.target: The target position.
Returns
The induced velocity at target.
VEM.induce — Method
induce(::VorticityField, blob::GaussianVortexBlob{2}, target)Compute the vorticity induced at target due to a 2D Gaussian vortex blob.
Arguments
VorticityField: The type of field that is induced.blob: The vortex blob.target: The target position.
Returns
The induced vorticity at target.
VEM.interpolate_circulation — Method
interpolate_circulation(blobs, mesh::CartesianMesh, kernel::AbstractRedistributionKernel)Interpolate the circulation of the blobs onto the nodes of the mesh using the redistribution kernel.
Arguments
blobs: The vortex blobs whose circulation is to be interpolated.mesh: The Cartesian mesh onto which the circulation will be interpolated at the nodes.kernel: The redistribution kernel that determines the weights for interpolation.
Returns
The interpolated circulation at the nodes of the Cartesian mesh.
VEM.mesh_bounds — Method
mesh_bounds(mesh::CartesianMesh)Get the bounds of the mesh.
Arguments
mesh: The Cartesian mesh.
Returns
The bounds of the Cartesian mesh as a tuple of tuples, where each inner tuple contains the minimum and maximum bounds along each axis.
VEM.mesh_dimension — Method
mesh_dimension(::CartesianMesh)Get the dimension of the CartesianMesh.
Arguments
::CartesianMesh: The Cartesian mesh.
Returns
The dimension of the Cartesian mesh.
VEM.mesh_nodes — Method
mesh_nodes(mesh)Get the nodes of the mesh.
Arguments
mesh: The Cartesian mesh.
Returns
The nodes of the Cartesian mesh as a matrix of static vectors.
VEM.mesh_scalar — Method
mesh_scalar(::CartesianMesh)Get the scalar type of the CartesianMesh.
Arguments
::CartesianMesh: The Cartesian mesh.
Returns
The scalar type of the Cartesian mesh.
VEM.node_spacing — Method
node_spacing(::CartesianMesh)Get the spacing between nodes in the mesh.
Arguments
mesh: The Cartesian mesh.
Returns
The spacing between nodes in the Cartesian mesh.
VEM.nodes_per_axis — Method
nodes_per_axis(::CartesianMesh)Get the number of nodes per axis in the mesh.
Arguments
mesh: The Cartesian mesh.
Returns
The number of nodes per axis in the Cartesian mesh.
VEM.population_control! — Method
population_control!(blobs, tolerance)Prune vortex blobs based on their circulation magnitude to maintain a manageable population size. The pruning procedure ensures that the sum of circulation magnitude removed is smaller than the specified tolerance multiplied by the sum of all circulation magnitudes.
Arguments
blobs: A collection of vortex blobs.tolerance: A scalar value that determines a relative threshold for pruning.
Returns
removed_circulation: The total circulation removed due to pruning.
VEM.redistribution — Method
redistribution(old_blobs, mesh::CartesianMesh, kernel::AbstractRedistributionKernel)Redistribute the old_blobs onto the mesh using the redistribution kernel.
Arguments
old_blobs: The vortex blobs to be redistributed.mesh: The Cartesian mesh onto which the blobs will be redistributed at the nodes.kernel: The redistribution kernel that determines the weights for redistribution.
Returns
The redistributed vortex blobs at the nodes of the Cartesian mesh.
VEM.redistribution_weight — Method
redistribution_weight(::M4Prime, distance)Compute the redistribution weight for a given distance using the M4' kernel.
Arguments
::M4Prime: An instance of the M4' redistribution kernel.distance: The distance from the center of the vortex blob, normalized by the blob's core radius.
Returns
The redistribution weight corresponding to the given distance.
VEM.support_radius — Method
support_radius(::M4Prime)Arguments
::M4Prime: An instance of the M4' redistribution kernel.
Returns
The support radius of the M4' redistribution kernel.