Loading...
Searching...
No Matches
ScalarTransport Class Reference

Implementation of a parametrized full order Burgers and preparation of the the reduced matrices for the online solve. More...

#include <ScalarTransport.H>

Inheritance diagram for ScalarTransport:
reductionProblem UnsteadyProblem

Public Member Functions

 ScalarTransport ()
 Null constructor.
 ScalarTransport (int argc, char *argv[])
 Construct with argc and argv.
void truthSolve (word folder="./ITHACAoutput/Offline/")
 truthsolve
void restart ()
 Function to restart the fields of the Burgers problem.
Public Member Functions inherited from reductionProblem
 reductionProblem ()
 Construct Null.
void setParameters ()
 Set Parameters Problems.
void genRandPar ()
 Generate Random Numbers.
void genRandPar (label tsize)
 Generate Random Numbers given the dimension of the training set.
void genEquiPar ()
 Generate Equidistributed Numbers.
void truthSolve ()
 Perform a TruthSolve.
void assignBC (volVectorField &s, label BC_ind, Vector< double > &value)
 Assign Boundary Condition to a volVectorField.
void assignBC (volScalarField &s, label BC_ind, double &value)
 Assign Boundary Condition to a volScalarField.
void reconstructFromMatrix (PtrList< volVectorField > &rec_field2, PtrList< volVectorField > &modes, label Nmodes, Eigen::MatrixXd coeff_matrix)
 Exact reconstruction using a certain number of modes for vector list of fields and the projection coefficients (volVectorField).
void reconstructFromMatrix (PtrList< volScalarField > &rec_field2, PtrList< volScalarField > &modes, label Nmodes, Eigen::MatrixXd coeff_matrix)
 Exact reconstruction using a certain number of modes for vector list of fields and the projection coefficients (volScalarField).
template<typename T, typename G>
void assignIF (T &s, G &value)
 Assign internal field condition.
template<typename T>
void computeLift (T &Lfield, T &liftfield, T &omfield)
 Homogenize the snapshot matrix, it works with PtrList of volVectorField and volScalarField.
template<typename T>
void computeLiftT (T &Lfield, T &liftfield, T &omfield)
 Virtual function to compute the lifting function.
void liftSolve ()
 Virtual function to compute the lifting function for scalar field.
void liftSolveT ()
void project ()
 General projection operation.
void writeMu (List< scalar > mu_now)
 Write out a list of scalar corresponding to the parameters used in the truthSolve.
std::vector< SPLINTER::RBFSpline > getCoeffManifoldRBF (PtrList< volVectorField > snapshots, PtrList< volVectorField > &modes, word rbfBasis="GAUSSIAN")
 Constructs the parameters-coefficients manifold for vector fields, based on RBF-spline model.
std::vector< SPLINTER::RBFSpline > getCoeffManifoldRBF (PtrList< volScalarField > snapshots, PtrList< volScalarField > &modes, word rbfBasis="GAUSSIAN")
 Constructs the parameters-coefficients manifold for scalar fields, based on RBF-spline model.
std::vector< SPLINTER::BSpline > getCoeffManifoldSPL (PtrList< volVectorField > snapshots, PtrList< volVectorField > &modes, label splDeg=3)
 Constructs the parameters-coefficients manifold for vector fields, based on the B-spline model.
std::vector< SPLINTER::BSpline > getCoeffManifoldSPL (PtrList< volScalarField > snapshots, PtrList< volScalarField > &modes, label splDeg=3)
 Constructs the parameters-coefficients manifold for scalar fields, based on the B-spline model.
Public Member Functions inherited from UnsteadyProblem
void setTimes (Time &timeObject)
bool checkWrite (Time &timeObject)
 Function to check if the solution must be exported.

Public Attributes

ITHACAparameterspara
PtrList< volScalarField > Tfield
 List of pointers used to form the T snapshots matrix.
volScalarModes Tmodes
 List of pointers used to form the Temperature modes.
autoPtr< volScalarField > _T
 Temperature field.
autoPtr< volVectorField > _U
 Velocity field.
autoPtr< volScalarField > _T0
 Initial Temperature field (for restart purposes).
autoPtr< fvMesh > _mesh
 Mesh.
autoPtr< Time > _runTime
 Time.
autoPtr< surfaceScalarField > _phi
 Flux.
autoPtr< surfaceScalarField > _phi0
 Initial Flux (for restart purposes).
autoPtr< IOdictionary > _transportProperties
autoPtr< dimensionedScalar > _nu
PtrList< scalarField > LDUfield
 LDU matrices data.
autoPtr< fv::options > _fvOptions
 fvOptions
autoPtr< simpleControl > _simple
 simpleControl
Public Attributes inherited from reductionProblem
label Pnumber
 Number of parameters.
label Tnumber
 Dimension of the training set (used only when gerating parameters without input).
Eigen::MatrixXd mu
 Row matrix of parameters.
Eigen::MatrixXd mu_range
 Range of the parameter spaces.
Eigen::MatrixXd mu_samples
 Matrix of parameters to be used for PODI, where each row corresponds to a sample point. In this matrix the time dimension is regarded as a parameter for unsteady problems.
double mu_cur
 Current value of the parameter.
bool podex
 Boolean variable, it is 1 if the POD has already been computed, else 0.
bool offline
 Boolean variable, it is 1 if the Offline phase has already been computed, else 0.
IOdictionary * ITHACAdict
 dictionary to store input output infos
autoPtr< argList > _args
 argList
ITHACAparallelparal
 parallel handling
label folderN = 1
 Counter to save intermediate steps in the correct folder, for unsteady and some stationary cases.
label counter = 1
 Counter used for the output of the full order solutions.
Eigen::MatrixXi inletIndex
 Matrix that contains informations about the inlet boundaries.
Eigen::MatrixXi inletPatch
 Matrix that contains informations about the inlet boundaries without specifing the direction Rows = Number of parametrized boundary conditions
Cols = 1
Example:
example.inletIndex.resize(2, 1);
example.inletIndex(0, 0) = 0;
example.inletIndex(1, 0) = 1;
Means that there are two parametrized boundary conditions of which the first row is of patch 0 and the second row of patch 1.
Eigen::MatrixXi inletIndexT
Public Attributes inherited from UnsteadyProblem
scalar startTime
 Start Time (initial time to start storing the snapshots).
scalar finalTime
 Final time (final time of the simulation and consequently of the acquisition of the snapshots).
scalar timeStep
 Time step of the simulation.
scalar writeEvery = timeStep
 Time step of the writing procedure.
scalar nextWrite
 Auxiliary variable to store the next writing instant.

Detailed Description

Implementation of a parametrized full order Burgers and preparation of the the reduced matrices for the online solve.

In this class are implemented the methods for the offline solve of a burgers problem and the for the generation of the reduced matrices for subsequent online solve, this class is a son of the reduction problem class

Definition at line 58 of file ScalarTransport.H.

Constructor & Destructor Documentation

◆ ScalarTransport() [1/2]

ScalarTransport::ScalarTransport ( )

Null constructor.

Class where the tutorial number 2 is implemented.

It is a child of the laplacianProblem class and some of its functions are overridden to be adapted to the specific case.

Definition at line 41 of file ScalarTransport.C.

◆ ScalarTransport() [2/2]

ScalarTransport::ScalarTransport ( int argc,
char * argv[] )

Construct with argc and argv.

Definition at line 43 of file ScalarTransport.C.

◆ ~ScalarTransport()

ScalarTransport::~ScalarTransport ( )
inline

Definition at line 69 of file ScalarTransport.H.

Member Function Documentation

◆ restart()

void ScalarTransport::restart ( )

Function to restart the fields of the Burgers problem.

Definition at line 153 of file ScalarTransport.C.

◆ truthSolve()

void ScalarTransport::truthSolve ( word folder = "./ITHACAoutput/Offline/")

truthsolve

Definition at line 108 of file ScalarTransport.C.

Member Data Documentation

◆ _fvOptions

autoPtr<fv::options> ScalarTransport::_fvOptions

fvOptions

Definition at line 106 of file ScalarTransport.H.

◆ _mesh

autoPtr<fvMesh> ScalarTransport::_mesh
mutable

Mesh.

Definition at line 88 of file ScalarTransport.H.

◆ _nu

autoPtr<dimensionedScalar> ScalarTransport::_nu

Definition at line 101 of file ScalarTransport.H.

◆ _phi

autoPtr<surfaceScalarField> ScalarTransport::_phi

Flux.

Definition at line 94 of file ScalarTransport.H.

◆ _phi0

autoPtr<surfaceScalarField> ScalarTransport::_phi0

Initial Flux (for restart purposes).

Definition at line 97 of file ScalarTransport.H.

◆ _runTime

autoPtr<Time> ScalarTransport::_runTime

Time.

Definition at line 91 of file ScalarTransport.H.

◆ _simple

autoPtr<simpleControl> ScalarTransport::_simple

simpleControl

Definition at line 109 of file ScalarTransport.H.

◆ _T

autoPtr<volScalarField> ScalarTransport::_T

Temperature field.

Definition at line 80 of file ScalarTransport.H.

◆ _T0

autoPtr<volScalarField> ScalarTransport::_T0

Initial Temperature field (for restart purposes).

Definition at line 85 of file ScalarTransport.H.

◆ _transportProperties

autoPtr<IOdictionary> ScalarTransport::_transportProperties

Definition at line 99 of file ScalarTransport.H.

◆ _U

autoPtr<volVectorField> ScalarTransport::_U

Velocity field.

Definition at line 82 of file ScalarTransport.H.

◆ LDUfield

PtrList<scalarField> ScalarTransport::LDUfield

LDU matrices data.

Definition at line 103 of file ScalarTransport.H.

◆ para

ITHACAparameters* ScalarTransport::para

Definition at line 71 of file ScalarTransport.H.

◆ Tfield

PtrList<volScalarField> ScalarTransport::Tfield

List of pointers used to form the T snapshots matrix.

Definition at line 74 of file ScalarTransport.H.

◆ Tmodes

volScalarModes ScalarTransport::Tmodes

List of pointers used to form the Temperature modes.

Definition at line 77 of file ScalarTransport.H.


The documentation for this class was generated from the following files: