UEqns.H
Go to the documentation of this file.
1 Info<< "Constructing face momentum equations" << endl;
2 
3 PtrList<fvVectorMatrix> UEqns(phases.size());
4 
5 {
6  fluid.momentumTransfer(); // !!! Update coefficients shouldn't be necessary
7  // This should be done on demand
8 
9  autoPtr<phaseSystem::momentumTransferTable>
10  momentumTransferPtr(fluid.momentumTransferf());
11 
12  phaseSystem::momentumTransferTable&
14 
15  forAll(fluid.movingPhases(), movingPhasei)
16  {
17  phaseModel& phase = fluid.movingPhases()[movingPhasei];
18 
19  const volScalarField& alpha = phase;
20  const tmp<volScalarField> trho = phase.rho();
21  volVectorField& U = phase.URef();
22 
23  const auto& rho = trho();
24 
25  UEqns.set
26  (
27  phase.index(),
28  new fvVectorMatrix
29  (
30  phase.UfEqn()
31  ==
32  *momentumTransfer[phase.name()]
33  + fvOptions(alpha, rho, U)
34  )
35  );
36 
37  UEqns[phase.index()].relax();
38  fvOptions.constrain(UEqns[phase.index()]);
39  U.correctBoundaryConditions();
40  fvOptions.correct(U);
41  }
42 }
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:531
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: [].