Inputs
Once the domain is defined, one has to declare few inputs. All the general inputs are declared in an input.txt
file. This file will be read by Tolosa to get the needed parameters.
Mesh¶
To let Tolosa access to our previously created mesh, one has to fill out the input.txt
file with the following informations :
!======================================================================================================================!
! Mesh parameters
!======================================================================================================================!
mesh_name = basic_gir_stereo.msh
bathy_in = 0
Info
The bathy_in
parameter is set to 0
here to specify that our configuration does not have a topography. See Tolosa-sw / Inputs.
Numerical scheme and simulation parameters¶
Then, one has to define which numerical scheme should be used to compute the results. Here, we choose a first order low mach spatial scheme and an euler scheme for the temporal discretization.
[ .... ]
!======================================================================================================================!
! 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
gamma = 0.5 ! Low Mach Stability Coefficient
alpha = 0.5 ! Low Mach Stability Coefficient
!======================================================================================================================!
! Simulation parameters
!======================================================================================================================!
!--------------------------------------------------------------------------!
! Time - Date
!--------------------------------------------------------------------------!
time_format = julian_cnes ! Time format choice (classic, julian, julian_cnes)
start_date = 24835. ! Initial date in time format
simu_time = 1 days ! Formatted Simulation Time (seconds, minutes, hours, days)
!--------------------------------------------------------------------------!
! Friction
!--------------------------------------------------------------------------!
friction_model = 2
friction_scheme = 1
cb = 0.001
!--------------------------------------------------------------------------!
! Coriolis Force
!--------------------------------------------------------------------------!
coriolis = 2
Define the expected outputs¶
To be able to access the simulation results, one has to define the expected outputs (see Tolosa-sw / Outputs). Here, we choose to extract various datas :
- 2D data : Fields distribution on the entire domain and in a smaller window.
- 1D data : Fields evolution at specific tide gauges
- Post-treatment data : energy balance, etc.
Generic outputs¶
One has to fill the input.txt
file to define the generic 2D outputs on the entire domain, and the post-treatment outputs.
!--------------------------------------------------------------------------!
! Output
!--------------------------------------------------------------------------!
dtw = 600. ! Result File Time Step
dtp = 100. ! Post-Treatment Time Step
dtb = 600. ! Binary File Time Step
w_tecplot = 0
w_vtk = 1
w_bin = 1
w_post = 1
verbose = 3 ! Verbosity Level
Info
w_vtk = 1
enables the results to be written in a VTK file anddtw
defines the writting time step.w_bin = 1
enables the results to be written in a binary file anddtb
defines the writting time step.w_post = 1
enables the post-treatment results to be written in a PLT and CSV files anddtp
defines the writting time step.verbose
defines the level of verbosity wished by the user
Specific outputs¶
One can also define specific outputs to be extracted at tide gauges or in a smaller subdomain. These outputs need to be defined in a savefield.yaml
file.
1. One dimensional outputs¶
Here, for the idealized Gironde, one can extract calculation results at different tide gauge. To extract data, one has to fill the savefield.yaml
file out with :
output_1d:
-
name: TIDE_G_1
cell: 6330
dt: 600
-
name: TIDE_G_2
cell: 12535
dt: 600
-
name: TIDE_G_3
cell: 16717
dt: 600
-
name: TIDE_G_4
cell: 13935
dt: 600
Considering the 1D outputs defined here, the ssh, u, and v evolution will be written in a .csv file for each tide gauge at a time step of 600 s
(see Tolosa-sw / Input) to get the signification and default values of each key).
2. Two dimensional outputs¶
Tolosa-sw enables the user to get a 2D distribution of various fields in a smaller window ; to define this window, the desired variables, etc. the user must fill the same savefield.yaml
file out. Here for example, we choose to extract the distribution of different fields (ssh, u, v) in two smaller domains defined here :
output_2d:
-
name: Window_1
x_min: -91500.
x_max: -82000.
y_min: -812000.
y_max: -798000.
dt: 360.
-
name: Window_2
format: bin
x_min: -101000.
x_max: -91500.
y_min: -784000.
y_max: -769000.
dt: 360.
See Tolosa-sw / Input to get the signification and default values of each key.
Summary¶
Here is a summary of the content of each input file.
input.txt
input file¶
!======================================================================================================================!
! Mesh parameters
!======================================================================================================================!
mesh_name = basic_gir_stereo.msh
bathy_in = 0
!======================================================================================================================!
! 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
gamma = 0.5 ! Low Mach Stability Coefficient
alpha = 0.5 ! Low Mach Stability Coefficient
!======================================================================================================================!
! Simulation parameters
!======================================================================================================================!
!--------------------------------------------------------------------------!
! Time - Date
!--------------------------------------------------------------------------!
time_format = julian_cnes ! Time format choice (classic, julian, julian_cnes)
start_date = 24835. ! Initial date in time format
simu_time = 1 days ! Formatted Simulation Time (seconds, minutes, hours, days)
!--------------------------------------------------------------------------!
! Friction
!--------------------------------------------------------------------------!
friction_model = 2
friction_scheme = 1
cb = 0.001
!--------------------------------------------------------------------------!
! Coriolis Force
!--------------------------------------------------------------------------!
coriolis = 2
!--------------------------------------------------------------------------!
! Output
!--------------------------------------------------------------------------!
dtw = 600. ! Result File Time Step
dtp = 100. ! Post-Treatment Time Step
dtb = 600. ! Binary File Time Step
w_tecplot = 0
w_vtk = 1
w_bin = 1
w_post = 1
verbose = 3 ! Verbosity Level
savefield.yaml
input file¶
output_1d:
-
name: TIDE_G_1
cell: 6330
dt: 600
-
name: TIDE_G_2
cell: 12535
dt: 600
-
name: TIDE_G_3
cell: 16717
dt: 600
-
name: TIDE_G_4
cell: 13935
dt: 600
output_2d:
-
name: Window_1
x_min: -91500.
x_max: -82000.
y_min: -812000.
y_max: -798000.
dt: 360.
-
name: Window_2
format: bin
x_min: -101000.
x_max: -91500.
y_min: -784000.
y_max: -769000.
dt: 360.