Loading...
Searching...
No Matches
ReducedSteadyNSTurbIntrusive.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 ReducedSteadyNSTurbIntrusive
26Description
27 A reduced problem for the stationary turbulent NS equations using fully intrusive approach
28SourceFiles
29 ReducedSteadyNSTurbIntrusive.C
30\*---------------------------------------------------------------------------*/
31
36
37#ifndef ReducedSteadyNSTurbIntrusive_H
38#define ReducedSteadyNSTurbIntrusive_H
39
40#include "fvCFD.H"
41#include "IOmanip.H"
42#include "ReducedProblem.H"
43#include "ReducedSteadyNS.H"
45#include "ITHACAutilities.H"
46#include <Eigen/Dense>
47#include <unsupported/Eigen/NonLinearOptimization>
48#include <unsupported/Eigen/NumericalDiff>
49
52{
53 public:
55
59 Nphi_u(problem.nModesOnline),
60 N_BC(problem.inletIndex.rows())
61 {}
62
63 int operator()(const Eigen::VectorXd& x, Eigen::VectorXd& fvec) const;
64 int df(const Eigen::VectorXd& x, Eigen::MatrixXd& fjac) const;
65
67 int Nphi_u;
68 int N_BC;
69 scalar nu;
70 Eigen::MatrixXd tauU;
71 Eigen::VectorXd bc;
72};
73
74
75/*---------------------------------------------------------------------------*\
76 Class reducedProblem Declaration
77\*---------------------------------------------------------------------------*/
78
79
81
84{
85 private:
86
87 public:
88 // Constructors
96
98
99
101 PtrList<volScalarField> nutFields;
102
104 PtrList<volScalarField> nutModes;
105
107 PtrList<volScalarField> nutRec;
108
111
114
117
127 void solveOnline(Eigen::MatrixXd velNow);
128
135 void reconstruct(fileName folder = "./ITHACAOutput/online_rec",
136 int printEvery = 1);
137
145 Eigen::MatrixXd setOnlineVelocity(Eigen::MatrixXd vel);
146
147 //--------------------------------------------------------------------------
154 fileName folder);
155
156
157};
158
159// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160
161
162
163#endif
164
165
166
167
168
169
Header file of the ITHACAutilities namespace.
Header file of the reducedProblem class.
Header file of the reducedSteadyNS class.
Header file of the SteadyNSTurbIntrusive class.
int nphiNut
Number of viscosity modes.
PtrList< volScalarField > nutRec
Reconstructed eddy viscosity field.
void reconstructLiftAndDrag(SteadyNSTurbIntrusive &problem, fileName folder)
Method to compute the reduced order forces for same number of modes of velocity and pressure.
Eigen::MatrixXd setOnlineVelocity(Eigen::MatrixXd vel)
Sets the online velocity.
newtonSteadyNSTurbIntrusive newtonObject
Newton Object to solve the nonlinear problem.
PtrList< volScalarField > nutModes
List of POD modes for eddy viscosity.
SteadyNSTurbIntrusive * problem
Pointer to the FOM problem.
void reconstruct(fileName folder="./ITHACAOutput/online_rec", int printEvery=1)
Method to reconstruct the solutions from an online solve with a supremizer stabilisation technique.
PtrList< volScalarField > nutFields
List of snapshots for the solution for eddy viscosity.
Implementation of a parametrized full order steady turbulent Navier Stokes problem and preparation ...
virtual void solveOnline()
Virtual Method to perform and online Solve.
reducedSteadyNS()
Construct Null.
Structure to implement a newton object for a stationary NS problem.
newtonSteadyNSTurbIntrusive(int Nx, int Ny, SteadyNSTurbIntrusive &problem)
int operator()(const Eigen::VectorXd &x, Eigen::VectorXd &fvec) const
int df(const Eigen::VectorXd &x, Eigen::MatrixXd &fjac) const