# tem_absorbLayer_module Module

This module gathers the various spatial absorbLayer definitions

The definition of sponge profile in the absorb layer is based on: 1) Xu, Hui; Sagaut, Pierre (2013): Analysis of the absorbing layers for the weakly-compressible lattice Boltzmann methods. In Journal of Computational Physics 245, pp. 14–42. DOI: 10.1016/j.jcp.2013.02.051. 2) Jacob, J.; Sagaut, P. (2019): Solid wall and open boundary conditions in hybrid recursive regularized lattice Boltzmann method for compressible flows. In Physics of Fluids 31 (12), p. 126103. DOI: 10.1063/1.5129138.

## Interfaces

### public interface tem_absorbLayer_plane_for

Interface for planar absorbLayer

• ### private function absorbLayer_plane_for_coord(me, coord, n) result(res)

This function calculates the sigma for the absorblayer from coord. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_plane_type) :: me

Spatial absorb layer to evaluate

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

return value

• ### private function absorbLayer_plane_for_treeids(me, treeIds, tree, n) result(res)

This function calculates the sigma for the absorblayer from treeids. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_plane_type) :: me

Spatial absorb layer to evaluate

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

return value

• ### private function absorbLayer_plane_vector_for_coord(me, ncomp, coord, n) result(res)

This function calculates the sigma for the absorblayer from coord and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_plane_type) :: me

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

return value

• ### private function absorbLayer_plane_vector_for_treeids(me, ncomp, treeIds, tree, n) result(res)

This function calculates the sigma for the absorblayer from treeids and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_plane_type) :: me

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

return value

• ### private function absorbLayer_radial_for_coord(me, coord, n, nDim) result(res)

This function calculates the sigma for the absorblayer from coord. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName

Spatial absorb layer to evaluate

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

integer, intent(in) :: nDim

Dimension

return value

• ### private function absorbLayer_radial_for_treeids(me, treeIds, tree, n, nDim) result(res)

This function calculates the sigma for the absorblayer from treeids. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName

Spatial absorb layer to evaluate

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

integer, intent(in) :: nDim

Dimension

return value

• ### private function absorbLayer_radial_vector_for_coord(me, ncomp, coord, n, nDim) result(res)

This function calculates the sigma for the absorblayer from coord and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

integer, intent(in) :: nDim

Dimension

return value

• ### private function absorbLayer_radial_vector_for_treeids(me, ncomp, treeIds, tree, n, nDim) result(res)

This function calculates the sigma for the absorblayer from treeids and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

integer, intent(in) :: nDim

Dimension

return value

### public interface tem_absorbLayer_box_for

Interface for box absorbLayer

• ### private function absorbLayer_box_for_coord(me, coord, n) result(res)

This function calculates the sigma for the absorblayer from coord and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_box_type) :: me

Spatial absorb layer to evaluate

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

return value

• ### private function absorbLayer_box_for_treeids(me, treeIds, tree, n) result(res)

This function calculates the sigma for the absorblayer from treeids and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_box_type) :: me

Spatial absorb layer to evaluate

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

return value

• ### private function absorbLayer_box_vector_for_coord(me, ncomp, coord, n) result(res)

This function calculates the sigma for the absorblayer from coord and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_box_type) :: me

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

return value

• ### private function absorbLayer_box_vector_for_treeids(me, ncomp, treeIds, tree, n) result(res)

This function calculates the sigma for the absorblayer from treeids and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_box_type) :: me

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

return value

## Derived Types

### type, public :: tem_absorbLayer_plane_type

This type contains data to define planar absorbLayer

#### Components

TypeVisibility AttributesNameInitial
real(kind=rk), public :: origin(3)

Plane origin, start of absorb layer

real(kind=rk), public :: unitNormal(3)

Plane normal should point outwards the domain and it should be unitNormal

type(absorbLayer_base_type), public :: base

Basic common data for all absorb layers

### type, public :: tem_absorbLayer_box_type

This type contains data to define box absorbLayer.

#### Components

TypeVisibility AttributesNameInitial
real(kind=rk), public :: origin(3)

Box origin, bottom left corner of absorb layer

real(kind=rk), public :: extent(3)

Length of box in each dimension

type(absorbLayer_base_type), public :: base

Basic common data for all absorb layers

This type contains data to define radial absorbLayer.

#### Components

TypeVisibility AttributesNameInitial
real(kind=rk), public :: origin(3)

type(absorbLayer_base_type), public :: base

Basic common data for all absorb layers

### type, private :: absorbLayer_base_type

This type contains data to define base absorbLayer

#### Components

TypeVisibility AttributesNameInitial
real(kind=rk), public :: thickness

Thickness of absorb layer

real(kind=rk), public :: strength

Strength factor for the absorb Layer

real(kind=rk), public :: targetState(4)

target state: pressure, velocityX, velocityY and velocityZ

## Functions

### private function absorbLayer_plane_for_coord(me, coord, n) result(res)

This function calculates the sigma for the absorblayer from coord. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_plane_type) :: me

Spatial absorb layer to evaluate

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

return value

### private function absorbLayer_plane_vector_for_coord(me, ncomp, coord, n) result(res)

This function calculates the sigma for the absorblayer from coord and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_plane_type) :: me

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

return value

### private function absorbLayer_plane_for_treeids(me, treeIds, tree, n) result(res)

This function calculates the sigma for the absorblayer from treeids. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_plane_type) :: me

Spatial absorb layer to evaluate

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

return value

### private function absorbLayer_plane_vector_for_treeids(me, ncomp, treeIds, tree, n) result(res)

This function calculates the sigma for the absorblayer from treeids and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_plane_type) :: me

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

return value

### private function absorbLayer_box_for_coord(me, coord, n) result(res)

This function calculates the sigma for the absorblayer from coord and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_box_type) :: me

Spatial absorb layer to evaluate

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

return value

### private function absorbLayer_box_vector_for_coord(me, ncomp, coord, n) result(res)

This function calculates the sigma for the absorblayer from coord and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_box_type) :: me

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

return value

### private function absorbLayer_box_for_treeids(me, treeIds, tree, n) result(res)

This function calculates the sigma for the absorblayer from treeids and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_box_type) :: me

Spatial absorb layer to evaluate

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

return value

### private function absorbLayer_box_vector_for_treeids(me, ncomp, treeIds, tree, n) result(res)

This function calculates the sigma for the absorblayer from treeids and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_box_type) :: me

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

return value

### private function absorbLayer_radial_for_coord(me, coord, n, nDim) result(res)

This function calculates the sigma for the absorblayer from coord. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName

Spatial absorb layer to evaluate

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

integer, intent(in) :: nDim

Dimension

return value

### private function absorbLayer_radial_vector_for_coord(me, ncomp, coord, n, nDim) result(res)

This function calculates the sigma for the absorblayer from coord and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: n

Number of arrays to return

integer, intent(in) :: nDim

Dimension

return value

### private function absorbLayer_radial_for_treeids(me, treeIds, tree, n, nDim) result(res)

This function calculates the sigma for the absorblayer from treeids. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName

Spatial absorb layer to evaluate

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

integer, intent(in) :: nDim

Dimension

return value

### private function absorbLayer_radial_vector_for_treeids(me, ncomp, treeIds, tree, n, nDim) result(res)

This function calculates the sigma for the absorblayer from treeids and fills up the res with the target state. Sponge profile: where, \sigma_A - sponge strength, L - thickness, x0 - start of sponge.

#### Arguments

Type IntentOptional AttributesName

Spatial absorb layer to evaluate

integer, intent(in) :: ncomp

Number of entrys in each array

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

type(treelmesh_type), intent(in) :: tree

global treelm mesh

integer, intent(in) :: n

Number of arrays to return

integer, intent(in) :: nDim

Dimension

return value

## Subroutines

### public subroutine tem_load_absorbLayer_plane(me, conf, thandle, nComp)

This routine load planar absorbLayer. Example:

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_plane_type), intent(out) :: me

Plane absorb layer

type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

aotus parent handle

integer, intent(in) :: nComp

Number of components, load target_state only if nComp > 1

### public subroutine tem_load_absorbLayer_box(me, conf, thandle, nComp)

This routine load box absorbLayer. Box must be axis-aligned so it is defined by an origin and extent in 3 dimensions. Example:

#### Arguments

Type IntentOptional AttributesName
type(tem_absorbLayer_box_type), intent(out) :: me

Plane absorb layer

type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

aotus parent handle

integer, intent(in) :: nComp

Number of components, load target_state only if nComp > 1

#### Arguments

Type IntentOptional AttributesName

Plane absorb layer

type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

aotus parent handle

integer, intent(in) :: nComp

Number of components, load target_state only if nComp > 1

### private subroutine load_absorbLayer_base(me, nComp, conf, thandle)

This routine load base info for absorbLayer

#### Arguments

Type IntentOptional AttributesName
type(absorbLayer_base_type), intent(out) :: me

Base info for absorb layer

integer, intent(in) :: nComp

Number of components, load target_state only if nComp > 1

type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

aotus parent handle