Loading...
Searching...
No Matches
unsteadyNST.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 unsteadyNS
26Description
27 Reduction class for a NON-Stationary NS plus energy equation problem
28SourceFiles
29 unsteadyNST.C
30\*---------------------------------------------------------------------------*/
31
36
37#ifndef unsteadyNST_H
38#define unsteadyNST_H
39#include "fvCFD.H"
40#include "singlePhaseTransportModel.H"
41#include "turbulentTransportModel.H"
42#include "pisoControl.H"
43#include "fvOptions.H"
44#include "IOporosityModelList.H"
45#include "IOMRFZoneList.H"
46#include "fixedFluxPressureFvPatchScalarField.H"
47#include "unsteadyNS.H"
48#include <iostream>
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52/*---------------------------------------------------------------------------*\
53 Class unsteadyNST Declaration
54\*---------------------------------------------------------------------------*/
55
57
61{
62
63 public:
65
68
70 unsteadyNST(int argc, char* argv[]);
72
73 // Specific variable for the unstationary case
75 scalar startTime;
76
78 scalar finalTime;
79
81 scalar timeStep;
82
85
87 scalar nextWrite;
88
91
93 scalar maxCo;
94
96 scalar maxDeltaT;
97
99 PtrList<volScalarField> Tfield;
100
102 autoPtr<volScalarField> _T;
103
105 autoPtr<volScalarField> _T0;
106
108 PtrList<volScalarField> Tmodes;
109
111 autoPtr<dimensionedScalar> _DT;
112
114 autoPtr<dimensionedScalar> _nu;
115
117 PtrList<volScalarField> liftfieldT;
118
120 PtrList<volScalarField> Tomfield;
121
123 PtrList<volVectorField> UModesWeighted;
124
126 PtrList<volScalarField> PModesWeighted;
127
129 PtrList<volScalarField> TModesWeighted;
130
132 PtrList<volScalarField> NUTModesWeighted;
133
135 PtrList<volScalarField> L_T_modes;
136
138 autoPtr<pisoControl> _piso;
139
141 label pRefCell;
142
144 scalar pRefValue;
145
147 mutable autoPtr<fvMesh> _mesh;
148
150 label NTmodes;
151
153 Eigen::MatrixXd Y_matrix;
154
156 List <Eigen::MatrixXd> Q_matrix;
157
159 Eigen::MatrixXd MT_matrix;
160
162 autoPtr<Time> _runTime;
163
165 void liftSolve();
166
168 void liftSolveT();
169
171 void truthSolve(List<scalar> mu_now);
172
173 //--------------------------------------------------------------------------
180 bool checkWrite(Time& timeObject);
181
183
184 //--------------------------------------------------------------------------
193 void projectSUP(fileName folder, label NUmodes, label NPmodes, label NTmodes,
194 label NSUPmodes);
195
196 //--------------------------------------------------------------------------
205 List< Eigen::MatrixXd > convective_term_temperature(label NUmodes,
206 label NTmodes, label NSUPmodes);
207
208 //--------------------------------------------------------------------------
217 Eigen::MatrixXd diffusive_term_temperature(label NUmodes, label NTmodes,
218 label NSUPmodes);
219
220 //--------------------------------------------------------------------------
229 Eigen::MatrixXd mass_term_temperature(label NUmodes, label NTmodes,
230 label NSUPmodes);
231};
232
233#endif
234
235
236
void truthSolve()
Perform a TruthSolve.
label NPmodes
Number of pressure modes used for the projection.
Definition steadyNS.H:143
label NUmodes
Number of velocity modes used for the projection.
Definition steadyNS.H:140
label NSUPmodes
Number of supremizer modes used for the projection.
Definition steadyNS.H:146
Implementation of a parametrized full order unsteady NS problem weakly coupled with the energy equat...
Definition unsteadyNST.H:61
PtrList< volVectorField > UModesWeighted
List of pointers used to form the Weighted nested-POD modes for velocity field.
Eigen::MatrixXd Y_matrix
Gradient of pressure matrix.
scalar pRefValue
Reference pressure value.
PtrList< volScalarField > Tfield
List of pointers used to form the temperature snapshots matrix.
Definition unsteadyNST.H:99
List< Eigen::MatrixXd > convective_term_temperature(label NUmodes, label NTmodes, label NSUPmodes)
Convective Term for Temperature.
unsteadyNST()
Constructors.
Definition unsteadyNST.C:39
List< Eigen::MatrixXd > Q_matrix
Non linear term.
PtrList< volScalarField > NUTModesWeighted
List of pointers used to form the Weighted nested-POD modes for nut-field.
scalar maxDeltaT
maxDeltaT
Definition unsteadyNST.H:96
PtrList< volScalarField > liftfieldT
List of pointers used to form the list of the temperature lifting functions.
PtrList< volScalarField > Tomfield
List of pointers used to form the homogeneous temperature snapshots.
scalar timeStep
Time step of the simulation.
Definition unsteadyNST.H:81
scalar maxCo
maxCourant
Definition unsteadyNST.H:93
void projectSUP(fileName folder, label NUmodes, label NPmodes, label NTmodes, label NSUPmodes)
Specific variable for the unstationary case.
bool checkWrite(Time &timeObject)
Function to check if the solution must be exported.
autoPtr< Time > _runTime
Time.
label NTmodes
Number of temperature modes used for the projection.
scalar finalTime
Final time (final time of the simulation and consequently of the acquisition of the snapshots)
Definition unsteadyNST.H:78
Eigen::MatrixXd diffusive_term_temperature(label NUmodes, label NTmodes, label NSUPmodes)
Diffusive Term for Temperature.
PtrList< volScalarField > PModesWeighted
List of pointers used to form the Weighted nested-POD modes for pressure field.
autoPtr< dimensionedScalar > _nu
dimensionedScalar nu;
Eigen::MatrixXd mass_term_temperature(label NUmodes, label NTmodes, label NSUPmodes)
Mass Term for Temperature.
scalar nextWrite
Auxiliary variable to store the next writing instant.
Definition unsteadyNST.H:87
scalar startTime
Start Time (initial time to start storing the snapshots)
Definition unsteadyNST.H:75
autoPtr< volScalarField > _T
Temperature field.
autoPtr< pisoControl > _piso
pisoControl
bool adjustTimeStep
adjustTimeStep
Definition unsteadyNST.H:90
scalar writeEvery
Time step of the writing procedure.
Definition unsteadyNST.H:84
void liftSolve()
Perform a lift solve for velocity field.
Eigen::MatrixXd MT_matrix
Mass Matrix T.
autoPtr< dimensionedScalar > _DT
dimensionedScalar DT;
label pRefCell
Reference pressure cell.
autoPtr< fvMesh > _mesh
Mesh.
PtrList< volScalarField > Tmodes
List of pointers used to form the temperature modes.
PtrList< volScalarField > TModesWeighted
List of pointers used to form the Weighted nested-POD modes for temperature field.
PtrList< volScalarField > L_T_modes
List of pointers containing the lift for temperature and the temperature field.
autoPtr< volScalarField > _T0
Initial Temperature field (for restart purposes)
void liftSolveT()
Perform a lift solve for temperature field.
Implementation of a parametrized full order unsteady NS problem and preparation of the the reduced ...
Definition unsteadyNS.H:62
Header file of the unsteadyNS class.