Define an advection operator on 2D \((r, \theta)\) index range. More...
Public Member Functions | |
BslAdvectionRTheta (PreallocatableSplineInterpolatorRTheta< ddc::NullExtrapolationRule > const &function_interpolator, FootFinder const &foot_finder, Mapping const &mapping) | |
Instantiate an advection operator. More... | |
host_t< DFieldRTheta > | operator() (host_t< DFieldRTheta > allfdistribu, host_t< DConstVectorFieldRTheta< X, Y >> advection_field_xy, double dt) const |
Allocate a Field of the advected function. More... | |
host_t< DFieldRTheta > | operator() (host_t< DFieldRTheta > allfdistribu, host_t< DConstVectorFieldRTheta< R, Theta >> advection_field_rp, CoordXY const &advection_field_xy_center, double dt) const |
Allocate a Field to the advected function. More... | |
Define an advection operator on 2D \((r, \theta)\) index range.
The advection operator uses a semi-Lagrangian method. The method is based on the property that the solution is constant along the characteristics.
For the following equation: \(\partial_t f(t,x) + V(t, x) \cdot \nabla_x f(t,x) = 0, \)
we write the characteristics: \( \partial_t X(t; s, x) = V(t, X(t; s, x)), \qquad \text{ with } X(s; s, x) = x. \)
Then the property gives us: \( f(t, x) = f(0, X(t; 0, x)), \quad \forall t. \)
So the first step of the advection operator is to compute the characteristic feet \( X(t; t+dt, x_i) \) for each mesh point \( x_i \).
For the second step, we interpolate the function at the characteristic feet computed, and obtain the function at the next time step: \( f(t + dt, x) = f(t, X(t + dt; t, x))\).
Different time integration methods are implemented to solve the characteristic equation. They are defined in the IFootFinder class.
The feet can be advected on different domains. Theses domains are defined in the AdvectionDomain class.
The interpolation of the function is always done in the logical index range.
|
inline |
Instantiate an advection operator.
[in] | function_interpolator | The polar interpolator to interpolate the function once the characteristic computed. |
[in] | foot_finder | An IFootFinder which computes the characteristic feet. |
[in] | mapping | The mapping function from the logical index range to the physical index range. |
IFootFinder | A child class of IFootFinder. |
|
inlinevirtual |
Allocate a Field of the advected function.
[in,out] | allfdistribu | A Field containing the values of the function we want to advect. |
[in] | advection_field_xy | A DConstVectorFieldRTheta containing the values of the advection field on the physical index range axes. |
[in] | dt | A time step used. |
Implements IAdvectionRTheta.
|
inlinevirtual |
Allocate a Field to the advected function.
[in,out] | allfdistribu | A Field containing the values of the function we want to advect. |
[in] | advection_field_rp | A DConstVectorFieldRTheta containing the values of the advection field on the logical index range axis. |
[in] | advection_field_xy_center | A CoordXY containing the value of the advection field on the physical index range axis at the O-point. |
[in] | dt | A time step used. |
Implements IAdvectionRTheta.