mus_field_module Module

This module contains information about all fields like fluid, species, temperature etc. This field type will be used for multispecies and passive scalar transport.

[mus_field_prop]: @ref mus_field_prop_module "mus_field_prop_module"


Uses

Used by

  • module~~mus_field_module~~UsedByGraph module~mus_field_module mus_field_module module~mus_bndforce_module mus_bndForce_module module~mus_bndforce_module->module~mus_field_module module~mus_bc_general_module mus_bc_general_module module~mus_bc_general_module->module~mus_field_module module~mus_auxfield_module mus_auxField_module module~mus_auxfield_module->module~mus_field_module module~mus_scheme_type_module mus_scheme_type_module module~mus_scheme_type_module->module~mus_field_module module~mus_construction_module mus_construction_module module~mus_construction_module->module~mus_field_module module~mus_variable_module mus_variable_module module~mus_variable_module->module~mus_field_module module~mus_control_module mus_control_module module~mus_control_module->module~mus_field_module module~mus_source_module mus_source_module module~mus_source_module->module~mus_field_module module~mus_bc_var_module mus_bc_var_module module~mus_bc_var_module->module~mus_field_module module~mus_aux_module mus_aux_module module~mus_aux_module->module~mus_field_module module~mus_scheme_module mus_scheme_module module~mus_scheme_module->module~mus_field_module module~mus_flow_module mus_flow_module module~mus_flow_module->module~mus_field_module

Contents


Interfaces

public interface mus_fields_out

Interface for dumping a single field or a set of fields in a file in lua format.

  • private subroutine mus_fields_out_vec(me, conf, schemeHeader)

    write array of fields into a lua file

    Arguments

    TypeIntentOptionalAttributesName
    type(mus_field_type), intent(in) :: me(:)

    array of field type

    type(aot_out_type), intent(inout) :: conf

    aotus out type

    type(mus_scheme_header_type), intent(in) :: schemeHeader

    identifier of the scheme

  • private subroutine mus_field_out_scal(me, conf, schemeHeader, level)

    write single field into a lua file

    Arguments

    TypeIntentOptionalAttributesName
    type(mus_field_type), intent(in) :: me

    single field type

    type(aot_out_type), intent(inout) :: conf

    aotus out type

    type(mus_scheme_header_type), intent(in) :: schemeHeader

    identifier of the scheme

    integer, intent(in), optional :: level

    To dump field with or without key


Derived Types

type, public :: mus_field_type

This type contains all information on fields with ic and bc Example fields: fluid, species etc. Each field contains one initial condition and array of boundary conditions

Components

TypeVisibilityAttributesNameInitial
character(len=labelLen), private :: label

field label. Should be unique for each field

type(mus_field_prop_type), private :: fieldProp

physics parameters (fluid and species) for field

type(boundary_type), private, allocatable:: bc(:)

array of field boundary types for each field size: #BCs in the boundary_condition table allocated in mus_load_bc

type(tem_ini_condition_type), private :: ic

initialization case, one initial condition for each field

type(mus_source_type), private :: source

field source applied only to current field

type(tem_restart_type), private :: restart

An instance of restart type


Functions

public pure function mus_check_allWall(nFields, fields, iBC) result(allWall)

Check if a BC is wall or symmetry for all fields

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: nFields
type(mus_field_type), intent(in) :: fields(nFields)
integer, intent(in) :: iBC

Return Value logical


Subroutines

public subroutine mus_load_fields(me, varSys, nFields, mixture, nernstPlanck, bc_prop, conf, parent, minLevel, maxLevel, schemeHeader, poss_srcVar, physics, scaling, layout, isMusHvs)

Subroutine to load the field table from the lua configuration file.

Read more…

Arguments

TypeIntentOptionalAttributesName
type(mus_field_type), intent(inout) :: me(:)

array of field type

type(tem_varSys_type), intent(inout) :: varSys

Global variable system required to append annoymous source and boundary variables

integer, intent(in) :: nFields
type(mus_mixture_type), intent(out) :: mixture

contains mixture information

type(mus_nernstPlanck_type), intent(out) :: nernstPlanck

contains solvent information

type(tem_BC_prop_type), intent(in) :: bc_prop

boundary data from mesh

type(flu_State), intent(inout) :: conf

flu state

integer, intent(in), optional :: parent

parent handle if scheme table is defined

integer, intent(in) :: minLevel

global pdf info

integer, intent(in) :: maxLevel

global pdf info

type(mus_scheme_header_type), intent(in) :: schemeHeader

identifier of the scheme

type(tem_possible_variable_type), intent(in) :: poss_srcVar

possible source variables

type(mus_physics_type), intent(in) :: physics

physics type to convert physics to lattice unit or vice versa

character(len=labelLen), intent(in) :: scaling

scaling type

type(mus_scheme_layout_type), intent(in) :: layout

fluid stencil info

logical, intent(in), optional :: isMusHvs

Logic to not to load tracking and variable table if this routine is called from mus_hvs_config_load. Default is False

public subroutine mus_load_fieldBaseInfos(me, nFields, parent, conf)

This routine returns nFields and field labels from config file. It is required to initialize variable system. labels are loaded only if field table is present else default is set to empty string.

Arguments

TypeIntentOptionalAttributesName
type(mus_field_type), intent(out), allocatable:: me(:)

array of field type

integer, intent(out) :: nFields

number of fields defined in lua file

integer, intent(in), optional :: parent

parent handle if scheme table is defined

type(flu_State), intent(inout) :: conf

flu state

public subroutine setParameters_multispecies(field, nFields, mixture, header, layout, iLevel, tNow)

Set parameters for multispecies

Read more…

Arguments

TypeIntentOptionalAttributesName
type(mus_field_type), intent(inout) :: field(nFields)
integer, intent(in) :: nFields
type(mus_mixture_type), intent(inout) :: mixture
type(mus_scheme_header_type), intent(in) :: header
type(mus_scheme_layout_type), intent(in) :: layout
integer, intent(in) :: iLevel
type(tem_time_type), intent(in) :: tNow

solver general info

public subroutine remove_solid_in_bc(minLevel, maxLevel, nBCs, nFields, levelPointer, levelDesc, globBC, fields)

First check count number of valid elements (non-solid) in each BC. Then rearrange BC elements list so it contains only valid elements. Update fields%bc%elemLvl%stencilPos fields%bc%elemLvl%posInNghElems accordingly.

Read more…

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: minLevel
integer, intent(in) :: maxLevel
integer, intent(in) :: nBCs
integer, intent(in) :: nFields
integer, intent(in) :: levelPointer(:)

Level pointer

type(tem_levelDesc_type), intent(in) :: levelDesc(minLevel:maxLevel)

Level Descriptor

type(glob_boundary_type) :: globBC(nBCs)
type(mus_field_type) :: fields(nFields)

public subroutine mus_field_getSymmetricBCs(symmetricBCs, nSymBCs, nBCs, nFields, field)

This routine checks for the existence of symmetric boundaries and returns the boundary IDs which are defined as symmetry

Arguments

TypeIntentOptionalAttributesName
integer, intent(out) :: symmetricBCs(nBCs)

Symmetric boundary ids

integer, intent(out) :: nSymBCs

Number of symmetric boundary conditions

integer, intent(in) :: nBCs

number of boundary conditions

integer, intent(in) :: nFields

number of fields

type(mus_field_type), intent(in) :: field(nFields)

all fields to access their boundary definitions

public subroutine mus_field_cleanup(me, schemeHeader, minLevel, maxLevel, nBCs, nFields)

This routines act as a destructor for field type. Only allocatable arrays which are allocated in mus_construct routine are deallocated. KM: DO NOT DESTROY FIELD ARRAY AS IT CONTAINS ALL CONFIG INFO

Arguments

TypeIntentOptionalAttributesName
type(mus_field_type), intent(inout) :: me(:)

single field type

type(mus_scheme_header_type), intent(in) :: schemeHeader

identifier of the scheme

integer, intent(in) :: minLevel

minlevel

integer, intent(in) :: maxLevel

maxlevel

integer, intent(in) :: nBCs

Number of boundary conditions

integer, intent(in) :: nFields

Number of fields

private subroutine mus_load_field_single(me, varSys, nFields, bc_prop, conf, parent, minLevel, maxLevel, poss_srcVar, physics, schemeHeader, scaling, layout, isMusHvs)

load a single field table In includes: load field property load source variables load boundary defination load immersed boundary method load initial condition defination and its property

Arguments

TypeIntentOptionalAttributesName
type(mus_field_type), intent(inout) :: me

field type

type(tem_varSys_type), intent(inout) :: varSys

Global variable system required to append annoymous source and boundary variables

integer, intent(in) :: nFields

number of fields defined in lua file

type(tem_BC_prop_type), intent(in) :: bc_prop

boundary data from mesh

type(flu_State), intent(inout) :: conf

flu state

integer, intent(in), optional :: parent

parent handle if scheme table is defined

integer, intent(in) :: minLevel

global pdf info

integer, intent(in) :: maxLevel

global pdf info

type(tem_possible_variable_type), intent(in) :: poss_srcVar

possible source variables

type(mus_physics_type), intent(in) :: physics

physics type to convert physics to lattice unit or vice versa

type(mus_scheme_header_type), intent(in) :: schemeHeader

identifier of the scheme

character(len=labelLen), intent(in) :: scaling

scaling type

type(mus_scheme_layout_type), intent(in) :: layout

fluid stencil info

logical, intent(in), optional :: isMusHvs

Logic to not to load tracking and variable table if this routine is called from mus_hvs_config_load. Default is False

private subroutine mus_fields_out_vec(me, conf, schemeHeader)

write array of fields into a lua file

Arguments

TypeIntentOptionalAttributesName
type(mus_field_type), intent(in) :: me(:)

array of field type

type(aot_out_type), intent(inout) :: conf

aotus out type

type(mus_scheme_header_type), intent(in) :: schemeHeader

identifier of the scheme

private subroutine mus_field_out_scal(me, conf, schemeHeader, level)

write single field into a lua file

Arguments

TypeIntentOptionalAttributesName
type(mus_field_type), intent(in) :: me

single field type

type(aot_out_type), intent(inout) :: conf

aotus out type

type(mus_scheme_header_type), intent(in) :: schemeHeader

identifier of the scheme

integer, intent(in), optional :: level

To dump field with or without key

private subroutine mus_set_ic_states(scheme_kind, ic_states, IC_nVars)

Set ic states labels by scheme kind

Arguments

TypeIntentOptionalAttributesName
character(len=labelLen), intent(in) :: scheme_kind
character(len=labelLen), allocatable:: ic_states(:)
integer, intent(out) :: IC_nVars

Number of initial condition variables required to initialize state