Skip to content

Inputs

The Tolosa-lib library provides a base of input informations shared by all Tolosa models. These inputs will be detailed in the following paragraph, however the inputs specific to each Tolosa model will be defined in the model’s tab.

To be able to set the required inputs, one has to fill an input.txt file out. This file should be placed in the same directory as the Tolosa executable.

The following paragraphs will first present the inputs’ implementation in the code, the structures’ usage, and then the available input parameters that can be filled out in the input.txt file.

The Command Line Interface cli structure encapsulates all the simple inputs and all the group of simple inputs. The inputs are first loaded from the input.txt file and can be overridden from the command line.

Each input has a name, a default value, a switch, a kind (real, integer, character) and an eventual manual.

The cli structure contains these inputs in a list of arguments arg(:). Each argument needs to be initialized by calling the add procedure. This routine enables one to define a new argument in the argument list by its name, and potentially its default value, its kind, its switch (the name used in the command line to override its value), and its manual.

When the new argument is defined, one can get its value(s) from the input.txt file by calling the get procedure.

One can initialize an argument and get its value(s) by only calling the add_get procedure.

type(cli) :: input
character(len=128) :: mesh_name
[...]
call input%add_get( name = 'mesh_name' , kind = ctype , value = mesh_name , default = 'mesh.msh' )
[...]

Tolosa has already defined arguments that are read from the input.txt file. The existing arguments allow one to configure the mesh, the numerical and physical parameters and output options.

The available input keys with their signification and usage are detailed in the following table :

Input optionDescriptionOption TypeDefault ValueValues
mesh_typeMesh typecharacterbasicbasic: Create carthesian mesh from input.txt arguments
gmsh : Gets mesh from GMSH mesh file
mesh_nameMesh file namecharactermesh.msh
part_stratScotch Partition Strategycharacterseq
nxNumber of nodes in x directioninteger101
nyNumber of nodes in y directioninteger101
lxLenght of computational domain x horizontal directiondouble1.
lyLenght of computational domain y vertical directiondouble1.
bc_NBoundary Condition Northcharacterwall
bc_SBoundary Condition Southcharacterwall
bc_WBoundary Condition Westcharacterwall
bc_EBoundary Condition Eastcharacterwall
temp_schemeTemporal schemecharactereulereuler or 1
rk2 or 2
rk3 or 3
spatial_schemeSpatial schemecharacterlmlow_mach (lm)
low_mach_dmp_rt (lm_dmp_rt, lmdmprt)
hllc
rusanov (r)
rusanov_twisted (rt)
spatial_orderSpatial ordercharacter11 : without MUSCL
2 : with MUSCL
dtTime stepdouble1.d15
adapt_dtAdaptive time step optioninteger11 : Adaptive time step
other : Constant time step
cflCFL Valuedouble0.5
time_formatTime formatcharacterclassicclassic
julian
julian_cnes
tsSimulation Time (in seconds)double0.
simu_timeSimulation Time (interpreted string)characternullwith X an integer :
X days
X hours
X minutes
X seconds
X(equivalent to X seconds)
start_dateInitial date (mandatory if time_format = julian or julian_cnes)double-1.
end_dateFinal datedouble-1.
dtwTime step to extract Result Filesdouble1.d15
dtpTime step to extract Post Variablesdouble1.d15
dt_tecplotTime step to extract Tecplot Filescharacternull
dt_vtkTime step to extract VTK Filescharacternull
dt_binaryTime step to extract Binary Filescharacternull
w_tecplotTecplot Output File optioninteger01 to 9: Binary File with Partitionned Connectivity
10 to 19: Binary File with Original Connectivity
w_vtkVTK Output File optioninteger01 to 9 : Binary File
w_gnuplotGnuplot Output File optioninteger0
w_pythonPython Output File optioninteger0
w_binBinary Output File optioninteger01: One Binary Output File per time step
2: One Binary Output File containing all time steps
w_exactExact Solution Output File optioninteger0
w_normError Norms Computation optioninteger0
verboseVerbosity Levelinteger1>0: Verbosity activated with level 1, 2, >= 3

The following example of input.txt file sums up the keys with their default value.

!======================================================================================================================!
! Mesh parameters
!======================================================================================================================!
mesh_name = your_mesh.msh
part_strat = seq
!======================================================================================================================!
! Schemes parameters
!======================================================================================================================!
temp_scheme = euler ! Temporal Scheme
spatial_scheme = lm ! Spatial Scheme
spatial_order = 1 ! Spatial Scheme Order
adapt_dt = 1 ! Activate Adaptive Time Step
cfl = 0.5 ! CFL number in case of Adaptative Time Step
!======================================================================================================================!
! Simulation parameters
!======================================================================================================================!
!--------------------------------------------------------------------------!
! Time - Date
!--------------------------------------------------------------------------!
time_format = julian_cnes ! Time format choice (classic, julian, julian_cnes)
start_date = 22548 ! Initial date in time format
simu_time = 5 days ! Formatted Simulation Time (seconds, minutes, hours, days)
!--------------------------------------------------------------------------!
! Output
!--------------------------------------------------------------------------!
dtw = 1.d15 ! Result File Time Step
dtp = 1.d15 ! Post-Treatment Time Step
dtb = -1.
w_tecplot = 0
w_vtk = 0
w_bin = 0
w_gnuplot = 0
w_python = 0
w_exact = 0
w_norm = 0
w_post = 0
verbose = 1 ! Verbosity Level