FreeFOAM The Cross-Platform CFD Toolkit
readThermalProperties.H
Go to the documentation of this file.
1  Info<< "Reading thermal properties\n" << endl;
2 
3  IOdictionary thermalProperties
4  (
5  IOobject
6  (
7  "thermalProperties",
8  runTime.constant(),
9  mesh,
10  IOobject::MUST_READ,
11  IOobject::NO_WRITE
12  )
13  );
14 
15  Switch thermalStress(thermalProperties.lookup("thermalStress"));
16 
17  dimensionedScalar threeKalpha
18  (
19  "threeKalpha",
20  dimensionSet(0, 2, -2 , -1, 0),
21  0
22  );
23 
25  (
26  "DT",
27  dimensionSet(0, 2, -1 , 0, 0),
28  0
29  );
30 
31  if (thermalStress)
32  {
33  dimensionedScalar C(thermalProperties.lookup("C"));
34  dimensionedScalar rhoK(thermalProperties.lookup("k"));
35  dimensionedScalar alpha(thermalProperties.lookup("alpha"));
36 
37  Info<< "Normalising k : k/rho\n" << endl;
38  dimensionedScalar k = rhoK/rho;
39 
40  Info<< "Calculating thermal coefficients\n" << endl;
41 
42  threeKalpha = threeK*alpha;
43  DT.value() = (k/C).value();
44 
45  Info<< "threeKalpha = " << threeKalpha.value() << " Pa/rho\n";
46  }
47 
48 // ************************ vim: set sw=4 sts=4 et: ************************ //