UEqns.H
Go to the documentation of this file.
1 Info<< "Constructing momentum equations" << endl;
2 
3 PtrList<fvVectorMatrix> UEqns(phases.size());
4 
5 {
6  autoPtr<phaseSystem::momentumTransferTable>
7  momentumTransferPtr(fluid.momentumTransfer());
8 
9  phaseSystem::momentumTransferTable&
11 
12  forAll(fluid.movingPhases(), movingPhasei)
13  {
14  phaseModel& phase = fluid.movingPhases()[movingPhasei];
15 
16  const volScalarField& alpha = phase;
17  const tmp<volScalarField> trho = phase.rho();
18  volVectorField& U = phase.URef();
19 
20  const auto& rho = trho();
21 
22  UEqns.set
23  (
24  phase.index(),
25  new fvVectorMatrix
26  (
27  phase.UEqn()
28  ==
29  *momentumTransfer[phase.name()]
30  + fvOptions(alpha, rho, U)
31  )
32  );
33 
34  UEqns[phase.index()].relax();
35  fvOptions.constrain(UEqns[phase.index()]);
36  fvOptions.correct(U);
37  }
38 }
twoPhaseSystem & fluid
multiphaseSystem::phaseModelList & phases
Definition: createFields.H:12
phaseSystem::momentumTransferTable & momentumTransfer(momentumTransferPtr())
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:529
tmp< volScalarField > trho
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:76
fv::options & fvOptions
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:72
autoPtr< phaseSystem::momentumTransferTable > momentumTransferPtr(fluid.momentumTransferf())
forAll(fluid.movingPhases(), movingPhasei)
Definition: UEqns.H:12
U
Definition: pEqn.H:72
PtrList< fvVectorMatrix > UEqns(fluid.phases().size())
fvMatrix< vector > fvVectorMatrix
Definition: fvMatricesFwd.H:40
messageStream Info
Information stream (stdout output on master, null elsewhere)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].