Configuration

To simulate a problem using KitAMR, user is required to define the problem. Most of the user-provided information is collected in Configure struct.

KitAMR.ConfigureType
struct Configure{DIM, NDF}

Structure of problem configuration. DIM and NDF represent the dimension number of the problem and the number of the distribution function. This struct plays an key role in the solution process.

Fields

  • geometry::Vector{Float64}: Range of the simulated domain. As an example, for 2D case, it should be aligned as [xmin,xmax,ymin,ymax].

  • trees_num::Vector{Int64}: Number of tree roots for each dimension. For 2D case, it should be aligned as [xnum,ynum]

  • quadrature::Union{KitAMR.AbstractQuadrature, Vector{Float64}}: For Vector type, it represents the range of the velocity space. For 2D case, it should be aligned as [umin,umax,vmin,vmax]. The AbstractQuadrature type is reserved for other quadrature rule like Gauss-Hermite.

  • vs_trees_num::Vector{Int64}: Number of tree roots for each dimension in velocity space.

  • IC::AbstractInitCond: Initial condition defined by AbstractInitCond.

  • domain::Vector{Domain}: Types of the domain boundary. For 2D case, the vector should catain 4 elements corresponding to the 4 domain boundaries. The element type is defined by Domain.

  • IB::Vector{AbstractBoundary}: Immersed boundary. Multiple boundaries are supported. The element type is defined by AbstractBoundary

  • gas::Gas: Properties of the simulated gas defined by Gas.

  • solver::Solver: Setup of the solver defined by Solver.

  • output::Output: Setup of the output form defined by Output.

  • user_defined::UDF: Functions defined by users, including some criteria.

source
KitAMR.SolverType
struct Solver{DIM, NDF}

Structure of solver configuration.

Fields

  • CFL::Float64: Courant-Friedrichs-Lewy number. Default is 0.4.

  • AMR_PS_MAXLEVEL::Int64: Maximum level of the (static) AMR in physical space. Mandatory.

  • AMR_DYNAMIC_PS_MAXLEVEL::Int64: Maximum level of the dynamic AMR in physical space. In most cases, it should be smaller than the static one. Default is equal to AMR_PS_MAXLEVEL.

  • AMR_VS_MAXLEVEL::Int64: Maximum level of the AMR in velocity space. Mandatory.

  • flux::Type{Tf} where Tf<:AbstractFluxType: Numerical flux type. Mandatory.

  • time_marching::Type{Tt} where Tt<:AbstractTimeMarchingType: Time-marching scheme. Mandatory.

  • PS_DYNAMIC_AMR::Bool: Dynamic AMR in physical space is open or not. Default is true.

  • VS_DYNAMIC_AMR::Bool: Dynamic AMR in velocity space is open or not. Default is true.

  • ADAPT_COEFFI_PS::Float64: Redundancy coefficient of AMR in physical space. Default is 0.25.

  • ADAPT_COEFFI_VS_GLOBAL::Float64: Redundancy coefficient of AMR in velocity space. Default is 0.125.

  • ADAPT_COEFFI_VS_LOCAL::Float64: Proportion that a refinement-required velocity cell contributes to the macroscopic quantities in a local physical cell. Default is 0.01.

  • TOLERANCE::Float64: Tolerance for convergence judgement. Default is 1e-6.

  • ST_CHECK_INTERVAL::Int64: Number of steps between two checks of status. Default is 100.

  • REDUNDANT_STEPS_NUM::Int64: Number of redundant steps after convergence criterion has been satisfied. Default is 100.

source
KitAMR.UDFType
mutable struct UDF

Structure of user-defined-functions.

Fields

  • static_ps_refine_flag::Function: The static AMR flag in physical space. (midpoint::Vector{Float64},ds::Vector{Float64},kinfo::KInfo,level::Int)->Bool

  • dynamic_ps_refine_flag::Function: The dynamic AMR flag in physical space. (ps_data::AbstractPsData,level::Int,ka::KA)->Bool

  • static_vs_refine_flag::Function: The static AMR flag in velocity space.

source