MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
conversionEqns.H
Go to the documentation of this file.
1 
13 alpha1phir = fvc::interpolate(alpha1)*phir;
15 
16 rhoFoamAlpha2 = rho_foam*alpha2;
17 frhoFoamAlpha2 = fvc::interpolate(rhoFoamAlpha2)*phi;
18 
19 volScalarField expImpSource
20 (
21  fvc::div(alpha1phir) - fvc::div(phi)
22 );
23 
24 if (KineticsModel == "generic")
25 {
26 
27  fvScalarMatrix XWEqn
28  (
29  fvm::ddt(XW)
30  + fvm::div(phi,XW)
31  + fvm::SuSp(XWSource,XW)
32  + fvm::SuSp(expImpSource,XW)
33  - fvm::div(alpha1phir,XW)
34  == XWSource
35  );
36  XWEqn.relax();
37  XWEqn.solve();
38 
39  fvScalarMatrix XOHEqn
40  (
41  fvm::ddt(XOH)
42  + fvm::div(phi,XOH)
43  + fvm::SuSp(expImpSource,XOH)
44  - fvm::div(alpha1phir,XOH)
45  ==
46  - fvm::SuSp(Coeff_1stOrd,XOH)
47  + ScNonXOH + SuXOH + fvm::Sp(SpXOH,XOH)
48  );
49  XOHEqn.relax();
50  XOHEqn.solve();
51 }
52 
53 if (KineticsModel == "RF-1")
54 {
55 
56  fvScalarMatrix XWEqn
57  (
58  fvm::ddt(XW)
59  + fvm::div(phi,XW)
60  + fvm::SuSp(expImpSource,XW)
61  - fvm::div(alpha1phir,XW)
62  == XWSource
63  );
64  XWEqn.relax();
65  XWEqn.solve();
66 
67  fvScalarMatrix XOHEqn
68  (
69  fvm::ddt(XOH)
70  + fvm::div(phi,XOH)
71  + fvm::SuSp(expImpSource,XOH)
72  - fvm::div(alpha1phir,XOH)
73  == XOHSource
74  );
75  XOHEqn.relax();
76  XOHEqn.solve();
77 
78  fvScalarMatrix Catalyst_1Eqn
79  (
80  fvm::ddt(Catalyst_1)
81  + fvm::div(phi,Catalyst_1)
82  + fvm::SuSp(expImpSource,Catalyst_1)
83  - fvm::div(alpha1phir,Catalyst_1)
84  == source_Catalyst_1
85  );
86  Catalyst_1Eqn.relax();
87  Catalyst_1Eqn.solve();
88 
89  fvScalarMatrix CE_A0Eqn
90  (
91  fvm::ddt(CE_A0)
92  + fvm::div(phi,CE_A0)
93  + fvm::SuSp(expImpSource,CE_A0)
94  - fvm::div(alpha1phir,CE_A0)
95  == source_CE_A0
96  );
97  CE_A0Eqn.relax();
98  CE_A0Eqn.solve();
99 
100  fvScalarMatrix CE_A1Eqn
101  (
102  fvm::ddt(CE_A1)
103  + fvm::div(phi,CE_A1)
104  + fvm::SuSp(expImpSource,CE_A1)
105  - fvm::div(alpha1phir,CE_A1)
106  == source_CE_A1
107  );
108  CE_A1Eqn.relax();
109  CE_A1Eqn.solve();
110 
111  fvScalarMatrix CE_BEqn
112  (
113  fvm::ddt(CE_B)
114  + fvm::div(phi,CE_B)
115  + fvm::SuSp(expImpSource,CE_B)
116  - fvm::div(alpha1phir,CE_B)
117  == source_CE_B
118  );
119  CE_BEqn.relax();
120  CE_BEqn.solve();
121 
122  fvScalarMatrix CE_B2Eqn
123  (
124  fvm::ddt(CE_B2)
125  + fvm::div(phi,CE_B2)
126  + fvm::SuSp(expImpSource,CE_B2)
127  - fvm::div(alpha1phir,CE_B2)
128  == source_CE_B2
129  );
130  CE_B2Eqn.relax();
131  CE_B2Eqn.solve();
132 
133  fvScalarMatrix CE_I0Eqn
134  (
135  fvm::ddt(CE_I0)
136  + fvm::div(phi,CE_I0)
137  + fvm::SuSp(expImpSource,CE_I0)
138  - fvm::div(alpha1phir,CE_I0)
139  == source_CE_I0
140  );
141  CE_I0Eqn.relax();
142  CE_I0Eqn.solve();
143 
144  fvScalarMatrix CE_I1Eqn
145  (
146  fvm::ddt(CE_I1)
147  + fvm::div(phi,CE_I1)
148  + fvm::SuSp(expImpSource,CE_I1)
149  - fvm::div(alpha1phir,CE_I1)
150  == source_CE_I1
151  );
152  CE_I1Eqn.relax();
153  CE_I1Eqn.solve();
154 
155  fvScalarMatrix CE_I2Eqn
156  (
157  fvm::ddt(CE_I2)
158  + fvm::div(phi,CE_I2)
159  + fvm::SuSp(expImpSource,CE_I2)
160  - fvm::div(alpha1phir,CE_I2)
161  == source_CE_I2
162  );
163  CE_I2Eqn.relax();
164  CE_I2Eqn.solve();
165 
166  fvScalarMatrix CE_PBAEqn
167  (
168  fvm::ddt(CE_PBA)
169  + fvm::div(phi,CE_PBA)
170  + fvm::SuSp(expImpSource,CE_PBA)
171  - fvm::div(alpha1phir,CE_PBA)
172  == source_CE_PBA
173  );
174  CE_PBAEqn.relax();
175  CE_PBAEqn.solve();
176 
177  fvScalarMatrix CE_BreacEqn
178  (
179  fvm::ddt(CE_Breac)
180  + fvm::div(phi,CE_Breac)
181  + fvm::SuSp(expImpSource,CE_Breac)
182  - fvm::div(alpha1phir,CE_Breac)
183  == source_CE_Breac
184  );
185  CE_BreacEqn.relax();
186  CE_BreacEqn.solve();
187 
188  fvScalarMatrix CE_Areac0Eqn
189  (
190  fvm::ddt(CE_Areac0)
191  + fvm::div(phi,CE_Areac0)
192  + fvm::SuSp(expImpSource,CE_Areac0)
193  - fvm::div(alpha1phir,CE_Areac0)
194  == source_CE_Areac0
195  );
196  CE_Areac0Eqn.relax();
197  CE_Areac0Eqn.solve();
198 
199  fvScalarMatrix CE_Areac1Eqn
200  (
201  fvm::ddt(CE_Areac1)
202  + fvm::div(phi,CE_Areac1)
203  + fvm::SuSp(expImpSource,CE_Areac1)
204  - fvm::div(alpha1phir,CE_Areac1)
205  == source_CE_Areac1
206  );
207  CE_Areac1Eqn.relax();
208  CE_Areac1Eqn.solve();
209 
210  fvScalarMatrix CE_Ireac0Eqn
211  (
212  fvm::ddt(CE_Ireac0)
213  + fvm::div(phi,CE_Ireac0)
214  + fvm::SuSp(expImpSource,CE_Ireac0)
215  - fvm::div(alpha1phir,CE_Ireac0)
216  == source_CE_Ireac0
217  );
218  CE_Ireac0Eqn.relax();
219  CE_Ireac0Eqn.solve();
220 
221  fvScalarMatrix CE_Ireac1Eqn
222  (
223  fvm::ddt(CE_Ireac1)
224  + fvm::div(phi,CE_Ireac1)
225  + fvm::SuSp(expImpSource,CE_Ireac1)
226  - fvm::div(alpha1phir,CE_Ireac1)
227  == source_CE_Ireac1
228  );
229  CE_Ireac1Eqn.relax();
230  CE_Ireac1Eqn.solve();
231 
232  fvScalarMatrix CE_Ireac2Eqn
233  (
234  fvm::ddt(CE_Ireac2)
235  + fvm::div(phi,CE_Ireac2)
236  + fvm::SuSp(expImpSource,CE_Ireac2)
237  - fvm::div(alpha1phir,CE_Ireac2)
238  == source_CE_Ireac2
239  );
240  CE_Ireac2Eqn.relax();
241  CE_Ireac2Eqn.solve();
242 
243  fvScalarMatrix BulkEqn
244  (
245  fvm::ddt(Bulk)
246  + fvm::div(phi,Bulk)
247  + fvm::SuSp(expImpSource,Bulk)
248  - fvm::div(alpha1phir,Bulk)
249  == source_Bulk
250  );
251  BulkEqn.relax();
252  BulkEqn.solve();
253 
254  fvScalarMatrix R_1Eqn
255  (
256  fvm::ddt(R_1)
257  + fvm::div(phi,R_1)
258  + fvm::SuSp(expImpSource,R_1)
259  - fvm::div(alpha1phir,R_1)
260  == source_R_1
261  );
262  R_1Eqn.relax();
263  R_1Eqn.solve();
264 
265  fvScalarMatrix R_1_temp_RF1Eqn
266  (
267  fvm::ddt(R_1_temp_RF1)
268  + fvm::div(phi,R_1_temp_RF1)
269  + fvm::SuSp(expImpSource,R_1_temp_RF1)
270  - fvm::div(alpha1phir,R_1_temp_RF1)
271  == source_R_1_temp_RF1
272  );
273  R_1_temp_RF1Eqn.relax();
274  R_1_temp_RF1Eqn.solve();
275 }
276 ///@endcond