FVGradientMethods System

FVGradientMethods lists the named gradient methods available to linear finite-volume variables and gradient-based interpolation methods. A gradient describes how quickly a cell-centered field changes in space.

The default gradient method for MooseVariableLinearFVReal is configured with "gradient_method". This parameter may name a built-in method such as green-gauss or green-gauss-venkatakrishnan, or it may name a method declared in [FVGradientMethods]. Gradient-based interpolation methods can also request a named method directly, for example "gradient_method".

Using named gradient methods

If several parts of an input file should use the same gradient settings, declare the method once in [FVGradientMethods] and refer to it by name. This avoids repeating the same settings and makes it clear which variables and interpolation methods use the same gradient choice.

FVGradientMethods block

Declare methods in the [FVGradientMethods] block. The example below defines one named Green-Gauss method:

[FVGradientMethods<<<{"href": "index.html"}>>>]
  [gg]
    type = FVGreenGaussGradient<<<{"description": "Green-Gauss cell-centered gradient method.", "href": "../../source/fvgradientmethods/FVGreenGaussGradient.html"}>>>
  []
[]
(test/tests/variables/linearfv/shared-gradient-method.i)

The method name can then be referenced by a variable:

[Variables<<<{"href": "../Variables/index.html"}>>>]
  [u]
    type = MooseLinearVariableFVReal<<<{"description": "Base class for Moose variables. This should never be the terminal object type", "href": "../../source/variables/MooseLinearVariableFV.html"}>>>
    solver_sys<<<{"description": "If this variable is a solver variable, this is the solver system to which it should be added."}>>> = 'u_sys'
    initial_condition<<<{"description": "Specifies a constant initial condition for this variable"}>>> = 1.0
    gradient_method<<<{"description": "Default gradient computation method to register when a consumer requests gradients from this variable. This may be a built-in method name like 'green-gauss' or 'green-gauss-venkatakrishnan', or the name of an object in [FVGradientMethods]."}>>> = gg
  []
[]
(test/tests/variables/linearfv/shared-gradient-method.i)

or by a gradient-based interpolation method:

[FVInterpolationMethods<<<{"href": "../FVInterpolationMethods/index.html"}>>>]
  [muscl]
    type = FVAdvectedMUSCLDeferredCorrection<<<{"description": "MUSCL reconstruction with cell gradients from a named gradient method using deferred correction.", "href": "../../source/fvinterpolationmethods/FVAdvectedMUSCLDeferredCorrection.html"}>>>
    gradient_method<<<{"description": "Gradient method used to compute cell gradients for the high-order reconstruction."}>>> = gg
    deferred_correction_factor<<<{"description": "Scales the deferred correction strength; 0 gives pure upwind (no deferred correction), 1 gives full deferred correction. Values < 1 can improve fixed point robustness."}>>> = 1.0
  []
[]
(test/tests/variables/linearfv/shared-gradient-method.i)

See the individual method pages listed below for details.

Available Objects