Finite volume data

In the finite volume method, the data is stored separately throughout the cells. Therefore, we provide AbstractControlVolume and AbstractInterface structs for processing in-cell and edge information, which are used as arrays of structs (AoS) in numerical simulations. Considering one-dimensional physical space $x$, we provide the following control volume structs. The structs differs from the number of particle distribution functions.

KitBase.ControlVolume1DType
mutable struct ControlVolume1D{A, B} <: AbstractControlVolume1D

1D control volume with no distribution function

Fields

  • w

  • prim

  • sw

source
KitBase.ControlVolume1D1FType
mutable struct ControlVolume1D1F{A, B} <: AbstractControlVolume1D

1D control volume with 1 distribution function

Fields

  • w

  • prim

  • sw

  • f

  • sf

source
KitBase.ControlVolume1D2FType
struct ControlVolume1D2F{A, B} <: AbstractControlVolume1D

1D control volume with 2 distribution functions

Fields

  • w

  • prim

  • sw

  • h

  • b

  • sh

  • sb

source
KitBase.ControlVolume1D3FType
mutable struct ControlVolume1D3F{A, B, C, D, E} <: AbstractControlVolume1D

1D control volume with 3 distribution functions

Fields

  • w

  • prim

  • sw

  • h0

  • h1

  • h2

  • sh0

  • sh1

  • sh2

  • E

  • B

  • ϕ

  • ψ

  • lorenz

source
KitBase.ControlVolume1D4FType
mutable struct ControlVolume1D4F{A, B, C, D, E} <: AbstractControlVolume1D

1D control volume with 4 distribution functions

Fields

  • w

  • prim

  • sw

  • h0

  • h1

  • h2

  • h3

  • sh0

  • sh1

  • sh2

  • sh3

  • E

  • B

  • ϕ

  • ψ

  • lorenz

source

Within each cell, different numbers of particle distribution function can be tracked. The interface data is stored correspondingly.

KitBase.Interface1DType
mutable struct Interface1D{A<:Union{Real, AbstractArray}} <: AbstractInterface1D

1D cell interface with no distribution function Note that deepcopy constructor is needed to work with StructArrays

Fields

  • fw
source
KitBase.Interface1D1FType
mutable struct Interface1D1F{A, B<:AbstractArray} <: AbstractInterface1D

1D cell interface with 1 distribution function Note that deepcopy constructor is needed to work with StructArrays

Fields

  • fw

  • ff

source
KitBase.Interface1D2FType
struct Interface1D2F{A, B<:AbstractArray} <: AbstractInterface1D

1D cell interface with 2 distribution functions

Fields

  • fw

  • fh

  • fb

source
KitBase.Interface1D3FType
struct Interface1D3F{A, B, C} <: AbstractInterface1D

1D cell interface with 3 distribution functions

Fields

  • fw

  • fh0

  • fh1

  • fh2

  • femL

  • femR

source
KitBase.Interface1D4FType
struct Interface1D4F{A, B, C} <: AbstractInterface1D

1D cell interface with 4 distribution functions

Fields

  • fw

  • fh0

  • fh1

  • fh2

  • fh3

  • femL

  • femR

source

The 2D control volume structs are implemented as well.

KitBase.ControlVolume2DType
mutable struct ControlVolume2D{A, B} <: AbstractControlVolume2D

2D control volume with no distribution function

Fields

  • w

  • prim

  • sw

source
KitBase.ControlVolume2D1FType
mutable struct ControlVolume2D1F{A, B, C, D} <: AbstractControlVolume2D

2D control volume with 1 distribution function

Fields

  • w

  • prim

  • sw

  • f

  • sf

source
KitBase.ControlVolume2D2FType
struct ControlVolume2D2F{A, B, C, D} <: AbstractControlVolume2D

2D control volume with 2 distribution functions

Fields

  • w

  • prim

  • sw

  • h

  • b

  • sh

  • sb

source
KitBase.ControlVolume2D3FType
mutable struct ControlVolume2D3F{T2, T3, T4, T5, T6, T7, T8} <: AbstractControlVolume2D

2D control volume with 3 distribution functions

Fields

  • w

  • prim

  • sw

  • h0

  • h1

  • h2

  • sh0

  • sh1

  • sh2

  • E

  • B

  • ϕ

  • ψ

  • lorenz

source

The numerical fluxes are evaluated through AbstractInterface structs.

KitBase.Interface2DType
mutable struct Interface2D{A, B, C} <: AbstractInterface2D

2D cell interface with no distribution function

Fields

  • len

  • n

  • fw

source
KitBase.Interface2D1FType
mutable struct Interface2D1F{A, B, C, D} <: AbstractInterface2D

2D cell interface with 1 distribution function

Fields

  • len

  • n

  • fw

  • ff

source
KitBase.Interface2D2FType
struct Interface2D2F{A, B<:(AbstractVector), C, D} <: AbstractInterface2D

2D cell interface with 2 distribution functions

Fields

  • len

  • n

  • fw

  • fh

  • fb

source