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 volScalarField& rho = phase.rho();
18  volVectorField& U = phase.URef();
19 
20  UEqns.set
21  (
22  phase.index(),
23  new fvVectorMatrix
24  (
25  phase.UEqn()
26  ==
27  *momentumTransfer[phase.name()]
28  + fvOptions(alpha, rho, U)
29  )
30  );
31 
32  UEqns[phase.index()].relax();
33  fvOptions.constrain(UEqns[phase.index()]);
34  fvOptions.correct(U);
35  }
36 }
forAll
forAll(fluid.movingPhases(), movingPhasei)
Definition: UEqns.H:12
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
UEqns
PtrList< fvVectorMatrix > UEqns(fluid.phases().size())
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
fluid
twoPhaseSystem & fluid
Definition: setRegionFluidFields.H:3
rho
rho
Definition: readInitialConditions.H:88
Foam::fvVectorMatrix
fvMatrix< vector > fvVectorMatrix
Definition: fvMatricesFwd.H:47
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:23
Foam::Info
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:62
U
U
Definition: pEqn.H:72
momentumTransfer
phaseSystem::momentumTransferTable & momentumTransfer(momentumTransferPtr())
momentumTransferPtr
autoPtr< phaseSystem::momentumTransferTable > momentumTransferPtr(fluid.momentumTransferf())
phases
multiphaseSystem::phaseModelList & phases
Definition: createFields.H:12