Documentation 6b54b78464
Loading...
Searching...
No Matches
CTGVSolution.hpp
Go to the documentation of this file.
1/*!
2 * \file CTGVSolution.hpp
3 * \brief Header file for the class CTGVSolution.
4 * The implementations are in the <i>CTGVSolution.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 CTGVSolution
36 * \brief Class to define the required data for the Taylor Green Vortex.
37 * \author E. van der Weide, T. Economon
38 */
39class CTGVSolution final : public CVerificationSolution {
40 protected:
41 /*--- TGV specific conditions. ---*/
42
43 su2double tgvLength; /*!< \brief Taylor-Green length scale. */
44 su2double tgvVelocity; /*!< \brief Taylor-Green velocity. */
45 su2double tgvDensity; /*!< \brief Taylor-Green density. */
46 su2double tgvPressure; /*!< \brief Taylor-Green pressure. */
47 su2double ovGm1; /*!< \brief 1 over Gamma minus 1 */
48
49 public:
50 /*!
51 * \brief Constructor of the class.
52 */
53 CTGVSolution(void);
54
55 /*!
56 * \overload
57 * \param[in] val_nDim - Number of dimensions of the problem.
58 * \param[in] val_nvar - Number of variables of the problem.
59 * \param[in] val_iMesh - Multigrid level of the solver.
60 * \param[in] config - Configuration of the particular problem.
61 */
62 CTGVSolution(unsigned short val_nDim, unsigned short val_nvar, unsigned short val_iMesh, CConfig* config);
63
64 /*!
65 * \brief Destructor of the class.
66 */
67 ~CTGVSolution(void) override;
68
69 /*!
70 * \brief Get the exact solution at the current position and time.
71 * \param[in] val_coords - Cartesian coordinates of the current position.
72 * \param[in] val_t - Current physical time.
73 * \param[in] val_solution - Array where the exact solution is stored.
74 */
75 void GetSolution(const su2double* val_coords, const su2double val_t, su2double* val_solution) const override;
76
77 /*!
78 * \brief Whether or not the exact solution is known for this verification solution.
79 * \return - False, because the exact solution is not known for the TGV case.
80 */
81 bool ExactSolutionKnown(void) const override;
82};
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 Taylor Green Vortex.
Definition CTGVSolution.hpp:39
su2double ovGm1
1 over Gamma minus 1
Definition CTGVSolution.hpp:47
su2double tgvPressure
Taylor-Green pressure.
Definition CTGVSolution.hpp:46
su2double tgvVelocity
Taylor-Green velocity.
Definition CTGVSolution.hpp:44
CTGVSolution(void)
Constructor of the class.
Definition CTGVSolution.cpp:30
su2double tgvDensity
Taylor-Green density.
Definition CTGVSolution.hpp:45
~CTGVSolution(void) override
Destructor of the class.
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 CTGVSolution.cpp:83
su2double tgvLength
Taylor-Green length scale.
Definition CTGVSolution.hpp:43
bool ExactSolutionKnown(void) const override
Whether or not the exact solution is known for this verification solution.
Definition CTGVSolution.cpp:116
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