MAIA bb96820c
Multiphysics at AIA
|
The Level-set (LS) solver of m-AIA is used to track iso-surfaces. That is, the motion of a rigid body, the deformation of a solid body, or contour surfaces of a flame front are tracked. Although the LS solver can be used as an independent solver, it is coupled to other solvers in most applications. In the following, the setup of two main applications are described. These are rigid body motion and combustion simulations. Before these specific use cases are explained, general properties are discussed.
To activate the level-set solver set
When running a LS simulation several properties should be set in general. These are explained in the tables below.
The level-set function \(G\) is a signed distance function to a distinct surface. As described above, this can be a flame front or the surface of a rigid body. On the surface \(G = 0\). For a fast computation of the level-set, the \(G\) field is only calculated in a band close to the level-set surface. Outside of this band a constant outside \(G\) value is set. The width of the level-set band is set by
Here, 4 describes the number of cells on both sides of the interface.
If the underlying Cartesian mesh is non-uniform, the level-set grid is only refined close the \(G = 0\) contour, since no level-set value is computed outside the level-set band anyways. The refinement is adjusted by the following two properties.
The property gShadowWidth
defines the distance from the \(G = 0\) surface in which the level-set grid is refined. It is set in the same way as the gBandWidth
. Because the rigid bodies are moving, the refined grid region is continuously adjusted according to the body movement. Therefore, always set adaptation = true
, if your grid is non-uniform. The property gInnerBound
describes at which point an adaptation of the grid is necessary. It describes a boundary inside the refined region and once a cell inside the level-set band intersects this boundary, the adaptation is forced. The position of this boundary is gShadowWidth-gInnerBound
. For an efficient simulation ensure that gShadowWidth-gInnerBound > gBandWidth + 2
.
To activate the rigid body motion of the LS solver the solverMethod
should be set to one of the following options: ??
In the following, it is described how the LS solver is set up for a coupled LS FVMB simulation. For this
solverMethod = "MAIA_RUNGE_KUTTA_MB_SEMI_LAGRANGE_LEVELSET"
To allow the LS solver to run set
To inform the LS solver that it is coupled to a FVMB solver set
The semi langrange level-set can either handle translatory or combined translatory and rotational motion. This is defined by the property levelSetDiscretizationScheme
.
In the following the combined translatory and rotational motion levelSetDiscretizationScheme = "ROTATING_LS"
is described. To use this discretization scheme set
To inform the level-set solver that it describes a forced body motion set
The level-set field can either be build from a specified analytical function or from a STL-file in which the surface of the \(G = 0\) contour is defined. To activate the level-set reconstruction from an STL-file set
The STL-files the level-set is reconstructed from need to be given in the geometry.toml file. The assignment of the STL-file to a specific level-set is handled by the property bodyBndryCndIds
. In the geometry.toml an id number is assigned to each STL-file
By entering these ids, the assignment is completed. Here, to STL files are assigned.
The level-set solver can contain more than one level-set. The number of level-set functions is set by
If more than one level-set function exists, a combined level-set function should be created to simply the coupling with the FVMB solver. Note that this combined level-set counts as an individual level-set. To create the combined level-set set
To address the individual level-set functions in the code. A body to set table is generated. The properties below, inform the level-set solver that there are two level-set functions (Here the combined level-set is not counted). Each level-set is constructed from a single STL file. Here, two level-set functions are created from two STL files.
The algorithm reconstructing the level-set functions requires some user input. First, a point located inside the STL contour and inside the computational domain is required. Second, it must be defined wether the inside or the outside volume formed by the STL contour should have the positive level-set value. Those cells with a positive level-set value are considered for the flow simulation in the FVMB solver. In the example below two level-set functions exist.
In case a level-set is stationary the computeSet
property can be set to false. This reduces the computational effort. The combined level-set function is considered by this property.
The properties below define the movement of the rigid body. Several bodyMovementFunctions
are implemented. Here, for both rigid bodies the case 8 is used. This is a translation of the body. The amplitude
defines the velocity. Since we only want to consider a rotation of the body, amplitudes
is set to zero for both bodies. The last two properties define the rotation of the bodies. The rotation is always regarding the center of the coordinate system. MaRot
sets the rotational speed and bodyRadius
is a radius. Here, the second body rotates around the x-axis.
THe two properties below are required by the FVMB solver and need to be set in the given way.
The properties below need to be defined because no default value is set. However, since the reinitialization is not used. These properties are also unused.
In the following it is described how the LS solver is set up for a coupled LS FVMB simulation. For this
solverMethod = "MAIA_SEMI_LAGRANGE_LEVELSET_LB"
solverMethod = "MAIA_SEMI_LAGRANGE_LEVELSET"
As is the case of the FV solver, a Runge-Kutta method is used for the numerical time integration of the discretized level-set equation.
An example of the properties is as follows, where the chosen RKMethod is set to 1, which activates a three step third order TVD Runge-kutta scheme
. Therefore the nogRKSteps
is also set to three to be consistent with the formulation of the method and the RK coefficients are chosen via the property grkalpha-step
.
Property | Type | Description |
---|---|---|
levelSetDiscretizationScheme | String | This property sets the level set discretization scheme of the level set equation. possible values are:
|
Should a combustion simulation with the level-set method be desired, the solverMethod is set to
solverMethod = "MAIA_RUNGE_KUTTA_GEQU_PV"
.
Reinitialization of the level-set is necessary for combustion simulations using the level-set method. Solving the transport equation moves the zero level set \( \varphi_0 \) correctly, but may perturb the level-set function near \( \varphi_0 \), leading to large or small gradients of the level-set variable near \( \varphi_0 \). The property reinitMethod
controls the type of reinitialization method used. A more thorough explanation of some of the methods can he found [here]().
All the convergence criteria and reinitialization control can also be chosen by the relevant properties. A concise summary of the most relevant ones can be found in the table below, however it is not only limited to these properties should a finer control be desired.
Property | Type | Description |
---|---|---|
reinitMethod | String | This property sets the reinitialization method. Possible values are:
|
gReinitIterations | Int | Triggers the maximum number of reinitialization steps to reach the convergence criterion reinitConvergence |
minReinitializationSteps | Int | This property triggers the minimum number of reinitialization steps to reach the convergence criterion reinitConvergence |
reinitCFL | Float | Sets the reinitialization cfl number which is used to calculate the pseudo time step for the reinitialization \( \Delta t_{pseudo} = CFL_{reinit} * \Delta x \), with \( \Delta x \) being the smallest G cell width. |
reinitConvergence | Float | Sets the convergence criterion of the reinitialization. The criterion should be of the order of \(10^{-3} - 10^{-10}\). |
If you want to learn how to enable AMR for you simulation, read here. The list of all available sensors for the LS solver can be found here.