|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
#include "layered/hydro.h"Go to the source code of this file.
Macros | |
| #define | sigma_kappa(eta, i) |
| We overload the default definition of the barotropic acceleration in hydro.h which becomes. | |
| #define | p_baro(eta, i) (- G*eta[i] + sigma_kappa(eta, i)) |
| #define | a_baro(eta, i) (gmetric(i)*(p_baro (eta, i) - p_baro (eta, i - 1))/Delta) |
Functions | |
| void | event_face_fields (void) |
| The non-linear surface tension coefficient(s) are defined using the surface elevation at the beginning of the timestep. | |
| void | event_pressure (void) |
| At the end of the timestep we delete the auxilliary fields. | |
Variables | |
| const scalar | sigma [] = 1. |
| scalar | sigma_n |
| vector | sigma_d |
Definition at line 105 of file hydro-tension.h.
Definition at line 104 of file hydro-tension.h.
We overload the default definition of the barotropic acceleration in hydro.h which becomes.
\[ \mathbf{a}_\text{baro} = - g \mathbf{{\nabla}} (\eta) \color{blue} + \mathbf{{\nabla}} (\sigma \kappa) \]
where \(\sigma \kappa\) is computed as
\[ \sigma \kappa = \sigma_n \frac{\partial^2\eta}{\partial x^2} \]
in two dimensions and
\[ \sigma \kappa = \sigma_x \frac{\partial^2\eta}{\partial x^2} + \sigma_y \frac{\partial^2\eta}{\partial y^2} + \sigma_n \frac{\partial^2\eta}{\partial x y} \]
in three dimensions.
In 3D, the weighing with the 0.2 coefficient is necessary to avoid odd-even decoupling.
Definition at line 93 of file hydro-tension.h.
The non-linear surface tension coefficient(s) are defined using the surface elevation at the beginning of the timestep.
Event: face_fields (i++)
In the case of a time-explicit integration (as controlled by CFL_H), we need to restrict the timestep based on the celerity of capillary waves (and not only gravity waves as done by the default solver). To do so, we imitate the code in hydro.h which sets dtmax, but take into account the celerity of the shortest capillary waves (of wavelength \(2\Delta\)).
Definition at line 115 of file hydro-tension.h.
References _i, boundary, c, CFL, CFL_H, cm, dh, dimension, dry, dt, dtmax, dx, dy, eta, fm, foreach_layer, G, h, hydrostatic, max, min, n, pi, pow(), restriction, sigma, sigma_d, sigma_n, sq(), u, uf, vector::x, x, coord::x, and vector::y.
At the end of the timestep we delete the auxilliary fields.
Event: pressure (i++)
Definition at line 180 of file hydro-tension.h.
This file adds surface tension to the multilayer solver i.e. the Laplace pressure applied on the free surface as
\[ (\mathbf{T_{liquid}} - \mathbf{T_{gas}}) \cdot \mathbf{n} = - \rho \sigma \kappa\mathbf{n} \]
with \(T\), the stress tensors respectively in the gas and in the liquid, \(\rho \sigma\) the surface tension coefficient, and \(\kappa\) the curvature of the free-surface.
Note that this file is also compatible with the implicit free-surface extension and with the non-hydrostatic extension. In both cases the Laplace pressure term is treated implicitly and does not restrict the timestep.
The default surface tension coefficient \(\sigma\) is constant and equal to unity.
Definition at line 23 of file hydro-tension.h.
Referenced by curvature(), event_acceleration(), event_face_fields(), event_stability(), and remap_central().
| vector sigma_d |
Definition at line 64 of file hydro-tension.h.
Referenced by event_face_fields(), and event_pressure().
| scalar sigma_n |
The Laplace pressure corresponds to a barotropic pressure \(\phi(x) = - \rho \sigma \kappa\) that is added to the hydrostatic equations (term in blue).
\[ \begin{aligned} \partial_t h_k + \mathbf{{\nabla}} \cdot \left( h \mathbf{u} \right)_k & = 0,\\ \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} + h_k \mathbf{{\nabla}} (\sigma \kappa) \end{aligned} \]
We will need auxilliary fields containing the "non-linear surface tension coefficients", which are
\[ \sigma_n = \frac{\sigma}{n} \]
in one dimension and
\[ \begin{aligned} \sigma_x & = \sigma \frac{1 + (\partial_y\eta)^2}{n} \\ \sigma_y & = \sigma \frac{1 + (\partial_x\eta)^2}{n} \\ \sigma_n & = - 2 \sigma \frac{\partial_x\eta \partial_y\eta}{n} \end{aligned} \]
in two dimensions, with
\[ n = (1 + |\mathbf{\nabla}\eta|^2)^{3/2} \]
Definition at line 62 of file hydro-tension.h.
Referenced by event_face_fields(), and event_pressure().