0.6.0
Loading...
Searching...
No Matches
mod_explicit_add_face_bc Module Reference

Functions/Subroutines

subroutine explicit_add_face_bc (field, boundary_condition)
 Compute the ghost node values of a field depending on boundary conditions.
 

Function/Subroutine Documentation

◆ explicit_add_face_bc()

subroutine mod_explicit_add_face_bc::explicit_add_face_bc ( type(t_face_field), intent(inout) field,
type(t_boundary_condition_face), intent(in) boundary_condition )

Compute the ghost node values of a field depending on boundary conditions.

The computation is done for Neumann and Dirichlet boundaries.

  • The Neumann value is modified as to account for the wanted extrapolated derivative at the destination cells *.

This is done by applying a different Neumann condition which is the extrapolation of the derivative at the extrapolated point (order 2):

\[ \phi(\alpha) \simeq \phi(x_0) + \alpha D^1(x_0) + \alpha^2/2 D^2(x_0) \Rightarrow \frac{d \phi}{d x}(\alpha) \simeq D^1(x_0) + \alpha D^2(x_0) \Rightarrow D^1(x_0) \simeq \frac{d \phi}{d x}(\alpha) - \alpha D^2(x_0) \]

where \( \alpha \) is the distance between the extrapolation cell and the place where the derivative is given.

Example
if the right face is a Neumann boundary, then scalar(i,je+1,k) will be filled with the 2nd order extrapolated value at the face.
Parameters
[in,out]fieldface field.
[in]boundary_conditionboundary conditions for the face field.