OGS
NumLib::IsotropicDiffusionStabilization Class Referencefinal

Detailed Description

It defines an isotropic diffusion stabilization, the simplest stabilization method.

The method adds an artificial isotropic balancing dissipation to the diffusion coefficient in order to force the Péclet number to be smaller than 1. The isotropic balancing dissipation is defined as

\[ \mathbf{K}_{\delta} = \frac{1}{2}\alpha ||\mathbf v||h \mathbf I \]

with \(\alpha \in [0,1] \) the tuning parameter, \(h\) the element size (e.g. the maximum edge length of element), and \(\mathbf I\) the identity matrix.

Definition at line 52 of file NumericalStabilization.h.

#include <NumericalStabilization.h>

Public Member Functions

 IsotropicDiffusionStabilization (double const cutoff_velocity, double const tuning_parameter, std::vector< double > &&element_sizes)
 
double computeArtificialDiffusion (std::size_t const element_id, double const velocity_norm) const
 

Private Attributes

double const cutoff_velocity_
 
double const tuning_parameter_ = 0.5
 The tuning parameter in the range [0,1].
 
std::vector< double > const element_sizes_
 

Constructor & Destructor Documentation

◆ IsotropicDiffusionStabilization()

NumLib::IsotropicDiffusionStabilization::IsotropicDiffusionStabilization ( double const cutoff_velocity,
double const tuning_parameter,
std::vector< double > && element_sizes )

Definition at line 21 of file NumericalStabilization.cpp.

25 : cutoff_velocity_(cutoff_velocity),
26 tuning_parameter_(tuning_parameter),
27 element_sizes_(std::move(element_sizes))
28{
29 if (tuning_parameter_ < 0 || tuning_parameter_ > 1.0)
30 {
32 "The tuning parameter value {:g} for "
33 "IsotropicDiffusion stabilization is out of range [0, 1]",
35 }
36}
#define OGS_FATAL(...)
Definition Error.h:26
double const tuning_parameter_
The tuning parameter in the range [0,1].

References OGS_FATAL, and tuning_parameter_.

Member Function Documentation

◆ computeArtificialDiffusion()

double NumLib::IsotropicDiffusionStabilization::computeArtificialDiffusion ( std::size_t const element_id,
double const velocity_norm ) const

Definition at line 38 of file NumericalStabilization.cpp.

40{
41 if (velocity_norm < cutoff_velocity_)
42 {
43 return 0.0;
44 }
45 return 0.5 * tuning_parameter_ * velocity_norm * element_sizes_[element_id];
46}

References cutoff_velocity_, element_sizes_, and tuning_parameter_.

Referenced by NumLib::detail::getHydrodynamicDispersionWithArtificialDiffusion().

Member Data Documentation

◆ cutoff_velocity_

double const NumLib::IsotropicDiffusionStabilization::cutoff_velocity_
private

The cutoff velocity. The stabilization is not applied if the velocity magnitude is below the cutoff velocity.

Definition at line 65 of file NumericalStabilization.h.

Referenced by computeArtificialDiffusion().

◆ element_sizes_

std::vector<double> const NumLib::IsotropicDiffusionStabilization::element_sizes_
private

Element sizes, which are represented by the maximum element edge lengths.

Definition at line 72 of file NumericalStabilization.h.

Referenced by computeArtificialDiffusion().

◆ tuning_parameter_

double const NumLib::IsotropicDiffusionStabilization::tuning_parameter_ = 0.5
private

The tuning parameter in the range [0,1].

Definition at line 68 of file NumericalStabilization.h.

Referenced by IsotropicDiffusionStabilization(), and computeArtificialDiffusion().


The documentation for this class was generated from the following files: