Documentation 6b54b78464
Loading...
Searching...
No Matches
wall_model.hpp
Go to the documentation of this file.
1/*!
2 * \file wall_model.hpp
3 * \brief Headers for the wall model functions for large eddy simulations.
4 * \author E. van der Weide, T. Economon, P. Urbanczyk
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
31#include "./CConfig.hpp"
32
33#include <iostream>
34#include <cmath>
35
36using namespace std;
37
38/* Forward declaration of the class CFluidModel to avoid any problems. */
39class CFluidModel;
40
41/*!
42 * \class CWallModel
43 * \brief Base class for defining the LES wall model.
44 * \author: E. van der Weide, T. Economon, P. Urbanczyk
45 * \version 8.5.0 "Harrier"
46 */
48 public:
49 /*!
50 * \brief Constructor of the class.
51 * \param[in] config - Definition of the particular problem.
52 */
53 CWallModel(CConfig* config);
54
55 /*!
56 * \brief Destructor of the class.
57 */
58 virtual ~CWallModel(void) = default;
59
60 /*!
61 * \brief Virtual function, which computes the wall shear stress and heat flux
62 from the data at the exchange location.
63 * \param[in] tExchange - Temperature at the exchange location.
64 * \param[in] velExchange - Velocity at the exchange location.
65 * \param[in] muExchange - Laminar viscosity at the exchange location.
66 * \param[in] pExchange - Pressure at the exchange location.
67 * \param[in] Wall_HeatFlux - Value of the wall heat flux, if prescribed.
68 * \param[in] HeatFlux_Prescribed - Whether or not the wall heat flux is prescribed.
69 * \param[in] Wall_Temperature - Value of the wall temperature, if prescribed.
70 * \param[in] Temperature_Prescribed - Wheter or not the wall temperature is prescribed.
71 * \param[in] FluidModel - Fluid model used in the solver.
72 * \param[out] tauWall - Wall shear stress, to be computed.
73 * \param[out] qWall - Wall hear flux, to be computed (if not prescribed).
74 * \param[out] ViscosityWall - Laminar viscosity at the wall, to be computed.
75 * \param[out] OverCvWall - Thermal conductivity divided by Cv at the wall,
76 to be computed.
77 */
78 virtual void WallShearStressAndHeatFlux(const su2double tExchange, const su2double velExchange,
79 const su2double muExchange, const su2double pExchange,
80 const su2double Wall_HeatFlux, const bool HeatFlux_Prescribed,
81 const su2double TWall, const bool Temperature_Prescribed,
82 CFluidModel* FluidModel, su2double& tauWall, su2double& qWall,
83 su2double& ViscosityWall, su2double& kOverCvWall);
84
85 protected:
86 su2double h_wm; /*!< \brief The thickness of the wall model. This is also basically the exchange location */
87 su2double Pr_lam; /*!< \brief Laminar Prandtl number. */
88 su2double Pr_turb; /*!< \brief Turbulent Prandtl number. */
89 su2double karman; /*!< \brief von Karman constant. */
90
91 private:
92 /*!
93 * \brief Default constructor of the class, disabled.
94 */
95 CWallModel(void);
96};
97
98class CWallModel1DEQ : public CWallModel {
99 public:
100 /*!
101 * \brief Constructor of the class.
102 * \param[in] config - Definition of the particular problem.
103 * \param[in] Marker_Tag - String, which identifies the boundary marker for
104 which the wall model is used.
105 */
106 CWallModel1DEQ(CConfig* config, const string& Marker_Tag);
107
108 /*!
109 * \brief Function, which computes the wall shear stress and heat flux
110 from the data at the exchange location.
111 * \param[in] tExchange - Temperature at the exchange location.
112 * \param[in] velExchange - Velocity at the exchange location.
113 * \param[in] muExchange - Laminar viscosity at the exchange location.
114 * \param[in] pExchange - Pressure at the exchange location.
115 * \param[in] Wall_HeatFlux - Value of the wall heat flux, if prescribed.
116 * \param[in] HeatFlux_Prescribed - Whether or not the wall heat flux is prescribed.
117 * \param[in] Wall_Temperature - Value of the wall temperature, if prescribed.
118 * \param[in] Temperature_Prescribed - Wheter or not the wall temperature is prescribed.
119 * \param[in] FluidModel - Fluid model used in the solver.
120 * \param[out] tauWall - Wall shear stress, to be computed.
121 * \param[out] qWall - Wall hear flux, to be computed (if not prescribed).
122 * \param[out] ViscosityWall - Laminar viscosity at the wall, to be computed.
123 * \param[out] kOverCvWall - Thermal conductivity divided by Cv at the wall,
124 to be computed.
125 */
126 void WallShearStressAndHeatFlux(const su2double tExchange, const su2double velExchange, const su2double muExchange,
127 const su2double pExchange, const su2double Wall_HeatFlux,
128 const bool HeatFlux_Prescribed, const su2double Wall_Temperature,
129 const bool Temperature_Prescribed, CFluidModel* FluidModel, su2double& tauWall,
130 su2double& qWall, su2double& ViscosityWall, su2double& kOverCvWall) override;
131
132 private:
133 su2double expansionRatio; /*!< \brief Stretching factor used for the wall model grid. */
134 int numPoints; /*!< \brief Number of points used in the wall model grid. */
135
136 vector<su2double> y_cv; /*!< \brief The coordinates in normal direction of the wall model grid (control volumes). */
137 vector<su2double> y_fa; /*!< \brief The coordinates in normal direction of the wall model grid (faces of CV). */
138
139 /*!
140 * \brief Default constructor of the class, disabled.
141 */
142 CWallModel1DEQ(void);
143};
144
146 public:
147 /*!
148 * \brief Constructor of the class, which initializes the object.
149 * \param[in] config - Definition of the particular problem.
150 * \param[in] Marker_Tag - String, which identifies the boundary marker for
151 which the wall model is used.
152 */
153 CWallModelLogLaw(CConfig* config, const string& Marker_Tag);
154
155 /*!
156 * \brief Function, which computes the wall shear stress and heat flux
157 from the data at the exchange location.
158 * \param[in] tExchange - Temperature at the exchange location.
159 * \param[in] velExchange - Velocity at the exchange location.
160 * \param[in] muExchange - Laminar Viscosity at the exchange location.
161 * \param[in] pExchange - Pressure at the exchange location.
162 * \param[in] Wall_HeatFlux - Value of the wall heat flux, if prescribed.
163 * \param[in] HeatFlux_Prescribed - Whether or not the wall heat flux is prescribed.
164 * \param[in] Wall_Temperature - Value of the wall temperature, if prescribed.
165 * \param[in] Temperature_Prescribed - Wheter or not the wall temperature is prescribed.
166 * \param[in] FluidModel - Fluid model used in the solver.
167 * \param[out] tauWall - Wall shear stress, to be computed.
168 * \param[out] qWall - Wall hear flux, to be computed (if not prescribed).
169 * \param[out] ViscosityWall - Laminar viscosity at the wall, to be computed.
170 * \param[out] kOverCvWall - Thermal conductivity divided by Cv at the wall,
171 to be computed.
172 */
173 void WallShearStressAndHeatFlux(const su2double tExchange, const su2double velExchange, const su2double muExchange,
174 const su2double pExchange, const su2double Wall_HeatFlux,
175 const bool HeatFlux_Prescribed, const su2double Wall_Temperature,
176 const bool Temperature_Prescribed, CFluidModel* FluidModel, su2double& tauWall,
177 su2double& qWall, su2double& ViscosityWall, su2double& kOverCvWall) override;
178
179 private:
180 su2double C; /*!< \brief Constant to match the Reichardt BL profile. */
181
182 /*!
183 * \brief Default constructor of the class, disabled.
184 */
185 CWallModelLogLaw(void);
186};
All the information about the definition of the physical problem. The subroutines and functions are i...
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Main class for defining the Thermo-Physical Model.
Definition CFluidModel.hpp:47
Definition wall_model.hpp:98
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
Function, which computes the wall shear stress and heat flux from the data at the exchange location.
Definition wall_model.cpp:95
Definition wall_model.hpp:145
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
Function, which computes the wall shear stress and heat flux from the data at the exchange location.
Definition wall_model.cpp:333
Base class for defining the LES wall model.
Definition wall_model.hpp:47
su2double Pr_lam
Laminar Prandtl number.
Definition wall_model.hpp:87
su2double karman
von Karman constant.
Definition wall_model.hpp:89
su2double Pr_turb
Turbulent Prandtl number.
Definition wall_model.hpp:88
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)
Virtual function, which computes the wall shear stress and heat flux from the data at the exchange lo...
Definition wall_model.cpp:50
virtual ~CWallModel(void)=default
Destructor of the class.
su2double h_wm
The thickness of the wall model. This is also basically the exchange location.
Definition wall_model.hpp:86
passivedouble su2double
Definition code_config.hpp:181
Headers of the mpi interface for generalized datatypes. The subroutines and functions are in the mpi_...