Documentation 6b54b78464
Loading...
Searching...
No Matches
hllc.hpp
Go to the documentation of this file.
1/*!
2 * \file hllc.hpp
3 * \brief Declaration of HLLC numerics classes, implemented in hllc.cpp.
4 * \author F. Palacios, T. Economon
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
30#include "../../CNumerics.hpp"
31
32/*!
33 * \class CUpwHLLC_Flow
34 * \brief Class for solving an approximate Riemann HLLC.
35 * \ingroup ConvDiscr
36 * \author G. Gori, Politecnico di Milano
37 * \version 8.5.0 "Harrier"
38 */
39class CUpwHLLC_Flow final : public CNumerics {
40private:
41 bool implicit, dynamic_grid;
42 unsigned short iDim, jDim, iVar, jVar;
43
44 su2double *IntermediateState;
45 su2double *Velocity_i, *Velocity_j, *RoeVelocity;
46
47 su2double sq_vel_i, Density_i, Energy_i, SoundSpeed_i, Pressure_i, Enthalpy_i, ProjVelocity_i;
48 su2double sq_vel_j, Density_j, Energy_j, SoundSpeed_j, Pressure_j, Enthalpy_j, ProjVelocity_j;
49
50 su2double sq_velRoe, RoeDensity, RoeEnthalpy, RoeSoundSpeed, RoeProjVelocity, ProjInterfaceVel;
51
52 su2double sL, sR, sM, pStar, EStar, rhoSL, rhoSR, Rrho;
53
54 su2double Omega, RHO, OmegaSM;
55 su2double *dSm_dU, *dPI_dU, *drhoStar_dU, *dpStar_dU, *dEStar_dU;
56
57 su2double* Flux; /*!< \brief The flux accross the face. */
58 su2double** Jacobian_i; /*!< \brief The Jacobian w.r.t. point i after computation. */
59 su2double** Jacobian_j; /*!< \brief The Jacobian w.r.t. point j after computation. */
60
61public:
62 /*!
63 * \brief Constructor of the class.
64 * \param[in] val_nDim - Number of dimensions of the problem.
65 * \param[in] val_nVar - Number of variables of the problem.
66 * \param[in] config - Definition of the particular problem.
67 */
68 CUpwHLLC_Flow(unsigned short val_nDim, unsigned short val_nVar, const CConfig* config);
69
70 /*!
71 * \brief Destructor of the class.
72 */
73 ~CUpwHLLC_Flow(void) override;
74
75 /*!
76 * \brief Compute the Roe's flux between two nodes i and j.
77 * \param[in] config - Definition of the particular problem.
78 * \return A lightweight const-view (read-only) of the residual/flux and Jacobians.
79 */
80 ResidualType<> ComputeResidual(const CConfig* config) override;
81
82};
83
84/*!
85 * \class CUpwGeneralHLLC_Flow
86 * \brief Class for solving an approximate Riemann HLLC.
87 * \ingroup ConvDiscr
88 * \author G. Gori, Politecnico di Milano
89 * \version 8.5.0 "Harrier"
90 */
91class CUpwGeneralHLLC_Flow final : public CNumerics {
92private:
93 bool implicit, dynamic_grid;
94 unsigned short iDim, jDim, iVar, jVar;
95
96 su2double *IntermediateState;
97 su2double *Velocity_i, *Velocity_j, *RoeVelocity;
98
99 su2double sq_vel_i, Density_i, Energy_i, SoundSpeed_i, Pressure_i, Enthalpy_i, ProjVelocity_i, StaticEnthalpy_i, StaticEnergy_i;
100 su2double sq_vel_j, Density_j, Energy_j, SoundSpeed_j, Pressure_j, Enthalpy_j, ProjVelocity_j, StaticEnthalpy_j, StaticEnergy_j;
101
102 su2double sq_velRoe, RoeDensity, RoeEnthalpy, RoeSoundSpeed, RoeProjVelocity, ProjInterfaceVel;
103 su2double Kappa_i, Kappa_j, Chi_i, Chi_j, RoeKappa, RoeChi, RoeKappaStaticEnthalpy;
104
105 su2double sL, sR, sM, pStar, EStar, rhoSL, rhoSR, Rrho;
106
107 su2double Omega, RHO, OmegaSM;
108 su2double *dSm_dU, *dPI_dU, *drhoStar_dU, *dpStar_dU, *dEStar_dU;
109
110 su2double* Flux; /*!< \brief The flux accross the face. */
111 su2double** Jacobian_i; /*!< \brief The Jacobian w.r.t. point i after computation. */
112 su2double** Jacobian_j; /*!< \brief The Jacobian w.r.t. point j after computation. */
113
114public:
115 /*!
116 * \brief Constructor of the class.
117 * \param[in] val_nDim - Number of dimensions of the problem.
118 * \param[in] val_nVar - Number of variables of the problem.
119 * \param[in] config - Definition of the particular problem.
120 */
121 CUpwGeneralHLLC_Flow(unsigned short val_nDim, unsigned short val_nVar, const CConfig* config);
122
123 /*!
124 * \brief Destructor of the class.
125 */
126 ~CUpwGeneralHLLC_Flow(void) override;
127
128 /*!
129 * \brief Compute the Roe's flux between two nodes i and j.
130 * \param[in] config - Definition of the particular problem.
131 * \return A lightweight const-view (read-only) of the residual/flux and Jacobians.
132 */
133 ResidualType<> ComputeResidual(const CConfig* config) override;
134
135 /*!
136 * \brief Compute the Average quantities for a general fluid flux between two nodes i and j.
137 * Using the approach of Vinokur and Montagne'
138 */
139 void VinokurMontagne();
140};
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Class for defining the numerical methods.
Definition CNumerics.hpp:48
Class for solving an approximate Riemann HLLC.
Definition hllc.hpp:91
void VinokurMontagne()
Compute the Average quantities for a general fluid flux between two nodes i and j....
Definition hllc.cpp:1077
~CUpwGeneralHLLC_Flow(void) override
Destructor of the class.
Definition hllc.cpp:561
ResidualType ComputeResidual(const CConfig *config) override
Compute the Roe's flux between two nodes i and j.
Definition hllc.cpp:584
Class for solving an approximate Riemann HLLC.
Definition hllc.hpp:39
ResidualType ComputeResidual(const CConfig *config) override
Compute the Roe's flux between two nodes i and j.
Definition hllc.cpp:85
~CUpwHLLC_Flow(void) override
Destructor of the class.
Definition hllc.cpp:62
passivedouble su2double
Definition code_config.hpp:181
Return type used in some "ComputeResidual" overloads to give a const-view of the internally stored fl...
Definition CNumerics.hpp:218