|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
Go to the source code of this file.
Macros | |
| #define | AXI 1 |
Functions | |
| static void | refine_cm_axi (Point point, scalar cm) |
| On trees we need refinement functions. | |
| static void | refine_face_x_axi (Point point, scalar fm) |
| static void | refine_face_y_axi (Point point, scalar fm) |
| void | event_metric (void) |
| If embedded solids are presents, cm, fm and the fluxes need to be updated consistently with the axisymmetric cylindrical coordinates and the solid fractions. | |
| #define AXI 1 |
For problems with a symmetry of revolution around the \(z\)-axis of a cylindrical coordinate system. The longitudinal coordinate ( \(z\)-axis) is x and the radial coordinate ( \(\rho\)- or \(r\)-axis) is y. Note that y (and so Y0) cannot be negative.
We first define a macro which will be used in some geometry-specific code (e.g. curvature computation).
If embedded solids are presents, cm, fm and the fluxes need to be updated consistently with the axisymmetric cylindrical coordinates and the solid fractions.
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.
Metric factors must be taken into account for fluxes on embedded boundaries.
The volume/area of a cell is proportional to \(r\) (i.e. \(y\)). 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 axis of revolution is zero ( \(y=r=0\) on the axis). 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 154 of file axi.h.
References _i, all, bottom, cm, dirichlet(), fm, free(), HUGE, l, list_concat(), list_copy(), max, metric_embed_factor, refine_cm_axi(), refine_face_x_axi(), refine_face_y_axi(), top, vector::x, vector::y, and y.
On trees we need refinement functions.
Definition at line 22 of file axi.h.
References alpha, cm, cs, fine(), interface_normal(), n, p, plane_alpha, plane_center, point, and y.
Referenced by event_metric().
Definition at line 49 of file axi.h.
References cs, facet_normal(), fine(), fm, fs, is_refined, n, neighbor(), point, sign(), vector::x, and y.
Referenced by event_metric().
Definition at line 87 of file axi.h.
References fine(), fm, fs, is_refined, max, neighbor(), vector::y, and y.
Referenced by event_metric().