Loading...
Searching...
No Matches
UnsteadyNSTurb.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 *-------------------------------------------------------------------------------
12 * License
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/>.
24 *
25 * Class
26 * UnsteadyNSTurb
27 *
28 * Description
29 * Reduction class for a NON-Stationary turbulent NS problem
30 *
31 * SourceFiles
32 * UnsteadyNSTurb.C
33\*---------------------------------------------------------------------------*/
34
35#ifndef UnsteadyNSTurb_H
36#define UnsteadyNSTurb_H
37
38#include "IOMRFZoneList.H"
39#include "IOporosityModelList.H"
40#include "fixedFluxPressureFvPatchScalarField.H"
41#include "fvCFD.H"
42#include "fvOptions.H"
43#include "pimpleControl.H"
44#include "singlePhaseTransportModel.H"
45#include "steadyNS.H"
46#include "turbulentTransportModel.H"
47#include "unsteadyNS.H"
48
49#include <bspline.h>
50#include <bsplinebuilder.h>
51#include <datatable.h>
52#include <rbfspline.h>
53#include <spline.h>
54
55#include <iostream>
56#include <vector>
57
58#include "Smagorinsky.H"
59#include "kOmegaSSTBase.H"
60#include "DESModelBase.H"
61#include "DESModel.H"
62#include "kOmegaSSTDES.H"
63#include "StoredParameters.H"
64#include <optional>
65
66/*---------------------------------------------------------------------------*\
67 Class UnsteadyNSTurb Declaration
68\*---------------------------------------------------------------------------*/
69
76class UnsteadyNSTurb : public unsteadyNS
77{
78 public:
79 // Constructors
80 UnsteadyNSTurb();
81 UnsteadyNSTurb(int argc, char* argv[]);
82
83 // Small construct with Parameters to access member functions linked to Smagorinsky diffusion
84 UnsteadyNSTurb(const Parameters* myParameters);
85
86 // Specific variable for the unstationary case
87 // Member Functions
88
90 PtrList<volScalarField> nutFields;
91
93 volScalarModes nutModes;
94
96 PtrList<volScalarField> nutAve;
97
98 // === Added for dual RBF interpolation (average and fluctuation νt) ===
99 int nNutAvgModes;
100 int nNutFluctModes;
101 int nphiNutAvg;
102 int nphiNutFluct;
103
104 PtrList<volScalarField> nutAvgModes;
105 PtrList<volScalarField> nutFluctModes;
106 PtrList<volScalarField> nutAvgFields;
107 PtrList<volScalarField> nutFluctFields;
108
109 List<SPLINTER::RBFSpline*> rbfSplinesNutAvg;
110 List<SPLINTER::RBFSpline*> rbfSplinesNutFluct;
111
112 List<SPLINTER::DataTable*> samplesNutAvg;
113 List<SPLINTER::DataTable*> samplesNutFluct;
114
115 // (optional but recommended for compatibility)
116 std::vector<SPLINTER::RBFSpline*> rbfSplines;
117
119 std::vector<SPLINTER::DataTable*> samples;
120
122 Eigen::MatrixXd btMatrix;
123
124 // New: PPE RHS boundary vector L (size NPmodes x 1)
125 Eigen::MatrixXd L_vector;
126
127 // Builder prototype
128 Eigen::MatrixXd pressurePPE_L(label NPmodes);
129
131 Eigen::MatrixXd z;
132
134 Eigen::Tensor<double, 3> ct1Tensor;
135
137 Eigen::Tensor<double, 3> ct1AveTensor;
138
140 Eigen::Tensor<double, 3> ct1PPETensor;
141
143 Eigen::Tensor<double, 3> ct1PPEAveTensor;
144
146 Eigen::Tensor<double, 3> ct2Tensor;
147
149 Eigen::Tensor<double, 3> ct2AveTensor;
150
152 Eigen::Tensor<double, 3> ct2PPETensor;
153
155 Eigen::Tensor<double, 3> ct2PPEAveTensor;
156
158 Eigen::Tensor<double, 3> ct1FluctTensor;
159
161 Eigen::Tensor<double, 3> ct1PPEFluctTensor;
162
164 Eigen::Tensor<double, 3> ct2FluctTensor;
165
167 Eigen::Tensor<double, 3> ct2PPEFluctTensor;
168
170 Eigen::Tensor<double, 3> cTotalTensor;
171
173 Eigen::Tensor<double, 3> cTotalAveTensor;
174
175 // ================= NEW FOR SUP: continuity matrix =================
176 // P_{ij} = ( χ_i , ∇·φ_j ), size NP × (lift + NU + NSUP)
177 Eigen::MatrixXd P_matrix;
178 Eigen::MatrixXd continuity_matrix(label NUmodes, label NSUPmodes,
179 label NPmodes);
180
182 Eigen::Tensor<double, 3> cTotalPPETensor;
183
185 Eigen::Tensor<double, 3> cTotalPPEAveTensor;
186
187 Eigen::Tensor<double, 3> cTotalFluctTensor;
188 Eigen::Tensor<double, 3> cTotalPPEFluctTensor;
189
191 Eigen::MatrixXd bTotalMatrix;
192
194 Eigen::MatrixXd coeffL2;
195
197 Eigen::MatrixXd velRBF;
198
200 Eigen::VectorXd radii;
201
203 double e = 1.0;
204
207
209 label interChoice = 1;
210
212 autoPtr<volScalarField> _nut;
213
215 autoPtr<surfaceVectorField> _Uf;
216
219
222
223 //--------------------------------------------------------------------------
231 Eigen::MatrixXd btTurbulence(label NUmodes, label NSUPmodes);
232
233 //--------------------------------------------------------------------------
242 Eigen::Tensor<double, 3> turbulenceTensor1(label NUmodes, label NSUPmodes,
243 label nNutModes);
244
245 //--------------------------------------------------------------------------
254 Eigen::Tensor<double, 3> turbulenceTensor2(label NUmodes, label NSUPmodes,
255 label nNutModes);
256
257 //--------------------------------------------------------------------------
267 Eigen::Tensor<double, 3> turbulencePPETensor1(
268 label NUmodes, label NSUPmodes, label NPmodes, label nNutModes);
269
270 //--------------------------------------------------------------------------
280 Eigen::Tensor<double, 3> turbulencePPETensor2(
281 label NUmodes, label NSUPmodes, label NPmodes, label nNutModes);
282
283 //--------------------------------------------------------------------------
292 Eigen::Tensor<double, 3> turbulenceAveTensor1(label NUmodes, label NSUPmodes);
293
294 //--------------------------------------------------------------------------
303 Eigen::Tensor<double, 3> turbulenceAveTensor2(label NUmodes, label NSUPmodes);
304
305 //--------------------------------------------------------------------------
316 Eigen::Tensor<double, 3> turbulencePPEAveTensor1(label NUmodes, label NSUPmodes,
317 label NPmodes);
318
319 //--------------------------------------------------------------------------
330 Eigen::Tensor<double, 3> turbulencePPEAveTensor2(label NUmodes, label NSUPmodes,
331 label NPmodes);
332
333 //--------------------------------------------------------------------------
340 Eigen::Tensor<double, 3> turbulenceFluctTensor1(label NUmodes, label NSUPmodes);
341
342 //--------------------------------------------------------------------------
349 Eigen::Tensor<double, 3> turbulenceFluctTensor2(label NUmodes, label NSUPmodes);
350
351 //--------------------------------------------------------------------------
359 Eigen::Tensor<double, 3> turbulencePPEFluctTensor1(label NUmodes,
360 label NSUPmodes, label NPmodes);
361
362 //--------------------------------------------------------------------------
370 Eigen::Tensor<double, 3> turbulencePPEFluctTensor2(label NUmodes,
371 label NSUPmodes, label NPmodes);
372
373 //--------------------------------------------------------------------------
380 void truthSolve(List<scalar> mu_now, std::string& offlinepath);
381
382 //----------------------------------------------------------------------
392 void projectSUP(
393 fileName folder,
394 label NUmodes,
395 label NPmodes,
396 label NSUPmodes,
397 label nNutModes,
398 bool rbfInterp = true);
399
400 //----------------------------------------------------------------------
411 void projectPPE(
412 fileName folder,
413 label NUmodes,
414 label NPmodes,
415 label NSUPmodes,
416 label nNutModes,
417 bool rbfInterp = true);
418
419 //--------------------------------------------------------------------------
432 List<Eigen::MatrixXd> velDerivativeCoeff(
433 Eigen::MatrixXd A,
434 Eigen::MatrixXd G,
435 Eigen::VectorXd initSnapInd,
436 Eigen::VectorXd timeSnap);
437
438 //--------------------------------------------------------------------------
448 List<Eigen::MatrixXd> velParCoeff(Eigen::MatrixXd A, Eigen::MatrixXd G);
449
450 //--------------------------------------------------------------------------
464 List<Eigen::MatrixXd> velParDerivativeCoeff(
465 Eigen::MatrixXd A,
466 Eigen::MatrixXd G,
467 Eigen::VectorXd initSnapInd,
468 Eigen::VectorXd timeSnap);
469
470 //--------------------------------------------------------------------------
483 Eigen::MatrixXd velParDerivativeCoeff(Eigen::MatrixXd A, Eigen::VectorXd par,
484 double timeSnap);
485
486private :
487
489 const StoredParameters* m_parameters;
490
491 // /// Turbulence model
492 // autoPtr<incompressible::turbulenceModel> turbModel;
493
494 public :
495
496 // =========================================================================
497 // ============================= Smagorinsky ===============================
498 // =========================================================================
499
500 //--------------------------------------------------------------------------
512 void computeNonLinearSnapshot_at_time(const word& snap_time, volVectorField& Smag,
513 std::optional<PtrList<volVectorField>> modesU = std::nullopt);
514
515 //--------------------------------------------------------------------------
521 volVectorField initSmagFunction();
522
523 //--------------------------------------------------------------------------
529 volScalarField initSmagPhiFunction(const volScalarField template_field_phi);
530
531 //--------------------------------------------------------------------------
540 volVectorField computeSmagTerm_at_time(const word& snap_time, std::optional<PtrList<volVectorField>> modesU = std::nullopt);
541
542 //--------------------------------------------------------------------------
550 volScalarField computeSmagTermPhi_at_time(const word& snap_time, const volScalarField template_field_phi);
551
552 //--------------------------------------------------------------------------
559 volVectorField computeSmagTerm_fromU(const volVectorField& snapshotj);
560
561 //--------------------------------------------------------------------------
569 volScalarField computeSmagTermPhi_fromUPhi(const volVectorField& snapshotj, const volScalarField& phij);
570
571 //--------------------------------------------------------------------------
579 volVectorField computeSmagTermPhi_fromUPhi(const volVectorField& snapshotj, const volVectorField& phij);
580
581 //--------------------------------------------------------------------------
589 template<typename T>
590 static volScalarField diffusion(const T& coefDiff, const volScalarField& phi);
591
592 //--------------------------------------------------------------------------
600 template<typename T>
601 static volVectorField diffusion(const T& coefDiff, const volVectorField& u);
602
603
604 // =========================================================================
605 // ======================= projFullStressFunction ==========================
606 // =========================================================================
607
608 //--------------------------------------------------------------------------
621 void computeNonLinearSnapshot_at_time(const word& snap_time, volScalarField& phi, volVectorField& modeU);
622
623 void computeNonLinearSnapshot_at_time(const word& snap_time, volVectorField& phi, volVectorField& modeU)
624 {
625 Info << "Output field with this call to computeNonLinearSnapshot_at_time is scalar" << endl;
626 abort();
627 };
628
629 //--------------------------------------------------------------------------
634 volScalarField initProjSmagFunction();
635
636 //--------------------------------------------------------------------------
644 volScalarField computeProjSmagTerm_at_time_fromMode(const word& snap_time, const volVectorField& mode);
645
646 //--------------------------------------------------------------------------
656 void computeProjSmagTerm_fromSmag_fromMode(volScalarField& phi, const volVectorField& Smag, const volVectorField& mode);
657
658 void computeProjSmagTerm_fromSmag_fromMode(volScalarField phi,const volScalarField& Smag, const volVectorField& mode)
659 {
660 Info << "Input fields for this call to computeProjSmagTerm_fromSmag_fromMode are vectors" << endl;
661 abort();
662 };
663
664 void computeProjSmagTerm_fromSmag_fromMode(volVectorField phi, const volVectorField& Smag, const volVectorField& mode)
665 {
666 Info << "Output field for this call to computeProjSmagTerm_fromSmag_fromMode is scalar" << endl;
667 abort();
668 };
669
670
671 // =========================================================================
672 // =========================== projSmagFromNut =============================
673 // =========================================================================
674
675 //--------------------------------------------------------------------------
688 void computeNonLinearSnapshot_at_time(const word& snap_time, volScalarField& phi,
689 volVectorField& modeU_proj , volVectorField& modeU_grad);
690
691 void computeNonLinearSnapshot_at_time(const word& snap_time, volVectorField& phi,
692 volVectorField& modeU_proj , volVectorField& modeU_grad)
693 {
694 Info << "Output field with this call to computeNonLinearSnapshot_at_time is scalar" << endl;
695 abort();
696 };
697
698 //--------------------------------------------------------------------------
703 volScalarField initProjSmagFromNutFunction();
704
705 //--------------------------------------------------------------------------
715 volScalarField computeProjSmagFromNut_at_time_fromModes(const word& snap_time, const volVectorField& modeU_proj,
716 const volVectorField& modeU_grad);
717
718 //--------------------------------------------------------------------------
729 void computeProjSmagFromNut_fromNut_fromModes(volScalarField& phi, const volScalarField& Nut,
730 const volVectorField& modeU_proj, const volVectorField& modeU_grad);
731
732 void computeProjSmagFromNut_fromNut_fromModes(volVectorField& phi, const volVectorField& Nut,
733 const volVectorField& modeU_proj, const volVectorField& modeU_grad)
734 {
735 Info << "Output field for this call to computeProjSmagFromNut_fromNut_fromModes is a scalar field" << endl;
736 abort();
737 };
738
739 void computeProjSmagFromNut_fromNut_fromModes(volScalarField& phi, const volVectorField& Nut,
740 const volVectorField& modeU_proj, const volVectorField& modeU_grad)
741 {
742 Info << "Input field for this call to computeProjSmagFromNut_fromNut_fromModes is a scalar field" << endl;
743 abort();
744 };
745
746 //--------------------------------------------------------------------------
755 static volScalarField projDiffusionIBP(const volScalarField& coefDiff,
756 const volVectorField& u, const volVectorField& v);
757
758
759
760 // =========================================================================
761 // ============================= NUT =======================================
762 // =========================================================================
763
764 //--------------------------------------------------------------------------
775 void computeNonLinearSnapshot_at_time(const word& snap_time, volScalarField& nut,
776 std::optional<PtrList<volVectorField>> modesU = std::nullopt);
777
778 //--------------------------------------------------------------------------
785 volScalarField initNutFunction();
786
787 //--------------------------------------------------------------------------
797 volScalarField computeNut_at_time(const word& snap_time, std::optional<PtrList<volVectorField>> modesU = std::nullopt);
798
799 //--------------------------------------------------------------------------
806 volScalarField computeNut_fromU(const volVectorField& snapshotj);
807
808 //--------------------------------------------------------------------------
815 volScalarField computeNut_fromS(const volTensorField& S);
816
817 // void initTurbModel();
818
819 //--------------------------------------------------------------------------
826 static volTensorField computeS_fromU(const volVectorField& snapshotj);
827
828 //--------------------------------------------------------------------------
835 static volVectorField computeS_fromU(const volScalarField& phij);
836
837};
838
839// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
840
841#endif
842
843
844
845
846
847
848
849
850
851
Class that contains all parameters of the stochastic POD.
volVectorField computeSmagTerm_fromU(const volVectorField &snapshotj)
Compute Smagorinsky Snapshot for a given velocity field U.
void computeProjSmagFromNut_fromNut_fromModes(volScalarField &phi, const volScalarField &Nut, const volVectorField &modeU_proj, const volVectorField &modeU_grad)
Compute projSmagFromNut given Nut and 2 velocity modes.
Eigen::Tensor< double, 3 > ct1PPEFluctTensor
Turbulent fluctuation viscosity tensor for the splitting approach in the PPE equation.
autoPtr< surfaceVectorField > _Uf
Face velocity field.
Eigen::Tensor< double, 3 > cTotalTensor
Turbulent total viscosity tensor.
Eigen::Tensor< double, 3 > turbulenceAveTensor2(label NUmodes, label NSUPmodes)
ct2Ave added tensor for approximation of the averaged part of the eddy viscosity
Eigen::Tensor< double, 3 > ct1Tensor
Turbulent viscosity tensor.
Eigen::Tensor< double, 3 > cTotalPPETensor
Turbulent total viscosity tensor in the PPE equation.
volScalarField computeNut_fromU(const volVectorField &snapshotj)
Compute turbulent viscosity Snapshot for a given velocity field U.
PtrList< volScalarField > nutAve
List of for eddy viscosity time-averaged fields.
scalar _pRefValue
Pressure reference value.
Eigen::MatrixXd btTurbulence(label NUmodes, label NSUPmodes)
bt added matrix for the turbulence treatement
List< Eigen::MatrixXd > velParDerivativeCoeff(Eigen::MatrixXd A, Eigen::MatrixXd G, Eigen::VectorXd initSnapInd, Eigen::VectorXd timeSnap)
A method to compute the two matrices needed for the RBF interpolation by combining the parameter valu...
Eigen::Tensor< double, 3 > ct2Tensor
Turbulent viscosity tensor.
Eigen::Tensor< double, 3 > turbulencePPETensor1(label NUmodes, label NSUPmodes, label NPmodes, label nNutModes)
ct1PPE added tensor for the turbulence treatement in the PPE method
Eigen::Tensor< double, 3 > turbulenceAveTensor1(label NUmodes, label NSUPmodes)
ct1Ave added tensor for approximation of the averaged part of the eddy viscosity
Eigen::Tensor< double, 3 > ct2PPEAveTensor
Turbulent average viscosity tensor for the splitting approach in the PPE equation.
volVectorField initSmagFunction()
Initialize Smagorinsky term with values at time 0.
Eigen::Tensor< double, 3 > ct1PPETensor
Turbulent viscosity tensor in the PPE equation.
void projectSUP(fileName folder, label NUmodes, label NPmodes, label NSUPmodes, label nNutModes, bool rbfInterp=true)
Project using a supremizer approach.
volScalarField computeNut_fromS(const volTensorField &S)
Compute turbulent viscosity Snapshot for a given tensor Field S.
static volTensorField computeS_fromU(const volVectorField &snapshotj)
Compute S deformation tensor for a given vector field U.
Eigen::Tensor< double, 3 > cTotalAveTensor
Turbulent total average viscosity tensor for the splitting approach.
Eigen::Tensor< double, 3 > turbulencePPEAveTensor1(label NUmodes, label NSUPmodes, label NPmodes)
ct1PPEAve added tensor for approximation of the averaged part of the eddy viscosity with the usage of...
Eigen::Tensor< double, 3 > turbulenceFluctTensor1(label NUmodes, label NSUPmodes)
ct1Fluct added tensor for approximation of the fluctuating part of the eddy viscosity
volScalarField computeSmagTermPhi_at_time(const word &snap_time, const volScalarField template_field_phi)
Compute Smagorinsky Snapshot of a tracer phi at a given time.
volScalarField computeSmagTermPhi_fromUPhi(const volVectorField &snapshotj, const volScalarField &phij)
Compute Smagorinsky Snapshot for given velocity field U and tracer phi.
volScalarField initNutFunction()
Initialize Nut term with values at time 0.
Eigen::Tensor< double, 3 > ct1PPEAveTensor
Turbulent average viscosity tensor for the splitting approach in the PPE equation.
Eigen::Tensor< double, 3 > ct1FluctTensor
Turbulent fluctuation viscosity tensor for the splitting approach.
Eigen::Tensor< double, 3 > turbulenceTensor2(label NUmodes, label NSUPmodes, label nNutModes)
ct2 added tensor for the turbulence treatement
Eigen::Tensor< double, 3 > turbulencePPEFluctTensor2(label NUmodes, label NSUPmodes, label NPmodes)
ct2PPEFluct added tensor for approximation of the fluctuating part of the eddy viscosity with the usa...
autoPtr< volScalarField > _nut
Eddy viscosity field.
label interChoice
Interpolation independent variable choice.
Eigen::MatrixXd coeffL2
The matrix of L2 projection coefficients for the eddy viscosity.
volScalarField computeNut_at_time(const word &snap_time, std::optional< PtrList< volVectorField > > modesU=std::nullopt)
Compute non linear Snapshot at a given time.
Eigen::MatrixXd btMatrix
Turbulent viscosity term.
volScalarModes nutModes
List of POD modes for eddy viscosity.
Eigen::Tensor< double, 3 > turbulenceFluctTensor2(label NUmodes, label NSUPmodes)
ct2Fluct added tensor for approximation of the fluctuating part of the eddy viscosity
volScalarField initSmagPhiFunction(const volScalarField template_field_phi)
Initialize Smagorinsky term of a tracer phi with values at time 0.
static volScalarField projDiffusionIBP(const volScalarField &coefDiff, const volVectorField &u, const volVectorField &v)
Compute projected diffusion term with the integration by parts (IBP) equation for a given vector fiel...
Eigen::Tensor< double, 3 > turbulencePPEAveTensor2(label NUmodes, label NSUPmodes, label NPmodes)
ct2PPEAve added tensor for approximation of the averaged part of the eddy viscosity with the usage of...
Eigen::Tensor< double, 3 > ct2FluctTensor
Turbulent fluctuation viscosity tensor for the splitting approach.
double e
RBF functions radius.
Eigen::Tensor< double, 3 > ct1AveTensor
Turbulent average viscosity tensor for the splitting approach.
Eigen::Tensor< double, 3 > ct2PPEFluctTensor
Turbulent fluctuation viscosity tensor for the splitting approach in the PPE equation.
PtrList< volScalarField > nutFields
List of snapshots for the solution for eddy viscosity.
volScalarField initProjSmagFromNutFunction()
Initialize projSmagFromNut with values at time 0.
static volScalarField diffusion(const T &coefDiff, const volScalarField &phi)
Compute diffusion term for a given scalar field phi.
label _pRefCell
Pressure reference cell.
volVectorField computeSmagTerm_at_time(const word &snap_time, std::optional< PtrList< volVectorField > > modesU=std::nullopt)
Compute Smagorinsky Snapshot at a given time.
List< Eigen::MatrixXd > velParCoeff(Eigen::MatrixXd A, Eigen::MatrixXd G)
A method to compute the two matrices needed for the RBF interpolation by combining the parameter samp...
volScalarField initProjSmagFunction()
Initialize projFullStressFunction with values at time 0.
Eigen::MatrixXd bTotalMatrix
Total B Matrix.
List< Eigen::MatrixXd > velDerivativeCoeff(Eigen::MatrixXd A, Eigen::MatrixXd G, Eigen::VectorXd initSnapInd, Eigen::VectorXd timeSnap)
A method to compute the two matrices needed for the RBF interpolation by combining the velocity L2 pr...
volScalarField computeProjSmagFromNut_at_time_fromModes(const word &snap_time, const volVectorField &modeU_proj, const volVectorField &modeU_grad)
Compute projSmagFromNut snapshot at a given time from 2 velocity modes.
label nNutModes
Number of viscoisty modes used for the projection.
Eigen::Tensor< double, 3 > ct2AveTensor
Turbulent average viscosity tensor for the splitting approach.
void computeProjSmagTerm_fromSmag_fromMode(volScalarField &phi, const volVectorField &Smag, const volVectorField &mode)
Compute projFullStressFunction given the Smagorinsky term and the velocity mode.
Eigen::Tensor< double, 3 > turbulencePPEFluctTensor1(label NUmodes, label NSUPmodes, label NPmodes)
ct1PPEFluct added tensor for approximation of the fluctuating part of the eddy viscosity with the usa...
void projectPPE(fileName folder, label NUmodes, label NPmodes, label NSUPmodes, label nNutModes, bool rbfInterp=true)
Project using the Poisson Equation for pressure.
Eigen::VectorXd radii
RBF shape parameters vector.
Eigen::Tensor< double, 3 > turbulencePPETensor2(label NUmodes, label NSUPmodes, label NPmodes, label nNutModes)
ct2PPE added tensor for the turbulence treatement in the PPE method
Eigen::MatrixXd z
Time-parameter combined matrix.
std::vector< SPLINTER::DataTable * > samples
Create a Rbf splines for interpolation.
Eigen::MatrixXd velRBF
Velocity coefficients for RBF interpolation.
Eigen::Tensor< double, 3 > turbulenceTensor1(label NUmodes, label NSUPmodes, label nNutModes)
ct1 added tensor for the turbulence treatement
Eigen::Tensor< double, 3 > ct2PPETensor
Turbulent viscosity tensor in the PPE equation.
volScalarField computeProjSmagTerm_at_time_fromMode(const word &snap_time, const volVectorField &mode)
Compute projFullStressFunction snapshot at a given time projected on the given mode.
Eigen::Tensor< double, 3 > cTotalPPEAveTensor
Turbulent total average viscosity tensor for the splitting approach in the PPE equation.
void computeNonLinearSnapshot_at_time(const word &snap_time, volVectorField &Smag, std::optional< PtrList< volVectorField > > modesU=std::nullopt)
Compute non linear Snapshot at a given time.
void truthSolve()
Perform a TruthSolve.
label NPmodes
Number of pressure modes used for the projection.
Definition steadyNS.H:146
label NUmodes
Number of velocity modes used for the projection.
Definition steadyNS.H:143
label NSUPmodes
Number of supremizer modes used for the projection.
Definition steadyNS.H:149
unsteadyNS()
Construct Null.
Definition unsteadyNS.C:39
Header file of the steadyNS class.
Header file of the unsteadyNS class.