-
Notifications
You must be signed in to change notification settings - Fork 7
How to change the simulation parameters ?
ImperatorS79 edited this page May 4, 2019
·
7 revisions
To run the code, two parameters have to be introduced:
- a
.mshpath, that contains the mesh; - a
.datpath, that contains the parameters of the simulation.
For example, ./main.exe myMesh.msh param.dat could be a correct usage.
Mesh file
The mesh file can be generated using Gmsh. One can then create a .geo file that will contain the geometry information. This can be done either through the graphic interface, or using Gmsh's scripting language (i.e. through code lines). Then, the .msh file can be generated. It is that file that should be put as the first parameter of the executable program.
Parameters
The .dat parameter file typically looks like that:
Gauss10
Lagrange
RK1
strong
0.1
0.0000001
0.001
shallow
LF
9.81
sourceShallowCstGradCstFrict
1000,0.0001,1,0,2
BC_Left
openShallow
10
BC_Right
openShallow
10
BC_Up
openShallow
10
BC_Down
reflectShallow
0
Init_Cond
gaussian2DShallow
0.3,0.5,0.005,0.5,0.005,10
which corresponds to the following:
-
Gauss10: degree used for Gauss integration; in this case, this means that for a polynomial of degree 6 or lower, there will be enough Gauss points for the integration to be exact; -
Lagrange: family of the shape functions used; -
RK1: time-integration scheme used; three options are available: Explicit Euler (RK1), Runge-Kutta of order 2 (RK2), and Runge-Kutta of order 4 (RK4); -
strong: formulation of the DG method; it can either be the strong one (strong), or the weak one (weak); -
0.1: simulation time [s]; -
0.001: integration time step [s]; -
0.01: saving frequency [s]; in this case, this means that only the simulations at time 0, 0.01, 0.02, ... [s] will be saved; -
shallow: problem type (can be transport, shallow, shallowLin); -
LF: numerical flux type (mean, LF, Roe(shallow* only)); -
9.81: coefficient of the physical flux, check/flux/flux.cpp; -
sourceShallowCstGradCstFrict: type of source terms, put no to disbale them, check/source/source.cpp; -
1000,0.0001,1,0,2: source terms coefficents, check/source/source.cpp; -
BC_Left/BC_Right/BC_Up/BC_Down: name of the physical entity to which a boundary condition is linked; it should be named when defining the.geogeometry; -
openShallow/refelctShallow: type of boundary condition; the complete list of available boundary conditions can be found in/params/ibvFunctions.cpp; -
10/0: parameter of the boundary condition; the prototype of those parameters can again be found in/params/ibvFunctions.cpp; -
Init_Cond: initial condition (no option); -
gaussian2DShallow: type of initial condition; the complete list of available boundary conditions can be found in/params/ibvFunctions.cpp; -
0.3,0.5,0.005,0.5,0.005,10: parameters of the initial condition; the prototype of those parameters can again be found in/params/ibvFunctions.cpp.
- Organization
- Documentation
- Reminders