MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
BAEqns.H
Go to the documentation of this file.
1 
7 if (PBESwitch)
8 {
9  if (blowingAgent == "no")
10  {
11  fvScalarMatrix wCO2_lEqn
12  (
13  fvm::ddt(wCO2_l)
14  + fvm::div(phi,wCO2_l)
15  + fvm::SuSp(expImpSource,wCO2_l)
16  - fvm::div(alpha1phir,wCO2_l)
17  == wCO2_lSource
18  );
19  wCO2_lEqn.relax();
20  wCO2_lEqn.solve();
21 
22  fvScalarMatrix wCO2_gEqn
23  (
24  fvm::ddt(wCO2_g)
25  + fvm::div(phi,wCO2_g)
26  + fvm::SuSp(expImpSource,wCO2_g)
27  - fvm::div(alpha1phir,wCO2_g)
28  == wCO2_gSource
29  );
30  wCO2_gEqn.relax();
31  wCO2_gEqn.solve();
32  }
33  else
34  {
35  fvScalarMatrix wBA_lEqn
36  (
37  fvm::ddt(wBA_l)
38  + fvm::div(phi,wBA_l)
39  + fvm::SuSp(expImpSource,wBA_l)
40  - fvm::div(alpha1phir,wBA_l)
41  == wBA_lSource
42  );
43  wBA_lEqn.relax();
44  wBA_lEqn.solve();
45 
46  fvScalarMatrix wBA_gEqn
47  (
48  fvm::ddt(wBA_g)
49  + fvm::div(phi,wBA_g)
50  + fvm::SuSp(expImpSource,wBA_g)
51  - fvm::div(alpha1phir,wBA_g)
52  == wBA_gSource
53  );
54  wBA_gEqn.relax();
55  wBA_gEqn.solve();
56 
57  fvScalarMatrix wCO2_lEqn
58  (
59  fvm::ddt(wCO2_l)
60  + fvm::div(phi,wCO2_l)
61  + fvm::SuSp(expImpSource,wCO2_l)
62  - fvm::div(alpha1phir,wCO2_l)
63  == wCO2_lSource
64  );
65  wCO2_lEqn.relax();
66  wCO2_lEqn.solve();
67 
68  fvScalarMatrix wCO2_gEqn
69  (
70  fvm::ddt(wCO2_g)
71  + fvm::div(phi,wCO2_g)
72  + fvm::SuSp(expImpSource,wCO2_g)
73  - fvm::div(alpha1phir,wCO2_g)
74  == wCO2_gSource
75  );
76  wCO2_gEqn.relax();
77  wCO2_gEqn.solve();
78  }
79 }
80 else
81 {
82  if (blowingAgent == "no")
83  {
84  fvScalarMatrix wCO2_gEqn
85  (
86  fvm::ddt(wCO2_g)
87  + fvm::div(phi,wCO2_g)
88  + fvm::SuSp(expImpSource,wCO2_g)
89  - fvm::div(alpha1phir,wCO2_g)
90  == wCO2_gSource
91  );
92  wCO2_gEqn.relax();
93  wCO2_gEqn.solve();
94  }
95  else
96  {
97  fvScalarMatrix wBA_lEqn
98  (
99  fvm::ddt(wBA_l)
100  + fvm::div(phi,wBA_l)
101  + fvm::SuSp(expImpSource,wBA_l)
102  - fvm::div(alpha1phir,wBA_l)
103  == wBA_lSource
104  );
105  wBA_lEqn.relax();
106  wBA_lEqn.solve();
107 
108  fvScalarMatrix wBA_gEqn
109  (
110  fvm::ddt(wBA_g)
111  + fvm::div(phi,wBA_g)
112  + fvm::SuSp(expImpSource,wBA_g)
113  - fvm::div(alpha1phir,wBA_g)
114  == wBA_gSource
115  );
116  wBA_gEqn.relax();
117  wBA_gEqn.solve();
118 
119  fvScalarMatrix wCO2_gEqn
120  (
121  fvm::ddt(wCO2_g)
122  + fvm::div(phi,wCO2_g)
123  + fvm::SuSp(expImpSource,wCO2_g)
124  - fvm::div(alpha1phir,wCO2_g)
125  == wCO2_gSource
126  );
127  wCO2_gEqn.relax();
128  wCO2_gEqn.solve();
129  }
130 }