|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
Go to the source code of this file.
Macros | |
| #define | SPHERISYM 1 |
Functions | |
| static void | refine_cm_spherisym (Point point, scalar cm) |
| On trees we need refinement functions. | |
| static void | refine_face_x_spherisym (Point point, scalar fm) |
| void | event_metric (void) |
| Event: metric (i = 0) | |
| #define SPHERISYM 1 |
This file defines the metric coefficients for a (one-dimensional) spherically-symmetric coordinate system.
The radial coordinate \(r\) is x. Note that x (and so X0) cannot be negative.
We first define a macro which will be used in some geometry-specific code (e.g. viscous stress tensor).
Definition at line 16 of file spherisym.h.
Event: metric (i = 0)
By default cm is a constant scalar field. To make it variable, we need to allocate a new field. We also move it at the begining of the list of variables: this is important to ensure the metric is defined before other fields.
The volume/area of a cell is proportional to \(r^2\) (i.e. \(x^2\)). We need to set boundary conditions at the top and bottom so that cm is interpolated properly when refining/coarsening the mesh.
We do the same for the length scale factors. The "length" of faces on the center of spherical symmetry is zero ( \(x=r=0\) in the center). To avoid division by zero we set it to epsilon (note that mathematically the limit is well posed).
We set our refinement/prolongation functions on trees.
Definition at line 39 of file spherisym.h.
References _i, all, cm, fm, free(), l, list_concat(), list_copy(), max, refine_cm_spherisym(), refine_face_x_spherisym(), vector::x, and x.
On trees we need refinement functions.
Definition at line 22 of file spherisym.h.
References cm, fine(), sq(), and x.
Referenced by event_metric().
Definition at line 28 of file spherisym.h.
References fine(), fm, is_refined, neighbor(), sq(), and x.
Referenced by event_metric().