Documentation 6b54b78464
Loading...
Searching...
No Matches
CMMSNSTwoHalfSpheresSolution.hpp
Go to the documentation of this file.
1/*!
2 * \file CMMSNSTwoHalfSpheresSolution.hpp
3 * \brief Header file for the class CMMSNSTwoHalfSpheresSolution.
4 * The implementations are in the <i>CMMSNSTwoHalfSpheresSolution.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 CMMSNSTwoHalfSpheresSolution
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 spheres.
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 su2double w_0; /*!< \brief Maximum z-velocity in the domain. */
61
62 su2double a_T1; /*!< \brief Parameter for the temperature solution. */
63 su2double a_T2; /*!< \brief Parameter for the temperature solution. */
64
65 public:
66 /*!
67 * \brief Constructor of the class.
68 */
70
71 /*!
72 * \overload
73 * \param[in] val_nDim - Number of dimensions of the problem.
74 * \param[in] val_nvar - Number of variables of the problem.
75 * \param[in] val_iMesh - Multigrid level of the solver.
76 * \param[in] config - Configuration of the particular problem.
77 */
78 CMMSNSTwoHalfSpheresSolution(unsigned short val_nDim, unsigned short val_nvar, unsigned short val_iMesh,
79 CConfig* config);
80
81 /*!
82 * \brief Destructor of the class.
83 */
85
86 /*!
87 * \brief Get the exact solution at the current position and time.
88 * \param[in] val_coords - Cartesian coordinates of the current position.
89 * \param[in] val_t - Current physical time.
90 * \param[in] val_solution - Array where the exact solution is stored.
91 */
92 void GetSolution(const su2double* val_coords, const su2double val_t, su2double* val_solution) const override;
93
94 /*!
95 * \brief Get the boundary conditions state for an exact solution.
96 * \param[in] val_coords - Cartesian coordinates of the current position.
97 * \param[in] val_t - Current physical time.
98 * \param[in] val_solution - Array where the exact solution is stored.
99 */
100 void GetBCState(const su2double* val_coords, const su2double val_t, su2double* val_solution) const override;
101
102 /*!
103 * \brief Get the source term for the manufactured solution (MMS).
104 * \param[in] val_coords - Cartesian coordinates of the current position.
105 * \param[in] val_t - Current physical time.
106 * \param[in] val_solution - Array where the exact solution is stored.
107 */
108 void GetMMSSourceTerm(const su2double* val_coords, const su2double val_t, su2double* val_source) const override;
109
110 /*!
111 * \brief Whether or not this verification solution is a manufactured solution.
112 * \return - True, because this is a manufactured solution.
113 */
114 bool IsManufacturedSolution(void) const override;
115};
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 CMMSNSTwoHalfSpheresSolution.hpp:40
su2double Conductivity
Constant thermal conductivity.
Definition CMMSNSTwoHalfSpheresSolution.hpp:46
su2double Viscosity
Constant viscosity.
Definition CMMSNSTwoHalfSpheresSolution.hpp:45
su2double TWall
Prescribed wall temperature at the outer wall.
Definition CMMSNSTwoHalfSpheresSolution.hpp:47
~CMMSNSTwoHalfSpheresSolution(void) override
Destructor of the class.
su2double u_0
Maximum x-velocity in the domain.
Definition CMMSNSTwoHalfSpheresSolution.hpp:58
su2double Density_Ref
Reference density for non-dimensionalization.
Definition CMMSNSTwoHalfSpheresSolution.hpp:50
CMMSNSTwoHalfSpheresSolution(void)
Constructor of the class.
Definition CMMSNSTwoHalfSpheresSolution.cpp:30
su2double RGas
Gas constant.
Definition CMMSNSTwoHalfSpheresSolution.hpp:44
su2double Velocity_Ref
Reference velocity for non-dimensionalization.
Definition CMMSNSTwoHalfSpheresSolution.hpp:51
su2double Gamma
Specific heat ratio.
Definition CMMSNSTwoHalfSpheresSolution.hpp:43
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 CMMSNSTwoHalfSpheresSolution.cpp:113
su2double v_0
Maximum y-velocity in the domain.
Definition CMMSNSTwoHalfSpheresSolution.hpp:59
su2double a_T1
Parameter for the temperature solution.
Definition CMMSNSTwoHalfSpheresSolution.hpp:62
su2double w_0
Maximum z-velocity in the domain.
Definition CMMSNSTwoHalfSpheresSolution.hpp:60
su2double Pressure_Ref
Reference pressure for non-dimensionalization.
Definition CMMSNSTwoHalfSpheresSolution.hpp:49
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 CMMSNSTwoHalfSpheresSolution.cpp:107
bool IsManufacturedSolution(void) const override
Whether or not this verification solution is a manufactured solution.
Definition CMMSNSTwoHalfSpheresSolution.cpp:390
su2double rho_0
Constant density.
Definition CMMSNSTwoHalfSpheresSolution.hpp:57
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 CMMSNSTwoHalfSpheresSolution.cpp:151
su2double a_T2
Parameter for the temperature solution.
Definition CMMSNSTwoHalfSpheresSolution.hpp:63
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