sfepy.terms.terms_navier_stokes module

class sfepy.terms.terms_navier_stokes.ConvectTerm(name, arg_str, integral, region, **kwargs)[source]

Nonlinear convective term.

Definition

\int_{\Omega} ((\ul{u} \cdot \nabla) \ul{u}) \cdot \ul{v}

Call signature

dw_convect

(virtual, state)

Arguments
  • virtual : \ul{v}

  • state : \ul{u}

arg_shapes = {'state': 'D', 'virtual': ('D', 'state')}
arg_types = ('virtual', 'state')
static function()
get_fargs(self, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'dw_convect'
class sfepy.terms.terms_navier_stokes.DivGradTerm(name, arg_str, integral, region, **kwargs)[source]

Diffusion term.

Definition

\int_{\Omega} \nu\ \nabla \ul{v} : \nabla \ul{u} \mbox{ , }
\int_{\Omega} \nu\ \nabla \ul{u} : \nabla \ul{w} \\
\int_{\Omega} \nabla \ul{v} : \nabla \ul{u} \mbox{ , }
\int_{\Omega} \nabla \ul{u} : \nabla \ul{w}

Call signature

dw_div_grad

(opt_material, virtual, state)

(opt_material, parameter_1, parameter_2)

Arguments 1
  • material : \nu (viscosity, optional)

  • virtual : \ul{v}

  • state : \ul{u}

Arguments 2
  • material : \nu (viscosity, optional)

  • parameter_1 : \ul{u}

  • parameter_2 : \ul{w}

arg_shapes = [{'opt_material': '1, 1', 'virtual': ('D', 'state'), 'state': 'D', 'parameter_1': 'D', 'parameter_2': 'D'}, {'opt_material': None}]
arg_types = (('opt_material', 'virtual', 'state'), ('opt_material', 'parameter_1', 'parameter_2'))
d_div_grad(self, out, grad1, grad2, mat, vg, fmode)[source]
static function()
get_eval_shape(self, mat, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
get_fargs(self, mat, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
modes = ('weak', 'eval')
name = 'dw_div_grad'
set_arg_types(self)[source]
class sfepy.terms.terms_navier_stokes.DivOperatorTerm(name, arg_str, integral, region, **kwargs)[source]

Weighted divergence term of a test function.

Definition

\int_{\Omega} \nabla \cdot \ul{v} \mbox { or } \int_{\Omega} c \nabla
\cdot \ul{v}

Call signature

dw_div

(opt_material, virtual)

Arguments
  • material : c (optional)

  • virtual : \ul{v}

arg_shapes = [{'opt_material': '1, 1', 'virtual': ('D', None)}, {'opt_material': None}]
arg_types = ('opt_material', 'virtual')
static function(out, mat, vg)[source]
get_fargs(self, mat, virtual, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'dw_div'
class sfepy.terms.terms_navier_stokes.DivTerm(name, arg_str, integral, region, **kwargs)[source]

Evaluate divergence of a vector field.

Supports ‘eval’, ‘el_avg’ and ‘qp’ evaluation modes.

Definition

\int_{\Omega} \nabla \cdot \ul{u}

\mbox{vector for } K \from \Ical_h:
\int_{T_K} \nabla \cdot \ul{u} / \int_{T_K} 1

(\nabla \cdot \ul{u})|_{qp}

Call signature

ev_div

(parameter)

Arguments
  • parameter : \ul{u}

arg_shapes = {'parameter': 'D'}
arg_types = ('parameter',)
static function(out, div, vg, fmode)[source]
get_eval_shape(self, parameter, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
get_fargs(self, parameter, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'ev_div'
class sfepy.terms.terms_navier_stokes.GradDivStabilizationTerm(name, arg_str, integral, region, **kwargs)[source]

Grad-div stabilization term ( \gamma is a global stabilization parameter).

Definition

\gamma \int_{\Omega} (\nabla\cdot\ul{u}) \cdot (\nabla\cdot\ul{v})

Call signature

dw_st_grad_div

(material, virtual, state)

Arguments
  • material : \gamma

  • virtual : \ul{v}

  • state : \ul{u}

arg_shapes = {'material': '1, 1', 'state': 'D', 'virtual': ('D', 'state')}
arg_types = ('material', 'virtual', 'state')
static function()
get_fargs(self, gamma, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'dw_st_grad_div'
class sfepy.terms.terms_navier_stokes.GradTerm(name, arg_str, integral, region, **kwargs)[source]

Evaluate gradient of a scalar or vector field.

Supports ‘eval’, ‘el_avg’ and ‘qp’ evaluation modes.

Definition

\int_{\Omega} \nabla p \mbox{ or } \int_{\Omega} \nabla \ul{w}

\mbox{vector for } K \from \Ical_h: \int_{T_K} \nabla p /
\int_{T_K} 1 \mbox{ or } \int_{T_K} \nabla \ul{w} /
\int_{T_K} 1

(\nabla p)|_{qp} \mbox{ or } \nabla \ul{w}|_{qp}

Call signature

ev_grad

(parameter)

Arguments
  • parameter : p or \ul{w}

arg_shapes = {'parameter': 'N'}
arg_types = ('parameter',)
static function(out, grad, vg, fmode)[source]
get_eval_shape(self, parameter, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
get_fargs(self, parameter, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'ev_grad'
class sfepy.terms.terms_navier_stokes.LinearConvect2Term(name, arg_str, integral, region, **kwargs)[source]

Linearized convective term with the convection velocity given as a material parameter.

Definition

\int_{\Omega} ((\ul{b} \cdot \nabla) \ul{u}) \cdot \ul{v}

((\ul{b} \cdot \nabla) \ul{u})|_{qp}

Call signature

dw_lin_convect2

(material, virtual, state)

Arguments
  • material : \ul{b}

  • virtual : \ul{v}

  • state : \ul{u}

arg_shapes = {'material': 'D, 1', 'state': 'D', 'virtual': ('D', 'state')}
arg_types = ('material', 'virtual', 'state')
static function()
get_fargs(self, material, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'dw_lin_convect2'
class sfepy.terms.terms_navier_stokes.LinearConvectTerm(name, arg_str, integral, region, **kwargs)[source]

Linearized convective term.

Definition

\int_{\Omega} ((\ul{b} \cdot \nabla) \ul{u}) \cdot \ul{v}

((\ul{b} \cdot \nabla) \ul{u})|_{qp}

Call signature

dw_lin_convect

(virtual, parameter, state)

Arguments
  • virtual : \ul{v}

  • parameter : \ul{b}

  • state : \ul{u}

arg_shapes = {'parameter': 'D', 'state': 'D', 'virtual': ('D', 'state')}
arg_types = ('virtual', 'parameter', 'state')
static function()
get_fargs(self, virtual, parameter, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'dw_lin_convect'
class sfepy.terms.terms_navier_stokes.PSPGCStabilizationTerm(name, arg_str, integral, region, **kwargs)[source]

PSPG stabilization term, convective part ( \tau is a local stabilization parameter).

Definition

\sum_{K \in \Ical_h}\int_{T_K} \tau_K\ ((\ul{b} \cdot \nabla) \ul{u})
\cdot \nabla q

Call signature

dw_st_pspg_c

(material, virtual, parameter, state)

Arguments
  • material : \tau_K

  • virtual : q

  • parameter : \ul{b}

  • state : \ul{u}

arg_shapes = {'material': '1, 1', 'parameter': 'D', 'state': 'D', 'virtual': (1, None)}
arg_types = ('material', 'virtual', 'parameter', 'state')
static function()
get_fargs(self, tau, virtual, parameter, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'dw_st_pspg_c'
class sfepy.terms.terms_navier_stokes.PSPGPStabilizationTerm(name, arg_str, integral, region, **kwargs)[source]

PSPG stabilization term, pressure part ( \tau is a local stabilization parameter), alias to Laplace term dw_laplace.

Definition

\sum_{K \in \Ical_h}\int_{T_K} \tau_K\ \nabla p \cdot \nabla q

Call signature

dw_st_pspg_p

(opt_material, virtual, state)

(opt_material, parameter_1, parameter_2)

Arguments
  • material : \tau_K

  • virtual : q

  • state : p

name = 'dw_st_pspg_p'
class sfepy.terms.terms_navier_stokes.SUPGCStabilizationTerm(name, arg_str, integral, region, **kwargs)[source]

SUPG stabilization term, convective part ( \delta is a local stabilization parameter).

Definition

\sum_{K \in \Ical_h}\int_{T_K} \delta_K\ ((\ul{b} \cdot \nabla)
\ul{u})\cdot ((\ul{b} \cdot \nabla) \ul{v})

Call signature

dw_st_supg_c

(material, virtual, parameter, state)

Arguments
  • material : \delta_K

  • virtual : \ul{v}

  • parameter : \ul{b}

  • state : \ul{u}

arg_shapes = {'material': '1, 1', 'parameter': 'D', 'state': 'D', 'virtual': ('D', 'state')}
arg_types = ('material', 'virtual', 'parameter', 'state')
static function()
get_fargs(self, delta, virtual, parameter, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'dw_st_supg_c'
class sfepy.terms.terms_navier_stokes.SUPGPStabilizationTerm(name, arg_str, integral, region, **kwargs)[source]

SUPG stabilization term, pressure part ( \delta is a local stabilization parameter).

Definition

\sum_{K \in \Ical_h}\int_{T_K} \delta_K\ \nabla p\cdot ((\ul{b} \cdot
\nabla) \ul{v})

Call signature

dw_st_supg_p

(material, virtual, parameter, state)

Arguments
  • material : \delta_K

  • virtual : \ul{v}

  • parameter : \ul{b}

  • state : p

arg_shapes = {'material': '1, 1', 'parameter': 'D', 'state': 1, 'virtual': ('D', None)}
arg_types = ('material', 'virtual', 'parameter', 'state')
static function()
get_fargs(self, delta, virtual, parameter, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'dw_st_supg_p'
class sfepy.terms.terms_navier_stokes.StokesTerm(name, arg_str, integral, region, **kwargs)[source]

Stokes problem coupling term. Corresponds to weak forms of gradient and divergence terms. Can be evaluated.

Definition

\int_{\Omega} p\ \nabla \cdot \ul{v} \mbox{ , }
\int_{\Omega} q\ \nabla \cdot \ul{u}
\mbox{ or }
\int_{\Omega} c\ p\ \nabla \cdot \ul{v} \mbox{ , }
\int_{\Omega} c\ q\ \nabla \cdot \ul{u}

Call signature

dw_stokes

(opt_material, virtual, state)

(opt_material, state, virtual)

(opt_material, parameter_v, parameter_s)

Arguments 1
  • material : c (optional)

  • virtual : \ul{v}

  • state : p

Arguments 2
  • material : c (optional)

  • state : \ul{u}

  • virtual : q

Arguments 3
  • material : c (optional)

  • parameter_v : \ul{u}

  • parameter_s : p

arg_shapes = [{'opt_material': '1, 1', 'virtual/grad': ('D', None), 'state/grad': 1, 'virtual/div': (1, None), 'state/div': 'D', 'parameter_v': 'D', 'parameter_s': 1}, {'opt_material': None}]
arg_types = (('opt_material', 'virtual', 'state'), ('opt_material', 'state', 'virtual'), ('opt_material', 'parameter_v', 'parameter_s'))
static d_eval(out, coef, vec_qp, div, vvg)[source]
get_eval_shape(self, coef, vvar, svar, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
get_fargs(self, coef, vvar, svar, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
modes = ('grad', 'div', 'eval')
name = 'dw_stokes'
set_arg_types(self)[source]
class sfepy.terms.terms_navier_stokes.StokesWaveDivTerm(name, arg_str, integral, region, **kwargs)[source]

Stokes dispersion term with the wave vector \ul{\kappa} and the divergence operator.

Definition

\int_{\Omega} (\ul{\kappa} \cdot \ul{v}) (\nabla \cdot \ul{u}) \;,
\int_{\Omega} (\ul{\kappa} \cdot \ul{u}) (\nabla \cdot \ul{v})

Call signature

dw_stokes_wave_div

(material, virtual, state)

(material, state, virtual)

Arguments 1
  • material : \ul{\kappa}

  • virtual : \ul{v}

  • state : \ul{u}

Arguments 2
  • material : \ul{\kappa}

  • state : \ul{u}

  • virtual : \ul{v}

arg_shapes = {'material': '.: D', 'state': 'D', 'virtual': ('D', 'state')}
arg_types = (('material', 'virtual', 'state'), ('material', 'state', 'virtual'))
static function(out, out_qp, geo, fmode)[source]
geometries = ['2_3', '2_4', '3_4', '3_8']
get_fargs(self, kappa, kvar, dvar, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
modes = ('kd', 'dk')
name = 'dw_stokes_wave_div'
class sfepy.terms.terms_navier_stokes.StokesWaveTerm(name, arg_str, integral, region, **kwargs)[source]

Stokes dispersion term with the wave vector \ul{\kappa}.

Definition

\int_{\Omega} (\ul{\kappa} \cdot \ul{v}) (\ul{\kappa} \cdot \ul{u})

Call signature

dw_stokes_wave

(material, virtual, state)

Arguments
  • material : \ul{\kappa}

  • virtual : \ul{v}

  • statee : \ul{u}

arg_shapes = {'material': '.: D', 'state': 'D', 'virtual': ('D', 'state')}
arg_types = ('material', 'virtual', 'state')
static function(out, out_qp, geo, fmode)[source]
geometries = ['2_3', '2_4', '3_4', '3_8']
get_fargs(self, kappa, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'dw_stokes_wave'
class sfepy.terms.terms_navier_stokes.SurfaceDivTerm(name, arg_str, integral, region, **kwargs)[source]

Evaluate divergence of a vector field.

Supports ‘eval’, ‘el_avg’ and ‘qp’ evaluation modes.

Definition

\int_{\Gamma} \nabla \cdot \ul{u}

\mbox{vector for } K \from \Ical_h:
\int_{T_K} \nabla \cdot \ul{u} / \int_{T_K} 1

(\nabla \cdot \ul{u})|_{qp}

Call signature

ev_surface_div

(parameter)

Arguments
  • parameter : \ul{u}

integration = 'surface_extra'
name = 'ev_surface_div'
class sfepy.terms.terms_navier_stokes.SurfaceGradTerm(name, arg_str, integral, region, **kwargs)[source]

Evaluate gradient of a scalar or vector field.

Supports ‘eval’, ‘el_avg’ and ‘qp’ evaluation modes.

Definition

\int_{\Gamma} \nabla p \mbox{ or } \int_{\Gamma} \nabla \ul{w}

\mbox{vector for } K \from \Ical_h: \int_{T_K} \nabla p /
\int_{T_K} 1 \mbox{ or } \int_{T_K} \nabla \ul{w} /
\int_{T_K} 1

(\nabla p)|_{qp} \mbox{ or } \nabla \ul{w}|_{qp}

Call signature

ev_surface_grad

(parameter)

Arguments
  • parameter : p or \ul{w}

integration = 'surface_extra'
name = 'ev_surface_grad'