Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
dr.h File Reference

Go to the source code of this file.

Functions

void event_defaults (void)
 Event: defaults (i = 0)
 
void event_cleanup (void)
 Event: cleanup (t = end, last)
 
void event_acceleration (void)
 The pressure gradient terms in blue are added to the acceleration of the multilayer solver.
 

Variables

scalar T
 

Function Documentation

◆ event_acceleration()

void event_acceleration ( void  )

The pressure gradient terms in blue are added to the acceleration of the multilayer solver.

Event: acceleration (i++)

The hydrostatic pressure deviation \(q\) is stored on the interfaces between layers (consistently with the Keller box scheme discretisation, see Popinet, 2020). This gives the following vertical discrete integration scheme.

Once the pressure deviation is known, the terms in blue above are added to the face acceleration field ha, using the pressure-gradient macro.

Definition at line 51 of file dr.h.

References _i, drho, G, h, ha, hpg, nl, point, q, T, vector::x, and x.

◆ event_cleanup()

void event_cleanup ( void  )

Event: cleanup (t = end, last)

Definition at line 41 of file dr.h.

References T.

◆ event_defaults()

void event_defaults ( void  )

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)

Initialisation

We set the default values.

Electrohydrodynamic stresses

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 )

Defaults

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)

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.

Definition at line 34 of file dr.h.

References list_append(), nl, T, and tracers.

Here is the call graph for this function:

Variable Documentation

◆ T

scalar T

Boussinesq buoyancy

The momentum equation of the multilayer solver becomes

\[ \begin{aligned} \partial_t \left( h \mathbf{u} \right)_k + \mathbf{{\nabla}} \cdot \left( h \mathbf{u} \mathbf{u} \right)_k & = - gh_k \mathbf{{\nabla}} (\eta) {\color{blue} - \mathbf{{\nabla}} (h q)_k + \left[ q \mathbf{{\nabla}} z \right]_k} \end{aligned} \]

where the terms in blue have been added and \(q\) is the (hydrostatic) pressure deviation due to (small) density variations.

The density variations are described by a scalar field \(T\), which is advected by the flow, and an associated "equation of state" \(\Delta\rho(T)\) defined by the user. This gives the additional equations

\[ \begin{aligned} \partial_t \left( h T \right)_k + \mathbf{{\nabla}} \cdot \left( h \mathbf{u} T \right)_k & = 0,\\ q(z) & = \int_0^z g \Delta \rho(T) dz \end{aligned} \]

Definition at line 31 of file dr.h.

Referenced by event_acceleration(), event_cleanup(), and event_defaults().