Documentation 6b54b78464
Loading...
Searching...
No Matches
fds.hpp
Go to the documentation of this file.
1/*!
2 * \file fds.hpp
3 * \brief Declarations of classes for Flux-Difference-Spliting schemes,
4 * the implementations are in fds.cpp
5 * \author F. Palacios, T. Economon
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 "../../CNumerics.hpp"
32
33/*!
34 * \class CUpwFDSInc_Flow
35 * \brief Class for solving a Flux Difference Splitting (FDS) upwind method for the incompressible flow equations.
36 * \ingroup ConvDiscr
37 * \author F. Palacios, T. Economon
38 */
39class CUpwFDSInc_Flow final : public CNumerics {
40private:
41 bool implicit, /*!< \brief Implicit calculation. */
42 dynamic_grid, /*!< \brief Modification for grid movement. */
43 variable_density, /*!< \brief Variable density incompressible flows. */
44 energy; /*!< \brief computation with the energy equation. */
45 su2double *Diff_V;
46 su2double *Velocity_i, *Velocity_j, *MeanVelocity;
47 su2double *ProjFlux_i, *ProjFlux_j;
48 su2double *Lambda, *Epsilon;
49 su2double **Precon, **invPrecon_A;
50 su2double Proj_ModJac_Tensor_ij, Pressure_i,
51 Pressure_j, ProjVelocity,
52 MeandRhodh, dRhodh_i, dRhodh_j, /*!< \brief Derivative of density w.r.t. enthalpy (variable density flows). */
53 Temperature_i, Temperature_j, /*!< \brief Temperature at node 0 and 1. */
54 MeanDensity, MeanPressure, MeanSoundSpeed, MeanBetaInc2, MeanEnthalpy, MeanCp, MeanTemperature; /*!< \brief Mean values of primitive variables. */
55 unsigned short iDim, iVar, jVar, kVar;
56
57 su2double* Flux = nullptr; /*!< \brief The flux / residual across the edge. */
58 su2double** Jacobian_i = nullptr; /*!< \brief The Jacobian w.r.t. point i after computation. */
59 su2double** Jacobian_j = nullptr; /*!< \brief The Jacobian w.r.t. point j after computation. */
60
61public:
62
63 /*!
64 * \brief Constructor of the class.
65 * \param[in] val_nDim - Number of dimensions of the problem.
66 * \param[in] val_nVar - Number of variables of the problem.
67 * \param[in] config - Definition of the particular problem.
68 */
69 CUpwFDSInc_Flow(unsigned short val_nDim, unsigned short val_nVar, const CConfig *config);
70
71 /*!
72 * \brief Destructor of the class.
73 */
74 ~CUpwFDSInc_Flow(void) override;
75
76 /*!
77 * \brief Compute the upwind flux between two nodes i and j.
78 * \param[in] config - Definition of the particular problem.
79 * \return A lightweight const-view (read-only) of the residual/flux and Jacobians.
80 */
81 ResidualType<> ComputeResidual(const CConfig* config) override;
82
83};
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 a Flux Difference Splitting (FDS) upwind method for the incompressible flow equatio...
Definition fds.hpp:39
ResidualType ComputeResidual(const CConfig *config) override
Compute the upwind flux between two nodes i and j.
Definition fds.cpp:91
~CUpwFDSInc_Flow(void) override
Destructor of the class.
Definition fds.cpp:61
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