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.Configure — Type
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]. TheAbstractQuadraturetype 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 byAbstractInitCond.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 byDomain.IB::Vector{AbstractBoundary}: Immersed boundary. Multiple boundaries are supported. The element type is defined byAbstractBoundarygas::Gas: Properties of the simulated gas defined byGas.solver::Solver: Setup of the solver defined bySolver.output::Output: Setup of the output form defined byOutput.user_defined::UDF: Functions defined by users, including some criteria.
KitAMR.Solver — Type
struct Solver{DIM, NDF}Structure of solver configuration.
Fields
CFL::Float64: Courant-Friedrichs-Lewy number. Default is0.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 toAMR_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 istrue.VS_DYNAMIC_AMR::Bool: Dynamic AMR in velocity space is open or not. Default istrue.ADAPT_COEFFI_PS::Float64: Redundancy coefficient of AMR in physical space. Default is0.25.ADAPT_COEFFI_VS_GLOBAL::Float64: Redundancy coefficient of AMR in velocity space. Default is0.125.ADAPT_COEFFI_VS_LOCAL::Float64: Proportion that a refinement-required velocity cell contributes to the macroscopic quantities in a local physical cell. Default is0.01.TOLERANCE::Float64: Tolerance for convergence judgement. Default is1e-6.ST_CHECK_INTERVAL::Int64: Number of steps between two checks of status. Default is100.REDUNDANT_STEPS_NUM::Int64: Number of redundant steps after convergence criterion has been satisfied. Default is100.
KitAMR.UDF — Type
mutable struct UDFStructure 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)->Booldynamic_ps_refine_flag::Function: The dynamic AMR flag in physical space. (ps_data::AbstractPsData,level::Int,ka::KA)->Boolstatic_vs_refine_flag::Function: The static AMR flag in velocity space.