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