|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
Go to the source code of this file.
Macros | |
| #define | u uf |
Functions | |
| void | event_defaults (void) |
| Event: defaults (i = 0) | |
| event | init (i=0) |
| User initialisation happens here. | |
| void | event_velocity (void) |
| The timestep is set using the velocity field and the CFL criterion. | |
Variables | |
| vector | uf [] |
| We allocate the (face) velocity field. | |
| double(* | gradient )(double, double, double) = NULL |
| scalar * | tracers |
Here we set the gradient functions for each tracer (as defined in the user-provided tracers list). | |
Definition at line 30 of file advection.h.
Event: defaults (i = 0)
Boundary conditions for VOF-advected tracers usually depend on boundary conditions for the VOF field.
Event: defaults (i = 0)
Definition at line 40 of file advection.h.
The timestep is set using the velocity field and the CFL criterion.
The integration itself is performed in the events of [tracer.h]().
Event: velocity (i++,last)
Definition at line 56 of file advection.h.
References dt, DT, dtnext(), timestep(), and u.
User initialisation happens here.
Referenced by init_event().
Definition at line 31 of file advection.h.
Referenced by event_defaults(), and refine_elevation().
|
extern |
Here we set the gradient functions for each tracer (as defined in the user-provided tracers list).
Here we set the gradient functions for each tracer (as defined in the user-provided tracers list).
\(\partial_xf_j = \partial_x(t_j/c)\) or \(\partial_xf_j = \partial_x(t_j/(1 - c))\) (for higher-order upwinding) and we need to store the computed fluxes. We first allocate the corresponding lists.
Definition at line 60 of file hydro.h.
Referenced by advection(), event_defaults(), event_half_advection(), event_remap(), event_vof(), and vertical_remapping().
| vector uf |
We allocate the (face) velocity field.
We wish to solve the advection equations
\[ \partial_tf_i+\mathbf{u}\cdot\nabla f_i=0 \]
where \(\mathbf{u}\) is the velocity field and \(f_i\) are a list of passive tracers. This can be done with a flux-based advection scheme such as the 2nd-order, unsplit, upwind scheme of Bell-Collela-Glaz, 1989.
The main time loop is defined in [run.h](). A stable timestep needs to respect the CFL condition. For compatibility with the other solvers, we allocate it as uf and define an alias. The gradient function is used to set the type of slope-limiting required. The default is to not use any limiting (i.e. a purely centered slope estimation).
Definition at line 29 of file advection.h.
Referenced by event_acceleration(), event_end_timestep(), event_face_fields(), event_init(), event_pressure(), event_tracer_advection(), project(), tracer_fluxes(), and update_tracer().