:py:mod:`FELiCS.Fields.fluctuationClass` ======================================== .. py:module:: FELiCS.Fields.fluctuationClass Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: FELiCS.Fields.fluctuationClass.fluctuationClass FELiCS.Fields.fluctuationClass.fluctuationSolutions Attributes ~~~~~~~~~~ .. autoapisummary:: FELiCS.Fields.fluctuationClass.logger .. py:data:: logger .. py:class:: fluctuationClass(param, mean, FEMSpaces, coordinateSystem) Bases: :py:obj:`FELiCS.Fields.fieldProperties.fieldProperties`, :py:obj:`FELiCS.Equation.dependentVariables.reactionHandler.reactionHandler`, :py:obj:`FELiCS.Equation.dependentVariables.equationOfStateHandler.equationOfStateHandler`, :py:obj:`FELiCS.Equation.dependentVariables.energyHandler.energyHandler`, :py:obj:`FELiCS.Equation.dependentVariables.momentumHandler.momentumHandler` Container for fluctuating variables and derived fields for postprocessing. This class wraps the test functions representing transported variables within the linearized governing equations. In addition to these, it also derives secondary fields (dependent variables) from the transported variables, which are needed for postprocessing and exporting results. It plays a central role in calculating and organizing both transported and derived quantities used in numerical simulations. **Initialize the fluctuationClass object** :param param: FELiCS parameter object containing simulation configuration. :type param: :py:class:`FELiCSParameter` :param mean: Mean flow object. :type mean: :py:class:`meanFlowClass` :param FEMSpaces: Object encapsulating FEM spaces used in the simulation. :type FEMSpaces: :py:class:`FEMSpaceHandler` :param coordinateSystem: Representation of the simulation's coordinate system. :type coordinateSystem: :py:class:`object` :ivar _fluc: Trial function for the mixed finite element space. :vartype _fluc: :py:class:`ufl.argument.TrialFunction` :ivar _mean: Temporal mean flow object. :vartype _mean: :py:class:`meanFlowClass` :ivar _transportedQuantities: Names of the transported quantities. :vartype _transportedQuantities: :py:class:`list` of :py:class:`str` :ivar _zeroVectorField: Zero-valued vector function in the velocity space. :vartype _zeroVectorField: :py:class:`dolfinx.Function` :ivar _fieldDict: Dictionary of calculated fields (both transported and dependent). :vartype _fieldDict: :py:class:`dict` :ivar _zeroField: Scalar zero field in the scalar space. :vartype _zeroField: :py:class:`dolfinx.Function` .. py:class:: fluctuationSolutions(param, mean, FEMSpaces, omega, vmixedVector, isResponseOrDirect, gainNumber=-1, gainValue=-1) Bases: :py:obj:`FELiCS.Fields.fieldProperties.fieldProperties`, :py:obj:`FELiCS.Equation.dependentVariables.heatReleaseHandler.heatReleaseHandler`, :py:obj:`FELiCS.Equation.dependentVariables.equationOfStateHandler.equationOfStateHandler`, :py:obj:`FELiCS.Equation.dependentVariables.momentumHandler.momentumHandler`, :py:obj:`FELiCS.Equation.dependentVariables.energyHandler.energyHandler`, :py:obj:`FELiCS.Equation.dependentVariables.reactionHandler.reactionHandler` Stores and manages linearized fluctuation solutions. This class contains the computed fluctuation solutions in the mixed function space. **Initialize the fluctuationSolutions object** :param param: FELiCS parameter object containing simulation configuration. :type param: :py:class:`FELiCSParameter` :param mean: Mean flow object. :type mean: :py:class:`meanFlowClass` :param FEMSpaces: Finite element space handler. :type FEMSpaces: :py:class:`FEMSpaceHandler` :param omega: Complex eigenvalue representing the frequency of the solution. :type omega: :py:class:`complex` :param vmixedVector: Complex-valued vector representing the mixed solution. :type vmixedVector: :py:class:`np.ndarray` :param isResponseOrDirect: Flag indicating whether the solution is a Response/Direct (True) or Forcing/Adjoint (False). :type isResponseOrDirect: :py:class:`bool` :param gainNumber: Index of the gain value, default is -1. :type gainNumber: :py:class:`int`, *optional* :param gainValue: Value of the gain, default is -1. :type gainValue: :py:class:`float`, *optional* :ivar _zeroVectorField: Vector-valued zero field used for initialization (not stored). :vartype _zeroVectorField: :py:class:`dolfinx.Function` :ivar _FEMSpaces: High-order FEM spaces for simulation. :vartype _FEMSpaces: :py:class:`FEMSpaceHandler` :ivar _mean: Mean flow object. :vartype _mean: :py:class:`meanFlowClass` :ivar _transportedQuantities: Names of the transported quantities. :vartype _transportedQuantities: :py:class:`list` of :py:class:`str` :ivar _param: Simulation configuration object. :vartype _param: :py:class:`FELiCSParameter` :ivar _meshfilename: Filename of the export mesh (if applicable). :vartype _meshfilename: :py:class:`str` :ivar _linearFunctionSpaces: Low-order FEM spaces for export mesh (if applicable). :vartype _linearFunctionSpaces: :py:class:`FEMSpaceHandler` :ivar _exportZeroScalarField: Scalar zero field on export mesh. :vartype _exportZeroScalarField: :py:class:`dolfinx.Function` :ivar _exportZeroVectorField: Vector zero field on export mesh. :vartype _exportZeroVectorField: :py:class:`dolfinx.Function` :ivar _exportMesh: Export mesh. :vartype _exportMesh: :py:class:`FELiCSMesh` :ivar _uValuesList: List of velocity component names. :vartype _uValuesList: :py:class:`list` of :py:class:`str` :ivar _solution: Solution vector components. :vartype _solution: :py:class:`list` :ivar _meanfieldDict: Dictionary containing mean field interpolated onto export space. :vartype _meanfieldDict: :py:class:`dict` :ivar _fieldDict: Dictionary of calculated fields (both transported and dependent). :vartype _fieldDict: :py:class:`dict` :ivar _zeroField: Zero-valued array for initialization. :vartype _zeroField: :py:class:`np.ndarray` .. py:property:: solutVector Complex-valued vector of the fluctuation solution. :returns: Solution vector in mixed function space. :rtype: :py:class:`np.ndarray` .. py:property:: solutionKind Type of the solution based on analysis mode and configuration. :returns: One of 'Response', 'Forcing', 'Direct', 'Adjoint', or empty string. :rtype: :py:class:`str` .. py:property:: omega Eigenvalue (frequency) of the fluctuation solution. :returns: Complex frequency associated with the solution. :rtype: :py:class:`complex` .. py:property:: gainNumber Gain number identifier. :returns: Gain index or -1 if unused. :rtype: :py:class:`int` .. py:property:: gainValue Gain magnitude. :returns: Real-valued gain. :rtype: :py:class:`float`