MRG: Integrated Foundation code to commit 19e602b

This commit is contained in:
Andrew Heather
2017-03-28 11:30:10 +01:00
227 changed files with 2746 additions and 2715 deletions

View File

@ -32,40 +32,52 @@ Description
application. Values are transferred as plain text files, where OpenFOAM
data is written as:
\verbatim
# Patch: \<patch name\>
\<magSf1\> \<value1\> \<qDot1\> \<htc1\>
\<magSf2\> \<value2\> \<qDot2\> \<htc2\>
\<magSf3\> \<value3\> \<qDot3\> \<htc2\>
...
\<magSfN\> \<valueN\> \<qDotN\> \<htcN\>
\endverbatim
and received as the constituent pieces of the `mixed' condition, i.e.
\verbatim
# Patch: \<patch name\>
\<value1\> \<gradient1\> \<valueFracion1\>
\<value2\> \<gradient2\> \<valueFracion2\>
\<value3\> \<gradient3\> \<valueFracion3\>
...
\<valueN\> \<gradientN\> \<valueFracionN\>
\endverbatim
Data is sent/received as a single file for all patches from the directory
\verbatim
$FOAM_CASE/\<commsDir\>
\endverbatim
At start-up, the boundary creates a lock file, i.e..
\verbatim
OpenFOAM.lock
\endverbatim
... to signal the external source to wait. During the boundary condition
update, boundary values are written to file, e.g.
\verbatim
\<fileName\>.out
\endverbatim
The lock file is then removed, instructing the external source to take
control of the program execution. When ready, the external program
should create the return values, e.g. to file
\verbatim
\<fileName\>.in
\endverbatim
... and then re-instate the lock file. The boundary condition will then
read the return values, and pass program execution back to OpenFOAM.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -67,6 +67,16 @@ void Foam::functionObjects::fieldAverage::resetFields()
void Foam::functionObjects::fieldAverage::initialize()
{
if (!totalIter_.size())
{
totalIter_.setSize(faItems_.size(), 1);
}
if (!totalTime_.size())
{
totalTime_.setSize(faItems_.size(), obr_.time().deltaTValue());
}
resetFields();
Log << type() << " " << name() << ":" << nl;
@ -113,10 +123,7 @@ void Foam::functionObjects::fieldAverage::restart()
<< nl << endl;
totalIter_.clear();
totalIter_.setSize(faItems_.size(), 1);
totalTime_.clear();
totalTime_.setSize(faItems_.size(), obr().time().deltaTValue());
initialize();
}