Skip to content

How to change the simulation parameters ?

tgregov edited this page Mar 29, 2019 · 7 revisions

To run the code, two parameters have to be introduced:

  • a .msh path, that contains the mesh;
  • a .dat path, 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:

Gauss6
Lagrange
RK1
strong
0.1
0.001
0.01
1.0,0.0
BC_Left
	constant
	0
BC_Right
	constantNeumann
	0
BC_Up
	constantNeumann
	0
BC_Down
	constantNeumann
	0
Init_Cond
	gaussian2D
	0.1,0.3,0.01,0.3,0.01

which corresponds to the following:

  • Gauss6: 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;
  • 1.0,0.0: components along (x, y) of the vector a that characterizes a pure transport physical flux of the form f(u)=au (for now we only consider a stationary and homogenous vector a, but this will be generalized in function of the physical application chosen)
  • 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 .geo geometry;
  • constant/constantNeumann: type of boundary condition; the complete list of available boundary conditions can be found in /params/ibvFunctions.cpp;
  • 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);
  • gaussian2D: type of initial condition; the complete list of available boundary conditions can be found in /params/ibvFunctions.cpp;
  • 0.1,0.3,0.01,0.3,0.01: parameters of the initial condition; the prototype of those parameters can again be found in /params/ibvFunctions.cpp.

Home

Clone this wiki locally