www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LevelSetOlssonReinitialization Class Reference

Implements the re-initialization equation proposed by Olsson et. More...

#include <LevelSetOlssonReinitialization.h>

Inheritance diagram for LevelSetOlssonReinitialization:
[legend]

Public Member Functions

 LevelSetOlssonReinitialization (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual () override
 
virtual Real computeQpJacobian () override
 

Protected Attributes

const VariableGradient & _grad_levelset_0
 Gradient of the level set variable at time, = 0. More...
 
const PostprocessorValue & _epsilon
 Interface thickness. More...
 
RealVectorValue _f
 
Real _s
 
RealVectorValue _n_hat
 

Detailed Description

Implements the re-initialization equation proposed by Olsson et.

al. (2007).

Definition at line 23 of file LevelSetOlssonReinitialization.h.

Constructor & Destructor Documentation

LevelSetOlssonReinitialization::LevelSetOlssonReinitialization ( const InputParameters &  parameters)

Definition at line 24 of file LevelSetOlssonReinitialization.C.

25  : Kernel(parameters),
26  _grad_levelset_0(coupledGradient("phi_0")),
27  _epsilon(getPostprocessorValue("epsilon"))
28 {
29 }
const VariableGradient & _grad_levelset_0
Gradient of the level set variable at time, = 0.
const PostprocessorValue & _epsilon
Interface thickness.

Member Function Documentation

Real LevelSetOlssonReinitialization::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 41 of file LevelSetOlssonReinitialization.C.

42 {
43  _s = _grad_levelset_0[_qp].norm() + std::numeric_limits<Real>::epsilon();
44  _n_hat = _grad_levelset_0[_qp] / _s;
45  return _grad_test[_i][_qp] * _n_hat *
46  ((2 * _u[_qp] - 1) * _phi[_j][_qp] + _epsilon * (_grad_phi[_j][_qp] * _n_hat));
47 }
const VariableGradient & _grad_levelset_0
Gradient of the level set variable at time, = 0.
const PostprocessorValue & _epsilon
Interface thickness.
Real LevelSetOlssonReinitialization::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 32 of file LevelSetOlssonReinitialization.C.

33 {
34  _s = _grad_levelset_0[_qp].norm() + std::numeric_limits<Real>::epsilon();
35  _n_hat = _grad_levelset_0[_qp] / _s;
36  _f = _u[_qp] * (1 - _u[_qp]) * _n_hat;
37  return _grad_test[_i][_qp] * (-_f + _epsilon * (_grad_u[_qp] * _n_hat) * _n_hat);
38 }
const VariableGradient & _grad_levelset_0
Gradient of the level set variable at time, = 0.
const PostprocessorValue & _epsilon
Interface thickness.

Member Data Documentation

const PostprocessorValue& LevelSetOlssonReinitialization::_epsilon
protected

Interface thickness.

Definition at line 36 of file LevelSetOlssonReinitialization.h.

Referenced by computeQpJacobian(), and computeQpResidual().

RealVectorValue LevelSetOlssonReinitialization::_f
protected

Helper members to avoid initializing variables in computeQpResidual/Jacobian

Definition at line 40 of file LevelSetOlssonReinitialization.h.

Referenced by computeQpResidual().

const VariableGradient& LevelSetOlssonReinitialization::_grad_levelset_0
protected

Gradient of the level set variable at time, = 0.

Definition at line 33 of file LevelSetOlssonReinitialization.h.

Referenced by computeQpJacobian(), and computeQpResidual().

RealVectorValue LevelSetOlssonReinitialization::_n_hat
protected

Definition at line 42 of file LevelSetOlssonReinitialization.h.

Referenced by computeQpJacobian(), and computeQpResidual().

Real LevelSetOlssonReinitialization::_s
protected

Definition at line 41 of file LevelSetOlssonReinitialization.h.

Referenced by computeQpJacobian(), and computeQpResidual().


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