Documentation 6b54b78464
Loading...
Searching...
No Matches
ausm_slau.hpp
Go to the documentation of this file.
1/*!
2 * \file ausm_slau.hpp
3 * \brief Declaration of numerics classes for the AUSM and SLAU family of schemes in NEMO.
4 * \author F. Palacios, S.R. Copeland, W. Maier, C. Garbacz
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 "../CNEMONumerics.hpp"
31
32/*!
33 * \class CUpwAUSM_SLAU_Base_NEMO
34 * \brief Class for solving an approximate Riemann AUSM.
35 * \ingroup ConvDiscr
36 * \author F. Palacios, S.R. Copeland, W. Maier, C. Garbacz
37 */
39 protected:
40 su2double A_F[2] = {0.0}, PressureFlux[MAXNDIM] = {0.0};
42
43 su2double* Fc_L = nullptr;
44 su2double* Fc_R = nullptr;
45 su2double* Fc_LR = nullptr;
46 su2double* dM_LP = nullptr;
47 su2double* dM_RM = nullptr;
48 su2double* dP_LP = nullptr;
49 su2double* dP_RM = nullptr;
50 su2double* da_L = nullptr;
51 su2double* da_R = nullptr;
52
53 su2double* Flux = nullptr; /*!< \brief The flux accross the face. */
54 su2double** Jacobian_i = nullptr; /*!< \brief The Jacobian w.r.t. point i after computation. */
55 su2double** Jacobian_j = nullptr; /*!< \brief The Jacobian w.r.t. point j after computation. */
56
57 /*!
58 * \brief Compute the interface Mach number, soundspeeds and pressure based on Primitives_i/j..
59 * \param[in] config - Definition of the particular problem.
60 * \param[out] pressure - The pressure at the control volume face.
61 * \param[out] interface_mach - The interface Mach number M_(1/2).
62 * \param[out] interface_soundspeed - The interface soundspeed (vector for i and j faces if necessary).
63 */
64 virtual void ComputeInterfaceQuantities(const CConfig* config, su2double* pressure, su2double& interface_mach,
65 su2double* interface_soundspeed) = 0;
66
67 private:
68 /*!
69 * \brief Compute the flux Jacobians of the AUSM scheme to use as an approximation.
70 * \param[out] val_Jacobian_i - Jacobian of the numerical method at node i (implicit computation).
71 * \param[out] val_Jacobian_j - Jacobian of the numerical method at node j (implicit computation).
72 */
73 void ComputeJacobian(su2double** val_Jacobian_i, su2double** val_Jacobian_j);
74
75 public:
76 /*!
77 * \brief Constructor of the class.
78 * \param[in] val_nDim - Number of dimension of the problem.
79 * \param[in] val_nVar - Number of variables of the problem.
80 * \param[in] val_nPrimVar - Number of primitive variables of the problem.
81 * \param[in] val_nPrimVarGrad - Number of primitive gradient variables of the problem.
82 * \param[in] config - Definition of the particular problem.
83 */
84 CUpwAUSM_SLAU_Base_NEMO(unsigned short val_nDim, unsigned short val_nVar, unsigned short val_nPrimVar,
85 unsigned short val_nPrimVarGrad, const CConfig* config);
86
87 /*!
88 * \brief Destructor of the class.
89 */
90 ~CUpwAUSM_SLAU_Base_NEMO(void) override;
91
92 /*!
93 * \brief Compute the AUSM and SLAU family of schemes.
94 * \param[in] config - Definition of the particular problem.
95 * \return A lightweight const-view (read-only) of the residual/flux and Jacobians.
96 */
97 ResidualType<> ComputeResidual(const CConfig* config) final;
98};
99
100/*!
101 * \class CUpwAUSM_NEMO
102 * \brief Class for solving an approximate Riemann AUSM.
103 * \ingroup ConvDiscr
104 * \author F. Palacios, S.R. Copeland, W. Maier, C. Garbacz
105 */
107 private:
108 /*!
109 * \brief Compute the interface Mach number, soundspeeds and pressure for AUSM scheme.
110 * \param[in] config - Definition of the particular problem.
111 * \param[out] pressure - The pressure at the control volume face.
112 * \param[out] interface_mach - The interface Mach number M_(1/2).
113 * \param[out] interface_soundspeed - The interface soundspeed (vector for i and j faces if necessary).
114 */
115 virtual void ComputeInterfaceQuantities(const CConfig* config, su2double* pressure, su2double& interface_mach,
116 su2double* interface_soundspeed) override;
117
118 public:
119 /*!
120 * \brief Constructor of the class.
121 * \param[in] val_nDim - Number of dimensions of the problem.
122 * \param[in] val_nVar - Number of variables of the problem.
123 * \param[in] val_nPrimVar - Number of primitive variables of the problem
124 * \param[in] val_nPrimVarGrad - Number of grad primitive variables of the problem
125 * \param[in] config - Definition of the particular problem.
126 */
127 CUpwAUSM_NEMO(unsigned short val_nDim, unsigned short val_nVar, unsigned short val_nPrimVar,
128 unsigned short val_nPrimVarGrad, const CConfig* config);
129};
130
131/*!
132 * \class CUpwAUSMPLUSM_NEMO
133 * \brief Class for solving an approximate Riemann AUSM+ M, Two-Temperature Model.
134 * https://doi.org/10.1016/j.apm.2019.09.005 \ingroup ConvDiscr \author F. Morgado
135 */
137 private:
138 su2double beta;
139
140 /*!
141 * \brief Compute the interface Mach number, soundspeeds and pressure for AUSM+M scheme.
142 * \param[in] config - Definition of the particular problem.
143 * \param[out] pressure - The pressure at the control volume face.
144 * \param[out] interface_mach - The interface Mach number M_(1/2).
145 * \param[out] interface_soundspeed - The interface soundspeed (vector for i and j faces if necessary).
146 */
147 virtual void ComputeInterfaceQuantities(const CConfig* config, su2double* pressure, su2double& interface_mach,
148 su2double* interface_soundspeed) override;
149
150 public:
151 /*!
152 * \brief Constructor of the class.
153 * \param[in] val_nDim - Number of dimension of the problem.
154 * \param[in] val_nVar - Number of variables of the problem.
155 * \param[in] val_nPrimVar - Number of primitive variables of the problem.
156 * \param[in] val_nPrimVarGrad - Number of primitive gradient variables of the problem.
157 * \param[in] config - Definition of the particular problem.
158 */
159 CUpwAUSMPLUSM_NEMO(unsigned short val_nDim, unsigned short val_nVar, unsigned short val_nPrimVar,
160 unsigned short val_nPrimVarGrad, const CConfig* config);
161};
162
163/*!
164 * \class CUpwAUSMPLUSUP2_NEMO
165 * \brief Class for solving an approximate Riemann AUSM+-up2, Two-Temperature Model.
166 * https://doi.org/10.1016/j.jcp.2013.02.046 \ingroup ConvDiscr \author W. Maier, A. Sachedeva, C. Garbacz
167 */
169 private:
170 su2double Kp, Ku, sigma;
171
172 /*!
173 * \brief Compute the interface Mach number, soundspeeds and pressure for AUSM+-Up2 scheme.
174 * \param[in] config - Definition of the particular problem.
175 * \param[out] pressure - The pressure at the control volume face.
176 * \param[out] interface_mach - The interface Mach number M_(1/2).
177 * \param[out] interface_soundspeed - The interface soundspeed (vector for i and j faces if necessary).
178 */
179 virtual void ComputeInterfaceQuantities(const CConfig* config, su2double* pressure, su2double& interface_mach,
180 su2double* interface_soundspeed) override;
181
182 public:
183 /*!
184 * \brief Constructor of the class.
185 * \param[in] val_nDim - Number of dimensions of the problem.
186 * \param[in] val_nVar - Number of variables of the problem.
187 * \param[in] val_nPrimVar - Number of primitive variables of the problem
188 * \param[in] val_nPrimVarGrad - Number of grad primitive variables of the problem
189 * \param[in] config - Definition of the particular problem.
190 */
191 CUpwAUSMPLUSUP2_NEMO(unsigned short val_nDim, unsigned short val_nVar, unsigned short val_nPrimVar,
192 unsigned short val_nPrimVarGrad, const CConfig* config);
193};
194
195/*!
196 * \class CUpwAUSMPWplus_NEMO
197 * \brief Class for solving an approximate Riemann AUSM.
198 * \ingroup ConvDiscr
199 * \author F. Palacios, W.Maier, C. Garbacz
200 */
202 private:
203 su2double alpha;
204
205 /*!
206 * \brief Compute the interface Mach number, soundspeeds and pressure for AUSMpw+ scheme.
207 * \param[in] config - Definition of the particular problem.
208 * \param[out] pressure - The pressure at the control volume face.
209 * \param[out] interface_mach - The interface Mach number M_(1/2).
210 * \param[out] interface_soundspeed - The interface soundspeed (vector for i and j faces if necessary).
211 */
212 virtual void ComputeInterfaceQuantities(const CConfig* config, su2double* pressure, su2double& interface_mach,
213 su2double* interface_soundspeed) override;
214
215 public:
216 /*!
217 * \brief Constructor of the class.
218 * \param[in] val_nDim - Number of dimensions of the problem.
219 * \param[in] val_nVar - Number of variables of the problem.
220 * \param[in] val_nPrimVar - Number of primitive variables of the problem
221 * \param[in] val_nPrimVarGrad - Number of grad primitive variables of the problem
222 * \param[in] config - Definition of the particular problem.
223 */
224 CUpwAUSMPWplus_NEMO(unsigned short val_nDim, unsigned short val_nVar, unsigned short val_nPrimVar,
225 unsigned short val_nPrimVarGrad, const CConfig* config);
226};
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Base class template NEMO numerics.
Definition CNEMONumerics.hpp:41
static constexpr size_t MAXNDIM
Max number of space dimensions, used in some static arrays.
Definition CNumerics.hpp:50
Class for solving an approximate Riemann AUSM+ M, Two-Temperature Model. https://doi....
Definition ausm_slau.hpp:136
Class for solving an approximate Riemann AUSM+-up2, Two-Temperature Model. https://doi....
Definition ausm_slau.hpp:168
Class for solving an approximate Riemann AUSM.
Definition ausm_slau.hpp:201
CUpwAUSMPWplus_NEMO(unsigned short val_nDim, unsigned short val_nVar, unsigned short val_nPrimVar, unsigned short val_nPrimVarGrad, const CConfig *config)
Constructor of the class.
Class for solving an approximate Riemann AUSM.
Definition ausm_slau.hpp:106
Class for solving an approximate Riemann AUSM.
Definition ausm_slau.hpp:38
su2double * dP_RM
Definition ausm_slau.hpp:49
su2double ** Jacobian_j
The Jacobian w.r.t. point j after computation.
Definition ausm_slau.hpp:55
~CUpwAUSM_SLAU_Base_NEMO(void) override
Destructor of the class.
Definition ausm_slau.cpp:62
su2double ** Jacobian_i
The Jacobian w.r.t. point i after computation.
Definition ausm_slau.hpp:54
su2double * da_L
Definition ausm_slau.hpp:50
su2double * Fc_R
Definition ausm_slau.hpp:44
su2double * Fc_L
Definition ausm_slau.hpp:43
su2double M_F
Definition ausm_slau.hpp:41
su2double * Flux
The flux accross the face.
Definition ausm_slau.hpp:53
su2double A_F[2]
Definition ausm_slau.hpp:40
su2double M_R
Definition ausm_slau.hpp:41
su2double PressureFlux[MAXNDIM]
Definition ausm_slau.hpp:40
ResidualType ComputeResidual(const CConfig *config) final
Compute the AUSM and SLAU family of schemes.
Definition ausm_slau.cpp:374
su2double * Fc_LR
Definition ausm_slau.hpp:45
su2double * dP_LP
Definition ausm_slau.hpp:48
su2double * dM_LP
Definition ausm_slau.hpp:46
su2double * dM_RM
Definition ausm_slau.hpp:47
virtual void ComputeInterfaceQuantities(const CConfig *config, su2double *pressure, su2double &interface_mach, su2double *interface_soundspeed)=0
Compute the interface Mach number, soundspeeds and pressure based on Primitives_i/j....
Definition ausm_slau.cpp:84
su2double * da_R
Definition ausm_slau.hpp:51
su2double M_L
Definition ausm_slau.hpp:41
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