|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
#include "poisson.h"Go to the source code of this file.
Macros | |
| #define | NH 1 |
| #define | PHIT 6. |
Variables | |
| scalar * | qzl = NULL |
| scalar * | phil = NULL |
| mgstats | mgp |
| double * | alpha = NULL |
| double * | gammap = NULL |
| scalar | phit = zeroc |
| #define NH 1 |
See section 3.6.1 of Popinet (2019). Note that this uses the vertical momentum qz rather than vertical velocity w and will not be compatible with [hydro.h]().
Definition at line 10 of file nh-staggered.h.
| #define PHIT 6. |
Definition at line 189 of file nh-staggered.h.
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 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.
Definition at line 20 of file nh-staggered.h.
References alpha, assert, beta, calloc(), gammap, l, list_append(), nl, phi, phil, qzl, reset, tracers, and x.
Event: pressure (i++)
Definition at line 641 of file nh-staggered.h.
References _i, a, bc, cc, coeffs1(), correct_qz(), dimension, dt, fm, free(), h, l, list_clone(), mg_solve(), mgp, nl, phi, phil, phit, point, q, qzl, relax_nh(), residual_nh(), restriction, TOLERANCE, uf, vector::x, x, and zb.
|
static |
Definition at line 295 of file nh-staggered.h.
References a, alpha, b, c, cl, coeffs1(), coeffs2(), cr, d, gammap, h, l, neighborp(), nl, phi, phil, PHIT, phit, point, sq(), x, and zb.
Referenced by relax_nh(), residual_nh(), and residual_nh3().
Definition at line 17 of file nh-staggered.h.
Referenced by correct_qz(), event_cleanup(), event_defaults(), matrix(), matrix1(), relax_nh1(), residual_nh(), residual_nh2(), and residual_nh3().
Definition at line 17 of file nh-staggered.h.
Referenced by event_cleanup(), event_defaults(), matrix(), matrix1(), relax_nh1(), residual_nh2(), and residual_nh3().
| mgstats mgp |
Definition at line 16 of file nh-staggered.h.
Referenced by event_pressure().
Definition at line 14 of file nh-staggered.h.
Referenced by correct_qz(), event_cleanup(), event_defaults(), event_pressure(), matrix(), matrix1(), relax_nh(), relax_nh(), relax_nh1(), residual_nh(), residual_nh(), residual_nh2(), and residual_nh3().
Definition at line 638 of file nh-staggered.h.
Referenced by correct_qz(), event_pressure(), matrix(), residual_nh2(), and residual_nh3().
Definition at line 14 of file nh-staggered.h.
Referenced by correct_qz(), event_cleanup(), event_defaults(), event_pressure(), and event_viscous_term().