NekVolumeNorm

Computes a finite L^N norm or an L-infinity norm of the difference between a NekRS solution field and an optional analytical function.

Description

This postprocessor computes either a finite integrated L norm or the L norm of a specified field over the NekRS mesh.

For finite , the postprocessor evaluates

where is the value of the postprocessor, is the volume of the NekRS mesh, is the specified field, and is an optional function provided by function.

When N = infinity, the postprocessor evaluates the nodal maximum norm

The N parameter may be set to any real value greater than or equal to one, or to infinity.

To be clear, this postprocessor is not evaluated on the NekRSMesh mesh mirror, but instead on the mesh actually used for computation in NekRS.

The field is specified with the field parameter, which may be one of:

  • pressure: pressure

  • temperature: temperature

  • velocity: magnitude of velocity

  • velocity_x: -component of velocity

  • velocity_y: -component of velocity

  • velocity_z: -component of velocity

  • velocity_x_squared: -component of velocity, squared

  • velocity_y_squared: -component of velocity, squared

  • velocity_z_squared: -component of velocity, squared

  • velocity_component: velocity vector dotted against another vector

  • scalar01: first non-temperature passive scalar

  • scalar02: second non-temperature passive scalar

  • scalar03: third non-temperature passive scalar

  • unity: the value 1.0

  • zero: the value 0.0 (this is typically used when combining with a function shift, to only apply the operation to the function)

Example Input Syntax

The following example evaluates the L, L, and L norms of the NekRS temperature field relative to a function provided in the input file.

[Postprocessors<<<{"href": "../../syntax/Postprocessors/index.html"}>>>]
  [temp_l2]
    type = NekVolumeNorm<<<{"description": "Computes a finite L^N norm or an L-infinity norm of the difference between a NekRS solution field and an optional analytical function.", "href": "NekVolumeNorm.html"}>>>
    field<<<{"description": "Field to apply this object to"}>>> = temperature
    function<<<{"description": "Function to shift the field by, when applying this object. For example, if 'field = temperature', using this parameter will apply this object to the new combined quantity 'temperature - f', where 'f' is this shifting function."}>>> = function_to_compare
  []
  [temp_l2_comparison_b]
    type = NekVolumeIntegral<<<{"description": "Integral of a field over the NekRS volume mesh", "href": "NekVolumeIntegral.html"}>>>
    field<<<{"description": "Field to apply this object to"}>>> = velocity_x
  []
  [temp_l2_comparison]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'sqrt(temp_l2_comparison_b)'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'temp_l2_comparison_b'
  []

  [temp_l1]
    type = NekVolumeNorm<<<{"description": "Computes a finite L^N norm or an L-infinity norm of the difference between a NekRS solution field and an optional analytical function.", "href": "NekVolumeNorm.html"}>>>
    field<<<{"description": "Field to apply this object to"}>>> = temperature
    N<<<{"description": "Order of the volume norm. Specify a finite real value N >= 1, or use 'infinity' for the L-infinity norm."}>>> = 1
    function<<<{"description": "Function to shift the field by, when applying this object. For example, if 'field = temperature', using this parameter will apply this object to the new combined quantity 'temperature - f', where 'f' is this shifting function."}>>> = function_to_compare
  []
  [temp_l1_comparison]
    type = NekVolumeIntegral<<<{"description": "Integral of a field over the NekRS volume mesh", "href": "NekVolumeIntegral.html"}>>>
    field<<<{"description": "Field to apply this object to"}>>> = velocity_y
  []

  [temp_linf]
    type = NekVolumeNorm<<<{"description": "Computes a finite L^N norm or an L-infinity norm of the difference between a NekRS solution field and an optional analytical function.", "href": "NekVolumeNorm.html"}>>>
    field<<<{"description": "Field to apply this object to"}>>> = temperature
    N<<<{"description": "Order of the volume norm. Specify a finite real value N >= 1, or use 'infinity' for the L-infinity norm."}>>> = infinity
    function<<<{"description": "Function to shift the field by, when applying this object. For example, if 'field = temperature', using this parameter will apply this object to the new combined quantity 'temperature - f', where 'f' is this shifting function."}>>> = function_to_compare
  []
  [temp_linf_comparison]
    type = NodalExtremeValue<<<{"description": "Finds either the min or max elemental value of a variable over the domain.", "href": "NodalExtremeValue.html"}>>>
    variable<<<{"description": "The name of the variable that this postprocessor operates on"}>>> = temperature_minus_function
  []

  [temp_without_function_linf]
    type = NekVolumeNorm<<<{"description": "Computes a finite L^N norm or an L-infinity norm of the difference between a NekRS solution field and an optional analytical function.", "href": "NekVolumeNorm.html"}>>>
    field<<<{"description": "Field to apply this object to"}>>> = temperature
    N<<<{"description": "Order of the volume norm. Specify a finite real value N >= 1, or use 'infinity' for the L-infinity norm."}>>> = infinity
  []
  [temp_without_function_linf_comparison]
    type = NodalExtremeValue<<<{"description": "Finds either the min or max elemental value of a variable over the domain.", "href": "NodalExtremeValue.html"}>>>
    variable<<<{"description": "The name of the variable that this postprocessor operates on"}>>> = temperature
  []
[]
(test/tests/postprocessors/nek_function_norm/nek.i)