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(out, grad, state, cmap, is_diff)
get_fargs(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} \nabla \ul{v} : \nabla \ul{u}

Call signature:

dw_div_grad

(opt_material, virtual, state)

(opt_material, parameter_1, parameter_2)

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

  • virtualparameter_1: \ul{v}

  • state/parameter_2: \ul{u}

arg_shapes = [{'opt_material': '1, 1', 'parameter_1': 'D', 'parameter_2': 'D', 'state': 'D', 'virtual': ('D', 'state')}, {'opt_material': None}]
arg_types = (('opt_material', 'virtual', 'state'), ('opt_material', 'parameter_1', 'parameter_2'))
d_div_grad(out, grad1, grad2, mat, vg, fmode)[source]
static function(out, grad, viscosity, cmap_v, cmap_s, is_diff)
get_eval_shape(mat, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
get_fargs(mat, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
modes = ('weak', 'eval')
name = 'dw_div_grad'
set_arg_types()[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(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_{\cal{D}} \nabla \cdot \ul{u} \mbox { , }
\int_{\cal{D}} c \nabla \cdot \ul{u}

Call signature:

ev_div

(opt_material, parameter)

Arguments:
  • parameter : \ul{u}

arg_shapes = [{'opt_material': '1, 1', 'parameter': 'D'}, {'opt_material': None}]
arg_types = ('opt_material', 'parameter')
static function(out, mat, div, vg, fmode)[source]
get_eval_shape(mat, parameter, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
get_fargs(mat, parameter, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
integration = ('cell', 'facet_extra')
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(out, div, coef, cmap, is_diff)
get_fargs(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_{\cal{D}} \nabla p \mbox{ or } \int_{\cal{D}} \nabla \ul{u}\\
\int_{\cal{D}} c \nabla p \mbox{ or } \int_{\cal{D}} c \nabla \ul{u}

Call signature:

ev_grad

(opt_material, parameter)

Arguments:
  • parameter : p or \ul{u}

arg_shapes = [{'opt_material': '1, 1', 'parameter': 'N'}, {'opt_material': None}]
arg_types = ('opt_material', 'parameter')
static function(out, mat, grad, vg, fmode)[source]
get_eval_shape(mat, parameter, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
get_fargs(mat, parameter, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
integration = ('cell', 'facet_extra')
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{c} \cdot \nabla) \ul{u}) \cdot \ul{v}

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

Call signature:

dw_lin_convect2

(material, virtual, state)

Arguments:
  • material : \ul{c}

  • virtual : \ul{v}

  • state : \ul{u}

arg_shapes = {'material': 'D, 1', 'state': 'D', 'virtual': ('D', 'state')}
arg_types = ('material', 'virtual', 'state')
static function(out, grad, state_b, cmap, is_diff)
get_fargs(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{w} \cdot \nabla) \ul{u}) \cdot \ul{v}

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

Call signature:

dw_lin_convect

(virtual, parameter, state)

Arguments:
  • virtual : \ul{v}

  • parameter : \ul{w}

  • state : \ul{u}

arg_shapes = {'parameter': 'D', 'state': 'D', 'virtual': ('D', 'state')}
arg_types = ('virtual', 'parameter', 'state')
static function(out, grad, state_b, cmap, is_diff)
get_fargs(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(out, state_b, state_u, coef, cmap_p, cmap_u, conn, is_diff)
get_fargs(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(out, state_b, state_u, coef, cmap, conn, is_diff)
get_fargs(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(out, state_b, grad_p, coef, cmap_u, cmap_p, is_diff)
get_fargs(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/parameter_v: \ul{v}

  • state/parameter_s: p

Arguments 2:
  • material : c (optional)

  • state : \ul{u}

  • virtual : q

arg_shapes = [{'opt_material': '1, 1', 'parameter_s': 1, 'parameter_v': 'D', 'state/div': 'D', 'state/grad': 1, 'virtual/div': (1, None), 'virtual/grad': ('D', None)}, {'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(coef, vvar, svar, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
get_fargs(coef, vvar, svar, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
modes = ('grad', 'div', 'eval')
name = 'dw_stokes'
set_arg_types()[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(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(kappa, virtual, state, mode=None, term_mode=None, diff_var=None, **kwargs)[source]
name = 'dw_stokes_wave'