Quick explicit advection method for a scalar field. More...
Functions/Subroutines | |
subroutine | advect_field (field, velocity_nm1, velocity_n, velocity_np1, time_step_n, time_step, spatial_scheme, temporal_scheme, flux_type, spatial_split, equation_has_immersed_boundaries, equation_isd_target, ibc_variable, boundary_condition) |
Solve the advection of the cell field in a conservative form,. | |
This module gives an easy and fast-to-use subroutine for advecting a cell scalar field.
subroutine mod_advect_field::advect_field | ( | double precision, dimension(:,:,:), intent(inout) | field, |
type(t_face_field), intent(in) | velocity_nm1, | ||
type(t_face_field), intent(in) | velocity_n, | ||
type(t_face_field), intent(in) | velocity_np1, | ||
double precision, intent(in) | time_step_n, | ||
double precision, intent(in) | time_step, | ||
integer, intent(in) | spatial_scheme, | ||
integer, intent(in) | temporal_scheme, | ||
type(t_fv_flux), intent(in) | flux_type, | ||
logical, intent(in) | spatial_split, | ||
logical, intent(in) | equation_has_immersed_boundaries, | ||
integer, dimension(:), intent(in) | equation_isd_target, | ||
type(t_immersed_boundary_condition), dimension(:), intent(in) | ibc_variable, | ||
type(t_boundary_condition), intent(in) | boundary_condition ) |
Solve the advection of the cell field in a conservative form, giving the time step, and the velocity field (for current and previous times). If \(\phi\) is the scalar field, then we are solving:
\[ \frac{\partial \phi}{\partial t} + \nabla \cdot \left( u \phi \right) = 0 \]
We advance from time \(t=t^n\) to \(t=t^n+\delta t\).
[in,out] | field | the cell scalar field to modify |
[in] | velocity_nm1 | the velocity at time \(t=t^n - \delta t^{n-1}\) |
[in] | velocity_n | the velocity at time \(t=t^n\) |
[in] | velocity_np1 | the velocity at time \(t=t^{n+1}=t^{n} + \delta t^{n}\) |
[in] | time_step_n | the previous time_step (usually navier_time_step_nm1 ) |
[in] | time_step | the time step over which to integrate (usually \(\delta t=t^{n+1} - t^{n}\)) |
[in] | spatial_scheme | the (enum) spatial scheme to use (upwind O1, WENO, etc.); see enum_cell_advection_term_scheme |
[in] | temporal_scheme | the (enum) temporal scheme to use (Euler, NSSP32, etc.); see enum_time_order_discretization |
[in] | flux_type | the flux type (see type_fv_flux) |
[in] | spatial_split | split the spatial integration on (x,y,z) |
[in] | equation_has_immersed_boundaries | Flag to enable immersed boundaries. |
[in] | equation_isd_target | Subset of immersed boundaries. |
[in] | ibc_variable | Boundary conditions on immersed boundaries. |
[in] | boundary_condition | (optional) boundaries conditions |