HydrothermalSinglePhaseDarcyFoam.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
6 \\/ M anipulation |
7-------------------------------------------------------------------------------*/
8
24#include "fvCFD.H"
25#include "pimpleControl.H"
26#include "simpleMatrix.H" //for investigating coefficients matrix
27// new defined thermophysical model: hydroThermo, htHydroThermo, see libraries
28#include "hydroThermo.H"
29//---------------------------------------------
30// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31
32
33int main(int argc, char *argv[])
34{
35 #include "postProcess.H"
36
37 #include "setRootCase.H"
38 #include "createTime.H"
39 #include "createMesh.H"
40 #include "createControl.H"
41 #include "createFields.H"
42 #include "createTimeControls.H"
43 #include "initContinuityErrs.H"
44 // initialize pressure: correct initial hydrostatic pressure is very important!!!
45 if(runTime.timeName()=="0")
46 {
47 Info<<"Initialize hydrostatic pressure"<<endl;
48 #include "initpEqn.H"
49 #include "updateProps.H"
50 #include "initpEqn.H"
51 // #include "updateProps.H"
52 Info<<"Initialize hydrostatic pressure end"<<endl;
53 }
54 // Get some constant values
55 const scalar endTime( readScalar(runTime.controlDict().lookup("endTime")));
56 const scalar sec_year = 86400*365;
57
58 while (runTime.run())
59 {
60 #include "readTimeControls.H"
61 #include "compressibleCourantNo.H"
62 #include "setDeltaT.H"
63
64 runTime++;
65
66 #include "EEqn.H"
67 #include "pEqn.H"
68 #include "updateProps.H"
69
70 // ---------------------------------------
71
72 runTime.write();
73
75 }
76
77 Info<< "End\n" << endl;
78
79 return 0;
80}
81
82
83// ************************************************************************* //
int main(int argc, char *argv[])
Calculate initial hydrostatic pressure.