createAutoCorrelationFunctions.H
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 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 Info << nl << "Creating autocorrelation functions." << endl;
27 
28 IOdictionary mdTransportProperitesDict
29 (
30  IOobject
31  (
32  "mdTransportProperitesDict",
33  mesh.time().system(),
34  mesh,
35  IOobject::MUST_READ_IF_MODIFIED,
36  IOobject::NO_WRITE,
37  false
38  )
39 );
40 
41 const dictionary& autocorrelationFunctionDict
42 (
43  mdTransportProperitesDict.subDict("autocorrelationFunctions")
44 );
45 
46 //- Velocity autocorrelation function
47 
48 Info << tab << "velocty" << endl;
49 
50 const dictionary& velocityACFDict
51 (
52  autocorrelationFunctionDict.subDict("velocity")
53 );
54 
55 correlationFunction<vector> vacf
56 (
57  mesh,
58  velocityACFDict,
59  molecules.size()
60 );
61 
62 bool writeVacf(Switch(velocityACFDict.lookup("writeFile")));
63 
64 //- Pressure autocorrelation function
65 
66 Info << tab << "pressure" << endl;
67 
68 const dictionary& pressureACFDict
69 (
70  autocorrelationFunctionDict.subDict("pressure")
71 );
72 
73 correlationFunction<vector> pacf
74 (
75  mesh,
76  pressureACFDict,
77  1
78 );
79 
80 bool writePacf(Switch(pressureACFDict.lookup("writeFile")));
81 
82 //- Heat flux autocorrelation function
83 
84 Info << tab << "heat flux" << endl;
85 
86 const dictionary& heatFluxACFDict
87 (
88  autocorrelationFunctionDict.subDict("heatFlux")
89 );
90 
91 correlationFunction<vector> hfacf
92 (
93  mesh,
94  heatFluxACFDict,
95  1
96 );
97 
98 bool writeHFacf(Switch(heatFluxACFDict.lookup("writeFile")));
static const char tab
Definition: Ostream.H:261
bool writePacf(Switch(pressureACFDict.lookup("writeFile")))
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
Info<< tab<< "pressure"<< endl;const dictionary &pressureACFDict(autocorrelationFunctionDict.subDict("pressure"));correlationFunction< vector > pacf(mesh, pressureACFDict, 1)
Pressure autocorrelation function.
dynamicFvMesh & mesh
Info<< tab<< "heat flux"<< endl;const dictionary &heatFluxACFDict(autocorrelationFunctionDict.subDict("heatFlux"));correlationFunction< vector > hfacf(mesh, heatFluxACFDict, 1)
Heat flux autocorrelation function.
bool writeVacf(Switch(velocityACFDict.lookup("writeFile")))
static const char nl
Definition: Ostream.H:262
Info<< nl<< "Creating autocorrelation functions."<< endl;IOdictionary mdTransportProperitesDict(IOobject("mdTransportProperitesDict", mesh.time().system(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false));const dictionary &autocorrelationFunctionDict(mdTransportProperitesDict.subDict("autocorrelationFunctions"));Info<< tab<< "velocty"<< endl;const dictionary &velocityACFDict(autocorrelationFunctionDict.subDict("velocity"));correlationFunction< vector > vacf(mesh, velocityACFDict, molecules.size())
messageStream Info
bool writeHFacf(Switch(heatFluxACFDict.lookup("writeFile")))