version 0.6.0

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,. More...
 

Detailed Description

This module gives an easy and fast-to-use subroutine for advecting a cell scalar field.

Function/Subroutine Documentation

◆ advect_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\).

Note
For now, only NSSP-RK3-2 (time) with WENO5 (space) scheme is accessible.
By default, if no bnd_type/value are given, use homogeneous Neumann.
Parameters
[in,out]fieldthe cell scalar field to modify
[in]velocity_nm1the velocity at time \(t=t^n - \delta t^{n-1}\)
[in]velocity_nthe velocity at time \(t=t^n\)
[in]velocity_np1the velocity at time \(t=t^{n+1}=t^{n} + \delta t^{n}\)
[in]time_step_nthe previous time_step (usually navier_time_step_nm1)
[in]time_stepthe time step over which to integrate (usually \(\delta t=t^{n+1} - t^{n}\))
[in]spatial_schemethe (enum) spatial scheme to use (upwind O1, WENO, etc.); see enum_cell_advection_term_scheme
[in]temporal_schemethe (enum) temporal scheme to use (Euler, NSSP32, etc.); see enum_time_order_discretization
[in]flux_typethe flux type (see type_fv_flux)
[in]spatial_splitsplit the spatial integration on (x,y,z)
[in]equation_has_immersed_boundariesFlag to enable immersed boundaries.
[in]equation_isd_targetSubset of immersed boundaries.
[in]ibc_variableBoundary conditions on immersed boundaries.
[in]boundary_condition(optional) boundaries conditions