Loading...
Searching...
No Matches
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 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}
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:519
phaseSystem::momentumTransferTable & momentumTransfer(momentumTransferPtr())
autoPtr< phaseSystem::momentumTransferTable > momentumTransferPtr(fluid.momentumTransferf())
volScalarField & alpha
tmp< volScalarField > trho
multiphaseSystem::phaseModelList & phases
#define forAll(list, i)
Loop across all elements in list.
Definition stdFoam.H:299