atl_equation_module Module

Module for the description of the equation system of the Ateles solver

The equation to be solved is configured by the equation table. To select the equation, its name needs to be provided. All further settings depend on the specific equation.

  equation = { name = 'equation to solve' }

The name has to be string and the following equations are available:

A note for the lower dimensional systems: the treelm meshes are always of 3D structure, but for lower dimensional equations the higher dimensions are ignored. If there are multiple elements in the superfluous dimensions, the equations will be solved there independently.

This module defines the atl_Equations_type that provides all equation specific data of the Ateles solver.



Abstract Interfaces

abstract interface

interface descriptoin for a routine that loads boundary conditions (currently not really used yet)

  • public subroutine atl_eqn_load_bc(equation, bc_state, bc_state_gradient, bc_varDict, bc_varDict_gradient, bc_normal_vec, bc_normal_vec_gradient, bc_trafo, bc_trafo_gradient, bc_label, bc_kind, thandle, conf)

    Arguments

    Type IntentOptional Attributes Name
    class(atl_Equations_type), intent(inout) :: equation

    Contains everything

    type(tem_bc_state_type), intent(out), allocatable :: bc_state(:)

    boundary state variable definitions loaded from config file

    type(tem_bc_state_type), intent(out), allocatable :: bc_state_gradient(:)

    boundary state gradient variable definitions loaded from config file

    type(grw_stringkeyvaluepairarray_type), intent(out) :: bc_varDict

    Dictionary of boundary variables in bc_state

    type(grw_stringkeyvaluepairarray_type), intent(out) :: bc_varDict_gradient

    Dictionary of boundary variables in bc_state_gradient

    logical, intent(out) :: bc_normal_vec
    logical, intent(out) :: bc_normal_vec_gradient
    type(atl_eqn_var_trafo_type), intent(out) :: bc_trafo
    type(atl_eqn_var_trafo_type), intent(out) :: bc_trafo_gradient
    character(len=*), intent(in) :: bc_label
    character(len=*), intent(in) :: bc_kind
    integer, intent(in) :: thandle
    type(flu_State) :: conf

abstract interface

interface description for the transormation of a set of state varibles to another set of state variables (e.g. conservative variables to primitive variable or vice versa)

  • private subroutine eqn_var_trafo(equation, instate, outstate, material)

    Arguments

    Type IntentOptional Attributes Name
    class(atl_Equations_type), intent(in) :: equation

    the eqations type that defines all necessary parameters

    real(kind=rk), intent(inout) :: instate(:,:)

    input state vector

    The array dimensions reflect the way the state vector is stored in the solver: dimension (nPnts nVars) with: * nPnts (used to store state at several points in each element) * nVars: number of necessary variables to define the state

    real(kind=rk), intent(out), optional :: outstate(:,:)

    output transformed state vector

    The array dimensions reflect the way the state vector is stored in the solver: dimension (nPnts, nVars) with: * nPnts same as in instate * nVars: number of necessary variables to define the state

    real(kind=rk), intent(in), optional :: material(:,:)

    The material information for the state transformation.

    The array dimensionals are: (nDofs, nMaterials) * nDoFs same as in instate * nMaterials: number of material parameters.

abstract interface

interface description for the transormation of a set of state varibles to another set of state variables (e.g. conservative variables to primitive variable or vice versa)

  • private subroutine eqn_varElem_trafo(equation, instate, outstate, nElems)

    Arguments

    Type IntentOptional Attributes Name
    class(atl_Equations_type), intent(in) :: equation

    the eqations type that defines all necessary parameters

    real(kind=rk), intent(inout) :: instate(:,:,:)

    input state vector

    The array dimensions reflect the way the state vector is stored in the solver: dimension (nDoFs nVars) with:

    • nMaxInElems >= nElems,
    • nDoFs arbitrary (used to store state at several points in each element)
    • nVars: number of necessary variables to define the state
    real(kind=rk), intent(out), optional :: outstate(:,:,:)

    output transformed state vector

    The array dimensions reflect the way the state vector is stored in the solver: dimension (nElems, nDoFs, nVars) with:

    • nDoFs same as in instate
    • nVars: number of necessary variables to define the state
    integer, intent(in) :: nElems

    The number of elements.

abstract interface

interface description for the calculation of source terms; adds necessary values to the right hand side of the equation system from source parameters (from a space-time function) and the state (from which you can possibly derive other quantities)

  • private subroutine eqn_evaluate_source(equation, state, sourceParameter, RHS, background_material, nElems)

    Arguments

    Type IntentOptional Attributes Name
    class(atl_Equations_type), intent(in) :: equation

    the eqations type that defines all necessary parameters

    real(kind=rk), intent(in) :: state(:,:,:)

    input state vector

    The array dimensions reflect the way the state vector is stored in the solver: dimension (1:nMaxInElems, nDoFs, nVars) with:

    • nMaxInElems >= nElems,
    • nDoFs arbitrary (used to store state at several points in each element)
    • nVars: number of necessary variables to define the state
    real(kind=rk), intent(in) :: sourceParameter(:,:,:)

    vector with the parameters of the source

    The array dimensions reflect the way the state vector is stored in the solver: dimension (1:nElems, nDoFs, nSourceParameter) with:

    • nElems, number elements to calculate RHS for (< nMaxInElems!)
    • nDoFs arbitrary (used to store state at several points in each element)
    • nSourceParameter: same as nComponents of the tem_source_type
    real(kind=rk), intent(inout) :: RHS(:,:,:)

    right hand side vector

    attention: always updat right hand side with RHS = RHS + ...

    same dimensions as state (1:nElems, nDoFs, nVars) with: * nElems, * nDoFs arbitrary (used to store state at several points in each element) * nVars: number of necessary variables to define the state

    real(kind=rk), intent(in) :: background_material(:)

    Description of the background material on the current level.

    integer, intent(in) :: nElems

    number of elems to calculate RHS for, if elemInd is not given, calculate RHS for (1:nElems,:,:)


Derived Types

type, public ::  atl_temp_flux_arrays_type

The number of temporary arrays required to evaluate the physical fluxes can be set from here. This is required so that they don't have to be decleared in the openmp parallel region where physical flux calculation takes place

Components

Type Visibility Attributes Name Initial
integer, public :: overSamp = 0

Number of temp arrays of size of oversamp.

integer, public :: modal = 0

Number of temp arrays of size of modal elements.

integer, public :: nodal = 0

Number of temp arrays of size of nodal elements.

integer, public :: nScal = 0

The size of the variables needed (can be more than equation%nScalars)

type, public ::  atl_Equations_type

Datatype representing the equation which is used for the simulation.

Read more…

Components

Type Visibility Attributes Name Initial
character(len=labelLen), public :: eq_kind = ''

The type of the equation

Read more…
integer, public :: nDimensions

Number of dimensions of the scheme

logical, public :: adaptive_timestep

Flag for adaptive timestep calcualtion

type(atl_euler_type), public :: Euler

Euler equations parameters

type(atl_navierStokes_type), public :: NavierStokes

Navier-Stokes equations parameters (additional to Euler)

type(atl_FiltNavierStokes_type), public :: FiltNavierStokes

filtered Navier-Stokes equation parameters (additional to NavierStokes and Euler)

type(atl_maxwell_type), public :: Maxwell

Pure Maxwell equations parameters

type(atl_advection_1d_type), public :: advection

Advection-Diffusion equation parameters

type(atl_BBMEM_type), public :: BBMEM

Membrane equations

type(atl_nernstPlanck_type), public :: NERPLANCK

Nernst-Planck equation

type(atl_acoustic_type), public :: Acoustic

Lineraized Gas Dynamics/Acoustic equation

type(atl_heat_type), public :: heat

Heat 1D,2D,3D equation parameters

type(atl_LinearEuler_type), public :: LinearEuler

Lineraized Euler equation, 3D and 2D

Read more…
type(tem_varSys_type), public :: varSys
type(tem_st_fun_linkedList_type), public :: stFunList

Contains all available space-time-functions.

Read more…
integer, public :: nDerivatives = 0

The number of derivatives we have to use in our simulation. Zero means that we use only cell values. One means that we calculate first derivatives (for each spatial direction).

logical, public :: hasPrimitiveVariables = .false.

Does this equation type have primitive variables?

integer, public, allocatable :: primVar(:)

Index of primitive variables in varSys, not allocated if the current equation has no primitive variables.

integer, public, allocatable :: stateVar(:)

Index of state variables in varSys

procedure(atl_eqn_load_bc), public, pointer :: load_bc => NULL()

Function pointer to the routine loading boundary conditions according to the equation system.

procedure(eqn_varElem_trafo), public, pointer, pass(equation) :: cons2prim => NULL()

Function pointer to transform conservative variables to primitive variables (if the equation has primitive variables)

procedure(eqn_varElem_trafo), public, pointer, pass(equation) :: prim2cons => NULL()

Function pointer to transform primitive variables to conservative variables (if the equation has primitive variables)

type(coordRotation_type), public :: varRotation(3)

Permutations for all variables of equation system to transform x,y,z axes to x axes aligned data.

logical, public :: requiresDeviation = .false.

Flag to indicate, whether the equation system requires estimates on polynomial deviations during computation.

logical, public :: requires_gradmax = .false.

Flag to indicate, whether the equation system requires estimates on gradients of the polynomials during computation.

logical, public :: isNonlinear = .false.

Flag to determine if the given equation system is nonlinear

type(atl_temp_flux_arrays_type), public :: temp

block of temporary arrays that can be used within the flux computation for

type(atl_materialFun_type), public :: material

Common information about the material the equation system is capable to use.

type(tem_varMap_type), public :: redTransVarMap

Maps to reduction_transient operation variables in varSys

type, public ::  atl_eqn_var_trafo_type

Description of variable transformations from one system to another and back again.

Read more…

Components

Type Visibility Attributes Name Initial
logical, public :: identity

Flag to indicate if transformation is necessary at all.

procedure(eqn_var_trafo), public, nopass, pointer :: from => NULL()

Transformation from a given system to the required one.

procedure(eqn_var_trafo), public, nopass, pointer :: to => NULL()

Inverse, back transformation again.