Particle Field

FLOWVPM.ParticleType
`Particle{T}`

Vortex particle data structure

State variables

  • X::Array{T, 1} : Position (3-elem array)
  • Gamma::Array{T, 1} : Vectorial circulation (3-elem array)
  • sigma::Array{T, 1} : Smoothing radius (1-elem array)
  • vol::Array{T, 1} : Volume (1-elem array)
  • circulation::Array{T, 1} : Scalar circulation (1-elem array)

Public calculations

  • U::Array{T, 1} : Velocity at particle (3-elem array)
  • J::Array{T, 2} : Jacobian at particle J[i,j]=dUi/dxj (9-elem array)
source
Missing docstring.

Missing docstring for FLOWUnsteady.vpm.ParticleField. Check Documenter's build log for details.

Missing docstring.

Missing docstring for FLOWUnsteady.vpm.ClassicVPM. Check Documenter's build log for details.

Missing docstring.

Missing docstring for FLOWUnsteady.vpm.ReformulatedVPM. Check Documenter's build log for details.

FLOWVPM.add_particleFunction

add_particle(self::ParticleField, X, Gamma, sigma; vol=0, index=np)

Add a particle to the field.

source

add_particle(self::ParticleField, P::Particle)

Add a copy of Particle P to the field.

source
FLOWVPM.remove_particleFunction

remove_particle(pfield::ParticleField, i)

Remove the i-th particle in the field. This is done by moving the last particle that entered the field into the memory slot of the target particle. To remove particles sequentally, you will need to go from the last particle back to the first one (see documentation of get_particleiterator for an example).

source
FLOWVPM.get_npFunction
`get_np(pfield::ParticleField)`

Returns current number of particles in the field.
source
FLOWVPM.get_particleiteratorFunction
`get_particleiterator(pfield::ParticleField; start_i=1, end_i=np)`

Return an iterator over particles that can be used as follows

julia> # Initiate particle field
       pfield = FLOWVPM.ParticleField(10);

julia> # Add particles
       for i in 1:4
           FLOWVPM.add_particle(pfield, (i*10^0, i*10^1, i*10^2), zeros(3), 1.0)
       end

julia> # Iterate over particles
       for P in FLOWVPM.get_particleiterator(pfield)
           println(P.X)
       end
[1.0, 10.0, 100.0]
[2.0, 20.0, 200.0]
[3.0, 30.0, 300.0]
[4.0, 40.0, 400.0]
source