46 _args = autoPtr<argList>
48 new argList(argc, argv)
51 if (!
_args->checkRootCase())
53 Foam::FatalError.exit();
56 argList& args =
_args();
57#include "createTime.H"
58#include "createMesh.H"
59 _piso = autoPtr<pisoControl>
77#include "createFields.H"
78#include "createFvOptions.H"
90 surfaceScalarField& phi =
_phi();
91 fvMesh& mesh =
_mesh();
92#include "initContinuityErrs.H"
94 pisoControl& piso =
_piso();
95 volScalarField& p =
_p();
96 volVectorField& U =
_U();
97 IOMRFZoneList& MRF =
_MRF();
99 instantList Times = runTime.times();
102 runTime.setTime(Times[1], 1);
133 while (runTime.run())
135#include "readTimeControls.H"
136#include "CourantNo.H"
137#include "setDeltaT.H"
140 Info <<
"Time = " << runTime.timeName() << nl << endl;
166 while (piso.correct())
173 laminarTransport.correct();
178 Info <<
"ExecutionTime = " << runTime.elapsedCpuTime() <<
" s"
179 <<
" ClockTime = " << runTime.elapsedClockTime() <<
" s"
229 argList& args =
_args();
231 runTime.setTime(0, 1);
232 Foam::fvMesh& mesh =
_mesh();
233 pisoControl& piso =
_piso();
234 Info <<
"ReReading field p\n" << endl;
235 _p = autoPtr<volScalarField>
250 volScalarField& p =
_p();
251 Info <<
"ReReading field U\n" << endl;
252 _U = autoPtr<volVectorField>
267 volVectorField& U =
_U();
268 Info <<
"ReReading/calculating face flux field phi\n" << endl;
269 _phi = autoPtr<surfaceScalarField>
271 new surfaceScalarField
278 IOobject::READ_IF_PRESENT,
281 linearInterpolate(U) & mesh.Sf()
284 surfaceScalarField& phi =
_phi();
290 new singlePhaseTransportModel( U, phi )
293 turbulence = autoPtr<incompressible::turbulenceModel>
295 incompressible::turbulenceModel::New(U, phi, laminarTransport)
297 _MRF = autoPtr<IOMRFZoneList>
299 new IOMRFZoneList(mesh)
301 _fvOptions = autoPtr<fv::options>(
new fv::options(mesh));
Header file of the unsteadyNS class.
static ITHACAparameters * getInstance()
Gets an instance of ITHACAparameters, to be used if the instance is already existing.
autoPtr< pisoControl > _piso
pimpleControl
void restart()
set U and P back to the values into the 0 folder
autoPtr< incompressible::turbulenceModel > turbulence
Turbulence model.
MyIcoSolver()
Construct Null.
bool checkWrite(Time &timeObject)
Function to check if the solution must be exported.
scalar startTime
Start Time (initial time to start storing the snapshots).
scalar writeEvery
Time step of the writing procedure.
scalar timeStep
Time step of the simulation.
scalar nextWrite
Auxiliary variable to store the next writing instant.
scalar finalTime
Final time (final time of the simulation and consequently of the acquisition of the snapshots).
label counter
Counter used for the output of the full order solutions.
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
bool podex
Boolean variable, it is 1 if the POD has already been computed, else 0.
void truthSolve()
Perform a TruthSolve.
autoPtr< surfaceScalarField > _phi
Flux.
PtrList< volScalarField > Pfield
List of pointers used to form the pressure snapshots matrix.
autoPtr< fv::options > _fvOptions
fvOptions
autoPtr< Time > _runTime
Time.
PtrList< volVectorField > Ufield
List of pointers used to form the velocity snapshots matrix.
autoPtr< fvMesh > _mesh
Mesh.
autoPtr< singlePhaseTransportModel > _laminarTransport
Laminar transport (used by turbulence model).
scalar pRefValue
Reference pressure value.
label pRefCell
Reference pressure cell.
autoPtr< IOMRFZoneList > _MRF
MRF variable.
autoPtr< volVectorField > _U
Velocity field.
autoPtr< volScalarField > _p
Pressure field.
void exportSolution(GeometricField< Type, PatchField, GeoMesh > &s, fileName subfolder, fileName folder, word fieldName)
Export a field to file in a certain folder and subfolder.
bool check_pod()
Check if the POD data folder "./ITHACAoutput/POD" exists.
bool check_off()
Check if the offline data folder "./ITHACAoutput/Offline" exists.