|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
#include "tag.h"Go to the source code of this file.
Functions | |
| void | event_init (void) |
| Event: init (i = 0) | |
| void | event_viscous_term (void) |
| At each timestep... | |
| void | event_cleanup (void) |
| We free memory at the end of the simulation to avoid memory leaks. | |
Variables | ||
| double * | hmin | |
| struct { | ||
| double * sum | ||
| } | Conservation = {0} | |
| The domain considered needs to be simply-connected in order to avoid the transfer of mass between basins which are not connected. | ||
We free memory at the end of the simulation to avoid memory leaks.
Event: cleanup (t = end)
Definition at line 117 of file conservation.h.
References Conservation, and free().
Event: init (i = 0)
At initialisation we make sure that the domain is simply connected by retaining only the largest "oceanic" basin. We first define an indicator function which is zero on dry land and one in wet areas.
We remove cells which are only connected diagonally with their neighbors.
We only keep the largest basin.
We "dry out" all the other basins.
And finally we store the initial volume of each layer.
Definition at line 32 of file conservation.h.
References _i, _layer, Conservation, d, dry, foreach_layer, h, HUGE, nl, remove_droplets(), statsf(), stats::sum, x, and zb.
At each timestep...
Event: viscous_term (i++)
... we compute the current volume of each layer and the area of cells which are "thick enough".
The ratio of these two quantities gives the vertical displacement, which is then applied in each cell which is "thick enough".
Definition at line 85 of file conservation.h.
References _i, _layer, area(), assert, Conservation, dh, dv, foreach_layer, h, hmin, and x.
| struct { ... } Conservation |
The domain considered needs to be simply-connected in order to avoid the transfer of mass between basins which are not connected.
To enforce this we use the functions in [/src/tag.h](). This stores the initial volume of each layer.
Referenced by event_cleanup(), event_init(), and event_viscous_term().
|
extern |
This module enforces conservation of the volume of each layer using a spatially-constant, but varying in time, "upwelling" velocity within each layer which compensates any volume loss. This can be interpreted as a vertical volume/mass transfer between layers.
This upwelling velocity is only applied when the thickness of a layer is larger than hmin/10. The value of hmin is typically that set in [entrainment.h]().
Referenced by event_viscous_term(), and geometric_beta().
| double* sum |
Definition at line 28 of file conservation.h.
Referenced by eta_restriction(), kdt_query_sum(), main(), masked_average(), mg_solve(), query_sum(), refine_linear_single(), restriction_average(), restriction_volume_average(), RPE(), statsf(), subtree_size(), sum_add_point(), and sum_add_sum().