Loading...
Searching...
No Matches
ReducedFsi.H
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
13This file is part of ITHACA-FV
14ITHACA-FV is free software: you can redistribute it and/or modify
15it under the terms of the GNU Lesser General Public License as published by
16the Free Software Foundation, either version 3 of the License, or
17(at your option) any later version.
18ITHACA-FV is distributed in the hope that it will be useful,
19but WITHOUT ANY WARRANTY; without even the implied warranty of
20MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21GNU Lesser General Public License for more details.
22You should have received a copy of the GNU Lesser General Public License
23along with ITHACA-FV. If not, see <http://www.gnu.org/licenses/>.
24Class
25ReducedFsi
26Description
27Reduced classs for fluid structure interaction problem with dynamic mesh
28SourceFiles
29ReducedFsi.C
30\*---------------------------------------------------------------------------*/
31#ifndef ReducedFsi_H
32#define ReducedFsi_H
33
34#include "fsiBasic.H"
35#include "ITHACAPOD.H"
36#include "ReducedProblem.H"
37#include "pointConstraints.H"
38#include "mathematicalConstants.H"
40
42{
43 public:
44 // Constructors
46 ReducedFsi();
50 explicit ReducedFsi(fsiBasic& problem);
51 ~ReducedFsi() {};
52
56 volScalarModes Pmodes;
57 volVectorModes Umodes;
58 pointVectorModes Dmodes;
60 PtrList<dynamicFvMesh> OnlineMeshes;
61
63 scalar startTime = 0.0;
64 scalar finalTime = 0.0;
65 scalar timeStep = 0.0;
66 scalar writeEvery = timeStep;
67 scalar nextWrite = 0.0;
69 List<scalar> centerofmassx;
70 List<scalar> centerofmassy;
71 List<scalar> centerofmassz;
73 List<scalar> romforcey;
74 List<scalar> romforcex;
75 // List of scaler for saving interpolation coefficients using RBF
76 List<scalar> pdcoeffrbf;
78 List<Eigen::MatrixXd> CoeffU;
79 List<Eigen::MatrixXd> CoeffP;
80
81 PtrList<volScalarField> PredFields;
82 PtrList<volVectorField> UredFields;
84 PtrList<pointVectorField> Dfield;
85 PtrList<volScalarField> Pfield;
86 PtrList<volVectorField> Ufield;
87 PtrList<pointField> ListOfpoints;
88 label counter = problem->counter;
89 //std::ofstream Errors;
90
91 // Functions
92
93
106 void solveOnline_Pimple(int NmodesUproj,
107 int NmodesPproj,
108 int NmodesDproj,
109 fileName folder = "./ITHACAoutput/Online/");
111 void restart();
113 bool checkWrite(Time& timeObject);
115 void PODI(Eigen::MatrixXd coeffL2, Eigen::MatrixXd muu, label NPdModes);
117 void prepareRomData(const word& outputPath);
118};
119// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120
121#endif
122
123
124
Header file of the ITHACAPOD class.
Header file of the reducedProblem class.
Header file of the reducedSteadyNS class.
void restart()
method to set all fields back to values in 0 folder
void solveOnline_Pimple(int NmodesUproj, int NmodesPproj, int NmodesDproj, fileName folder="./ITHACAoutput/Online/")
Definition ReducedFsi.C:113
fsiBasic * problem
Full problem.
Definition ReducedFsi.H:54
void prepareRomData(const word &outputPath)
Routine to save forces and center of mass.
Definition ReducedFsi.C:394
List< scalar > romforcey
List to save ROM lift and drag forces.
Definition ReducedFsi.H:73
bool checkWrite(Time &timeObject)
Method to save snapshots at a given time.
Definition ReducedFsi.C:378
void PODI(Eigen::MatrixXd coeffL2, Eigen::MatrixXd muu, label NPdModes)
Method to construct PODI.
Definition ReducedFsi.C:61
List< scalar > centerofmassx
List scalar for access the centerofmass.
Definition ReducedFsi.H:69
ReducedFsi()
Construct Null.
Definition ReducedFsi.C:37
volScalarModes Pmodes
The respective modes.
Definition ReducedFsi.H:56
PtrList< dynamicFvMesh > OnlineMeshes
PtrList to save the meshes.
Definition ReducedFsi.H:60
PtrList< pointVectorField > Dfield
List of Online nodes displacement.
Definition ReducedFsi.H:84
List< Eigen::MatrixXd > CoeffU
List of POD coefficients.
Definition ReducedFsi.H:78
Implementation of a parametrized full order unsteady NS problem and preparation of the the reduced ...
Definition fsiBasic.H:76
reducedSimpleSteadyNS()
Construct Null.
Header file of the fsiBasic class.