atl_eqn_euler_module Module

Description of the Euler equation system for inviscid compressible flows.

The flow field is described in terms of the conservative variables density, momentum and energy. The Euler equations require the definition of the following parameters:

  • Isentropic expansion coefficient isen_coef
  • Gas constant r
  • Heat capacity at constant volume cv
  • Numerical flux numflux
  • Linearization limit linear_limit
  • Linearization indicator linearization_indicator
  • Wether to ensure positivity modally ensure_positivity
  • Porosity for modeling geometries as porous materials porosity
  • Viscous permeability for the porous material viscous_permeability
  • Thermal permeability for the porous material thermal_permeability
  • Definition of the material (to model geometries) material

There are three different implementations for the numerical flux available:

  • 'hll' Harten/Lax/van-Leer flux
  • 'godunov' Solve the nonlinear Riemann problem
  • 'lax_friedrich' Lax/Friedrichs flux, not recommended and may lead to instabilities, especially at boundaries

It is possible to adaptively linearize the flux in elements according to its state. This is activated by setting the linear_limit to some value larger than 0. The default is to use no adaptive linearization (linear_limit=0). There are three different indicators available that may be used to decide the linearization of elements. linearization_indicator may be:

  • 'error' A modal estimation for the terms neglected by linearization. This involves all variables and is the default.
  • 'energy' Use the deviation of the energy to decide the linearization.
  • 'density' Use the deviation of the density to decide the linearization.

The deviations are considered in relation to the cell mean value. Thus, setting linear_limit = 0.01 and linearization_indicator = 'density' would only compute the linearized flux in elements where the maximal deviation of the state is guaranteed to be less or equal to one percent of the mean density in that cell.

For the material the following variables need to be defined:

  • characteristic masking function, has to 1 where a geometry is to be found and 0 elsewhere.
  • relax_velocity the velocity of the object
  • relax_temperature the temperature of the object

If the characteristic is 0 everywhere, the other settings are irrelevant. Each material component is of tem_variable_type. However, these can be also simply defined as space-time functions, which can just be constants. See the tem_variable_module and tem_spacetime_fun_module for more details.

If ensure_positivity = true is set, the state will be scaled such that the deviation of the state is guaranteed to be smaller than the mean for density and energy such that these are positive. While this is a computationally cheap measure, you should be aware that it is not sufficient to avoid unphysical states, as the pressure may still be negative.

The following equation names are implementing the Euler equations and require the settings described above:

  • euler (3D)
  • euler_2d (2D)
  • euler_1d (1D)
  • loclineuler Locally linearized (3D)
  • loclineuler_1d Locally linearized (1D)

The locally linearized variants use fluxes linearized to the cell means within the elements, while between elements the nonlinear flux is computed.

An example configuration for Euler equations is shown below:

```lua gamma = 1.4 -- isentropic expansion coefficient R = 1.0 -- gas constant equation = { name = 'euler', isen_coef = gamma, r = R, cv = R/(gamma-1), numflux = 'hll',

linear_limit      = 0.001,
linearization_indicator = 'error',

ensure_positivity = false, -- Ensure that density and energy remain
                           -- positive by only considering higher modes up
                           -- to the point where positivity is guaranteed.

porosity          = 1.0,   -- Porosity to use in material modelling for
                           -- wall representation in elements.
viscous_permeability = 1.0e-6, -- Viscous permeability for the porous
                               -- medium to represent wall geometries in
                               -- elements.
thermal_permeability = 1.0e-3, -- Thermal permeability for the material to
                               -- represent walls.
material = {
  -- Description of the material distribution to define obstacles inside
  -- the domain.
  characteristic = 0.0, -- Masking function (may be a variable) that
                        -- describes where Material is to be found
                        -- (Chi(x,y,z)), should be 1 inside material and 0
                        -- everywhere else.
  relax_velocity = {0, 0, 0}, -- Velocity of the obstacle.
  relax_temperature = 0.0     -- Temperature of the obstacle.
}

}


Uses

  • module~~atl_eqn_euler_module~~UsesGraph module~atl_eqn_euler_module atl_eqn_euler_module aot_out_module aot_out_module module~atl_eqn_euler_module->aot_out_module aotus_module aotus_module module~atl_eqn_euler_module->aotus_module env_module env_module module~atl_eqn_euler_module->env_module tem_aux_module tem_aux_module module~atl_eqn_euler_module->tem_aux_module tem_logging_module tem_logging_module module~atl_eqn_euler_module->tem_logging_module

Used by

  • module~~atl_eqn_euler_module~~UsedByGraph module~atl_eqn_euler_module atl_eqn_euler_module module~atl_eqn_euler_hlp_module atl_eqn_euler_hlp_module module~atl_eqn_euler_hlp_module->module~atl_eqn_euler_module module~atl_eqn_nvrstk_module atl_eqn_nvrstk_module module~atl_eqn_nvrstk_module->module~atl_eqn_euler_module module~atl_equation_module atl_equation_module module~atl_equation_module->module~atl_eqn_euler_module module~atl_godunovflux_module atl_GodunovFlux_module module~atl_godunovflux_module->module~atl_eqn_euler_module module~atl_hlleflux_module atl_hlleFlux_module module~atl_hlleflux_module->module~atl_eqn_euler_module module~atl_laxfriedrichflux_1d_module atl_laxFriedrichFlux_1d_module module~atl_laxfriedrichflux_1d_module->module~atl_eqn_euler_module module~atl_laxfriedrichflux_2d_module atl_laxFriedrichFlux_2d_module module~atl_laxfriedrichflux_2d_module->module~atl_eqn_euler_module module~atl_laxfriedrichflux_module atl_laxFriedrichFlux_module module~atl_laxfriedrichflux_module->module~atl_eqn_euler_module module~atl_physcheck_module atl_physCheck_module module~atl_physcheck_module->module~atl_eqn_euler_module module~atl_stabilize_module atl_stabilize_module module~atl_stabilize_module->module~atl_eqn_euler_module proc~atl_eqn_write atl_eqn_write proc~atl_eqn_write->module~atl_eqn_euler_module

Abstract Interfaces

abstract interface

  • private pure function linearization_indicator(euler, mean, deviation) result(islinear)

    Computation of indicator, whether a linear flux is sufficient.

    Arguments

    Type IntentOptional Attributes Name
    class(atl_euler_type), intent(in) :: euler

    Description of the equation

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

    The mean value of each state

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

    Maximal deviation of each state

    Return Value logical

abstract interface

  • private subroutine euler_numflux(euler, state_left, state_right, material_left, material_right, nPoints, flux)

    Interface definition for numerical fluxes.

    Todo

    HK: should be vectorized to reduce overheads.

    Arguments

    Type IntentOptional Attributes Name
    class(atl_euler_type), intent(in) :: euler

    The global equation specific settings.

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

    State on the left side of the interface.

    First index has to correspond with nPoints, second with number of variables.

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

    State on the right side of the interface.

    First index has to correspond with nPoints, second with number of variables.

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

    Material definition on the left of the interface.

    First index corresponds to nPoints or is 1 for constant material, second index has to correspond with number of material settings.

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

    Material definition on the right of the interface.

    First index corresponds to nPoints or is 1 for constant material, second index has to correspond with number of material settings.

    integer, intent(in) :: nPoints

    Number of points to evaluate the flux at.

    real(kind=rk), intent(out) :: flux(:,:)

    Resulting flux.

    First index has to correspond with nPoints, second with number of variables.


Derived Types

type, public ::  atl_euler_type

The Euler equation properties are stored here

Components

Type Visibility Attributes Name Initial
real(kind=rk), public :: isen_coef

Isentropic coefficient

real(kind=rk), public :: r

Ideal gas constant

real(kind=rk), public :: cv

Heat capacity

real(kind=rk), public :: linear_limit

Limit in energy variation up to which a linearization is to be allowed in elements.

Read more…
logical, public :: ensure_positivity

Ensure that polynomials for density and energy are everywhere positive after transfer to oversampled space.

Read more…
logical, public :: adaptive_timestep

Flag for adaptive timestep calculation

real(kind=rk), public :: porosity

Porosity (for the continuity equation)

real(kind=rk), public :: viscous_permeability

Porosity for the momentum transport

real(kind=rk), public :: thermal_permeability

Porosity for the heat transport

procedure(euler_numflux), public, pointer, pass(euler) :: numflux => NULL()

Procedure to compute the numerical flux for the equation at hand.

Read more…
procedure(linearization_indicator), public, pointer, pass(euler) :: linear => NULL()

Function to decide, whether linearized flux computation would be tolerable.

Read more…

Subroutines

public subroutine atl_load_euler(euler, conf, eq_table)

Subroutine to initialize an equation of type euler equation as defined in the configuration file

Arguments

Type IntentOptional Attributes Name
type(atl_euler_type), intent(out) :: euler

Resulting description of the Euler equation parameters.

type(flu_State) :: conf

Handle to the configuration script, to load the parameters from.

integer, intent(in) :: eq_table

Handle to the table containing the description for the equation system.

public subroutine atl_save_euler(me, eqn_name, conf, withName)

Arguments

Type IntentOptional Attributes Name
type(atl_euler_type), intent(in) :: me
character(len=*), intent(in) :: eqn_name
type(aot_out_type) :: conf
logical, intent(in), optional :: withName

Defines whether or not to print the equation name. Default is true.