forked from manjilray/electro-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEEqns.H
More file actions
46 lines (39 loc) · 1.03 KB
/
EEqns.H
File metadata and controls
46 lines (39 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
{
fluid.correctEnergyTransport();
autoPtr<phaseSystem::heatTransferTable>
heatTransferPtr(fluid.heatTransfer());
phaseSystem::heatTransferTable&
heatTransfer = heatTransferPtr();
if (!phase1.isothermal())
{
fvScalarMatrix E1Eqn
(
phase1.heEqn()
==
*heatTransfer[phase1.name()]
+ alpha1*rho1*(U1&g)
+ fvOptions(alpha1, rho1, thermo1.he())
);
E1Eqn.relax();
fvOptions.constrain(E1Eqn);
E1Eqn.solve();
fvOptions.correct(thermo1.he());
}
if (!phase2.isothermal())
{
fvScalarMatrix E2Eqn
(
phase2.heEqn()
==
*heatTransfer[phase2.name()]
+ alpha2*rho2*(U2&g)
+ fvOptions(alpha2, rho2, phase2.thermoRef().he())
);
E2Eqn.relax();
fvOptions.constrain(E2Eqn);
E2Eqn.solve();
fvOptions.correct(thermo2.he());
}
fluid.correctThermo();
}