|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
#include "utils.h"Go to the source code of this file.
Functions | |
| trace void | run (void) |
| void | event_defaults (void) |
| By default we display the boundaries of the domain. | |
| void | event_cleanup (void) |
| At the end of the run we need to empty the default display, otherwise we would append multiple copies when re-running. | |
Variables | |
| double | dt = 1. |
| These come from the multilayer solver. | |
By default we display the boundaries of the domain.
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.
By default we set a zero Neumann boundary condition for all the components except if the bottom is an axis of symmetry.
We use (strict) minmod slope limiting for all components.
We reset the multigrid parameters to their default values.
The pressures are never dumped.
The default density field is set to unity (times the metric and the solid factors).
On trees, refinement of the face-centered velocity field needs to preserve the divergence-free condition.
When using embedded boundaries, the restriction and prolongation operators need to take the boundary into account.
We set the dimensions of the velocity field.
On trees, the refinement and restriction functions above rely on the volume fraction field f being refined/restricted before the components of velocity. To ensure this, we move f to the front of the field list (all).
We then set the refinement and restriction functions for the components of the velocity field. The boundary conditions on \(\mathbf{u}\) now depend on those on \(f\).
The default display.
Definition at line 45 of file run.h.
References display().
We store the total number of cells advanced in time for computing speed statistics.
Time/speed statistics are written out on standard output.
Definition at line 16 of file run.h.
References dt, events, free_grid, inext, init_grid, iter, N, perf, t, timer_print(), timer_start(), tnext, and update_perf().
| double dt = 1. |
These come from the multilayer solver.
The run() function below implements a generic time loop which executes events until termination.
The timestep dt can be accessed as a global variable.
Definition at line 11 of file run.h.
Referenced by advance_saint_venant(), advect(), advection(), airsea_integrated_fluxes(), correct_qz(), correction(), dphidt(), dtnext(), event_acceleration(), event_advance(), event_advection_term(), event_end_timestep(), event_face_fields(), event_half_advection(), event_perfs(), event_pressure(), event_projection(), event_stability(), event_tracer_advection(), event_tracer_diffusion(), event_velocity(), event_viscous_term(), for(), gotm_deprecated_output(), gotm_step(), h_relax(), h_residual(), hllc(), horizontal_diffusion(), implicit_horizontal_diffusion(), kinetic(), kurganov(), meanflow_buoyancy(), meanflow_coriolis(), meanflow_salinity(), meanflow_stratification(), meanflow_temperature(), meanflow_uequation(), meanflow_updategrid(), meanflow_vequation(), meanflow_wequation(), ohmic_flux(), prediction(), project(), relax_diffusion(), relax_nh(), relax_viscosity(), residual_diffusion(), residual_nh(), residual_viscosity(), riemann(), run(), runge_kutta(), timestep(), timestep(), tracer_fluxes(), turbulence_dissipationeq(), turbulence_do_epsb(), turbulence_do_kb(), turbulence_do_lengthscale(), turbulence_do_tke(), turbulence_do_turbulence(), turbulence_genericeq(), turbulence_kbeq(), turbulence_lengthscaleeq(), turbulence_q2over2eq(), turbulence_tkeeq(), update(), update_green_naghdi(), update_tracer(), util_adv_center(), util_diff_center(), util_diff_face(), util_findp_bisection(), util_lagrange(), vertical_diffusion(), vertical_viscosity(), viscosity(), and viscosity_explicit().