Loading...
Searching...
No Matches
HyperReducedCompressibleUnSteadyNS.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 reducedSteadyNS
26Description
27 A reduced problem for the stationary NS equations
28SourceFiles
29 reducedSteadyNS.C
30\*---------------------------------------------------------------------------*/
31
36
37#ifndef HyperReducedCompressibleUnSteadyNS_H
38#define HyperReducedCompressibleUnSteadyNS_H
39
40#include "fvCFD.H"
41#include "IOmanip.H"
42#include "ReducedProblem.H"
43#include "UnsteadyProblem.H"
45#include "ITHACAutilities.H"
46#include <Eigen/Eigen>
47#include "Modes.H"
49
50/*---------------------------------------------------------------------------*\
51 Class HyperReducedCompressibleUnSteadyNS Declaration
52\*---------------------------------------------------------------------------*/
53
55
58{
59 private:
60
61 public:
62 // Constructors
65
72 problem);
73
75
76 // Functions
77
85 void SolveHyperReducedSys(int NmodesUproj,
86 int NmodesPproj,
87 int NmodesEproj,
88 fileName folder = "./ITHACAoutput/Online/");
89
96 void setOnlineVelocity(Eigen::MatrixXd vel);
97
105 void projectReducedOperators(int NmodesUproj, int NmodesPproj, int NmodesEproj);
106
115 std::tuple<Eigen::MatrixXd, Eigen::VectorXd> HyperReducedSys(
116 Eigen::SparseMatrix<double>& S,
117 Eigen::VectorXd& se,
118 List<label>& MagicPoints,
119 Eigen::MatrixXd& Modes);
120
122 bool checkWrite(Time& timeObject);
123 // Variables
124
126 volVectorModes Umodes;
127 volScalarModes Emodes, Pmodes;
129 scalar startTime = 0.0;
130 scalar finalTime = 0.0;
131 scalar timeStep = 0.0;
132 scalar writeEvery = timeStep;
133 scalar nextWrite = 0.0;
135 PtrList<volScalarField> Pfield, Efield;
136 PtrList<volVectorField> Ufield;
137 // /// List of snapshots for the solution for eddy viscosity
138 // PtrList<volScalarField> nutFields;
139
140 // /// List of POD modes for eddy viscosity
141 volScalarModes nutModes;
142
145
147 Eigen::MatrixXd vel_now;
148
150 int counter = 0;
151
152 //Reduced operators
153
155 Eigen::MatrixXd projGradModP;
156};
157
158// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159
160
161
162#endif
163
164
165
166
167
168
Header file of the CompressibleUnSteadyPimple class.
Header file of the ITHACAutilities namespace.
Header file of the Modes class.
Header file of the reducedSteadyNS class.
Header file of the reducedProblem class.
Implementation of a parametrized full order Compressible UnSteady Pimple and preparation of the the...
std::tuple< Eigen::MatrixXd, Eigen::VectorXd > HyperReducedSys(Eigen::SparseMatrix< double > &S, Eigen::VectorXd &se, List< label > &MagicPoints, Eigen::MatrixXd &Modes)
It assembles the reduced oeprators using the modes.
bool checkWrite(Time &timeObject)
Method to check and write solutions.
Eigen::MatrixXd vel_now
Imposed boundary conditions.
void setOnlineVelocity(Eigen::MatrixXd vel)
It checks if the number of imposed boundary conditions is correct and set the inlet velocity equal to...
Eigen::MatrixXd projGradModP
Projected gradient of the pressure modes.
void SolveHyperReducedSys(int NmodesUproj, int NmodesPproj, int NmodesEproj, fileName folder="./ITHACAoutput/Online/")
Method to perform an online solve using a PPE stabilisation method.
PtrList< volScalarField > Pfield
List to save the solutions.
void projectReducedOperators(int NmodesUproj, int NmodesPproj, int NmodesEproj)
It assembles the reduced oeprators using the modes.
CompressibleUnSteadyRhoPimple * problem
Full problem.
Implementation of a container class derived from PtrList.
Definition Modes.H:69