Loading...
Searching...
No Matches
CompressibleSteadyNS.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ██╗████████╗██╗ ██╗ █████╗ ██████╗ █████╗ ███████╗██╗ ██╗
3 ██║╚══██╔══╝██║ ██║██╔══██╗██╔════╝██╔══██╗ ██╔════╝██║ ██║
4 ██║ ██║ ███████║███████║██║ ███████║█████╗█████╗ ██║ ██║
5 ██║ ██║ ██╔══██║██╔══██║██║ ██╔══██║╚════╝██╔══╝ ╚██╗ ██╔╝
6 ██║ ██║ ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ╚████╔╝
7 ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═══╝
8
9 * In real Time Highly Advanced Computational Applications for Finite Volumes
10 * Copyright (C) 2017 by the ITHACA-FV authors
11-------------------------------------------------------------------------------
12License
13 This file is part of ITHACA-FV
14 ITHACA-FV is free software: you can redistribute it and/or modify
15 it under the terms of the GNU Lesser General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18 ITHACA-FV is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU Lesser General Public License for more details.
22 You should have received a copy of the GNU Lesser General Public License
23 along with ITHACA-FV. If not, see <http://www.gnu.org/licenses/>.
24Class
25 steadyNS
26Description
27 Reduction class for a Stationary Navier-Stokes problem.
28SourceFiles
29 steadyNS.C
30\*---------------------------------------------------------------------------*/
31
36
37#ifndef CompressibleSteadyNS_H
38#define CompressibleSteadyNS_H
39#include "fvCFD.H"
40#include "fluidThermo.H"
41#include "turbulentFluidThermoModel.H"
42#include "simpleControl.H"
43#include "pressureControl.H"
44#include "fvOptions.H"
45#include "steadyNS.H"
46#include "SteadyNSTurb.H"
47#include "SteadyNSSimple.H"
48#include "reductionProblem.H"
49#include "ITHACAstream.H"
50#include "ITHACAparameters.H"
51#include "ITHACAforces.H"
52#include "volFields.H"
53#include <iostream>
54
55
56// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57
58/*---------------------------------------------------------------------------*\
59 Class SteadyNS Declaration
60\*---------------------------------------------------------------------------*/
61
63
67{
68 public:
69 // Constructors
72
74 CompressibleSteadyNS(int argc, char* argv[]);
76
77 // Functions
78
79 //--------------------------------------------------------------------------
85 //void truthSolve(List<scalar> mu_now);
86 void truthSolve(word folder);
87
88 // Momuntum equation terms
89 fvVectorMatrix getUmatrix(volVectorField& U);//, Vector<double>& uresidual_v);
90 fvVectorMatrix getNLTerm(volVectorField& U);
91 fvVectorMatrix getViscTerm(volVectorField& U);
92 volVectorField getGradP(volScalarField& p);
93
94 // Energy equation terms
95 fvScalarMatrix getEmatrix(volVectorField& U,
96 volScalarField& p);//, scalar& eresidual);
97 fvScalarMatrix getFluxTerm();
98 volScalarField getKinEnTerm(volVectorField& U, volScalarField& p);
99 fvScalarMatrix getDiffTerm();
100
101 // Pressure equation terms
102 fvScalarMatrix getPmatrix(fvVectorMatrix& Ueqn, volVectorField& U,
103 volScalarField& p);
104 surfaceScalarField getPhiHbyA(fvVectorMatrix& Ueqn, volVectorField& U,
105 volScalarField& p);
106 volScalarField getDivPhiHbyA(fvVectorMatrix& Ueqn, volVectorField& U,
107 volScalarField& p);
108 surfaceScalarField getRhorAUf(fvVectorMatrix& Ueqn);
109 fvScalarMatrix getPoissonTerm(fvVectorMatrix& Ueqn, volScalarField& p);
110
111 //--------------------------------------------------------------------------
116 void changeViscosity(double mu_new);
117
118 //--------------------------------------------------------------------------
121 void restart();
122
123 autoPtr<fluidThermo> pThermo;
124
125 autoPtr<volScalarField> _rho;
126
127 autoPtr<volScalarField> _p;
128
129 autoPtr<pressureControl> _pressureControl;
130
131 autoPtr<compressible::turbulenceModel> turbulence;
132
133 autoPtr<dimensionedScalar> _initialMass;
134
135 autoPtr<volScalarField> _psi;
136
137 autoPtr<volScalarField> _E;
138
140
142 autoPtr<volScalarField> _p0;
143
145 autoPtr<volScalarField> _E0;
146
148 autoPtr<volVectorField> _U0;
149
151 autoPtr<volScalarField> _rho0;
152
154 autoPtr<surfaceScalarField> _phi0;
155
156
158 PtrList<volScalarField> Efield;
159
162
163 autoPtr<fvVectorMatrix> Ueqn_global;
164
165 autoPtr<fvScalarMatrix> Peqn_global;
166
167 autoPtr<fvScalarMatrix> Eeqn_global;
168
169 autoPtr<surfaceScalarField> phiHbyA;
170
171 autoPtr<surfaceScalarField> rhorAUf;
172
173 autoPtr<volVectorField> HbyA;
174
176 scalar tolerance;
177
179 scalar maxIter;
180
183 //label middleStepInit;
184
187
188
189
190};
191
192#endif
193
194
195
196
197
198
199
200
201
202
Header file of the ITHACAstream class, it contains the implementation of several methods for input ou...
Modes< scalar, fvPatchField, volMesh > volScalarModes
Definition Modes.H:255
Header file of the steadyNS class.
Header file of the SteadyNSTurb class.
volScalarField getKinEnTerm(volVectorField &U, volScalarField &p)
volScalarField getDivPhiHbyA(fvVectorMatrix &Ueqn, volVectorField &U, volScalarField &p)
fvScalarMatrix getEmatrix(volVectorField &U, volScalarField &p)
autoPtr< fluidThermo > pThermo
PtrList< volScalarField > Efield
List of pointers used to store the energy solutions.
CompressibleSteadyNS()
Null constructor.
volVectorField getGradP(volScalarField &p)
autoPtr< volVectorField > _U0
Initial Velocity field (for restart purposes)
autoPtr< volScalarField > _p
autoPtr< dimensionedScalar > _initialMass
volScalarModes Emodes
List of pointers used to form the energy modes.
autoPtr< surfaceScalarField > phiHbyA
autoPtr< volScalarField > _rho0
Initial Density field (for restart purposes)
void changeViscosity(double mu_new)
Function to change the viscosity.
fvScalarMatrix getPmatrix(fvVectorMatrix &Ueqn, volVectorField &U, volScalarField &p)
autoPtr< surfaceScalarField > _phi0
Initial Flux field (for restart purposes)
bool middleExport
Export also intermediate fields.
surfaceScalarField getRhorAUf(fvVectorMatrix &Ueqn)
scalar tolerance
Tolerance for the residual of the stationary problems, there is the same tolerance for velocity and p...
autoPtr< volScalarField > _E
autoPtr< volScalarField > _p0
List of pointers to store initial solutions.
autoPtr< fvScalarMatrix > Eeqn_global
autoPtr< volScalarField > _E0
Initial Energy field (for restart purposes)
autoPtr< compressible::turbulenceModel > turbulence
scalar maxIter
Number of maximum iterations to be done for the computation of the truth solution.
autoPtr< fvVectorMatrix > Ueqn_global
fvVectorMatrix getNLTerm(volVectorField &U)
label middleStep
Distancing between intermediate steps (for turbulent case only)
fvVectorMatrix getViscTerm(volVectorField &U)
autoPtr< pressureControl > _pressureControl
fvScalarMatrix getPoissonTerm(fvVectorMatrix &Ueqn, volScalarField &p)
autoPtr< volScalarField > _psi
autoPtr< volVectorField > HbyA
fvVectorMatrix getUmatrix(volVectorField &U)
autoPtr< volScalarField > _rho
surfaceScalarField getPhiHbyA(fvVectorMatrix &Ueqn, volVectorField &U, volScalarField &p)
void restart()
set all variables back to the values into the 0 folder
autoPtr< surfaceScalarField > rhorAUf
autoPtr< fvScalarMatrix > Peqn_global
void truthSolve()
Perform a TruthSolve.
Header file of the reductionProblem class.
volVectorField & U
volScalarField & p
Header file of the steadyNS class.