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-------------------------------------------------------------------------------
10License
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
28Info << nl << "Creating autocorrelation functions." << endl;
29
30IOdictionary 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
43const dictionary& autocorrelationFunctionDict
44(
45 mdTransportProperitesDict.subDict("autocorrelationFunctions")
46);
47
48//- Velocity autocorrelation function
49
50Info << tab << "velocty" << endl;
51
52const dictionary& velocityACFDict
53(
54 autocorrelationFunctionDict.subDict("velocity")
55);
56
57correlationFunction<vector> vacf
58(
59 mesh,
60 velocityACFDict,
61 molecules.size()
62);
63
64bool writeVacf(velocityACFDict.get<bool>("writeFile"));
65
66//- Pressure autocorrelation function
67
68Info << tab << "pressure" << endl;
69
70const dictionary& pressureACFDict
71(
72 autocorrelationFunctionDict.subDict("pressure")
73);
74
75correlationFunction<vector> pacf
76(
77 mesh,
78 pressureACFDict,
79 1
80);
81
82bool writePacf(pressureACFDict.get<bool>("writeFile"));
83
84//- Heat flux autocorrelation function
85
86Info << tab << "heat flux" << endl;
87
88const dictionary& heatFluxACFDict
89(
90 autocorrelationFunctionDict.subDict("heatFlux")
91);
92
93correlationFunction<vector> hfacf
94(
95 mesh,
96 heatFluxACFDict,
97 1
98);
99
100bool writeHFacf(heatFluxACFDict.get<bool>("writeFile"));
Info<< tab<< "pressure"<< endl;const dictionary &pressureACFDict(autocorrelationFunctionDict.subDict("pressure"));correlationFunction< vector > pacf(mesh, pressureACFDict, 1)
Pressure autocorrelation function.
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())
bool writePacf(pressureACFDict.get< bool >("writeFile"))
bool writeVacf(velocityACFDict.get< bool >("writeFile"))
bool writeHFacf(heatFluxACFDict.get< bool >("writeFile"))
Info<< tab<< "heat flux"<< endl;const dictionary &heatFluxACFDict(autocorrelationFunctionDict.subDict("heatFlux"));correlationFunction< vector > hfacf(mesh, heatFluxACFDict, 1)
Heat flux autocorrelation function.
dynamicFvMesh & mesh
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
constexpr char nl
The newline '\n' character (0x0a)
Definition: Ostream.H:53
constexpr char tab
The tab '\t' character(0x09)
Definition: Ostream.H:52