Documentation a537f1bdf2
Loading...
Searching...
No Matches
CAdjTurbVariable.hpp
Go to the documentation of this file.
1/*!
2 * \file CAdjTurbVariable.hpp
3 * \brief Main class for defining the variables of the adjoint turbulence model.
4 * \author F. Palacios, T. Economon
5 * \version 8.5.0 "Harrier"
6 *
7 * SU2 Project Website: https://su2code.github.io
8 *
9 * The SU2 Project is maintained by the SU2 Foundation
10 * (http://su2foundation.org)
11 *
12 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
13 *
14 * SU2 is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * SU2 is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28#pragma once
29
30#include "CVariable.hpp"
31
32/*!
33 * \class CAdjTurbVariable
34 * \brief Main class for defining the variables of the adjoint turbulence model.
35 * \ingroup Turbulence_Model
36 * \author A. Bueno.
37 */
38class CAdjTurbVariable final : public CVariable {
39protected:
40 // ToDo: These variables were not being allocated... is this class used?
41 MatrixType dmuT_dUTvar; /*!< \brief Sensitivity of eddy viscosity to mean flow and turbulence vars. */
42 CVectorOfMatrix dRTstar_dUTvar; /*!< \brief Sensitivity of modified turbulence residual (no boundary flux) to mean flow and turbulence vars. */
43 CVectorOfMatrix dFT_dUTvar; /*!< \brief Sensitivity of boundary flux to mean flow and turbulence vars. */
44 MatrixType EddyViscSens; /*!< \brief Eddy Viscosity Sensitivity. */
45
46public:
47 /*!
48 * \brief Constructor of the class.
49 * \param[in] psinu_inf - Value of the adjoint turbulence variable at the infinity (initialization value).
50 * \param[in] npoint - Number of points/nodes/vertices in the domain.
51 * \param[in] ndim - Number of dimensions of the problem.
52 * \param[in] nvar - Number of variables of the problem.
53 * \param[in] config - Definition of the particular problem.
54 */
55 CAdjTurbVariable(su2double psinu_inf, unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config);
56
57 /*!
58 * \brief Destructor of the class.
59 */
60 ~CAdjTurbVariable() override = default;
61
62 /*!
63 * \brief Set the Eddy Viscosity Sensitivity of the problem.
64 * \param[in] val_EddyViscSens - Eddy Viscosity Sensitivity.
65 */
66 inline void SetEddyViscSens(unsigned long iPoint, const su2double *val_EddyViscSens, unsigned long numTotalVar) override {
67 for (unsigned long iVar = 0; iVar < numTotalVar; iVar++)
68 EddyViscSens(iPoint,iVar) = val_EddyViscSens[iVar];
69 }
70
71 /*!
72 * \brief Get the Eddy Viscosity Sensitivity of the problem.
73 * \return Pointer to the Eddy Viscosity Sensitivity.
74 */
75 inline su2double *GetEddyViscSens(unsigned long iPoint) override { return EddyViscSens[iPoint]; }
76};
Declaration and inlines of the parent class for defining problem variables, function definitions in f...
Main class for defining the variables of the adjoint turbulence model.
Definition CAdjTurbVariable.hpp:38
MatrixType EddyViscSens
Eddy Viscosity Sensitivity.
Definition CAdjTurbVariable.hpp:44
CVectorOfMatrix dRTstar_dUTvar
Sensitivity of modified turbulence residual (no boundary flux) to mean flow and turbulence vars.
Definition CAdjTurbVariable.hpp:42
~CAdjTurbVariable() override=default
Destructor of the class.
su2double * GetEddyViscSens(unsigned long iPoint) override
Get the Eddy Viscosity Sensitivity of the problem.
Definition CAdjTurbVariable.hpp:75
void SetEddyViscSens(unsigned long iPoint, const su2double *val_EddyViscSens, unsigned long numTotalVar) override
Set the Eddy Viscosity Sensitivity of the problem.
Definition CAdjTurbVariable.hpp:66
CVectorOfMatrix dFT_dUTvar
Sensitivity of boundary flux to mean flow and turbulence vars.
Definition CAdjTurbVariable.hpp:43
MatrixType dmuT_dUTvar
Sensitivity of eddy viscosity to mean flow and turbulence vars.
Definition CAdjTurbVariable.hpp:41
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Main class for defining the variables.
Definition CVariable.hpp:50
passivedouble su2double
Definition code_config.hpp:181