UEqns.H
Go to the documentation of this file.
1Info<< "Constructing face momentum equations" << endl;
2
3PtrList<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 volScalarField& rho = phase.rho();
21 volVectorField& U = phase.URef();
22
23 UEqns.set
24 (
25 phase.index(),
26 new fvVectorMatrix
27 (
28 phase.UfEqn()
29 ==
30 *momentumTransfer[phase.name()]
31 + fvOptions(alpha, rho, U)
32 )
33 );
34
35 UEqns[phase.index()].relax();
36 fvOptions.constrain(UEqns[phase.index()]);
37 U.correctBoundaryConditions();
38 fvOptions.correct(U);
39 }
40}
fv::options & fvOptions
twoPhaseSystem & fluid
U
Definition: pEqn.H:72
PtrList< fvVectorMatrix > UEqns(fluid.phases().size())
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
phaseSystem::momentumTransferTable & momentumTransfer(momentumTransferPtr())
autoPtr< phaseSystem::momentumTransferTable > momentumTransferPtr(fluid.momentumTransferf())
volScalarField & alpha
multiphaseSystem::phaseModelList & phases
Definition: createFields.H:12
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:333