m_config Module

Contains all the namelist configurations used in x3d2


Uses

  • module~~m_config~~UsesGraph module~m_config m_config module~m_common m_common module~m_config->module~m_common module~m_logger m_logger module~m_config->module~m_logger module~m_common->module~m_logger m_mpi m_mpi module~m_common->m_mpi iso_fortran_env iso_fortran_env module~m_logger->iso_fortran_env module~m_logger->m_mpi

Used by

  • module~~m_config~~UsedByGraph module~m_config m_config module~m_abl m_abl module~m_abl->module~m_config module~m_les m_les module~m_abl->module~m_les module~m_abl_diagnostics m_abl_diagnostics module~m_abl_diagnostics->module~m_config module~m_abl_diagnostics->module~m_les module~m_base_case m_base_case module~m_base_case->module~m_config module~m_solver m_solver module~m_base_case->module~m_solver module~m_io_manager m_io_manager module~m_base_case->module~m_io_manager module~m_monitoring m_monitoring module~m_base_case->module~m_monitoring module~m_postprocess m_postprocess module~m_base_case->module~m_postprocess module~m_case_abl m_case_abl module~m_case_abl->module~m_config module~m_case_abl->module~m_abl module~m_case_abl->module~m_abl_diagnostics module~m_case_abl->module~m_base_case module~m_case_channel m_case_channel module~m_case_channel->module~m_config module~m_case_channel->module~m_base_case module~m_case_channel->module~m_solver module~m_case_cylinder m_case_cylinder module~m_case_cylinder->module~m_config module~m_case_cylinder->module~m_base_case module~m_case_cylinder->module~m_solver module~m_case_wind_turbine m_case_wind_turbine module~m_case_wind_turbine->module~m_config module~m_case_wind_turbine->module~m_base_case module~m_case_wind_turbine->module~m_solver module~m_checkpoint_manager m_checkpoint_manager module~m_checkpoint_manager->module~m_config module~m_checkpoint_manager->module~m_solver module~m_stats m_stats module~m_checkpoint_manager->module~m_stats module~m_io_field_utils m_io_field_utils module~m_checkpoint_manager->module~m_io_field_utils module~m_les->module~m_config module~m_snapshot_manager m_snapshot_manager module~m_snapshot_manager->module~m_config module~m_snapshot_manager->module~m_solver module~m_snapshot_manager->module~m_io_field_utils module~m_solver->module~m_config module~m_solver->module~m_les module~m_stats->module~m_config module~m_stats->module~m_solver program~xcompact xcompact program~xcompact->module~m_config program~xcompact->module~m_base_case program~xcompact->module~m_case_abl program~xcompact->module~m_case_channel program~xcompact->module~m_case_cylinder program~xcompact->module~m_case_wind_turbine module~m_case_generic m_case_generic program~xcompact->module~m_case_generic module~m_case_tgv m_case_tgv program~xcompact->module~m_case_tgv module~m_case_generic->module~m_base_case module~m_case_generic->module~m_solver module~m_case_tgv->module~m_base_case module~m_case_tgv->module~m_solver module~m_io_field_utils->module~m_solver module~m_io_manager->module~m_checkpoint_manager module~m_io_manager->module~m_snapshot_manager module~m_io_manager->module~m_solver module~m_io_manager->module~m_stats module~m_monitoring->module~m_solver module~m_postprocess->module~m_solver

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: n_species_max = 99

Maximum number of additional snapshot output fields accepted from the input file. Some entries, such as species, can expand to multiple written snapshot fields.

integer, public, parameter :: MAX_OUTPUT_FIELDS = 10

Abstract Interfaces

abstract interface

  • public subroutine read(self, nml_file, nml_string)

    Assigns the member variables either from a file or text source.

    nml_file can be an absolute or relative path nml_string is a character string that contains the namelist. For example, nml_string="&foobar_nml foo=0, bar='this'/"

    Arguments

    Type IntentOptional Attributes Name
    class(base_config_t) :: self
    character(len=*), intent(in), optional :: nml_file
    character(len=*), intent(in), optional :: nml_string

Derived Types

type, public, abstract ::  base_config_t

All config types have a method read to initialise their data

Type-Bound Procedures

procedure(read), public, deferred :: read

type, public, extends(base_config_t) ::  domain_config_t

Components

Type Visibility Attributes Name Initial
character(len=30), public :: flow_case_name
real(kind=dp), public :: L_global(3)
integer, public :: dims_global(3)
integer, public :: nproc_dir(3)
character(len=20), public :: BC_x(2)
character(len=20), public :: BC_y(2)
character(len=20), public :: BC_z(2)
character(len=20), public :: stretching(3)
real(kind=dp), public :: beta(3)

Type-Bound Procedures

procedure, public :: read => read_domain_nml

type, public, extends(base_config_t) ::  solver_config_t

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: Re
real(kind=dp), public :: dt
logical, public :: ibm_on
real(kind=dp), public, dimension(:), allocatable :: pr_species
integer, public :: n_iters
integer, public :: n_output
integer, public :: n_species
logical, public :: lowmem_transeq
logical, public :: lowmem_fft
logical, public :: spatial_filter

explicit low-pass filter on velocity

real(kind=dp), public :: filter_alpha

filter parameter, -0.5 < alpha < 0.5

character(len=3), public :: poisson_solver_type
character(len=3), public :: time_intg
character(len=30), public :: der1st_scheme
character(len=30), public :: der2nd_scheme
character(len=30), public :: interpl_scheme
character(len=30), public :: stagder_scheme
real(kind=dp), public :: c_nu

hyperviscous (iSVV) der2nd parameters

real(kind=dp), public :: nu0_nu

hyperviscous (iSVV) der2nd parameters

Type-Bound Procedures

procedure, public :: read => read_solver_nml

type, public, extends(base_config_t) ::  les_config_t

Configuration for explicit sub-grid-scale modelling.

Components

Type Visibility Attributes Name Initial
character(len=20), public :: model = 'none'
real(kind=dp), public :: smagorinsky_constant = 0.14_dp
logical, public :: wall_damping = .false.
real(kind=dp), public :: wall_damping_n = 3._dp

Type-Bound Procedures

procedure, public :: read => read_les_nml

type, public, extends(base_config_t) ::  channel_config_t

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: omega_rot
real(kind=dp), public :: init_noise(3)
real(kind=dp), public :: inlet_noise(3)
logical, public :: rotation
integer, public :: n_rotate

Type-Bound Procedures

procedure, public :: read => read_channel_nml

type, public, extends(base_config_t) ::  cylinder_config_t

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: init_noise(3)
real(kind=dp), public :: inlet_noise(3)

Type-Bound Procedures

procedure, public :: read => read_cylinder_nml

type, public, extends(base_config_t) ::  wind_turbine_config_t

Configuration for the wind-turbine carrier case. Inflow/outflow and initial noise mirror the cylinder case; the turbine block selects and drives the turbine forcing model.

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: init_noise(3) = 0._dp
real(kind=dp), public :: inlet_noise(3) = 0._dp

perturbation applied at inlet each substep

real(kind=dp), public :: bc_start_u = 1._dp

uniform inflow u (Dirichlet at i=1)

real(kind=dp), public :: bc_start_v = 0._dp
real(kind=dp), public :: bc_start_w = 0._dp
integer, public :: iturbine = 0

0: none, 1: actuator line, 2: disc

integer, public :: iturboutput = 1

turbine diagnostics output frequency

character(len=256), public :: adm_coords = ''

actuator-disc (.ad) coords file

real(kind=dp), public :: rho_air = 1._dp

air density used in thrust/power

real(kind=dp), public :: T_relax = -1._dp

ADM velocity-filter time; < 0 disables

Type-Bound Procedures

procedure, public :: read => read_wind_turbine_nml

type, public, extends(base_config_t) ::  abl_config_t

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: z0 = 0.1_dp

aerodynamic roughness length

real(kind=dp), public :: u_star = 0._dp

friction velocity

real(kind=dp), public :: delta = 1._dp

boundary-layer depth

real(kind=dp), public :: kappa = 0.41_dp

von Karman constant

real(kind=dp), public :: dsampling = 3._dp

wall-model sampling height, in dy

real(kind=dp), public :: u_geo(3) = 0._dp

geostrophic wind UG

real(kind=dp), public :: coriolis_freq = 0._dp

Coriolis frequency f

real(kind=dp), public :: init_noise(3) = 0._dp
integer, public :: seed = 0

Seed for the initial noise; 0 draws one from the clock

real(kind=dp), public :: u_bulk = 0._dp

target bulk velocity (mass_conserve)

integer, public :: profile_start_iter = -1

first profile sample (-1 = disabled)

character(len=256), public :: profile_file = 'abl_profile.csv'
logical, public :: pressure_gradient = .false.
logical, public :: coriolis = .false.
logical, public :: mass_conserve = .false.
logical, public :: damping = .false.

Type-Bound Procedures

procedure, public :: read => read_abl_nml

type, public, extends(base_config_t) ::  stats_config_t

Components

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

iteration to start accumulating (0 = disabled)

integer, public :: istatfreq = 1

accumulate every N steps

integer, public :: istatout = 0

write stats every N steps (0 = disabled)

character(len=256), public :: stats_prefix = "statistics"

Type-Bound Procedures

procedure, public :: read => read_stats_nml

type, public, extends(base_config_t) ::  checkpoint_config_t

Components

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

Frequency of checkpointing (0 = off)

integer, public :: snapshot_freq = 0

Frequency of snapshots (0 = off)

logical, public :: keep_checkpoint = .true.

If false, only keep latest checkpoint

character(len=256), public :: checkpoint_prefix = "checkpoint"
character(len=256), public :: snapshot_prefix = "snapshot"
logical, public :: restart_from_checkpoint = .false.
character(len=256), public :: restart_file = ""
integer, public, dimension(3) :: output_stride = [2, 2, 2]

Spatial stride for snapshot output

logical, public :: snapshot_sp = .false.

if true, snapshot in single precision

character(len=32), public :: output_fields(MAX_OUTPUT_FIELDS) = ''

additional snapshot output fields

Type-Bound Procedures

procedure, public :: read => read_checkpoint_nml

Functions

public pure function has_output_field(config, name)

Check whether a field name is present in the output_fields list.

Arguments

Type IntentOptional Attributes Name
type(checkpoint_config_t), intent(in) :: config
character(len=*), intent(in) :: name

Return Value logical


Subroutines

public subroutine read_domain_nml(self, nml_file, nml_string)

Arguments

Type IntentOptional Attributes Name
class(domain_config_t) :: self
character(len=*), intent(in), optional :: nml_file
character(len=*), intent(in), optional :: nml_string

public subroutine read_solver_nml(self, nml_file, nml_string)

Arguments

Type IntentOptional Attributes Name
class(solver_config_t) :: self
character(len=*), intent(in), optional :: nml_file
character(len=*), intent(in), optional :: nml_string

public subroutine read_les_nml(self, nml_file, nml_string)

Arguments

Type IntentOptional Attributes Name
class(les_config_t) :: self
character(len=*), intent(in), optional :: nml_file
character(len=*), intent(in), optional :: nml_string

public subroutine read_channel_nml(self, nml_file, nml_string)

Arguments

Type IntentOptional Attributes Name
class(channel_config_t) :: self
character(len=*), intent(in), optional :: nml_file
character(len=*), intent(in), optional :: nml_string

public subroutine read_cylinder_nml(self, nml_file, nml_string)

Arguments

Type IntentOptional Attributes Name
class(cylinder_config_t) :: self
character(len=*), intent(in), optional :: nml_file
character(len=*), intent(in), optional :: nml_string

public subroutine read_wind_turbine_nml(self, nml_file, nml_string)

Arguments

Type IntentOptional Attributes Name
class(wind_turbine_config_t) :: self
character(len=*), intent(in), optional :: nml_file
character(len=*), intent(in), optional :: nml_string

public subroutine read_abl_nml(self, nml_file, nml_string)

Arguments

Type IntentOptional Attributes Name
class(abl_config_t) :: self
character(len=*), intent(in), optional :: nml_file
character(len=*), intent(in), optional :: nml_string

public subroutine validate_abl_config(config)

Validate relationships between ABL namelist values in one place.

Arguments

Type IntentOptional Attributes Name
type(abl_config_t), intent(in) :: config

public subroutine read_checkpoint_nml(self, nml_file, nml_string)

Arguments

Type IntentOptional Attributes Name
class(checkpoint_config_t) :: self
character(len=*), intent(in), optional :: nml_file
character(len=*), intent(in), optional :: nml_string

public subroutine read_stats_nml(self, nml_file, nml_string)

Arguments

Type IntentOptional Attributes Name
class(stats_config_t) :: self
character(len=*), intent(in), optional :: nml_file
character(len=*), intent(in), optional :: nml_string