MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
MomEqns.H
Go to the documentation of this file.
1 
12 if
14 (
15  PBESwitch
16  && PBEMethod == "QMOM"
17  && nNodes == 2
18 )
19 {
20  fvScalarMatrix mZeroEqn
21  (
22  fvm::ddt(mZero)
23  + fvm::div(phi,mZero)
24  + fvm::SuSp(expImpSource,mZero)
25  - fvm::div(alpha1phir,mZero)
26  == mZeroSource
27  );
28  mZeroEqn.relax();
29 
30  fvScalarMatrix mOneEqn
31  (
32  fvm::ddt(mOne)
33  + fvm::div(phi,mOne)
34  + fvm::SuSp(expImpSource,mOne)
35  - fvm::div(alpha1phir,mOne)
36  == mOneSource
37  );
38  mOneEqn.relax();
39 
40  fvScalarMatrix mTwoEqn
41  (
42  fvm::ddt(mTwo)
43  + fvm::div(phi,mTwo)
44  + fvm::SuSp(expImpSource,mTwo)
45  - fvm::div(alpha1phir,mTwo)
46  == mTwoSource
47  );
48  mTwoEqn.relax();
49 
50  fvScalarMatrix mThreeEqn
51  (
52  fvm::ddt(mThree)
53  + fvm::div(phi,mThree)
54  + fvm::SuSp(expImpSource,mThree)
55  - fvm::div(alpha1phir,mThree)
56  == mThreeSource
57  );
58  mThreeEqn.relax();
59 
60  Info<< "\nSolving Moments Equations. " << endl;
61  mZeroEqn.solve();
62  mOneEqn.solve();
63  mTwoEqn.solve();
64  mThreeEqn.solve();
65 }
66 
67 if
68 (
69  PBESwitch
70  && PBEMethod == "QMOM"
71  && nNodes == 3
72 )
73 {
74  fvScalarMatrix mZeroEqn
75  (
76  fvm::ddt(mZero)
77  + fvm::div(phi,mZero)
78  + fvm::SuSp(expImpSource,mZero)
79  - fvm::div(alpha1phir,mZero)
80  == mZeroSource
81  );
82  mZeroEqn.relax();
83 
84  fvScalarMatrix mOneEqn
85  (
86  fvm::ddt(mOne)
87  + fvm::div(phi,mOne)
88  + fvm::SuSp(expImpSource,mOne)
89  - fvm::div(alpha1phir,mOne)
90  == mOneSource
91  );
92  mOneEqn.relax();
93 
94  fvScalarMatrix mTwoEqn
95  (
96  fvm::ddt(mTwo)
97  + fvm::div(phi,mTwo)
98  + fvm::SuSp(expImpSource,mTwo)
99  - fvm::div(alpha1phir,mTwo)
100  == mTwoSource
101  );
102  mTwoEqn.relax();
103 
104  fvScalarMatrix mThreeEqn
105  (
106  fvm::ddt(mThree)
107  + fvm::div(phi,mThree)
108  + fvm::SuSp(expImpSource,mThree)
109  - fvm::div(alpha1phir,mThree)
110  == mThreeSource
111  );
112  mThreeEqn.relax();
113 
114  fvScalarMatrix mFourEqn
115  (
116  fvm::ddt(mFour)
117  + fvm::div(phi,mFour)
118  + fvm::SuSp(expImpSource,mFour)
119  - fvm::div(alpha1phir,mFour)
120  == mFourSource
121  );
122  mFourEqn.relax();
123 
124  fvScalarMatrix mFiveEqn
125  (
126  fvm::ddt(mFive)
127  + fvm::div(phi,mFive)
128  + fvm::SuSp(expImpSource,mFive)
129  - fvm::div(alpha1phir,mFive)
130  == mFiveSource
131  );
132  mFiveEqn.relax();
133 
134  Info<< "\nSolving Moments Equations. " << endl;
135  mZeroEqn.solve();
136  mOneEqn.solve();
137  mTwoEqn.solve();
138  mThreeEqn.solve();
139  mFourEqn.solve();
140  mFiveEqn.solve();
141 }
142 ///@endcond