-
Notifications
You must be signed in to change notification settings - Fork 993
Expand file tree
/
Copy pathwall_model.hpp
More file actions
186 lines (167 loc) · 8.9 KB
/
Copy pathwall_model.hpp
File metadata and controls
186 lines (167 loc) · 8.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
/*!
* \file wall_model.hpp
* \brief Headers for the wall model functions for large eddy simulations.
* \author E. van der Weide, T. Economon, P. Urbanczyk
* \version 8.5.0 "Harrier"
*
* SU2 Project Website: https://su2code.github.io
*
* The SU2 Project is maintained by the SU2 Foundation
* (http://su2foundation.org)
*
* Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
*
* SU2 is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* SU2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with SU2. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "./parallelization/mpi_structure.hpp"
#include "./CConfig.hpp"
#include <iostream>
#include <cmath>
using namespace std;
/* Forward declaration of the class CFluidModel to avoid any problems. */
class CFluidModel;
/*!
* \class CWallModel
* \brief Base class for defining the LES wall model.
* \author: E. van der Weide, T. Economon, P. Urbanczyk
* \version 8.5.0 "Harrier"
*/
class CWallModel {
public:
/*!
* \brief Constructor of the class.
* \param[in] config - Definition of the particular problem.
*/
CWallModel(CConfig* config);
/*!
* \brief Destructor of the class.
*/
virtual ~CWallModel(void) = default;
/*!
* \brief Virtual function, which computes the wall shear stress and heat flux
from the data at the exchange location.
* \param[in] tExchange - Temperature at the exchange location.
* \param[in] velExchange - Velocity at the exchange location.
* \param[in] muExchange - Laminar viscosity at the exchange location.
* \param[in] pExchange - Pressure at the exchange location.
* \param[in] Wall_HeatFlux - Value of the wall heat flux, if prescribed.
* \param[in] HeatFlux_Prescribed - Whether or not the wall heat flux is prescribed.
* \param[in] Wall_Temperature - Value of the wall temperature, if prescribed.
* \param[in] Temperature_Prescribed - Wheter or not the wall temperature is prescribed.
* \param[in] FluidModel - Fluid model used in the solver.
* \param[out] tauWall - Wall shear stress, to be computed.
* \param[out] qWall - Wall hear flux, to be computed (if not prescribed).
* \param[out] ViscosityWall - Laminar viscosity at the wall, to be computed.
* \param[out] OverCvWall - Thermal conductivity divided by Cv at the wall,
to be computed.
*/
virtual void WallShearStressAndHeatFlux(const su2double tExchange, const su2double velExchange,
const su2double muExchange, const su2double pExchange,
const su2double Wall_HeatFlux, const bool HeatFlux_Prescribed,
const su2double TWall, const bool Temperature_Prescribed,
CFluidModel* FluidModel, su2double& tauWall, su2double& qWall,
su2double& ViscosityWall, su2double& kOverCvWall);
protected:
su2double h_wm; /*!< \brief The thickness of the wall model. This is also basically the exchange location */
su2double Pr_lam; /*!< \brief Laminar Prandtl number. */
su2double Pr_turb; /*!< \brief Turbulent Prandtl number. */
su2double karman; /*!< \brief von Karman constant. */
private:
/*!
* \brief Default constructor of the class, disabled.
*/
CWallModel(void);
};
class CWallModel1DEQ : public CWallModel {
public:
/*!
* \brief Constructor of the class.
* \param[in] config - Definition of the particular problem.
* \param[in] Marker_Tag - String, which identifies the boundary marker for
which the wall model is used.
*/
CWallModel1DEQ(CConfig* config, const string& Marker_Tag);
/*!
* \brief Function, which computes the wall shear stress and heat flux
from the data at the exchange location.
* \param[in] tExchange - Temperature at the exchange location.
* \param[in] velExchange - Velocity at the exchange location.
* \param[in] muExchange - Laminar viscosity at the exchange location.
* \param[in] pExchange - Pressure at the exchange location.
* \param[in] Wall_HeatFlux - Value of the wall heat flux, if prescribed.
* \param[in] HeatFlux_Prescribed - Whether or not the wall heat flux is prescribed.
* \param[in] Wall_Temperature - Value of the wall temperature, if prescribed.
* \param[in] Temperature_Prescribed - Wheter or not the wall temperature is prescribed.
* \param[in] FluidModel - Fluid model used in the solver.
* \param[out] tauWall - Wall shear stress, to be computed.
* \param[out] qWall - Wall hear flux, to be computed (if not prescribed).
* \param[out] ViscosityWall - Laminar viscosity at the wall, to be computed.
* \param[out] kOverCvWall - Thermal conductivity divided by Cv at the wall,
to be computed.
*/
void WallShearStressAndHeatFlux(const su2double tExchange, const su2double velExchange, const su2double muExchange,
const su2double pExchange, const su2double Wall_HeatFlux,
const bool HeatFlux_Prescribed, const su2double Wall_Temperature,
const bool Temperature_Prescribed, CFluidModel* FluidModel, su2double& tauWall,
su2double& qWall, su2double& ViscosityWall, su2double& kOverCvWall) override;
private:
su2double expansionRatio; /*!< \brief Stretching factor used for the wall model grid. */
int numPoints; /*!< \brief Number of points used in the wall model grid. */
vector<su2double> y_cv; /*!< \brief The coordinates in normal direction of the wall model grid (control volumes). */
vector<su2double> y_fa; /*!< \brief The coordinates in normal direction of the wall model grid (faces of CV). */
/*!
* \brief Default constructor of the class, disabled.
*/
CWallModel1DEQ(void);
};
class CWallModelLogLaw : public CWallModel {
public:
/*!
* \brief Constructor of the class, which initializes the object.
* \param[in] config - Definition of the particular problem.
* \param[in] Marker_Tag - String, which identifies the boundary marker for
which the wall model is used.
*/
CWallModelLogLaw(CConfig* config, const string& Marker_Tag);
/*!
* \brief Function, which computes the wall shear stress and heat flux
from the data at the exchange location.
* \param[in] tExchange - Temperature at the exchange location.
* \param[in] velExchange - Velocity at the exchange location.
* \param[in] muExchange - Laminar Viscosity at the exchange location.
* \param[in] pExchange - Pressure at the exchange location.
* \param[in] Wall_HeatFlux - Value of the wall heat flux, if prescribed.
* \param[in] HeatFlux_Prescribed - Whether or not the wall heat flux is prescribed.
* \param[in] Wall_Temperature - Value of the wall temperature, if prescribed.
* \param[in] Temperature_Prescribed - Wheter or not the wall temperature is prescribed.
* \param[in] FluidModel - Fluid model used in the solver.
* \param[out] tauWall - Wall shear stress, to be computed.
* \param[out] qWall - Wall hear flux, to be computed (if not prescribed).
* \param[out] ViscosityWall - Laminar viscosity at the wall, to be computed.
* \param[out] kOverCvWall - Thermal conductivity divided by Cv at the wall,
to be computed.
*/
void WallShearStressAndHeatFlux(const su2double tExchange, const su2double velExchange, const su2double muExchange,
const su2double pExchange, const su2double Wall_HeatFlux,
const bool HeatFlux_Prescribed, const su2double Wall_Temperature,
const bool Temperature_Prescribed, CFluidModel* FluidModel, su2double& tauWall,
su2double& qWall, su2double& ViscosityWall, su2double& kOverCvWall) override;
private:
su2double C; /*!< \brief Constant to match the Reichardt BL profile. */
/*!
* \brief Default constructor of the class, disabled.
*/
CWallModelLogLaw(void);
};