File: TEqns.H

package info (click to toggle)
openfoam 1812%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 220,284 kB
  • sloc: cpp: 1,038,902; sh: 14,536; ansic: 8,240; lex: 657; xml: 387; python: 300; awk: 212; makefile: 94; sed: 88; csh: 3
file content (36 lines) | stat: -rw-r--r-- 829 bytes parent folder | download | duplicates (5)
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
{
    volScalarField kByCp1("kByCp1", alpha1*(k1/Cp1/rho1 + sqr(Ct)*nut2/Prt));
    volScalarField kByCp2("kByCp2", alpha2*(k2/Cp2/rho2 + nut2/Prt));

    fvScalarMatrix T1Eqn
    (
        fvm::ddt(alpha1, T1)
      + fvm::div(alphaPhi1, T1)
      - fvm::laplacian(kByCp1, T1)
     ==
        heatTransferCoeff*T2/Cp1/rho1
      - fvm::Sp(heatTransferCoeff/Cp1/rho1, T1)
      + alpha1*Dp1Dt/Cp1/rho1
    );

    fvScalarMatrix T2Eqn
    (
        fvm::ddt(alpha2, T2)
      + fvm::div(alphaPhi2, T2)
      - fvm::laplacian(kByCp2, T2)
     ==
        heatTransferCoeff*T1/Cp2/rho2
      - fvm::Sp(heatTransferCoeff/Cp2/rho2, T2)
      + alpha2*Dp2Dt/Cp2/rho2
    );

    T1Eqn.relax();
    T1Eqn.solve();

    T2Eqn.relax();
    T2Eqn.solve();

    // Update compressibilities
    psi1 = 1.0/(R1*T1);
    psi2 = 1.0/(R2*T2);
}