All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  + fvModels.source(alpha, rho, U)
29  )
30  );
31 
32  UEqns[phase.index()].relax();
33  fvConstraints.constrain(UEqns[phase.index()]);
34  U.correctBoundaryConditions();
36  }
37 }
Info<< "Constructing momentum equations"<< endl;PtrList< fvVectorMatrix > UEqns(phases.size())
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:58
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::fvConstraints & fvConstraints
phaseSystem & fluid
Definition: createFields.H:11
phaseSystem::momentumTransferTable & momentumTransfer(momentumTransferPtr())
forAll(fluid.movingPhases(), movingPhasei)
Definition: UEqns.H:12
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
Foam::fvModels & fvModels
U
Definition: pEqn.H:72
fvMatrix< vector > fvVectorMatrix
Definition: fvMatricesFwd.H:45
phaseSystem::phaseModelList & phases
Definition: createFields.H:12
messageStream Info
autoPtr< phaseSystem::momentumTransferTable > momentumTransferPtr(fluid.momentumTransferf())