Skip to content

how are constant monomial aux variables computed from material properties? #23892

Discussion options

You must be logged in to vote

It's a volumetric averaging, i.e. you integrate the material property over the element volume then divide by the element volume.

    _n_local_dofs = _var.numberOfDofs();
    if (_n_local_dofs == 1) /* p0 */
    {
      ComputeValueType value = 0;
      for (_qp = 0; _qp < _qrule->n_points(); _qp++)
        value += _JxW[_qp] * _coord[_qp] * computeValue();
      value /= (_bnd ? _current_side_volume : _current_elem_volume);
      if (_var.isFV())
        setDofValueHelper(value);
      else
        // update the variable data referenced by other kernels.
        // Note that this will update the values at the quadrature points too
        // (because this is an Elemental variable)
       …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jessecarterMOOSE
Comment options

@hugary1995
Comment options

@GiudGiud
Comment options

@jessecarterMOOSE
Comment options

Answer selected by GiudGiud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants