MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
utvdschememodule::utvdschemetype Interface Referenceabstract

Total Variation Diminishing (TVD) interpolation scheme. More...

Inheritance diagram for utvdschememodule::utvdschemetype:
Inheritance graph
Collaboration diagram for utvdschememodule::utvdschemetype:
Collaboration graph

Public Member Functions

procedure compute (this, n, m, iposnm)
procedure set_field (this, phi)
 Set the scalar field for which interpolation will be computed.
final destructor (this)
type(utvdschemetype) function constructor (dis, fmi, gradient)
procedure(compute_if), deferred compute (this, n, m, iposnm)
procedure(set_field_if), deferred set_field (this, phi)

Public Attributes

type(tspfmitype), pointer fmi
class(igradienttype), pointer gradient
real(dp), dimension(:), pointer phi
type(localcellextrematype), allocatable min_max_phi
integer(i4b) limiter_id = 2
real(dp), dimension(:, :), allocatable cached_node_distance

Private Member Functions

procedure, private limiter (this, r)
procedure, private compute_node_distance (this)

Private Attributes

class(disbasetype), pointer dis

Detailed Description

This class implements a high-resolution, TVD interpolation scheme for use in transport modeling. It extends a generic interpolation scheme interface and supports multiple TVD limiters (van Leer, Koren, Superbee, van Albada, etc.) for controlling numerical diffusion and oscillations. The default limiter is van Leer, but others can be selected by changing the limiter_id member.

The scheme uses a combination of low-order upwind and high-order limited terms to compute face concentrations. The high-order term is constructed using a gradient-based virtual node value, following the approach described by Darwish et al. An additional TVD clamp is applied to the virtual node value to enforce TVD compliance, especially on grids where the original method may not guarantee monotonicity.

  • Supports both structured and unstructured grids via polymorphic discretization and gradient objects.
  • The limiter can be selected via the limiter_id member (default is van Leer).
  • The method find_local_extrema finds the minimum and maximum values among the current cell and its neighbors, which is used to enforce the TVD condition.
  • The compute method calculates the face coefficients for the transport equation.

Definition at line 37 of file UTVDScheme.f90.

Constructor & Destructor Documentation

◆ destructor()

final utvdschememodule::utvdschemetype::destructor ( type(utvdschemetype), intent(inout) this)
final

Definition at line 50 of file UTVDScheme.f90.

Here is the call graph for this function:

Member Function/Subroutine Documentation

◆ compute() [1/2]

procedure(compute_if), deferred interpolationschemeinterfacemodule::interpolationschemeinterface::compute ( class(interpolationschemeinterface), target this,
integer(i4b), intent(in) n,
integer(i4b), intent(in) m,
integer(i4b), intent(in) iposnm )
pure virtualinherited

Definition at line 18 of file InterpolationSchemeInterface.f90.

◆ compute() [2/2]

procedure utvdschememodule::utvdschemetype::compute ( class(utvdschemetype), target this,
integer(i4b), intent(in) n,
integer(i4b), intent(in) m,
integer(i4b), intent(in) iposnm )

Definition at line 48 of file UTVDScheme.f90.

◆ compute_node_distance()

procedure, private utvdschememodule::utvdschemetype::compute_node_distance ( class(utvdschemetype), target this)
private

Definition at line 53 of file UTVDScheme.f90.

Here is the call graph for this function:

◆ constructor()

type(utvdschemetype) function utvdschememodule::utvdschemetype::constructor ( class(disbasetype), intent(in), pointer dis,
type(tspfmitype), intent(in), pointer fmi,
class(igradienttype), intent(in), allocatable, target gradient )

Definition at line 62 of file UTVDScheme.f90.

64 ! -- return
65 type(UTVDSchemeType) :: interpolation_scheme
66 ! -- dummy
67 class(DisBaseType), pointer, intent(in) :: dis
68 type(TspFmiType), pointer, intent(in) :: fmi
69 class(IGradientType), allocatable, intent(in), target :: gradient
70
71 interpolation_scheme%dis => dis
72 interpolation_scheme%fmi => fmi
73
74 interpolation_scheme%gradient => gradient
75 interpolation_scheme%min_max_phi = localcellextrematype(dis)
76
77 allocate (interpolation_scheme%cached_node_distance(dis%njas, 3))
78 call compute_node_distance(interpolation_scheme)
79
Here is the call graph for this function:

◆ limiter()

procedure, private utvdschememodule::utvdschemetype::limiter ( class(utvdschemetype) this,
real(dp) r )
private

Definition at line 52 of file UTVDScheme.f90.

◆ set_field() [1/2]

procedure(set_field_if), deferred interpolationschemeinterfacemodule::interpolationschemeinterface::set_field ( class(interpolationschemeinterface), target this,
real(dp), dimension(:), intent(in), pointer phi )
pure virtualinherited

Definition at line 19 of file InterpolationSchemeInterface.f90.

◆ set_field() [2/2]

procedure utvdschememodule::utvdschemetype::set_field ( class(utvdschemetype), target this,
real(dp), dimension(:), intent(in), pointer phi )

This method establishes a pointer to the scalar field data and updates any dependent cached data (gradients and local extrema) to ensure subsequent interpolation computations use the current field values.

Definition at line 49 of file UTVDScheme.f90.

Member Data Documentation

◆ cached_node_distance

real(dp), dimension(:, :), allocatable utvdschememodule::utvdschemetype::cached_node_distance

Definition at line 46 of file UTVDScheme.f90.

46 real(DP), dimension(:, :), allocatable :: cached_node_distance ! distance vectors

◆ dis

class(disbasetype), pointer utvdschememodule::utvdschemetype::dis
private

Definition at line 39 of file UTVDScheme.f90.

39 class(DisBaseType), pointer :: dis

◆ fmi

type(tspfmitype), pointer utvdschememodule::utvdschemetype::fmi

Definition at line 40 of file UTVDScheme.f90.

40 type(TspFmiType), pointer :: fmi

◆ gradient

class(igradienttype), pointer utvdschememodule::utvdschemetype::gradient

Definition at line 41 of file UTVDScheme.f90.

41 class(IGradientType), pointer :: gradient

◆ limiter_id

integer(i4b) utvdschememodule::utvdschemetype::limiter_id = 2

Definition at line 45 of file UTVDScheme.f90.

◆ min_max_phi

type(localcellextrematype), allocatable utvdschememodule::utvdschemetype::min_max_phi

Definition at line 44 of file UTVDScheme.f90.

44 type(LocalCellExtremaType), allocatable :: min_max_phi ! local minimum values at nodes

◆ phi

real(dp), dimension(:), pointer utvdschememodule::utvdschemetype::phi

Definition at line 43 of file UTVDScheme.f90.

43 real(DP), dimension(:), pointer :: phi

The documentation for this interface was generated from the following file:
  • /home/runner/work/modflow6/modflow6/src/Model/TransportModel/InterpolationScheme/UTVDScheme.f90