Appendix : Inputs¶
This appendix details all the input keys, their parametrization, meaning and default values. Check Default to get an example of input.txt
parametrization file with default values.
Info
Only the input options of Tolosa-sw are presented here. See Tolosa-lib / Inputs to get the input options of Tolosa-lib and their default values.
Inputs parametrization¶
Keys¶
Input option | Description | Option Type | Default Value | Values |
---|---|---|---|---|
gamma |
LM Scheme First Stability Constant | double | 0.5 |
|
alpha |
LM Scheme Second Stability Constant | double | 0.5 |
|
hcut |
Cut-off of water depth to switch to dissipate scheme | double | 0.1 |
|
nb_level |
integer | 3 |
||
tbf_forcing |
Tidal Body Forcing activation | integer | 0 |
> 0 to activate |
wind_forcing |
Wind Stress Forcing activation | integer | 0 |
> 0 to activate |
patm_forcing |
Atmospheric Pressure Forcing | integer | 0 |
> 0 to activate |
julian_cnes_date |
Julian CNES Date (init. referential time) | double | 24472. |
|
bathy_in |
Bathymetry input format | integer | 0 |
0 : No bathymetry 1 : Bathymetry loaded from m_user_data.f90 with function of (x,y) 2 : Bathymetry loaded from external file regional.depth-ele.a in bin directory |
g |
Gravity constant | double | 9.81 |
|
heps |
Cut-off of water depth for dry cells | double | 1.d-13 |
|
restart |
integer | 0 |
0 : restart from rest_old_XXX other : restart from m_user_data.f90 |
|
friction_model |
Friction model (FM) | integer | 0 |
1 : FM activated with oceanic model 2 : FM activated with oceanic model / quadratic computed from z0 3 : FM activated with Manning-Strickler Model |
friction_scheme |
Friction Scheme | integer | 0 |
1 : Implicit Scheme for a logarithmic velocity profile (if FM = 1 or FM = 2 ) Implicit Scheme for the Manning-Strickler law (if FM = 3 ) 2 : Semi-Implicit Scheme for a logarithmic velocity profile (if FM = 1 or FM = 2 ) Implicit Scheme for the Manning-Strickler law (if FM = 3 ) |
cb |
Constant quadratic friction | double | 2.5d-3 |
|
cb_min |
Minimal quadratic friction | double | 1.d-4 |
|
cb_max |
Maximal quadratic friction | double | 1.d-2 |
|
cl |
Constant linear friction | double | 0. |
|
cl_min |
Minimal linear friction | double | 0. |
|
cl_max |
Maximal linear friction | double | 1.d-3 |
|
z0 |
To compute quadratic friction from formula (if file bottom_fric_z0 not found) |
double | 1.d-3 |
|
n |
Uniform Manning | double | 0.05 |
|
karman |
Karman constant | double | 0.41 |
|
coriolis |
Coriolis parameter | integer | 0 |
1 : Calculate Coriolis force from external latitude coordinates (regional.grid file) 2 : Calculate Coriolis force from beta-plane approximation |
f0 |
Constant for the Coriolis Force | double | 9.0541d-05 |
|
beta |
Constant for the Coriolis Force | double | 1.7876d-11 |
|
theta |
Earth Latitude | double | 38.5 |
|
omega |
Earth Angular Velocity | double | 7.2722052166d-05 |
|
earth_r |
Earth Radius | double | 6367442.76 |
|
w_post |
Data Output File option | integer | 0 |
|
dtb |
Time Step for binary outputs | double | -1. |
|
mpi_choice |
MPI communications choice | integer | 3 |
0 : Using library overrided MPI Send/Recv, no need to initialize 1 : Using locally implemented Send/Recv, allocate the MPI request array 2 : Using MPI persistant Send/Recv (synchronous mode), initialize communications >2 : Using MPI persistant Send/Recv (standard mode), initialize communications |
On the boundary conditions ...¶
Tolosa-lib enabled one to name their boundary conditions as they wanted. Here, a specific syntax is used to help the boundary conditions definition along. For each boundary condition, their specifications are :
- Rigid Wall :
wall
- Neumann :
neumann
- Tide : The
tide.list
file is neededtide
: consider all tidal constituentstide#N
: consider only the N first tidal constituents
- Discharge constraint :
q
: Read a tabulated filebc_q.txt
with discharge valuesq#X
: Fix a constant discharge atX (m^3 . s^-1)
q#user
: Define discharge at the boundary from a function inm_user_data.f90
- Height constraint :
h
: Read a tabulated filebc_h.txt
with height valuesh#X
: Fix a constant height atX (m)
h#user
: Define height at the boundary from a function inm_user_data.f90
- Sea surface height (ssh) constraint :
ssh
: Read a tabulated filebc_ssh.txt
with ssh valuesssh#X
: Fix a constant ssh atX (m)
ssh#user
: Define ssh at the boundary from a function inm_user_data.f90
For example, if one chooses to create a box mesh from the input.txt
file, the enabled key values are the following :
Input option | Description | Option Type | Default Value | Values |
---|---|---|---|---|
bc_N |
Boundary Condition North | character | wall |
wall neumann tide , tide#X q , q#X , q#user ssh , ssh#X , ssh#user h , h#X , h#user ratcurve |
bc_S |
Boundary Condition South | character | wall |
wall neumann tide , tide#X q , q#X , q#user ssh , ssh#X , ssh#user h , h#X , h#user ratcurve |
bc_W |
Boundary Condition West | character | wall |
wall neumann tide , tide#X q , q#X , q#user ssh , ssh#X , ssh#user h , h#X , h#user ratcurve |
bc_E |
Boundary Condition East | character | wall |
wall neumann tide , tide#X q , q#X , q#user ssh , ssh#X , ssh#user h , h#X , h#user ratcurve |
If one defines their mesh in a gmsh mesh file, one has to make sure the physical groups respect this syntax.
Default parametrization file¶
Info
More informations on the mesh parameters, the simulation time parametrization are given in Tolosa-lib.
Domain defined by a mesh file and time format is Julian CNES¶
!======================================================================================================================!
! Mesh parameters
!======================================================================================================================!
mesh_name = your_mesh.msh
part_strat = seq
!======================================================================================================================!
! Schemes parameters
!======================================================================================================================!
temp_scheme = first ! Temporal Scheme
spatial_scheme = euler ! 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
gamma = 0.5 ! Low Mach Stability Coefficient
alpha = 0.5 ! Low Mach Stability Coefficient
hcut = 0.1 ! Cut-off of water depth to switch to dissipate scheme
nb_level = 3
!======================================================================================================================!
! Forcings
!======================================================================================================================!
tbf_forcing = 0 ! Tidal Body Force ( 0 if not )
wind_forcing = 0 ! Wind forcing ( 0 if not )
patm_forcing = 0 ! Atmospheric pressure ( 0 if not )
inv_baro = 0 ! Inverse barometer effect
!======================================================================================================================!
! 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)
!--------------------------------------------------------------------------!
! Bathymetry & others
!--------------------------------------------------------------------------!
bathy_in = 0
g = 9.81
heps = 1.d-13
!--------------------------------------------------------------------------!
! Initial state
!--------------------------------------------------------------------------!
restart = 0
!--------------------------------------------------------------------------!
! Friction
!--------------------------------------------------------------------------!
friction_model = 0
friction_scheme = 0
cb = 2.5d-3
cb_min = 1.d-4
cb_max = 1.d-2
cl = 0.
cl_min = 0.
cl_max = 1.d-3
z0 = 1.d-3
n = 0.05
karman = 0.41
!--------------------------------------------------------------------------!
! Coriolis Force
!--------------------------------------------------------------------------!
coriolis = 2
f0 = 9.0541d-05
beta = 1.7876d-11
theta = 38.5
omega = 7.2722052166d-05
earth_r = 6367442.76
!--------------------------------------------------------------------------!
! 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
!--------------------------------------------------------------------------!
! MPI
!--------------------------------------------------------------------------!
mpi_choice = 3
Domain defined by a box in input.txt
and time format is classic¶
Info
One has to change the boundary conditions here.
!======================================================================================================================!
! Mesh parameters
!======================================================================================================================!
mesh_type = basic
part_strat = seq
nx = 101
ny = 101
lx = 1.
ly = 1.
bc_N = wall
bc_S = wall
bc_W = wall
bc_E = wall
!======================================================================================================================!
! Schemes parameters
!======================================================================================================================!
temp_scheme = first ! Temporal Scheme
spatial_scheme = euler ! 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
gamma = 0.5 ! Low Mach Stability Coefficient
alpha = 0.5 ! Low Mach Stability Coefficient
hcut = 0.1 ! Cut-off of water depth to switch to dissipate scheme
nb_level = 3
!======================================================================================================================!
! Forcings
!======================================================================================================================!
tbf_forcing = 0 ! Tidal Body Force ( 0 if not )
wind_forcing = 0 ! Wind forcing ( 0 if not )
patm_forcing = 0 ! Atmospheric pressure ( 0 if not )
inv_baro = 0 ! Inverse barometer effect
!======================================================================================================================!
! Simulation parameters
!======================================================================================================================!
!--------------------------------------------------------------------------!
! Time - Date
!--------------------------------------------------------------------------!
time_format = classic ! Time format choice (classic, julian, julian_cnes)
ts = 86400.d0 ! Simulation Time (in seconds)
!--------------------------------------------------------------------------!
! Bathymetry & others
!--------------------------------------------------------------------------!
bathy_in = 0
g = 9.81
heps = 1.d-13
!--------------------------------------------------------------------------!
! Initial state
!--------------------------------------------------------------------------!
restart = 0
!--------------------------------------------------------------------------!
! Friction
!--------------------------------------------------------------------------!
friction_model = 0
friction_scheme = 0
cb = 2.5d-3
cb_min = 1.d-4
cb_max = 1.d-2
cl = 0.
cl_min = 0.
cl_max = 1.d-3
z0 = 1.d-3
n = 0.05
karman = 0.41
!--------------------------------------------------------------------------!
! Coriolis Force
!--------------------------------------------------------------------------!
coriolis = 2
f0 = 9.0541d-05
beta = 1.7876d-11
theta = 38.5
omega = 7.2722052166d-05
earth_r = 6367442.76
!--------------------------------------------------------------------------!
! 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
!--------------------------------------------------------------------------!
! MPI
!--------------------------------------------------------------------------!
mpi_choice = 3