Documentation a537f1bdf2
Loading...
Searching...
No Matches
CMMSNSUnitQuadSolutionWallBC.hpp
Go to the documentation of this file.
1/*!
2 * \file CMMSNSUnitQuadSolutionWallBC.hpp
3 * \brief Header file for the class CMMSNSUnitQuadSolutionWallBC.
4 * The implementations are in the <i>CMMSNSUnitQuadSolutionWallBC.cpp</i> file.
5 * \author T. Economon, E. van der Weide
6 * \version 8.5.0 "Harrier"
7 *
8 * SU2 Project Website: https://su2code.github.io
9 *
10 * The SU2 Project is maintained by the SU2 Foundation
11 * (http://su2foundation.org)
12 *
13 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
14 *
15 * SU2 is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 2.1 of the License, or (at your option) any later version.
19 *
20 * SU2 is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
27 */
28
29#pragma once
30
31#include <cmath>
33
34/*!
35 * \class CMMSNSUnitQuadSolutionWallBC
36 * \brief Class to define the required data for the manufactured solution of the
37 laminar Navier-Stokes equations on a unit quad with wall boundary conditions.
38 * \author E. van der Weide, T. Economon
39 */
41 protected:
42 /*--- Variables that define the solution and MMS source term. ---*/
43 su2double Gamma; /*!< \brief Specific heat ratio. */
44 su2double RGas; /*!< \brief Gas constant. */
45 su2double Viscosity; /*!< \brief Viscosity, must be constant. */
46 su2double Conductivity; /*!< \brief Thermal conductivity, must be constant. */
47 su2double TWall; /*!< \brief Prescribed wall temperature at the upper wall. */
48
49 su2double Pressure_Ref; /*!< \brief Reference pressure for non-dimensionalization. */
50 su2double Density_Ref; /*!< \brief Reference density for non-dimensionalization. */
51 su2double Velocity_Ref; /*!< \brief Reference velocity for non-dimensionalization. */
52
53 /*--- Constants, which describe this manufactured solution. The primitive variables
54 rho, T, u and v are described by analytical functions in such a way that the
55 lower wall is an adiabatic no-slip wall and the upper wall is an isothermal
56 no-slip wall. ---*/
57 su2double rho_0; /*!< \brief Constant density. */
58 su2double u_0; /*!< \brief Maximum x-velocity in the domain. */
59 su2double v_0; /*!< \brief Maximum y-velocity in the domain. */
60
61 su2double a_T1; /*!< \brief Parameter for the temperature solution. */
62 su2double a_T2; /*!< \brief Parameter for the temperature solution. */
63
64 public:
65 /*!
66 * \brief Constructor of the class.
67 */
69
70 /*!
71 * \overload
72 * \param[in] val_nDim - Number of dimensions of the problem.
73 * \param[in] val_nvar - Number of variables of the problem.
74 * \param[in] val_iMesh - Multigrid level of the solver.
75 * \param[in] config - Configuration of the particular problem.
76 */
77 CMMSNSUnitQuadSolutionWallBC(unsigned short val_nDim, unsigned short val_nvar, unsigned short val_iMesh,
78 CConfig* config);
79
80 /*!
81 * \brief Destructor of the class.
82 */
84
85 /*!
86 * \brief Get the exact solution at the current position and time.
87 * \param[in] val_coords - Cartesian coordinates of the current position.
88 * \param[in] val_t - Current physical time.
89 * \param[in] val_solution - Array where the exact solution is stored.
90 */
91 void GetSolution(const su2double* val_coords, const su2double val_t, su2double* val_solution) const override;
92
93 /*!
94 * \brief Get the boundary conditions state for an exact solution.
95 * \param[in] val_coords - Cartesian coordinates of the current position.
96 * \param[in] val_t - Current physical time.
97 * \param[in] val_solution - Array where the exact solution is stored.
98 */
99 void GetBCState(const su2double* val_coords, const su2double val_t, su2double* val_solution) const override;
100
101 /*!
102 * \brief Get the source term for the manufactured solution (MMS).
103 * \param[in] val_coords - Cartesian coordinates of the current position.
104 * \param[in] val_t - Current physical time.
105 * \param[in] val_solution - Array where the exact solution is stored.
106 */
107 void GetMMSSourceTerm(const su2double* val_coords, const su2double val_t, su2double* val_source) const override;
108
109 /*!
110 * \brief Whether or not this verification solution is a manufactured solution.
111 * \return - True, because this is a manufactured solution.
112 */
113 bool IsManufacturedSolution(void) const override;
114};
Header file for the base class CVerificationSolution. The implementations are in the CVerificationSol...
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Class to define the required data for the manufactured solution of the laminar Navier-Stokes equation...
Definition CMMSNSUnitQuadSolutionWallBC.hpp:40
void GetSolution(const su2double *val_coords, const su2double val_t, su2double *val_solution) const override
Get the exact solution at the current position and time.
Definition CMMSNSUnitQuadSolutionWallBC.cpp:116
su2double Gamma
Specific heat ratio.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:43
su2double TWall
Prescribed wall temperature at the upper wall.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:47
su2double a_T1
Parameter for the temperature solution.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:61
su2double u_0
Maximum x-velocity in the domain.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:58
bool IsManufacturedSolution(void) const override
Whether or not this verification solution is a manufactured solution.
Definition CMMSNSUnitQuadSolutionWallBC.cpp:229
void GetBCState(const su2double *val_coords, const su2double val_t, su2double *val_solution) const override
Get the boundary conditions state for an exact solution.
Definition CMMSNSUnitQuadSolutionWallBC.cpp:110
su2double Pressure_Ref
Reference pressure for non-dimensionalization.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:49
su2double rho_0
Constant density.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:57
~CMMSNSUnitQuadSolutionWallBC(void) override
Destructor of the class.
su2double RGas
Gas constant.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:44
su2double Conductivity
Thermal conductivity, must be constant.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:46
su2double a_T2
Parameter for the temperature solution.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:62
su2double v_0
Maximum y-velocity in the domain.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:59
CMMSNSUnitQuadSolutionWallBC(void)
Constructor of the class.
Definition CMMSNSUnitQuadSolutionWallBC.cpp:30
void GetMMSSourceTerm(const su2double *val_coords, const su2double val_t, su2double *val_source) const override
Get the source term for the manufactured solution (MMS).
Definition CMMSNSUnitQuadSolutionWallBC.cpp:150
su2double Density_Ref
Reference density for non-dimensionalization.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:50
su2double Viscosity
Viscosity, must be constant.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:45
su2double Velocity_Ref
Reference velocity for non-dimensionalization.
Definition CMMSNSUnitQuadSolutionWallBC.hpp:51
Class for holding verification PDE solutions, e.g., phi = phi(x,y,z,t), used for initial conditions,...
Definition CVerificationSolution.hpp:40
passivedouble su2double
Definition code_config.hpp:181