Documentation 6b54b78464
Loading...
Searching...
No Matches
CMMSNSTwoHalfCirclesSolution.hpp
Go to the documentation of this file.
1/*!
2 * \file CMMSNSTwoHalfCirclesSolution.hpp
3 * \brief Header file for the class CMMSNSTwoHalfCirclesSolution.
4 * The implementations are in the <i>CMMSNSTwoHalfCirclesSolution.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 CMMSNSTwoHalfCirclesSolution
36 * \brief Class to define the required data for the manufactured solution of the
37 laminar Navier-Stokes equations on the domain between two half circles.
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 Constant viscosity. */
46 su2double Conductivity; /*!< \brief Constant thermal conductivity. */
47 su2double TWall; /*!< \brief Prescribed wall temperature at the outer 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, v and w are described by analytical functions in such a way that the
55 inner wall is an adiabatic no-slip wall and the outer 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 CMMSNSTwoHalfCirclesSolution(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 CMMSNSTwoHalfCirclesSolution.hpp:40
su2double RGas
Gas constant.
Definition CMMSNSTwoHalfCirclesSolution.hpp:44
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 CMMSNSTwoHalfCirclesSolution.cpp:146
su2double Conductivity
Constant thermal conductivity.
Definition CMMSNSTwoHalfCirclesSolution.hpp:46
su2double u_0
Maximum x-velocity in the domain.
Definition CMMSNSTwoHalfCirclesSolution.hpp:58
CMMSNSTwoHalfCirclesSolution(void)
Constructor of the class.
Definition CMMSNSTwoHalfCirclesSolution.cpp:30
su2double a_T2
Parameter for the temperature solution.
Definition CMMSNSTwoHalfCirclesSolution.hpp:62
su2double Viscosity
Constant viscosity.
Definition CMMSNSTwoHalfCirclesSolution.hpp:45
su2double a_T1
Parameter for the temperature solution.
Definition CMMSNSTwoHalfCirclesSolution.hpp:61
su2double Density_Ref
Reference density for non-dimensionalization.
Definition CMMSNSTwoHalfCirclesSolution.hpp:50
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 CMMSNSTwoHalfCirclesSolution.cpp:104
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 CMMSNSTwoHalfCirclesSolution.cpp:110
su2double Velocity_Ref
Reference velocity for non-dimensionalization.
Definition CMMSNSTwoHalfCirclesSolution.hpp:51
su2double rho_0
Constant density.
Definition CMMSNSTwoHalfCirclesSolution.hpp:57
su2double Pressure_Ref
Reference pressure for non-dimensionalization.
Definition CMMSNSTwoHalfCirclesSolution.hpp:49
bool IsManufacturedSolution(void) const override
Whether or not this verification solution is a manufactured solution.
Definition CMMSNSTwoHalfCirclesSolution.cpp:310
su2double Gamma
Specific heat ratio.
Definition CMMSNSTwoHalfCirclesSolution.hpp:43
su2double TWall
Prescribed wall temperature at the outer wall.
Definition CMMSNSTwoHalfCirclesSolution.hpp:47
~CMMSNSTwoHalfCirclesSolution(void) override
Destructor of the class.
su2double v_0
Maximum y-velocity in the domain.
Definition CMMSNSTwoHalfCirclesSolution.hpp:59
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