solveFluid.H
Go to the documentation of this file.
1 if (!pimple.flow())
2 {
3  if (pimple.models())
4  {
6  }
7 
8  if (pimple.thermophysics())
9  {
10  tmp<fv::convectionScheme<scalar>> mvConvection(nullptr);
11 
12  if (Ecorr == 0)
13  {
14  #include "YEqn.H"
15  }
16  #include "EEqn.H"
17  }
18 }
19 else
20 {
21  if (Ecorr == 0)
22  {
23  if (!mesh.schemes().steady() && pimples.firstPimpleIter())
24  {
25  #include "rhoEqn.H"
26  }
27 
28  if (pimple.models())
29  {
30  fvModels.correct();
31  }
32 
33  #include "UEqn.H"
34  }
35 
36  if (pimple.thermophysics())
37  {
38  tmp<fv::convectionScheme<scalar>> mvConvection(nullptr);
39 
40  if (Ecorr == 0)
41  {
42  #include "YEqn.H"
43  }
44  #include "EEqn.H"
45  }
46 
47  if (Ecorr == nEcorr - 1)
48  {
49  tmp<fvVectorMatrix>& tUEqn = UEqns[i];
50  fvVectorMatrix& UEqn = tUEqn.ref();
51 
52  // --- PISO loop
53  while (pimple.correct())
54  {
55  #include "../../buoyantFoam/pEqn.H"
56  }
57 
58  if (pimples.pimpleTurbCorr(i))
59  {
60  turbulence.correct();
61  thermophysicalTransport.correct();
62  }
63 
64  if (!mesh.schemes().steady() && pimples.finalPimpleIter())
65  {
66  rho = thermo.rho();
67  }
68  }
69 }
fluidReactionThermo & thermo
Definition: createFields.H:28
pimpleNoLoopControl & pimple
UEqns[i]
Definition: UEqn.H:5
virtual void correct()
Correct the fvModels.
Definition: fvModels.C:353
fvMesh & mesh
Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);volScalarField rho(IOobject("rho", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), thermo.rho());volVectorField rhoU(IOobject("rhoU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *U);volScalarField rhoE(IOobject("rhoE", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE), rho *(e+0.5 *magSqr(U)));surfaceScalarField pos(IOobject("pos", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, 1.0));surfaceScalarField neg(IOobject("neg", runTime.timeName(), mesh), mesh, dimensionedScalar(dimless, -1.0));surfaceScalarField phi("phi", fvc::flux(rhoU));Info<< "Creating turbulence model\"<< endl;autoPtr< compressible::momentumTransportModel > turbulence(compressible::momentumTransportModel::New(rho, U, phi, thermo))
Definition: createFields.H:94
fluidReactionThermophysicalTransportModel & thermophysicalTransport
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevTau(U)==fvModels.source(rho, U))
Foam::fvModels & fvModels
tmp< fv::convectionScheme< scalar > > mvConvection(fv::convectionScheme< scalar >::New(mesh, fields, phi, mesh.schemes().div("div(phi,Yi_h)")))
fvMatrix< vector > fvVectorMatrix
Definition: fvMatricesFwd.H:45
fvVectorMatrix & UEqn
Definition: UEqn.H:13