FELiCS.Equation.Equations.SpongeTerm#

Module Contents#

Classes#

SpongeTerm

Class representing the sponge term in the equation.

Attributes#

FELiCS.Equation.Equations.SpongeTerm.logger#
class FELiCS.Equation.Equations.SpongeTerm.SpongeTerm(index, eqColl, fluc, X, param)#

Bases: FELiCS.Equation.Equations.EquationTemplate.EquationTemplate

Class representing the sponge term in the equation.

The sponge term applies damping to fluctuations or deviations from target profiles in computational domains. It stabilizes numerical simulations by attenuating reflections and enforcing desired flow behavior in designated regions.

Initialize the SpongeTerm object

Parameters:
  • eqColl (EquationCollection) – The equation collection object.

  • fluc (Fluctuations) – The fluctuations object.

  • X (list) – The list of solution variables.

  • param (Parameters) – The parameters object.

Variables:
  • fluc (Fluctuations) – Fluctuating fields used in the formulation.

  • X (list of Function) – Trial/test functions for each variable.

  • param (Parameters) – Configuration and problem parameters.

  • J_hat (Expression) – Jacobian determinant for integration.

  • all_ds (Measure) – Boundary integration measure.

  • n (FacetNormal) – Unit normal vector on boundaries.

Notes

Discontinuous Galerkin schemes are not supported in this tensorial framework.

addWeightMatrixExpression(weakForm, mean)#

Add the weight matrix expression to the weak form.

Parameters:
  • weakForm (ufl.Form) – The weak form object.

  • mean (MeanField) – The mean field object.

Notes

This method does not apply any sponge term contributions.

addLinearExpression(weakForm, mean)#

Add the linear expression to the weak form.

Parameters:
  • weakForm (ufl.Form) – The weak form object.

  • mean (MeanField) – The mean field object.

Notes

Applies linear sponge damping terms to the fluctuation variables, as specified in the parameter set. For velocity variables, a dot product is applied. Each variable’s sponge term is weighted by the sponge strength field spg.

addNonlinearExpression(weakForm, mean)#

Add the nonlinear expression to the weak form.

Parameters:
  • weakForm (ufl.Form) – The weak form object.

  • mean (MeanField) – The mean field object.

Notes

Applies nonlinear sponge damping terms based on the deviation of mean flow variables from their designated target profiles. These target values are retrieved dynamically and matched to each variable. Velocity terms are handled with tensor dot products.