tem_temporal_module Module

This module gathers different temporal effect treatments. like: constant, lua function and predefined Fortran function. \n Currently supports:

  • const: data is a constant value
  • lua_fun: data is a lua function
  • linear: data is ramped linearly
  • smooth: data is ramped with a smooth function
  • cos: oscillation as a cosine function
  • from_file: data is read from file (supports periodicity)

Note

Boundaries can be defined with superposed conditions in space and time. Therefore the function defined here acts as a factor applied to the overall boundary value.


Uses

  • module~~tem_temporal_module~~UsesGraph module~tem_temporal_module tem_temporal_module aot_fun_module aot_fun_module module~tem_temporal_module->aot_fun_module aot_references_module aot_references_module module~tem_temporal_module->aot_references_module aot_table_module aot_table_module module~tem_temporal_module->aot_table_module aotus_module aotus_module module~tem_temporal_module->aotus_module module~env_module env_module module~tem_temporal_module->module~env_module module~tem_aux_module tem_aux_module module~tem_temporal_module->module~tem_aux_module module~tem_grow_array_module tem_grow_array_module module~tem_temporal_module->module~tem_grow_array_module module~tem_logging_module tem_logging_module module~tem_temporal_module->module~tem_logging_module module~tem_param_module tem_param_module module~tem_temporal_module->module~tem_param_module module~tem_time_module tem_time_module module~tem_temporal_module->module~tem_time_module module~env_module->aotus_module flu_binding flu_binding module~env_module->flu_binding iso_fortran_env iso_fortran_env module~env_module->iso_fortran_env mpi mpi module~env_module->mpi module~tem_aux_module->aot_table_module module~tem_aux_module->aotus_module module~tem_aux_module->module~env_module module~tem_aux_module->module~tem_logging_module module~tem_aux_module->flu_binding module~soi_revision_module soi_revision_module module~tem_aux_module->module~soi_revision_module module~tem_comm_env_module tem_comm_env_module module~tem_aux_module->module~tem_comm_env_module module~tem_lua_requires_module tem_lua_requires_module module~tem_aux_module->module~tem_lua_requires_module module~tem_tools_module tem_tools_module module~tem_aux_module->module~tem_tools_module module~tem_aux_module->mpi module~tem_grow_array_module->module~env_module module~tem_logging_module->aot_table_module module~tem_logging_module->aotus_module module~tem_logging_module->module~env_module module~tem_param_module->module~env_module module~tem_time_module->aot_table_module module~tem_time_module->aotus_module module~tem_time_module->module~env_module aot_out_module aot_out_module module~tem_time_module->aot_out_module module~tem_time_module->mpi module~tem_comm_env_module->mpi module~tem_lua_requires_module->aot_table_module module~tem_lua_requires_module->aotus_module module~tem_lua_requires_module->module~env_module module~tem_lua_requires_module->flu_binding iso_c_binding iso_c_binding module~tem_lua_requires_module->iso_c_binding module~tem_tools_module->module~env_module

Used by

  • module~~tem_temporal_module~~UsedByGraph module~tem_temporal_module tem_temporal_module module~tem_spacetime_fun_module tem_spacetime_fun_module module~tem_spacetime_fun_module->module~tem_temporal_module module~tem_bc_module tem_bc_module module~tem_bc_module->module~tem_spacetime_fun_module module~tem_varmap_module tem_varMap_module module~tem_bc_module->module~tem_varmap_module module~tem_derived_module tem_derived_module module~tem_derived_module->module~tem_spacetime_fun_module module~tem_spacetime_var_module tem_spacetime_var_module module~tem_derived_module->module~tem_spacetime_var_module module~tem_variable_module tem_variable_module module~tem_derived_module->module~tem_variable_module module~tem_operation_var_module tem_operation_var_module module~tem_derived_module->module~tem_operation_var_module module~tem_face_module tem_face_module module~tem_face_module->module~tem_spacetime_fun_module module~tem_spacetime_var_module->module~tem_spacetime_fun_module module~tem_spacetime_var_module->module~tem_variable_module module~tem_surfacedata_module tem_surfaceData_module module~tem_surfacedata_module->module~tem_spacetime_fun_module module~tem_variable_module->module~tem_spacetime_fun_module module~tem_varmap_module->module~tem_spacetime_fun_module module~tem_varmap_module->module~tem_spacetime_var_module module~hvs_output_module hvs_output_module module~hvs_output_module->module~tem_varmap_module module~tem_restart_module tem_restart_module module~hvs_output_module->module~tem_restart_module module~tem_convergence_module tem_convergence_module module~tem_convergence_module->module~tem_varmap_module module~tem_depend_module tem_depend_module module~tem_depend_module->module~tem_varmap_module module~tem_operation_var_module->module~tem_variable_module module~tem_operation_var_module->module~tem_varmap_module module~tem_restart_module->module~tem_varmap_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_varmap_module module~tem_tracking_module->module~hvs_output_module module~tem_abortcriteria_module tem_abortCriteria_module module~tem_abortcriteria_module->module~tem_convergence_module module~tem_general_module tem_general_module module~tem_general_module->module~tem_restart_module module~tem_ini_condition_module tem_ini_condition_module module~tem_ini_condition_module->module~tem_depend_module module~tem_simcontrol_module tem_simControl_module module~tem_simcontrol_module->module~tem_convergence_module

Derived Types

type, public ::  tem_temporal_type

defines different temporal types like const, lua func or predefined func

Components

Type Visibility Attributes Name Initial
character(len=LabelLen), public :: kind

temporal kind

real(kind=rk), public :: const

constant value

integer, public :: lua_fun_ref = 0

Reference to the Lua function if the temporal function is defined as a Lua function.

type(flu_State), public :: conf

Handle to the Lua script for the Lua function

type(tem_linear_type), public :: linear

contains information for predefined functions

type(tem_from_file_temporal_type), public :: from_file

contains information for reading the data from file

real(kind=rk), public :: freq

frequency of oscillation Load in routine: load_temporal_cos

real(kind=rk), public :: phi

initial phase

real(kind=rk), public :: offset

offset

type, private ::  tem_linear_type

contains information for predefined temporal functions

Components

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

start time

real(kind=rk), public :: to_time

end time

real(kind=rk), public :: min_factor

minimum factor at start time

real(kind=rk), public :: max_factor

maximum factor at end time

type, private ::  tem_from_file_temporal_type

contains information for loading inlet velocities from a datafile The data has to be stored as tuples (time,velocity) columnwise. t1 v1 t2 v2 ... tn vn and v1 .eq. vn has to be fullfilled. The data has to be provided in the format '(e15.8)'

Components

Type Visibility Attributes Name Initial
character(len=PathLen), public :: datafile

filename of the data

character(len=LabelLen), public :: intp

interpolate linearly between the data

type(grw_real2darray_type), public :: signal

growing array of tuples (time, velocity)

logical, public :: ramp = .false.

ramping active?

real(kind=rk), public :: rampVal

ramping value at the end of rampT

real(kind=rk), public :: rampT

ramping time

real(kind=rk), public :: fac

factor to multiply data with

logical, public :: periodic

is the data periodic?


Functions

public function tem_temporal_for(temporal, time) result(res)

This function invokes the type of the boundary such as constant, lua or predefined Fortran function.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_temporal_type) :: temporal

boundary state

type(tem_time_type), intent(in) :: time

timer object incl. the current time information

Return Value real(kind=rk)

return value of a function

private pure function temporal_linear_for(me, t) result(res)

This function returns value of linear function which is defined by from_time, to_time, min_factor and max_factor

Arguments

Type IntentOptional Attributes Name
type(tem_linear_type), intent(in) :: me

temporal linear type

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

current time

Return Value real(kind=rk)

return value of a function

private pure function temporal_smooth_for(me, t) result(res)

This function returns value of smooth sin function which is defined by from_time, to_time, min_factor and max_factor

Arguments

Type IntentOptional Attributes Name
type(tem_linear_type), intent(in) :: me

temporal smooth type

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

current time

Return Value real(kind=rk)

return value of a function

private function temporal_lua_for(fun_ref, time, conf) result(res)

This function evaluate lua function and return its result

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: fun_ref

Lua reference to the function to evaluate.

type(tem_time_type), intent(in) :: time

timer object incl. the current time information

type(flu_State) :: conf

optional lua state

Return Value real(kind=rk)

return value

private function temporal_from_file_periodic_for(me, time) result(res)

This function searches for the right values in the periodic data read from file and interpolates them if needed.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_from_file_temporal_type) :: me

datatype incl. the data read from file

type(tem_time_type), intent(in) :: time

timer object incl. the current time information

Return Value real(kind=rk)

return value


Subroutines

public subroutine tem_load_temporal(me, conf, parent, key)

This subroutine load temporal table defined for a boundary.\n

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_temporal_type), intent(out) :: me

boundary temporal type

type(flu_State) :: conf

lua state

integer, intent(in) :: parent

parent handle contains temporal table

character(len=*), intent(in), optional :: key

state variable key string defined in lua

private subroutine load_temporal_linear(me, conf, thandle)

This subroutine load standard temporal function variables from LUA file.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_linear_type), intent(inout) :: me

temporal predefined fun type

type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

aotus parent handle

private subroutine load_temporal_from_file(me, conf, thandle)

This subroutine loads the information needed to read data from a file.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_from_file_temporal_type), intent(inout) :: me

temporal predefined from_file type

type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

aotus parent handle

private subroutine load_temporal_cos(freq, phi, offset, conf, thandle)

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(inout) :: freq

temporal predefined fun type

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

temporal predefined fun type

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

temporal predefined fun type

type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

aotus parent handle

private subroutine load_datafile(me)

This subroutine reads the data from disc and stores it in the tem_from_file_temporal_type.

Arguments

Type IntentOptional Attributes Name
type(tem_from_file_temporal_type), intent(inout) :: me

temporal predefined from_file type