|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
#include "remapc.h"Go to the source code of this file.
Functions | |
| void | event_defaults (void) |
| Event: defaults (i = 0) | |
| void | geometric_beta (double rmin, bool top) |
| The default uniform layer distribution can be replaced with a geometric progression for the layer thicknesses. | |
| trace void | vertical_remapping (scalar h, scalar *tracers) |
| The vertical_remapping() function takes a (block) field of layer thicknesses and the corresponding list of tracer fields and performs the remapping (defined by beta). | |
| void | event_remap (void) |
| The remapping is applied at every timestep. | |
| void | event_cleanup (void) |
| The beta array is freed at the end of the run. | |
Variables | |
| const bool | null_limit = false |
| const bool | mono_limit = true |
| int | cell_lim = null_limit |
| double * | beta = NULL |
| The distribution of layers can be controlled using the beta array which defines the ratio of the thickness of each layer to the total depth \(H\) (i.e. | |
Event: defaults (i = 0)
Boundary conditions for VOF-advected tracers usually depend on boundary conditions for the VOF field.
Event: defaults (i = 0)
Event: defaults (i = 0)
We set the default values.
The EHD force density, \(\mathbf{f}_e\), can be computed as the divergence of the Maxwell stress tensor \(\mathbf{M}\),
\[ M_{ij} = \varepsilon (E_i E_j - \frac{E^2}{2}\delta_{ij}) \]
where \(E_i\) is the \(i\)-component of the electric field, \(\mathbf{E}=-\nabla \phi\) and \(\delta_{ij}\) is the Kronecker delta.
We need to add the corresponding acceleration to the Navier–Stokes solver.
If the acceleration vector a (defined by the Navier–Stokes solver) is constant, we make it variable.
Event: defaults (i = 0)
Event: defaults (i = 0 )
On trees we need to ensure conservation of the tracer when refining/coarsening.
Event: defaults (i = 0)
it is an acceleration. If necessary, we allocate a new vector field to store it.
Event: defaults (i = 0)
Event: defaults (i = 0)
\[ \begin{aligned} 0 & = - \sum_k \nabla \cdot [\theta_H (hu)_k^{n + 1} + (1 - \theta_H) (hu)^n_k] \\ \frac{(hu)^{n + 1}_k - (hu)_k^n}{\Delta t} & = - \Delta tgh^{n + 1 / 2}_k (\theta_H \nabla \eta_r^{n + 1} + (1 - \theta_H) \nabla \eta_r^n) \end{aligned} \]
where \(\eta_r\) is the equivalent free-surface height (i.e. pressure) applied on the rigid lid.
Event: defaults (i = 0)
The \(w_k\) and \(\phi_k\) scalar fields are allocated and the \(w_k\) are added to the list of advected tracers.
The default density field is set to unity (times the metric).
We reset the multigrid parameters to their default values.
If the viscosity is non-zero, we need to allocate the face-centered viscosity field.
We also initialize the list of tracers to be advected with the VOF function \(f\) (or its complementary function).
We set limiting.
On trees, we ensure that limiting is also applied to prolongation and refinement.
We add the interface and the density to the default display.
We switch to a pure minmod limiter by default for increased robustness.
With the MUSCL scheme we use the CFL depends on the dimension of the problem.
On trees we need to replace the default bilinear refinement/prolongation with linear so that reconstructed values also use slope limiting.
The restriction/refine attributes of the charge density are those of a tracer otherwise the conservation is not guaranteed.
By default the permittivity is unity and other quantities are zero.
The (velocity) CFL is limited by the unsplit advection scheme, so is dependent on the dimension. The (gravity wave) CFL is set to 1/2 (if not already set by the user).
The gradient and prolongation/restriction functions are set for all tracer fields.
We setup the default display.
The default uniform layer distribution can be replaced with a geometric progression for the layer thicknesses.
This needs to be called for example in the init() event. The rmin parameter specifies the minimum layer thickness relative to the uniform layer thickness (proportional to 1/nl). If the top parameter is set to true the minimum layer thickness is at the top (layer nl - 1), otherwise it is at the bottom (layer 0).
Definition at line 53 of file remap.h.
References beta, hmin, l, nl, pow(), top, and x.
The vertical_remapping() function takes a (block) field of layer thicknesses and the corresponding list of tracer fields and performs the remapping (defined by beta).
For the moment we simply use Neumann zero top and bottom boundary conditions for all fields. Note that we also ignore the corresponding dimensions since this could be inconsistent when remapping quantities with different dimensions.
Definition at line 69 of file remap.h.
References _i, beta, cell_lim, dry, foreach_layer, h, HUGE, i, list_len(), max, nl, point, remap_c(), s, tracers, v, and x.
Referenced by event_remap().
The distribution of layers can be controlled using the beta array which defines the ratio of the thickness of each layer to the total depth \(H\) (i.e.
the relative thickness). By default all layers have the same relative thickness.
Definition at line 34 of file remap.h.
Referenced by event_cleanup(), event_defaults(), geometric_beta(), and vertical_remapping().
| int cell_lim = null_limit |
Definition at line 26 of file remap.h.
Referenced by vertical_remapping().
This implements a simple vertical remapping to "\f$\sigma\f$-coordinates" (equally-distributed by default).
We can optionally use the PPR Library of Engwirda and Kelley to perform the remapping. The default settings are using the Parabolic Piecewise Method without limiting.
By default we use the C PPR implementation without limiting.