:py:mod:`FELiCS.Equation.Equations.SpongeTerm` ============================================== .. py:module:: FELiCS.Equation.Equations.SpongeTerm Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: FELiCS.Equation.Equations.SpongeTerm.SpongeTerm Attributes ~~~~~~~~~~ .. autoapisummary:: FELiCS.Equation.Equations.SpongeTerm.logger .. py:data:: logger .. py:class:: SpongeTerm(index, eqColl, fluc, X, param) Bases: :py:obj:`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** :param eqColl: The equation collection object. :type eqColl: :py:class:`EquationCollection` :param fluc: The fluctuations object. :type fluc: :py:class:`Fluctuations` :param X: The list of solution variables. :type X: :py:class:`list` :param param: The parameters object. :type param: :py:class:`Parameters` :ivar fluc: Fluctuating fields used in the formulation. :vartype fluc: :py:class:`Fluctuations` :ivar X: Trial/test functions for each variable. :vartype X: :py:class:`list` of :py:class:`Function` :ivar param: Configuration and problem parameters. :vartype param: :py:class:`Parameters` :ivar J_hat: Jacobian determinant for integration. :vartype J_hat: :py:class:`Expression` :ivar all_ds: Boundary integration measure. :vartype all_ds: :py:class:`Measure` :ivar n: Unit normal vector on boundaries. :vartype n: :py:class:`FacetNormal` .. admonition:: Notes Discontinuous Galerkin schemes are not supported in this tensorial framework. .. py:method:: addWeightMatrixExpression(weakForm, mean) Add the weight matrix expression to the weak form. :param weakForm: The weak form object. :type weakForm: :py:class:`ufl.Form` :param mean: The mean field object. :type mean: :py:class:`MeanField` .. admonition:: Notes This method does not apply any sponge term contributions. .. py:method:: addLinearExpression(weakForm, mean) Add the linear expression to the weak form. :param weakForm: The weak form object. :type weakForm: :py:class:`ufl.Form` :param mean: The mean field object. :type mean: :py:class:`MeanField` .. admonition:: 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`. .. py:method:: addNonlinearExpression(weakForm, mean) Add the nonlinear expression to the weak form. :param weakForm: The weak form object. :type weakForm: :py:class:`ufl.Form` :param mean: The mean field object. :type mean: :py:class:`MeanField` .. admonition:: 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.