Documentation 6b54b78464
Loading...
Searching...
No Matches
NEMO_diffusion.hpp
Go to the documentation of this file.
1/*!
2 * \file NEMO_diffusion.hpp
3 * \brief Declarations of numerics classes for viscous flux computation.
4 * \author S.R. Copeland, W. Maier, C. Garbacz.
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 "CNEMONumerics.hpp"
31
32/*!
33 * \class CAvgGrad_NEMO
34 * \brief Class for computing viscous term using the average of gradients.
35 * \ingroup ViscDiscr
36 * \author S.R. Copeland, W. Maier, C. Garbacz
37 * \version 8.5.0 "Harrier"
38 */
40private:
41
42 su2double *Mean_PrimVar, /*!< \brief Mean primitive variables. */
43 *Mean_U,
44 **Mean_GU,
45 *Mean_dTdU,
46 *Mean_dTvedU,
47 *Mean_dPdU,
48 *Mean_Eve,
49 *Mean_Cvve,
50 *PrimVar_i, *PrimVar_j, /*!< \brief Primitives variables at point i and 1. */
51 **Mean_GradPrimVar, /*!< \brief Mean value of the gradient. */
52 *Mean_Diffusion_Coeff, /*!< \brief Mean value of the species diffusion coefficient. */
53 Mean_Laminar_Viscosity, /*!< \brief Mean value of the laminar viscosity. */
54 Mean_Eddy_Viscosity, /*!< \brief Mean value of the eddy viscosity. */
55 Mean_Thermal_Conductivity, /*!< \brief Mean value of the thermal conductivity. */
56 Mean_Thermal_Conductivity_ve, /*!< \brief Mean value of the vib-el. thermal conductivity. */
57 *ProjFlux, /*!< \brief Projection of the viscous fluxes. */
58 dist_ij; /*!< \brief Length of the edge and face. */
59
60public:
61
62 /*!
63 * \brief Constructor of the class.
64 * \param[in] val_nDim - Number of dimension of the problem.
65 * \param[in] val_nVar - Number of variables of the problem.
66 * \param[in] val_nPrimVar - Number of primitive variables of the problem.
67 * \param[in] val_nPrimVarGrad - Number of variables in the primitive variable gradient.
68 * \param[in] config - Definition of the particular problem.
69 */
70 CAvgGrad_NEMO(unsigned short val_nDim,
71 unsigned short val_nVar,
72 unsigned short val_nPrimVar,
73 unsigned short val_nPrimVarGrad,
74 CConfig *config);
75
76 /*!
77 * \brief Destructor of the class.
78 */
79 ~CAvgGrad_NEMO(void);
80
81 /*!
82 * \brief Compute the viscous flow residual using an average of gradients.
83 * \param[in] config - Definition of the particular problem.
84 */
85 ResidualType<> ComputeResidual(const CConfig* config) final;
86};
87
88/*!
89 * \class CAvgGradCorrected_NEMO
90 * \brief Class for computing viscous term using the average of gradients.
91 * \ingroup ViscDiscr
92 * \author C. Garbacz, W. Maier, S.R. Copeland.
93 * \version 8.5.0 "Harrier"
94 */
96private:
97 unsigned short
98 nPrimVar, nPrimVarGrad; /*!< \brief Iterators in dimension an variable. */
100 *Mean_PrimVar, /*!< \brief Mean primitive variables. */
101 *PrimVar_i, *PrimVar_j, /*!< \brief Primitives variables at point i and 1. */
102 **Mean_GradPrimVar, /*!< \brief Mean value of the gradient. */
103 *Mean_Eve, /*!< \brief Mean value of eve. */
104 *Mean_Cvve, /*!< \brief Mean value of cvve. */
105 Edge_Vector[MAXNDIM]={0.0}, /*!< \brief Vector from point i to point j. */
106 *Mean_Diffusion_Coeff, /*!< \brief Mean value of the species diffusion coefficient. */
107 Mean_Laminar_Viscosity, /*!< \brief Mean value of the viscosity. */
108 Mean_Eddy_Viscosity, /*!< \brief Mean value of the eddy viscosity. */
109 Mean_Thermal_Conductivity, /*!< \brief Mean value of the thermal conductivity. */
110 Mean_Thermal_Conductivity_ve, /*!< \brief Mean value of the vib-el. thermal conductivity. */
111 *ProjFlux, /*!< \brief Projection of the viscous fluxes. */
112 dist_ij; /*!< \brief Length of the edge and face. */
113 bool implicit; /*!< \brief Implicit calculus. */
114
115 su2double* Flux = nullptr; /*!< \brief The flux / residual across the edge. */
116
117public:
118
119 /*!
120 * \brief Constructor of the class.
121 * \param[in] val_nDim - Number of dimension of the problem.
122 * \param[in] val_nVar - Number of variables of the problem.
123 * \param[in] val_nPrimVar - Number of primitive variables of the problem.
124 * \param[in] val_nPrimVarGrad - Number of variables in the primitive variable gradient.
125 * \param[in] config - Definition of the particular problem.
126 */
127 CAvgGradCorrected_NEMO(unsigned short val_nDim,
128 unsigned short val_nVar,
129 unsigned short val_nPrimVar,
130 unsigned short val_nPrimVarGrad,
131 CConfig *config);
132
133 /*!
134 * \brief Destructor of the class.
135 */
137
138 /*!
139 * \brief Compute the viscous flow residual using an average of gradients.
140 * \param[in] config - Definition of the particular problem.
141 */
142 ResidualType<> ComputeResidual(const CConfig* config) final;
143
144};
Base class template NEMO numerics.
Class for computing viscous term using the average of gradients.
Definition NEMO_diffusion.hpp:95
ResidualType ComputeResidual(const CConfig *config) final
Compute the viscous flow residual using an average of gradients.
Definition NEMO_diffusion.cpp:261
~CAvgGradCorrected_NEMO(void)
Destructor of the class.
Definition NEMO_diffusion.cpp:232
Class for computing viscous term using the average of gradients.
Definition NEMO_diffusion.hpp:39
ResidualType ComputeResidual(const CConfig *config) final
Compute the viscous flow residual using an average of gradients.
Definition NEMO_diffusion.cpp:105
~CAvgGrad_NEMO(void)
Destructor of the class.
Definition NEMO_diffusion.cpp:72
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Base class template NEMO numerics.
Definition CNEMONumerics.hpp:41
static constexpr size_t MAXNDIM
Max number of space dimensions, used in some static arrays.
Definition CNumerics.hpp:50
passivedouble su2double
Definition code_config.hpp:181
Return type used in some "ComputeResidual" overloads to give a const-view of the internally stored fl...
Definition CNumerics.hpp:218