mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
4
applications/test/passiveParticle/Make/files
Normal file
4
applications/test/passiveParticle/Make/files
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
passiveParticleTest.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_USER_APPBIN)/passiveParticleTest
|
||||||
8
applications/test/passiveParticle/Make/options
Normal file
8
applications/test/passiveParticle/Make/options
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
|
-lfiniteVolume \
|
||||||
|
-lmeshTools \
|
||||||
|
-llagrangian
|
||||||
105
applications/test/passiveParticle/passiveParticleTest.C
Normal file
105
applications/test/passiveParticle/passiveParticleTest.C
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Application
|
||||||
|
testPassiveParticle
|
||||||
|
|
||||||
|
Description
|
||||||
|
Test cloud of passive particles.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "fvCFD.H"
|
||||||
|
#include "passiveParticleCloud.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
argList::validArgs.append("cloudName");
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
runTime.functionObjects().off();
|
||||||
|
|
||||||
|
const word cloudName(args.additionalArgs()[0]);
|
||||||
|
|
||||||
|
{
|
||||||
|
// Start with empty cloud
|
||||||
|
passiveParticleCloud particles
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
cloudName,
|
||||||
|
IDLList<passiveParticle>()
|
||||||
|
);
|
||||||
|
Pout<< "Starting particles:" << particles.size() << endl;
|
||||||
|
|
||||||
|
Pout<< "Adding a particle." << endl;
|
||||||
|
particles.addParticle(new passiveParticle(particles, vector::zero, -1));
|
||||||
|
|
||||||
|
forAllConstIter(passiveParticleCloud, particles, iter)
|
||||||
|
{
|
||||||
|
Pout<< " " << iter().position() << " cell:" << iter().cell()
|
||||||
|
<< " origProc:" << iter().origProc()
|
||||||
|
<< " origId:" << iter().origId()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
<< nl << endl;
|
||||||
|
|
||||||
|
runTime++;
|
||||||
|
Pout<< "Writing particles to time " << runTime.timeName() << endl;
|
||||||
|
particles.write();
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Pout<< "Rereading particles from time " << runTime.timeName()
|
||||||
|
<< endl;
|
||||||
|
passiveParticleCloud particles(mesh, cloudName);
|
||||||
|
Pout<< "Reread particles:" << particles.size() << endl;
|
||||||
|
|
||||||
|
forAllConstIter(passiveParticleCloud, particles, iter)
|
||||||
|
{
|
||||||
|
Pout<< " " << iter().position() << " cell:" << iter().cell()
|
||||||
|
<< " origProc:" << iter().origProc()
|
||||||
|
<< " origId:" << iter().origId()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
<< nl << endl;
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -33,6 +33,7 @@ Description
|
|||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
#include "IStringStream.H"
|
#include "IStringStream.H"
|
||||||
|
#include "cpuTime.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -44,42 +45,77 @@ int main(int argc, char *argv[])
|
|||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.insert("string .. stringN");
|
argList::validArgs.insert("string .. stringN");
|
||||||
argList::validOptions.insert("file", "name");
|
argList::validOptions.insert("file", "name");
|
||||||
|
argList::validOptions.insert("repeat", "count");
|
||||||
|
|
||||||
argList args(argc, argv, false, true);
|
argList args(argc, argv, false, true);
|
||||||
|
|
||||||
|
label repeat = 1;
|
||||||
|
args.optionReadIfPresent<label>("repeat", repeat);
|
||||||
|
|
||||||
|
cpuTime timer;
|
||||||
|
|
||||||
|
for (label count = 0; count < repeat; ++count)
|
||||||
|
{
|
||||||
forAll(args.additionalArgs(), argI)
|
forAll(args.additionalArgs(), argI)
|
||||||
{
|
{
|
||||||
const string& rawArg = args.additionalArgs()[argI];
|
const string& rawArg = args.additionalArgs()[argI];
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
Info<< "input string: " << rawArg << nl;
|
Info<< "input string: " << rawArg << nl;
|
||||||
|
}
|
||||||
|
|
||||||
IStringStream is(rawArg);
|
IStringStream is(rawArg);
|
||||||
|
|
||||||
while (is.good())
|
while (is.good())
|
||||||
{
|
{
|
||||||
token tok(is);
|
token tok(is);
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
Info<< "token: " << tok.info() << endl;
|
Info<< "token: " << tok.info() << endl;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
Info<< nl;
|
Info<< nl;
|
||||||
IOobject::writeDivider(Info);
|
IOobject::writeDivider(Info);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "tokenized args " << repeat << " times in "
|
||||||
|
<< timer.cpuTimeIncrement() << " s\n\n";
|
||||||
|
|
||||||
if (args.optionFound("file"))
|
if (args.optionFound("file"))
|
||||||
|
{
|
||||||
|
for (label count = 0; count < repeat; ++count)
|
||||||
{
|
{
|
||||||
IFstream is(args.option("file"));
|
IFstream is(args.option("file"));
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
Info<< "tokenizing file: " << args.option("file") << nl;
|
Info<< "tokenizing file: " << args.option("file") << nl;
|
||||||
|
}
|
||||||
|
|
||||||
while (is.good())
|
while (is.good())
|
||||||
{
|
{
|
||||||
token tok(is);
|
token tok(is);
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
Info<< "token: " << tok.info() << endl;
|
Info<< "token: " << tok.info() << endl;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
Info<< nl;
|
Info<< nl;
|
||||||
IOobject::writeDivider(Info);
|
IOobject::writeDivider(Info);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "tokenized file " << repeat << " times in "
|
||||||
|
<< timer.cpuTimeIncrement() << " s\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -157,14 +157,14 @@ void testSortedEdgeFaces(const triSurface& surf)
|
|||||||
{
|
{
|
||||||
if (findIndex(sortMyFaces, myFaces[i]) == -1)
|
if (findIndex(sortMyFaces, myFaces[i]) == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn("testSortedEdgeFaces") << abort(FatalError);
|
FatalErrorIn("testSortedEdgeFaces(..)") << abort(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
forAll(sortMyFaces, i)
|
forAll(sortMyFaces, i)
|
||||||
{
|
{
|
||||||
if (findIndex(myFaces, sortMyFaces[i]) == -1)
|
if (findIndex(myFaces, sortMyFaces[i]) == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn("testSortedEdgeFaces") << abort(FatalError);
|
FatalErrorIn("testSortedEdgeFaces(..)") << abort(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -304,7 +304,7 @@ label findEdge
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FatalErrorIn("findEdge") << "Cannot find edge with labels " << v0
|
FatalErrorIn("findEdge(..)") << "Cannot find edge with labels " << v0
|
||||||
<< ' ' << v1 << " in candidates " << edgeLabels
|
<< ' ' << v1 << " in candidates " << edgeLabels
|
||||||
<< " with vertices:" << UIndirectList<edge>(surf.edges(), edgeLabels)()
|
<< " with vertices:" << UIndirectList<edge>(surf.edges(), edgeLabels)()
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
@ -343,7 +343,7 @@ label otherEdge
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FatalErrorIn("otherEdge") << "Cannot find other edge on face " << faceI
|
FatalErrorIn("otherEdge(..)") << "Cannot find other edge on face " << faceI
|
||||||
<< " verts:" << surf.localPoints()[faceI]
|
<< " verts:" << surf.localPoints()[faceI]
|
||||||
<< " connected to point " << pointI
|
<< " connected to point " << pointI
|
||||||
<< " faceEdges:" << UIndirectList<edge>(surf.edges(), fEdges)()
|
<< " faceEdges:" << UIndirectList<edge>(surf.edges(), fEdges)()
|
||||||
@ -409,7 +409,9 @@ void walkSplitLine
|
|||||||
|
|
||||||
if (eFaces.size() != 2)
|
if (eFaces.size() != 2)
|
||||||
{
|
{
|
||||||
FatalErrorIn("walkSplitPoint") << abort(FatalError);
|
FatalErrorIn("walkSplitPoint(..)")
|
||||||
|
<< "Can only handle edges with 2 or 4 edges for now."
|
||||||
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eFaces[0] == faceI)
|
if (eFaces[0] == faceI)
|
||||||
@ -422,7 +424,7 @@ void walkSplitLine
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorIn("walkSplitPoint") << abort(FatalError);
|
FatalErrorIn("walkSplitPoint(..)") << abort(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (true);
|
while (true);
|
||||||
@ -547,7 +549,7 @@ void calcPointVecs
|
|||||||
|
|
||||||
surf.write("errorSurf.ftr");
|
surf.write("errorSurf.ftr");
|
||||||
|
|
||||||
FatalErrorIn("calcPointVecs")
|
FatalErrorIn("calcPointVecs(..)")
|
||||||
<< "Cannot find two faces using border edge " << edgeI
|
<< "Cannot find two faces using border edge " << edgeI
|
||||||
<< " verts:" << edges[edgeI]
|
<< " verts:" << edges[edgeI]
|
||||||
<< " eFaces:" << eFaces << endl
|
<< " eFaces:" << eFaces << endl
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
EXE_INC = \
|
EXE_INC =
|
||||||
-I$(WM_THIRD_PARTY_DIR)/zlib-1.2.3
|
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
$(FOAM_LIBBIN)/libOSspecific.o \
|
$(FOAM_LIBBIN)/libOSspecific.o \
|
||||||
|
|||||||
@ -22,22 +22,10 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "MeshWave.H"
|
#include "MeshWave.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "processorPolyPatch.H"
|
|
||||||
#include "cyclicPolyPatch.H"
|
|
||||||
#include "OPstream.H"
|
|
||||||
#include "IPstream.H"
|
|
||||||
#include "PstreamReduceOps.H"
|
|
||||||
#include "debug.H"
|
|
||||||
#include "typeInfo.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,15 @@ inline void Foam::IPstream::readFromBuffer
|
|||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::IPstream::~IPstream()
|
Foam::IPstream::~IPstream()
|
||||||
{}
|
{
|
||||||
|
if (bufPosition_ < messageSize_)
|
||||||
|
{
|
||||||
|
FatalErrorIn("IPstream::~IPstream()")
|
||||||
|
<< "Message not fully consumed. messageSize:" << messageSize_
|
||||||
|
<< " bytes of which only " << bufPosition_
|
||||||
|
<< " consumed." << Foam::abort(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -350,6 +350,31 @@ public:
|
|||||||
return oldCommsType;
|
return oldCommsType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Transfer buffer
|
||||||
|
const List<char>& buf() const
|
||||||
|
{
|
||||||
|
return buf_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Transfer buffer
|
||||||
|
List<char>& buf()
|
||||||
|
{
|
||||||
|
return buf_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Current buffer read/write location
|
||||||
|
int bufPosition() const
|
||||||
|
{
|
||||||
|
return bufPosition_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Current buffer read/write location
|
||||||
|
int& bufPosition()
|
||||||
|
{
|
||||||
|
return bufPosition_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Exit program
|
//- Exit program
|
||||||
static void exit(int errnum = 1);
|
static void exit(int errnum = 1);
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@ char Foam::ISstream::nextValid()
|
|||||||
while (get(c) && isspace(c))
|
while (get(c) && isspace(c))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// Return if stream is bad
|
// Return if stream is bad - ie, previous get() failed
|
||||||
if (bad() || isspace(c))
|
if (bad() || isspace(c))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -102,7 +102,8 @@ char Foam::ISstream::nextValid()
|
|||||||
|
|
||||||
Foam::Istream& Foam::ISstream::read(token& t)
|
Foam::Istream& Foam::ISstream::read(token& t)
|
||||||
{
|
{
|
||||||
static char charBuffer[128];
|
static const int maxLen = 128;
|
||||||
|
static char buf[maxLen];
|
||||||
|
|
||||||
// Return the put back token if it exists
|
// Return the put back token if it exists
|
||||||
if (Istream::getBack(t))
|
if (Istream::getBack(t))
|
||||||
@ -114,7 +115,7 @@ Foam::Istream& Foam::ISstream::read(token& t)
|
|||||||
// Lines are counted by '\n'
|
// Lines are counted by '\n'
|
||||||
|
|
||||||
// Get next 'valid character': i.e. proceed through any whitespace
|
// Get next 'valid character': i.e. proceed through any whitespace
|
||||||
// and/or comments until a semantically valid character is hit upon.
|
// and/or comments until a semantically valid character is found
|
||||||
|
|
||||||
char c = nextValid();
|
char c = nextValid();
|
||||||
|
|
||||||
@ -131,7 +132,7 @@ Foam::Istream& Foam::ISstream::read(token& t)
|
|||||||
// Analyse input starting with this character.
|
// Analyse input starting with this character.
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
// First check for punctuation characters.
|
// Check for punctuation first
|
||||||
|
|
||||||
case token::END_STATEMENT :
|
case token::END_STATEMENT :
|
||||||
case token::BEGIN_LIST :
|
case token::BEGIN_LIST :
|
||||||
@ -144,7 +145,7 @@ Foam::Istream& Foam::ISstream::read(token& t)
|
|||||||
case token::COMMA :
|
case token::COMMA :
|
||||||
case token::ASSIGN :
|
case token::ASSIGN :
|
||||||
case token::ADD :
|
case token::ADD :
|
||||||
// case token::SUBTRACT : // Handled later as the possible start of a number
|
// NB: token::SUBTRACT handled later as the possible start of a Number
|
||||||
case token::MULTIPLY :
|
case token::MULTIPLY :
|
||||||
case token::DIVIDE :
|
case token::DIVIDE :
|
||||||
{
|
{
|
||||||
@ -153,26 +154,27 @@ Foam::Istream& Foam::ISstream::read(token& t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Strings: enclosed by double quotes.
|
// String: enclosed by double quotes.
|
||||||
case token::BEGIN_STRING :
|
case token::BEGIN_STRING :
|
||||||
{
|
{
|
||||||
putback(c);
|
putback(c);
|
||||||
string* sPtr = new string;
|
string* sPtr = new string;
|
||||||
|
|
||||||
if (!read(*sPtr).bad())
|
if (read(*sPtr).bad())
|
||||||
{
|
|
||||||
t = sPtr;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
delete sPtr;
|
delete sPtr;
|
||||||
t.setBad();
|
t.setBad();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
t = sPtr;
|
||||||
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Numbers: do not distinguish at this point between Types.
|
// Number: integer or floating point
|
||||||
//
|
//
|
||||||
// ideally match the equivalent of this regular expression
|
// ideally match the equivalent of this regular expression
|
||||||
//
|
//
|
||||||
@ -185,10 +187,11 @@ Foam::Istream& Foam::ISstream::read(token& t)
|
|||||||
{
|
{
|
||||||
bool asLabel = (c != '.');
|
bool asLabel = (c != '.');
|
||||||
|
|
||||||
unsigned int nChar = 0;
|
int nChar = 0;
|
||||||
charBuffer[nChar++] = c;
|
buf[nChar++] = c;
|
||||||
|
|
||||||
// get everything that could reasonable look like a number
|
// get everything that could resemble a number and let
|
||||||
|
// strtod() determine the validity
|
||||||
while
|
while
|
||||||
(
|
(
|
||||||
is_.get(c)
|
is_.get(c)
|
||||||
@ -202,24 +205,38 @@ Foam::Istream& Foam::ISstream::read(token& t)
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
asLabel = asLabel && isdigit(c);
|
if (asLabel)
|
||||||
|
{
|
||||||
|
asLabel = isdigit(c);
|
||||||
|
}
|
||||||
|
|
||||||
charBuffer[nChar++] = c;
|
buf[nChar++] = c;
|
||||||
if (nChar >= sizeof(charBuffer))
|
if (nChar == maxLen)
|
||||||
{
|
{
|
||||||
// runaway argument - avoid buffer overflow
|
// runaway argument - avoid buffer overflow
|
||||||
|
buf[maxLen-1] = '\0';
|
||||||
|
|
||||||
|
FatalIOErrorIn("ISstream::read(token&)", *this)
|
||||||
|
<< "number '" << buf << "...'\n"
|
||||||
|
<< " is too long (max. " << maxLen << " characters)"
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
|
||||||
t.setBad();
|
t.setBad();
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
charBuffer[nChar] = '\0';
|
buf[nChar] = '\0';
|
||||||
|
|
||||||
setState(is_.rdstate());
|
setState(is_.rdstate());
|
||||||
if (!is_.bad())
|
if (is_.bad())
|
||||||
|
{
|
||||||
|
t.setBad();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
is_.putback(c);
|
is_.putback(c);
|
||||||
|
|
||||||
if (nChar == 1 && charBuffer[0] == '-')
|
if (nChar == 1 && buf[0] == '-')
|
||||||
{
|
{
|
||||||
// a single '-' is punctuation
|
// a single '-' is punctuation
|
||||||
t = token::punctuationToken(token::SUBTRACT);
|
t = token::punctuationToken(token::SUBTRACT);
|
||||||
@ -230,31 +247,43 @@ Foam::Istream& Foam::ISstream::read(token& t)
|
|||||||
|
|
||||||
if (asLabel)
|
if (asLabel)
|
||||||
{
|
{
|
||||||
long longval = strtol(charBuffer, &endptr, 10);
|
long longVal(strtol(buf, &endptr, 10));
|
||||||
t = label(longval);
|
t = label(longVal);
|
||||||
|
|
||||||
// return as a scalar if doesn't fit in a label
|
// return as a scalar if doesn't fit in a label
|
||||||
if (t.labelToken() != longval)
|
if (t.labelToken() != longVal)
|
||||||
{
|
{
|
||||||
t = scalar(strtod(charBuffer, &endptr));
|
t = scalar(strtod(buf, &endptr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t = scalar(strtod(charBuffer, &endptr));
|
scalar scalarVal(strtod(buf, &endptr));
|
||||||
|
t = scalarVal;
|
||||||
|
|
||||||
|
// ---------------------------------------
|
||||||
|
// this would also be possible if desired:
|
||||||
|
// ---------------------------------------
|
||||||
|
// // return as a label when possible
|
||||||
|
// // eg, 1E6 -> 1000000
|
||||||
|
// if (scalarVal <= labelMax && scalarVal >= labelMin)
|
||||||
|
// {
|
||||||
|
// label labelVal(scalarVal);
|
||||||
|
//
|
||||||
|
// if (labelVal == scalarVal)
|
||||||
|
// {
|
||||||
|
// t = labelVal;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// nothing converted (bad format), or trailing junk
|
// nothing converted (bad format), or trailing junk
|
||||||
if (endptr == charBuffer || *endptr != '\0')
|
if (endptr == buf || *endptr != '\0')
|
||||||
{
|
{
|
||||||
t.setBad();
|
t.setBad();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
t.setBad();
|
|
||||||
}
|
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -266,9 +295,12 @@ Foam::Istream& Foam::ISstream::read(token& t)
|
|||||||
putback(c);
|
putback(c);
|
||||||
word* wPtr = new word;
|
word* wPtr = new word;
|
||||||
|
|
||||||
if (!read(*wPtr).bad())
|
if (read(*wPtr).bad())
|
||||||
{
|
{
|
||||||
if (token::compound::isCompound(*wPtr))
|
delete wPtr;
|
||||||
|
t.setBad();
|
||||||
|
}
|
||||||
|
else if (token::compound::isCompound(*wPtr))
|
||||||
{
|
{
|
||||||
t = token::compound::New(*wPtr, *this).ptr();
|
t = token::compound::New(*wPtr, *this).ptr();
|
||||||
delete wPtr;
|
delete wPtr;
|
||||||
@ -277,12 +309,7 @@ Foam::Istream& Foam::ISstream::read(token& t)
|
|||||||
{
|
{
|
||||||
t = wPtr;
|
t = wPtr;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
delete wPtr;
|
|
||||||
t.setBad();
|
|
||||||
}
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -302,69 +329,64 @@ Foam::Istream& Foam::ISstream::read(word& str)
|
|||||||
static const int errLen = 80; // truncate error message for readability
|
static const int errLen = 80; // truncate error message for readability
|
||||||
static char buf[maxLen];
|
static char buf[maxLen];
|
||||||
|
|
||||||
register int i = 0;
|
register int nChar = 0;
|
||||||
register int bc = 0;
|
register int listDepth = 0;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
while (get(c) && word::valid(c))
|
while (get(c) && word::valid(c))
|
||||||
{
|
{
|
||||||
if (fail())
|
|
||||||
{
|
|
||||||
if (i < maxLen-1)
|
|
||||||
{
|
|
||||||
buf[i] = '\0';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
buf[maxLen-1] = '\0';
|
|
||||||
}
|
|
||||||
buf[errLen] = '\0';
|
|
||||||
|
|
||||||
FatalIOErrorIn("ISstream::read(word&)", *this)
|
|
||||||
<< "problem while reading word '" << buf << "'\n"
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i >= maxLen)
|
|
||||||
{
|
|
||||||
buf[maxLen-1] = '\0';
|
|
||||||
buf[errLen] = '\0';
|
|
||||||
|
|
||||||
FatalIOErrorIn("ISstream::read(word&)", *this)
|
|
||||||
<< "word '" << buf << "' ...\n"
|
|
||||||
<< " is too long (max. " << maxLen << " characters)"
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (c == token::BEGIN_LIST)
|
if (c == token::BEGIN_LIST)
|
||||||
{
|
{
|
||||||
bc++;
|
listDepth++;
|
||||||
}
|
}
|
||||||
else if (c == token::END_LIST)
|
else if (c == token::END_LIST)
|
||||||
{
|
{
|
||||||
bc--;
|
if (listDepth)
|
||||||
|
{
|
||||||
if (bc == -1)
|
listDepth--;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buf[i++] = c;
|
buf[nChar++] = c;
|
||||||
|
if (nChar == maxLen)
|
||||||
|
{
|
||||||
|
buf[errLen] = '\0';
|
||||||
|
|
||||||
|
FatalIOErrorIn("ISstream::read(word&)", *this)
|
||||||
|
<< "word '" << buf << "...'\n"
|
||||||
|
<< " is too long (max. " << maxLen << " characters)"
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 0)
|
// we could probably skip this check
|
||||||
|
if (bad())
|
||||||
|
{
|
||||||
|
buf[errLen] = buf[nChar] = '\0';
|
||||||
|
|
||||||
|
FatalIOErrorIn("ISstream::read(word&)", *this)
|
||||||
|
<< "problem while reading word '" << buf << "...' after "
|
||||||
|
<< nChar << " characters\n"
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nChar == 0)
|
||||||
{
|
{
|
||||||
FatalIOErrorIn("ISstream::read(word&)", *this)
|
FatalIOErrorIn("ISstream::read(word&)", *this)
|
||||||
<< "invalid first character found : " << c
|
<< "invalid first character found : " << c
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
buf[i] = '\0'; // Terminator
|
// done reading
|
||||||
|
buf[nChar] = '\0';
|
||||||
str = buf;
|
str = buf;
|
||||||
putback(c);
|
putback(c);
|
||||||
|
|
||||||
@ -382,8 +404,6 @@ Foam::Istream& Foam::ISstream::read(string& str)
|
|||||||
|
|
||||||
if (!get(c))
|
if (!get(c))
|
||||||
{
|
{
|
||||||
buf[0] = '\0';
|
|
||||||
|
|
||||||
FatalIOErrorIn("ISstream::read(string&)", *this)
|
FatalIOErrorIn("ISstream::read(string&)", *this)
|
||||||
<< "cannot read start of string"
|
<< "cannot read start of string"
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
@ -391,36 +411,32 @@ Foam::Istream& Foam::ISstream::read(string& str)
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
char endTok = token::END_STRING;
|
|
||||||
|
|
||||||
// Note, we could also handle single-quoted strings here (if desired)
|
// Note, we could also handle single-quoted strings here (if desired)
|
||||||
if (c != token::BEGIN_STRING)
|
if (c != token::BEGIN_STRING)
|
||||||
{
|
{
|
||||||
buf[0] = '\0';
|
|
||||||
|
|
||||||
FatalIOErrorIn("ISstream::read(string&)", *this)
|
FatalIOErrorIn("ISstream::read(string&)", *this)
|
||||||
<< "Incorrect start of string character"
|
<< "Incorrect start of string character found : " << c
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
register int i = 0;
|
register int nChar = 0;
|
||||||
bool escaped = false;
|
bool escaped = false;
|
||||||
|
|
||||||
while (get(c))
|
while (get(c))
|
||||||
{
|
{
|
||||||
if (c == endTok)
|
if (c == token::END_STRING)
|
||||||
{
|
{
|
||||||
if (escaped)
|
if (escaped)
|
||||||
{
|
{
|
||||||
escaped = false;
|
escaped = false;
|
||||||
i--; // overwrite backslash
|
nChar--; // overwrite backslash
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// done reading string
|
// done reading
|
||||||
buf[i] = '\0';
|
buf[nChar] = '\0';
|
||||||
str = buf;
|
str = buf;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -430,12 +446,11 @@ Foam::Istream& Foam::ISstream::read(string& str)
|
|||||||
if (escaped)
|
if (escaped)
|
||||||
{
|
{
|
||||||
escaped = false;
|
escaped = false;
|
||||||
i--; // overwrite backslash
|
nChar--; // overwrite backslash
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
buf[i] = '\0';
|
buf[errLen] = buf[nChar] = '\0';
|
||||||
buf[errLen] = '\0';
|
|
||||||
|
|
||||||
FatalIOErrorIn("ISstream::read(string&)", *this)
|
FatalIOErrorIn("ISstream::read(string&)", *this)
|
||||||
<< "found '\\n' while reading string \""
|
<< "found '\\n' while reading string \""
|
||||||
@ -454,10 +469,9 @@ Foam::Istream& Foam::ISstream::read(string& str)
|
|||||||
escaped = false;
|
escaped = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
buf[i] = c;
|
buf[nChar++] = c;
|
||||||
if (i++ == maxLen)
|
if (nChar == maxLen)
|
||||||
{
|
{
|
||||||
buf[maxLen-1] = '\0';
|
|
||||||
buf[errLen] = '\0';
|
buf[errLen] = '\0';
|
||||||
|
|
||||||
FatalIOErrorIn("ISstream::read(string&)", *this)
|
FatalIOErrorIn("ISstream::read(string&)", *this)
|
||||||
@ -471,8 +485,7 @@ Foam::Istream& Foam::ISstream::read(string& str)
|
|||||||
|
|
||||||
|
|
||||||
// don't worry about a dangling backslash if string terminated prematurely
|
// don't worry about a dangling backslash if string terminated prematurely
|
||||||
buf[i] = '\0';
|
buf[errLen] = buf[nChar] = '\0';
|
||||||
buf[errLen] = '\0';
|
|
||||||
|
|
||||||
FatalIOErrorIn("ISstream::read(string&)", *this)
|
FatalIOErrorIn("ISstream::read(string&)", *this)
|
||||||
<< "problem while reading string \"" << buf << "...\""
|
<< "problem while reading string \"" << buf << "...\""
|
||||||
|
|||||||
@ -60,8 +60,8 @@ Foam::argList::initValidTables dummyInitValidTables;
|
|||||||
// transform sequences with "(" ... ")" into string lists in the process
|
// transform sequences with "(" ... ")" into string lists in the process
|
||||||
bool Foam::argList::regroupArgv(int& argc, char**& argv)
|
bool Foam::argList::regroupArgv(int& argc, char**& argv)
|
||||||
{
|
{
|
||||||
int level = 0;
|
|
||||||
int nArgs = 0;
|
int nArgs = 0;
|
||||||
|
int listDepth = 0;
|
||||||
string tmpString;
|
string tmpString;
|
||||||
|
|
||||||
// note: we also re-write directly into args_
|
// note: we also re-write directly into args_
|
||||||
@ -70,16 +70,16 @@ bool Foam::argList::regroupArgv(int& argc, char**& argv)
|
|||||||
{
|
{
|
||||||
if (strcmp(argv[argI], "(") == 0)
|
if (strcmp(argv[argI], "(") == 0)
|
||||||
{
|
{
|
||||||
level++;
|
listDepth++;
|
||||||
tmpString += "(";
|
tmpString += "(";
|
||||||
}
|
}
|
||||||
else if (strcmp(argv[argI], ")") == 0)
|
else if (strcmp(argv[argI], ")") == 0)
|
||||||
{
|
{
|
||||||
if (level >= 1)
|
if (listDepth)
|
||||||
{
|
{
|
||||||
level--;
|
listDepth--;
|
||||||
tmpString += ")";
|
tmpString += ")";
|
||||||
if (level == 0)
|
if (listDepth == 0)
|
||||||
{
|
{
|
||||||
args_[nArgs++] = tmpString;
|
args_[nArgs++] = tmpString;
|
||||||
tmpString.clear();
|
tmpString.clear();
|
||||||
@ -90,7 +90,7 @@ bool Foam::argList::regroupArgv(int& argc, char**& argv)
|
|||||||
args_[nArgs++] = argv[argI];
|
args_[nArgs++] = argv[argI];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (level)
|
else if (listDepth)
|
||||||
{
|
{
|
||||||
// quote each string element
|
// quote each string element
|
||||||
tmpString += "\"";
|
tmpString += "\"";
|
||||||
|
|||||||
@ -286,7 +286,7 @@ Foam::mapDistribute::mapDistribute(const mapDistribute& map)
|
|||||||
|
|
||||||
void Foam::mapDistribute::compact(const boolList& elemIsUsed)
|
void Foam::mapDistribute::compact(const boolList& elemIsUsed)
|
||||||
{
|
{
|
||||||
// 1. send back to sender. Have him delete the corresponding element
|
// 1. send back to sender. Have sender delete the corresponding element
|
||||||
// from the submap and do the same to the constructMap locally
|
// from the submap and do the same to the constructMap locally
|
||||||
// (and in same order).
|
// (and in same order).
|
||||||
|
|
||||||
|
|||||||
@ -376,16 +376,29 @@ inline pointHit triangle<Point, PointRef>::ray
|
|||||||
return ray(p, q1 - n, alg, intersection::VECTOR);
|
return ray(p, q1 - n, alg, intersection::VECTOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Intersection point with triangle plane
|
||||||
point pInter;
|
point pInter;
|
||||||
|
// Is intersection point inside triangle
|
||||||
bool hit;
|
bool hit;
|
||||||
{
|
{
|
||||||
// Reuse the fast ray intersection routine below in FULL_RAY
|
// Reuse the fast ray intersection routine below in FULL_RAY
|
||||||
// mode since the original intersection routine has rounding problems.
|
// mode since the original intersection routine has rounding problems.
|
||||||
pointHit fastInter = intersection(p, q1, intersection::FULL_RAY);
|
pointHit fastInter = intersection(p, q1, intersection::FULL_RAY);
|
||||||
pInter = fastInter.rawPoint();
|
|
||||||
hit = fastInter.hit();
|
hit = fastInter.hit();
|
||||||
|
|
||||||
|
if (hit)
|
||||||
|
{
|
||||||
|
pInter = fastInter.rawPoint();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Calculate intersection of ray with triangle plane
|
||||||
|
vector v = a_ - p;
|
||||||
|
pInter = p + (q1&v)*q1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Distance to intersection point
|
||||||
scalar dist = q1 & (pInter - p);
|
scalar dist = q1 & (pInter - p);
|
||||||
|
|
||||||
const scalar planarPointTol =
|
const scalar planarPointTol =
|
||||||
|
|||||||
@ -61,24 +61,38 @@ Foam::IPstream::IPstream
|
|||||||
|
|
||||||
MPI_Status status;
|
MPI_Status status;
|
||||||
|
|
||||||
|
// Cannot use buf_.size() since appends a few bytes extra
|
||||||
|
label realBufSize = bufSize;
|
||||||
|
|
||||||
// If the buffer size is not specified, probe the incomming message
|
// If the buffer size is not specified, probe the incomming message
|
||||||
// and set it
|
// and set it
|
||||||
if (!bufSize)
|
if (!bufSize)
|
||||||
{
|
{
|
||||||
|
if (commsType == nonBlocking)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"IPstream::IPstream(const commsTypes, const int, "
|
||||||
|
"const label, streamFormat, versionNumber)"
|
||||||
|
) << "Can use nonBlocking mode only with pre-allocated buffers"
|
||||||
|
<< Foam::abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
MPI_Probe(procID(fromProcNo_), msgType(), MPI_COMM_WORLD, &status);
|
MPI_Probe(procID(fromProcNo_), msgType(), MPI_COMM_WORLD, &status);
|
||||||
MPI_Get_count(&status, MPI_BYTE, &messageSize_);
|
MPI_Get_count(&status, MPI_BYTE, &messageSize_);
|
||||||
|
|
||||||
buf_.setSize(messageSize_);
|
buf_.setSize(messageSize_);
|
||||||
|
realBufSize = buf_.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
messageSize_ = read(commsType, fromProcNo_, buf_.begin(), buf_.size());
|
messageSize_ = read(commsType, fromProcNo_, buf_.begin(), realBufSize);
|
||||||
|
|
||||||
if (!messageSize_)
|
if (!messageSize_)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"IPstream::IPstream(const int fromProcNo, "
|
"IPstream::IPstream(const commsTypes, const int, "
|
||||||
"const label bufSize, streamFormat format, versionNumber version)"
|
"const label, streamFormat, versionNumber)"
|
||||||
) << "read failed"
|
) << "read failed"
|
||||||
<< Foam::abort(FatalError);
|
<< Foam::abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -173,7 +187,8 @@ Foam::label Foam::IPstream::read
|
|||||||
|
|
||||||
IPstream_outstandingRequests_.append(request);
|
IPstream_outstandingRequests_.append(request);
|
||||||
|
|
||||||
return 1;
|
// Assume the message is completely received.
|
||||||
|
return bufSize;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -42,6 +42,20 @@ Foam::DynamicList<MPI_Request> OPstream_outstandingRequests_;
|
|||||||
|
|
||||||
Foam::OPstream::~OPstream()
|
Foam::OPstream::~OPstream()
|
||||||
{
|
{
|
||||||
|
if (commsType_ == nonBlocking)
|
||||||
|
{
|
||||||
|
// alloc nonBlocking only if empty buffer. This denotes the buffer
|
||||||
|
// having been transfered out.
|
||||||
|
if (bufPosition_ > 0)
|
||||||
|
{
|
||||||
|
FatalErrorIn("OPstream::~OPstream()")
|
||||||
|
<< "OPstream contains buffer so cannot be used with nonBlocking"
|
||||||
|
<< " since destructor would destroy buffer whilst possibly"
|
||||||
|
<< " still sending." << Foam::abort(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!write
|
!write
|
||||||
@ -54,9 +68,10 @@ Foam::OPstream::~OPstream()
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
FatalErrorIn("OPstream::~OPstream()")
|
FatalErrorIn("OPstream::~OPstream()")
|
||||||
<< "MPI_Bsend cannot send outgoing message"
|
<< "MPI cannot send outgoing message"
|
||||||
<< Foam::abort(FatalError);
|
<< Foam::abort(FatalError);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,7 @@ oscillatingFixedValueFvPatchField<Type>::oscillatingFixedValueFvPatchField
|
|||||||
const fvPatchFieldMapper& mapper
|
const fvPatchFieldMapper& mapper
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(p, iF),
|
fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
|
||||||
refValue_(ptf.refValue_, mapper),
|
refValue_(ptf.refValue_, mapper),
|
||||||
amplitude_(ptf.amplitude_),
|
amplitude_(ptf.amplitude_),
|
||||||
frequency_(ptf.frequency_),
|
frequency_(ptf.frequency_),
|
||||||
@ -188,13 +188,12 @@ void oscillatingFixedValueFvPatchField<Type>::updateCoeffs()
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
void oscillatingFixedValueFvPatchField<Type>::write(Ostream& os) const
|
void oscillatingFixedValueFvPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<Type>::write(os);
|
fixedValueFvPatchField<Type>::write(os);
|
||||||
refValue_.writeEntry("refValue", os);
|
refValue_.writeEntry("refValue", os);
|
||||||
os.writeKeyword("amplitude")
|
os.writeKeyword("amplitude")
|
||||||
<< amplitude_ << token::END_STATEMENT << nl;
|
<< amplitude_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("frequency")
|
os.writeKeyword("frequency")
|
||||||
<< frequency_ << token::END_STATEMENT << nl;
|
<< frequency_ << token::END_STATEMENT << nl;
|
||||||
this->writeEntry("value", os);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1 @@
|
|||||||
EXE_INC = \
|
EXE_INC =
|
||||||
-I$(WM_THIRD_PARTY_DIR)/zlib-1.2.3
|
|
||||||
|
|
||||||
|
|||||||
@ -41,8 +41,8 @@ namespace Foam
|
|||||||
void triSurface::writeOBJ(const bool writeSorted, Ostream& os) const
|
void triSurface::writeOBJ(const bool writeSorted, Ostream& os) const
|
||||||
{
|
{
|
||||||
// Write header
|
// Write header
|
||||||
os << "# Wavefront OBJ file" << endl
|
os << "# Wavefront OBJ file" << nl
|
||||||
<< "# Regions:" << endl;
|
<< "# Regions:" << nl;
|
||||||
|
|
||||||
labelList faceMap;
|
labelList faceMap;
|
||||||
|
|
||||||
@ -54,13 +54,13 @@ void triSurface::writeOBJ(const bool writeSorted, Ostream& os) const
|
|||||||
forAll(myPatches, patchI)
|
forAll(myPatches, patchI)
|
||||||
{
|
{
|
||||||
os << "# " << patchI << " "
|
os << "# " << patchI << " "
|
||||||
<< myPatches[patchI].name() << endl;
|
<< myPatches[patchI].name() << nl;
|
||||||
}
|
}
|
||||||
os << "#" << endl;
|
os << "#" << nl;
|
||||||
|
|
||||||
os << "# points : " << ps.size() << endl
|
os << "# points : " << ps.size() << nl
|
||||||
<< "# triangles : " << size() << endl
|
<< "# triangles : " << size() << nl
|
||||||
<< "#" << endl;
|
<< "#" << nl;
|
||||||
|
|
||||||
|
|
||||||
// Write vertex coords
|
// Write vertex coords
|
||||||
@ -69,7 +69,7 @@ void triSurface::writeOBJ(const bool writeSorted, Ostream& os) const
|
|||||||
os << "v "
|
os << "v "
|
||||||
<< ps[pointi].x() << ' '
|
<< ps[pointi].x() << ' '
|
||||||
<< ps[pointi].y() << ' '
|
<< ps[pointi].y() << ' '
|
||||||
<< ps[pointi].z() << endl;
|
<< ps[pointi].z() << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (writeSorted)
|
if (writeSorted)
|
||||||
@ -80,7 +80,7 @@ void triSurface::writeOBJ(const bool writeSorted, Ostream& os) const
|
|||||||
{
|
{
|
||||||
// Print all faces belonging to this patch
|
// Print all faces belonging to this patch
|
||||||
|
|
||||||
os << "g " << myPatches[patchI].name() << endl;
|
os << "g " << myPatches[patchI].name() << nl;
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
@ -96,20 +96,39 @@ void triSurface::writeOBJ(const bool writeSorted, Ostream& os) const
|
|||||||
<< operator[](faceI)[1] + 1 << ' '
|
<< operator[](faceI)[1] + 1 << ' '
|
||||||
<< operator[](faceI)[2] + 1
|
<< operator[](faceI)[2] + 1
|
||||||
//<< " # " << operator[](faceI).region()
|
//<< " # " << operator[](faceI).region()
|
||||||
<< endl;
|
<< nl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Get patch (=compact region) per face
|
||||||
|
labelList patchIDs(size());
|
||||||
|
forAll(myPatches, patchI)
|
||||||
|
{
|
||||||
|
label faceI = myPatches[patchI].start();
|
||||||
|
|
||||||
|
forAll(myPatches[patchI], i)
|
||||||
|
{
|
||||||
|
patchIDs[faceMap[faceI++]] = patchI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
label prevPatchI = -1;
|
||||||
|
|
||||||
forAll(*this, faceI)
|
forAll(*this, faceI)
|
||||||
{
|
{
|
||||||
|
if (prevPatchI != patchIDs[faceI])
|
||||||
|
{
|
||||||
|
prevPatchI = patchIDs[faceI];
|
||||||
|
os << "g " << myPatches[patchIDs[faceI]].name() << nl;
|
||||||
|
}
|
||||||
os << "f "
|
os << "f "
|
||||||
<< operator[](faceI)[0] + 1 << ' '
|
<< operator[](faceI)[0] + 1 << ' '
|
||||||
<< operator[](faceI)[1] + 1 << ' '
|
<< operator[](faceI)[1] + 1 << ' '
|
||||||
<< operator[](faceI)[2] + 1
|
<< operator[](faceI)[2] + 1
|
||||||
//<< " # " << operator[](faceI).region()
|
<< nl;
|
||||||
<< endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,8 +70,7 @@ tmp<scalarField> mutURoughWallFunctionFvPatchScalarField::calcYPlus
|
|||||||
// of the wall will depend on yPlus
|
// of the wall will depend on yPlus
|
||||||
forAll(yPlus, facei)
|
forAll(yPlus, facei)
|
||||||
{
|
{
|
||||||
const scalar magUpara = magUp[facei];
|
const scalar Re = rho[facei]*magUp[facei]*y[facei]/muw[facei];
|
||||||
const scalar Re = rho[facei]*magUpara*y[facei]/muw[facei];
|
|
||||||
const scalar kappaRe = kappa_*Re;
|
const scalar kappaRe = kappa_*Re;
|
||||||
|
|
||||||
scalar yp = yPlusLam_;
|
scalar yp = yPlusLam_;
|
||||||
@ -142,8 +141,7 @@ tmp<scalarField> mutURoughWallFunctionFvPatchScalarField::calcYPlus
|
|||||||
// Smooth Walls
|
// Smooth Walls
|
||||||
forAll(yPlus, facei)
|
forAll(yPlus, facei)
|
||||||
{
|
{
|
||||||
const scalar magUpara = magUp[facei];
|
const scalar Re = rho[facei]*magUp[facei]*y[facei]/muw[facei];
|
||||||
const scalar Re = rho[facei]*magUpara*y[facei]/muw[facei];
|
|
||||||
const scalar kappaRe = kappa_*Re;
|
const scalar kappaRe = kappa_*Re;
|
||||||
|
|
||||||
scalar yp = yPlusLam_;
|
scalar yp = yPlusLam_;
|
||||||
@ -193,7 +191,8 @@ tmp<scalarField> mutURoughWallFunctionFvPatchScalarField::calcMut() const
|
|||||||
{
|
{
|
||||||
if (yPlus[facei] > yPlusLam_)
|
if (yPlus[facei] > yPlusLam_)
|
||||||
{
|
{
|
||||||
const scalar Re = rho[facei]*magUp[facei]*y[facei]/muw[facei];
|
const scalar Re =
|
||||||
|
rho[facei]*magUp[facei]*y[facei]/muw[facei] + ROOTVSMALL;
|
||||||
mutw[facei] = muw[facei]*(sqr(yPlus[facei])/Re - 1);
|
mutw[facei] = muw[facei]*(sqr(yPlus[facei])/Re - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,10 +66,9 @@ tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::calcUTau
|
|||||||
|
|
||||||
forAll(mutw, faceI)
|
forAll(mutw, faceI)
|
||||||
{
|
{
|
||||||
scalar magUpara = magUp[faceI];
|
|
||||||
|
|
||||||
scalar ut =
|
scalar ut =
|
||||||
sqrt((mutw[faceI] + muw[faceI])*magGradU[faceI]/rhow[faceI]);
|
sqrt((mutw[faceI] + muw[faceI])*magGradU[faceI]/rhow[faceI])
|
||||||
|
+ ROOTVSMALL;
|
||||||
|
|
||||||
if (ut > VSMALL)
|
if (ut > VSMALL)
|
||||||
{
|
{
|
||||||
@ -78,17 +77,17 @@ tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::calcUTau
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
scalar kUu = min(kappa_*magUpara/ut, 50);
|
scalar kUu = min(kappa_*magUp[faceI]/ut, 50);
|
||||||
scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu);
|
scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu);
|
||||||
|
|
||||||
scalar f =
|
scalar f =
|
||||||
- ut*y[faceI]/(muw[faceI]/rhow[faceI])
|
- ut*y[faceI]/(muw[faceI]/rhow[faceI])
|
||||||
+ magUpara/ut
|
+ magUp[faceI]/ut
|
||||||
+ 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu));
|
+ 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu));
|
||||||
|
|
||||||
scalar df =
|
scalar df =
|
||||||
y[faceI]/(muw[faceI]/rhow[faceI])
|
y[faceI]/(muw[faceI]/rhow[faceI])
|
||||||
+ magUpara/sqr(ut)
|
+ magUp[faceI]/sqr(ut)
|
||||||
+ 1/E_*kUu*fkUu/ut;
|
+ 1/E_*kUu*fkUu/ut;
|
||||||
|
|
||||||
scalar uTauNew = ut + f/df;
|
scalar uTauNew = ut + f/df;
|
||||||
@ -111,7 +110,7 @@ tmp<scalarField> mutUSpaldingWallFunctionFvPatchScalarField::calcMut() const
|
|||||||
|
|
||||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||||
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
||||||
const scalarField magGradU = mag(Uw.snGrad());
|
const scalarField magGradU = mag(Uw.snGrad()) + ROOTVSMALL;
|
||||||
const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
|
const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
|
||||||
const scalarField& muw = rasModel.mu().boundaryField()[patchI];
|
const scalarField& muw = rasModel.mu().boundaryField()[patchI];
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcNut() const
|
|||||||
{
|
{
|
||||||
if (yPlus[facei] > yPlusLam_)
|
if (yPlus[facei] > yPlusLam_)
|
||||||
{
|
{
|
||||||
const scalar Re = magUp[facei]*y[facei]/nuw[facei];
|
const scalar Re = magUp[facei]*y[facei]/nuw[facei] + ROOTVSMALL;
|
||||||
nutw[facei] = nuw[facei]*(sqr(yPlus[facei])/Re - 1);
|
nutw[facei] = nuw[facei]*(sqr(yPlus[facei])/Re - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,7 +47,7 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcNut() const
|
|||||||
|
|
||||||
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
|
||||||
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
|
||||||
const scalarField magGradU = mag(Uw.snGrad());
|
const scalarField magGradU = mag(Uw.snGrad()) + ROOTVSMALL;
|
||||||
const scalarField& nuw = rasModel.nu().boundaryField()[patchI];
|
const scalarField& nuw = rasModel.nu().boundaryField()[patchI];
|
||||||
|
|
||||||
return max(scalar(0), sqr(calcUTau(magGradU))/magGradU - nuw);
|
return max(scalar(0), sqr(calcUTau(magGradU))/magGradU - nuw);
|
||||||
@ -74,9 +74,8 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau
|
|||||||
|
|
||||||
forAll(uTau, facei)
|
forAll(uTau, facei)
|
||||||
{
|
{
|
||||||
scalar magUpara = magUp[facei];
|
scalar ut =
|
||||||
|
sqrt((nutw[facei] + nuw[facei])*magGradU[facei]) + ROOTVSMALL;
|
||||||
scalar ut = sqrt((nutw[facei] + nuw[facei])*magGradU[facei]);
|
|
||||||
|
|
||||||
if (ut > VSMALL)
|
if (ut > VSMALL)
|
||||||
{
|
{
|
||||||
@ -85,17 +84,17 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
scalar kUu = min(kappa_*magUpara/ut, 50);
|
scalar kUu = min(kappa_*magUp[facei]/ut, 50);
|
||||||
scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu);
|
scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu);
|
||||||
|
|
||||||
scalar f =
|
scalar f =
|
||||||
- ut*y[facei]/nuw[facei]
|
- ut*y[facei]/nuw[facei]
|
||||||
+ magUpara/ut
|
+ magUp[facei]/ut
|
||||||
+ 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu));
|
+ 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu));
|
||||||
|
|
||||||
scalar df =
|
scalar df =
|
||||||
y[facei]/nuw[facei]
|
y[facei]/nuw[facei]
|
||||||
+ magUpara/sqr(ut)
|
+ magUp[facei]/sqr(ut)
|
||||||
+ 1/E_*kUu*fkUu/ut;
|
+ 1/E_*kUu*fkUu/ut;
|
||||||
|
|
||||||
scalar uTauNew = ut + f/df;
|
scalar uTauNew = ut + f/df;
|
||||||
@ -103,6 +102,7 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau
|
|||||||
ut = uTauNew;
|
ut = uTauNew;
|
||||||
|
|
||||||
} while (ut > VSMALL && err > 0.01 && ++iter < 10);
|
} while (ut > VSMALL && err > 0.01 && ++iter < 10);
|
||||||
|
|
||||||
uTau[facei] = max(0.0, ut);
|
uTau[facei] = max(0.0, ut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
48
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/T
Normal file
48
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/T
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 293;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
topAndBottom
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
hot
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 307.75; // 34.6 degC
|
||||||
|
}
|
||||||
|
|
||||||
|
cold
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 288.15; // 15 degC
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
50
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/U
Normal file
50
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/U
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volVectorField;
|
||||||
|
location "0";
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform (0 0 0);
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
topAndBottom
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
hot
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
cold
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object alphat;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type compressible::alphatWallFunction;
|
||||||
|
Prt 0.85;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
topAndBottom
|
||||||
|
{
|
||||||
|
type compressible::alphatWallFunction;
|
||||||
|
Prt 0.85;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
hot
|
||||||
|
{
|
||||||
|
type compressible::alphatWallFunction;
|
||||||
|
Prt 0.85;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cold
|
||||||
|
{
|
||||||
|
type compressible::alphatWallFunction;
|
||||||
|
Prt 0.85;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object epsilon;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -3 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 4e-06;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type compressible::epsilonWallFunction;
|
||||||
|
value uniform 4e-06;
|
||||||
|
}
|
||||||
|
topAndBottom
|
||||||
|
{
|
||||||
|
type compressible::epsilonWallFunction;
|
||||||
|
value uniform 4e-06;
|
||||||
|
}
|
||||||
|
hot
|
||||||
|
{
|
||||||
|
type compressible::epsilonWallFunction;
|
||||||
|
value uniform 4e-06;
|
||||||
|
}
|
||||||
|
cold
|
||||||
|
{
|
||||||
|
type compressible::epsilonWallFunction;
|
||||||
|
value uniform 4e-06;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
47
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/k
Normal file
47
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/k
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object k;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 3.75e-04;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type compressible::kqRWallFunction;
|
||||||
|
value uniform 3.75e-04;
|
||||||
|
}
|
||||||
|
topAndBottom
|
||||||
|
{
|
||||||
|
type compressible::kqRWallFunction;
|
||||||
|
value uniform 3.75e-04;
|
||||||
|
}
|
||||||
|
hot
|
||||||
|
{
|
||||||
|
type compressible::kqRWallFunction;
|
||||||
|
value uniform 3.75e-04;
|
||||||
|
}
|
||||||
|
cold
|
||||||
|
{
|
||||||
|
type compressible::kqRWallFunction;
|
||||||
|
value uniform 3.75e-04;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
47
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/mut
Normal file
47
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/mut
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object mut;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type mutUWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
topAndBottom
|
||||||
|
{
|
||||||
|
type mutUWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
hot
|
||||||
|
{
|
||||||
|
type mutUWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
cold
|
||||||
|
{
|
||||||
|
type mutUWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object omega;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0.12;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type compressible::omegaWallFunction;
|
||||||
|
value uniform 0.12;
|
||||||
|
}
|
||||||
|
topAndBottom
|
||||||
|
{
|
||||||
|
type compressible::omegaWallFunction;
|
||||||
|
value uniform 0.12;
|
||||||
|
}
|
||||||
|
hot
|
||||||
|
{
|
||||||
|
type compressible::omegaWallFunction;
|
||||||
|
value uniform 0.12;
|
||||||
|
}
|
||||||
|
cold
|
||||||
|
{
|
||||||
|
type compressible::omegaWallFunction;
|
||||||
|
value uniform 0.12;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
50
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/p
Normal file
50
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/0/p
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 1e5;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
value uniform 1e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
topAndBottom
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
value uniform 1e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
hot
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
value uniform 1e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
cold
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
value uniform 1e5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
7
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean
Executable file
7
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allclean
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
rm -rf sets
|
||||||
|
(cd validation && rm -f *.eps)
|
||||||
11
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
Executable file
11
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
# Set application name
|
||||||
|
application="buoyantSimpleFoam"
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication $application
|
||||||
|
runApplication sample -latestTime
|
||||||
|
(cd validation && ./createGraphs)
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object RASProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
RASModel kOmegaSST;
|
||||||
|
|
||||||
|
turbulence on;
|
||||||
|
|
||||||
|
printCoeffs on;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class uniformDimensionedVectorField;
|
||||||
|
location "constant";
|
||||||
|
object g;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -2 0 0 0 0];
|
||||||
|
value ( 0 -9.81 0 );
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
convertToMeters 0.001;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
( 0 0 -260)
|
||||||
|
(76 0 -260)
|
||||||
|
(76 2180 -260)
|
||||||
|
( 0 2180 -260)
|
||||||
|
( 0 0 260)
|
||||||
|
(76 0 260)
|
||||||
|
(76 2180 260)
|
||||||
|
( 0 2180 260)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (35 150 15) simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
patches
|
||||||
|
(
|
||||||
|
wall frontAndBack
|
||||||
|
(
|
||||||
|
(0 1 5 4)
|
||||||
|
(2 3 7 6)
|
||||||
|
)
|
||||||
|
|
||||||
|
wall topAndBottom
|
||||||
|
(
|
||||||
|
(4 5 6 7)
|
||||||
|
(3 2 1 0)
|
||||||
|
)
|
||||||
|
|
||||||
|
wall hot
|
||||||
|
(
|
||||||
|
(6 5 1 2)
|
||||||
|
)
|
||||||
|
|
||||||
|
wall cold
|
||||||
|
(
|
||||||
|
(4 7 3 0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
mergePatchPairs
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class polyBoundaryMesh;
|
||||||
|
location "constant/polyMesh";
|
||||||
|
object boundary;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
4
|
||||||
|
(
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 1050;
|
||||||
|
startFace 228225;
|
||||||
|
}
|
||||||
|
topAndBottom
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 10500;
|
||||||
|
startFace 229275;
|
||||||
|
}
|
||||||
|
hot
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 2250;
|
||||||
|
startFace 239775;
|
||||||
|
}
|
||||||
|
cold
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 2250;
|
||||||
|
startFace 242025;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object thermophysicalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;
|
||||||
|
|
||||||
|
mixture air 1 28.96 1004.4 0 1.831e-05 0.705;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
application buoyantSimpleFoam;
|
||||||
|
|
||||||
|
startFrom startTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 1000;
|
||||||
|
|
||||||
|
deltaT 1;
|
||||||
|
|
||||||
|
writeControl timeStep;
|
||||||
|
|
||||||
|
writeInterval 50;
|
||||||
|
|
||||||
|
purgeWrite 3;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression uncompressed;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable yes;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default steadyState;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
div(phi,U) Gauss limitedLinear 0.2;
|
||||||
|
div(phi,h) Gauss limitedLinear 0.2;
|
||||||
|
div(phi,k) Gauss limitedLinear 0.2;
|
||||||
|
div(phi,epsilon) Gauss limitedLinear 0.2;
|
||||||
|
div(phi,omega) Gauss limitedLinear 0.2;
|
||||||
|
div((muEff*dev2(grad(U).T()))) Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
laplacian(muEff,U) Gauss linear uncorrected;
|
||||||
|
laplacian((rho*(1|A(U))),p) Gauss linear uncorrected;
|
||||||
|
laplacian(alphaEff,h) Gauss linear uncorrected;
|
||||||
|
laplacian(DkEff,k) Gauss linear uncorrected;
|
||||||
|
laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
|
||||||
|
laplacian(DomegaEff,omega) Gauss linear uncorrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default uncorrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
fluxRequired
|
||||||
|
{
|
||||||
|
default no;
|
||||||
|
p;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
p
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
tolerance 1e-7;
|
||||||
|
relTol 0.1;
|
||||||
|
|
||||||
|
smoother DICGaussSeidel;
|
||||||
|
|
||||||
|
cacheAgglomeration true;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(U|h|k|epsilon|omega)"
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-8;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMPLE
|
||||||
|
{
|
||||||
|
nNonOrthogonalCorrectors 0;
|
||||||
|
pRefCell 0;
|
||||||
|
pRefValue 100000;
|
||||||
|
convergence 1e-04;
|
||||||
|
}
|
||||||
|
|
||||||
|
relaxationFactors
|
||||||
|
{
|
||||||
|
p 0.3;
|
||||||
|
U 0.7;
|
||||||
|
h 0.7;
|
||||||
|
"(k|epsilon|omega)" 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.openfoam.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object sampleDict;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
interpolationScheme cellPointFace;
|
||||||
|
|
||||||
|
setFormat raw;
|
||||||
|
|
||||||
|
sets
|
||||||
|
(
|
||||||
|
y0.1
|
||||||
|
{
|
||||||
|
type face;
|
||||||
|
axis x;
|
||||||
|
start (-1 0.218 0);
|
||||||
|
end (1 0.218 0);
|
||||||
|
}
|
||||||
|
y0.2
|
||||||
|
{
|
||||||
|
type face;
|
||||||
|
axis x;
|
||||||
|
start (-1 0.436 0);
|
||||||
|
end (1 0.436 0);
|
||||||
|
}
|
||||||
|
y0.3
|
||||||
|
{
|
||||||
|
type face;
|
||||||
|
axis x;
|
||||||
|
start (-1 0.654 0);
|
||||||
|
end (1 0.654 0);
|
||||||
|
}
|
||||||
|
y0.4
|
||||||
|
{
|
||||||
|
type face;
|
||||||
|
axis x;
|
||||||
|
start (-1 0.872 0);
|
||||||
|
end (1 0.872 0);
|
||||||
|
}
|
||||||
|
y0.5
|
||||||
|
{
|
||||||
|
type face;
|
||||||
|
axis x;
|
||||||
|
start (-1 1.09 0);
|
||||||
|
end (1 1.09 0);
|
||||||
|
}
|
||||||
|
y0.6
|
||||||
|
{
|
||||||
|
type face;
|
||||||
|
axis x;
|
||||||
|
start (-1 1.308 0);
|
||||||
|
end (1 1.308 0);
|
||||||
|
}
|
||||||
|
y0.7
|
||||||
|
{
|
||||||
|
type face;
|
||||||
|
axis x;
|
||||||
|
start (-1 1.526 0);
|
||||||
|
end (1 1.526 0);
|
||||||
|
}
|
||||||
|
y0.8
|
||||||
|
{
|
||||||
|
type face;
|
||||||
|
axis x;
|
||||||
|
start (-1 1.744 0);
|
||||||
|
end (1 1.744 0);
|
||||||
|
}
|
||||||
|
y0.9
|
||||||
|
{
|
||||||
|
type face;
|
||||||
|
axis x;
|
||||||
|
start (-1 1.962 0);
|
||||||
|
end (1 1.962 0);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
surfaces ();
|
||||||
|
|
||||||
|
fields
|
||||||
|
(
|
||||||
|
T
|
||||||
|
U
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
115
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/validation/createGraphs
Executable file
115
tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/validation/createGraphs
Executable file
@ -0,0 +1,115 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# createGraphs
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Creates .eps graphs of OpenFOAM results vs experiment for the buoyant
|
||||||
|
# cavity case
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
createEpsT() {
|
||||||
|
index=$1
|
||||||
|
OF=$2
|
||||||
|
EXPT=$3
|
||||||
|
|
||||||
|
gnuplot<<EOF
|
||||||
|
set terminal postscript eps color enhanced
|
||||||
|
set output "OF_vs_EXPT_T$i.eps"
|
||||||
|
set xlabel "Channel width, x / [m]"
|
||||||
|
set ylabel "Temperature / [K]"
|
||||||
|
set grid
|
||||||
|
set key left top
|
||||||
|
set size 0.6, 0.6
|
||||||
|
set xrange [0:0.08]
|
||||||
|
set yrange [285:310]
|
||||||
|
plot \
|
||||||
|
"$EXPT" u (\$1/1000):(\$2+273.15) title "Expt 0.$index" with points lt 1 pt 6, \
|
||||||
|
"$OF" title "OpenFOAM 0.$index" with lines linetype -1
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
createEpsU() {
|
||||||
|
index=$1
|
||||||
|
OF=$2
|
||||||
|
EXPT=$3
|
||||||
|
|
||||||
|
gnuplot<<EOF
|
||||||
|
set terminal postscript eps color enhanced
|
||||||
|
set output "OF_vs_EXPT_U$i.eps"
|
||||||
|
set xlabel "Channel width, x / [m]"
|
||||||
|
set ylabel "Vertical velocity component, Uy / [m/s]"
|
||||||
|
set grid
|
||||||
|
set key left top
|
||||||
|
set size 0.6, 0.6
|
||||||
|
set xrange [0:0.08]
|
||||||
|
set yrange [-0.2:0.2]
|
||||||
|
plot \
|
||||||
|
"$EXPT" u (\$1/1000):(\$2) title "Expt 0.$index" with points lt 1 pt 6, \
|
||||||
|
"$OF" u 1:3 title "OpenFOAM 0.$index" with lines linetype -1
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# test if gnuplot exists on the system
|
||||||
|
type -P gnuplot &>/dev/null || {
|
||||||
|
echo "gnuplot not found - skipping graph creation" >&2; exit 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
# paths to data
|
||||||
|
LATESTTIME=`ls ../sets`
|
||||||
|
OFDATAROOT=../sets/$LATESTTIME
|
||||||
|
|
||||||
|
EXPTDATAROOT=./exptData
|
||||||
|
|
||||||
|
# generate temperature profiles
|
||||||
|
TSets="1 3 4 5 6 7 9"
|
||||||
|
for i in $TSets; do
|
||||||
|
echo " processing temperature profile at y/yMax of 0.$i"
|
||||||
|
|
||||||
|
OF="$OFDATAROOT/y0.${i}_T.xy"
|
||||||
|
EXPT="$EXPTDATAROOT/mt_z0_${i}0_lo.dat"
|
||||||
|
|
||||||
|
createEpsT $i $OF $EXPT
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# generate velocity profiles
|
||||||
|
USets="1 3 4 5 6 7 9"
|
||||||
|
for i in $USets; do
|
||||||
|
echo " processing velocity profile at y/yMax of 0.$i"
|
||||||
|
|
||||||
|
OF="$OFDATAROOT/y0.${i}_U.xy"
|
||||||
|
EXPT="$EXPTDATAROOT/mv_z0_${i}0_lo.dat"
|
||||||
|
|
||||||
|
createEpsU $i $OF $EXPT
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "done"
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Mean temperature profile through z=0, y/H=0.10
|
||||||
|
# x (mm) T (deg C)
|
||||||
|
0.33 15.13
|
||||||
|
0.58 15.38
|
||||||
|
0.84 15.65
|
||||||
|
1.09 15.82
|
||||||
|
1.6 16.29
|
||||||
|
2.11 16.72
|
||||||
|
2.61 17.15
|
||||||
|
3.25 17.44
|
||||||
|
3.88 17.79
|
||||||
|
5.15 18.37
|
||||||
|
6.42 18.72
|
||||||
|
7.69 19.04
|
||||||
|
8.96 19.14
|
||||||
|
10.23 19.57
|
||||||
|
11.5 19.62
|
||||||
|
12.77 19.8
|
||||||
|
15.31 20.02
|
||||||
|
17.85 20.23
|
||||||
|
20.39 20.46
|
||||||
|
22.93 20.48
|
||||||
|
25.47 20.48
|
||||||
|
28.01 20.67
|
||||||
|
30.55 20.69
|
||||||
|
33.09 20.71
|
||||||
|
35.63 20.87
|
||||||
|
38.17 20.79
|
||||||
|
# 40.57 24.66 spurious value
|
||||||
|
43.11 20.73
|
||||||
|
# 45.65 25.36 spurious value
|
||||||
|
48.19 20.87
|
||||||
|
# 50.73 25.62 spurious value
|
||||||
|
53.27 20.93
|
||||||
|
# 55.81 26.09 spurious value
|
||||||
|
58.35 21.25
|
||||||
|
60.89 21.29
|
||||||
|
63.43 21.72
|
||||||
|
64.7 21.77
|
||||||
|
65.97 22.52
|
||||||
|
67.24 23.09
|
||||||
|
68.51 23.87
|
||||||
|
69.78 24.99
|
||||||
|
71.05 26.42
|
||||||
|
72.32 28.32
|
||||||
|
72.95 29.14
|
||||||
|
73.59 30.1
|
||||||
|
74.09 31.15
|
||||||
|
74.6 32.06
|
||||||
|
75.11 33.15
|
||||||
|
75.36 33.52
|
||||||
|
75.62 33.99
|
||||||
|
75.87 34.6
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Mean temperature profile through z=0, y/H=0.30
|
||||||
|
# x (mm) T (deg C)
|
||||||
|
0.33 15.4
|
||||||
|
0.58 15.81
|
||||||
|
0.84 16.52
|
||||||
|
1.09 16.52
|
||||||
|
1.6 17.24
|
||||||
|
2.11 17.98
|
||||||
|
2.61 18.5
|
||||||
|
3.25 18.89
|
||||||
|
3.88 19.55
|
||||||
|
5.15 20.56
|
||||||
|
6.42 20.84
|
||||||
|
7.69 21.49
|
||||||
|
8.96 21.69
|
||||||
|
10.23 21.97
|
||||||
|
11.5 22.07
|
||||||
|
12.77 22.52
|
||||||
|
15.31 22.64
|
||||||
|
17.85 23.17
|
||||||
|
20.39 23.31
|
||||||
|
22.93 23.61
|
||||||
|
25.47 23.51
|
||||||
|
28.01 23.79
|
||||||
|
30.55 24.38
|
||||||
|
33.09 24.28
|
||||||
|
35.63 24.81
|
||||||
|
38.17 25.09
|
||||||
|
43.11 25.01
|
||||||
|
48.19 25.44
|
||||||
|
53.27 25.76
|
||||||
|
58.35 26.33
|
||||||
|
60.89 26.79
|
||||||
|
63.43 27.2
|
||||||
|
64.7 27.32
|
||||||
|
65.97 27.4
|
||||||
|
67.24 27.87
|
||||||
|
68.51 28.04
|
||||||
|
69.78 28.5
|
||||||
|
71.05 29.03
|
||||||
|
72.32 29.72
|
||||||
|
72.95 30.41
|
||||||
|
73.59 31.27
|
||||||
|
74.09 31.6
|
||||||
|
74.6 32.55
|
||||||
|
75.11 33.3
|
||||||
|
75.36 33.52
|
||||||
|
75.62 34.14
|
||||||
|
75.87 34.43
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Mean temperature profile through z=0, y/H=0.40
|
||||||
|
# x (mm) T (deg C)
|
||||||
|
0.33 15.55
|
||||||
|
0.58 16.03
|
||||||
|
0.84 16.45
|
||||||
|
1.09 16.98
|
||||||
|
1.6 17.53
|
||||||
|
2.11 18.1
|
||||||
|
2.61 18.71
|
||||||
|
3.25 19.68
|
||||||
|
3.88 19.88
|
||||||
|
5.15 20.78
|
||||||
|
6.42 21.44
|
||||||
|
7.69 21.47
|
||||||
|
8.96 22.13
|
||||||
|
10.23 22.48
|
||||||
|
11.5 22.64
|
||||||
|
12.77 22.87
|
||||||
|
15.31 23.09
|
||||||
|
17.85 23.42
|
||||||
|
20.39 23.9
|
||||||
|
22.93 23.84
|
||||||
|
25.47 24.18
|
||||||
|
28.01 24.26
|
||||||
|
30.55 24.67
|
||||||
|
33.09 25.08
|
||||||
|
35.63 25.29
|
||||||
|
38.17 25.3
|
||||||
|
40.57 25.12
|
||||||
|
43.11 25.4
|
||||||
|
45.65 25.69
|
||||||
|
48.19 25.92
|
||||||
|
50.73 25.95
|
||||||
|
53.27 26.07
|
||||||
|
55.81 26.77
|
||||||
|
58.35 26.75
|
||||||
|
60.89 27.02
|
||||||
|
63.43 27.61
|
||||||
|
64.7 27.51
|
||||||
|
65.97 27.8
|
||||||
|
67.24 28.21
|
||||||
|
68.51 28.32
|
||||||
|
69.78 28.94
|
||||||
|
71.05 29.36
|
||||||
|
72.32 30.26
|
||||||
|
72.95 30.74
|
||||||
|
73.59 31.16
|
||||||
|
74.09 31.82
|
||||||
|
74.6 32.28
|
||||||
|
75.11 33.09
|
||||||
|
75.36 33.47
|
||||||
|
75.62 33.92
|
||||||
|
75.87 34.16
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Mean temperature profile through z=0, y/H=0.50
|
||||||
|
# x (mm) T (deg C)
|
||||||
|
0.33 15.62
|
||||||
|
0.58 15.94
|
||||||
|
0.84 16.45
|
||||||
|
1.09 16.78
|
||||||
|
1.6 17.58
|
||||||
|
2.11 18.48
|
||||||
|
2.61 19.05
|
||||||
|
3.25 19.43
|
||||||
|
3.88 19.96
|
||||||
|
5.15 20.46
|
||||||
|
6.42 21.32
|
||||||
|
7.69 21.74
|
||||||
|
8.96 22.01
|
||||||
|
10.23 22.21
|
||||||
|
11.5 22.53
|
||||||
|
12.77 22.74
|
||||||
|
15.31 23.02
|
||||||
|
17.85 23.35
|
||||||
|
20.39 23.76
|
||||||
|
22.93 23.69
|
||||||
|
25.47 24.17
|
||||||
|
28.01 24.25
|
||||||
|
30.55 25.08
|
||||||
|
33.09 25.15
|
||||||
|
35.63 25.33
|
||||||
|
38.17 25.26
|
||||||
|
40.57 25.23
|
||||||
|
43.11 25.57
|
||||||
|
45.65 25.92
|
||||||
|
48.19 26.12
|
||||||
|
50.73 25.87
|
||||||
|
53.27 26.3
|
||||||
|
55.81 26.55
|
||||||
|
58.35 26.99
|
||||||
|
60.89 27.05
|
||||||
|
63.43 27.53
|
||||||
|
64.7 27.65
|
||||||
|
65.97 27.77
|
||||||
|
67.24 27.71
|
||||||
|
68.51 28.38
|
||||||
|
69.78 28.61
|
||||||
|
71.05 29.44
|
||||||
|
72.32 30.06
|
||||||
|
72.95 30.5
|
||||||
|
73.59 31.12
|
||||||
|
74.09 31.66
|
||||||
|
74.6 32.37
|
||||||
|
75.11 33.08
|
||||||
|
75.36 33.37
|
||||||
|
75.62 33.94
|
||||||
|
75.87 34.21
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Mean temperature profile through z=0, y/H=0.60
|
||||||
|
# x (mm) T (deg C)
|
||||||
|
0.33 15.59
|
||||||
|
0.58 16.15
|
||||||
|
0.84 16.44
|
||||||
|
1.09 16.81
|
||||||
|
1.6 17.52
|
||||||
|
2.11 18.15
|
||||||
|
2.61 18.89
|
||||||
|
3.25 19.63
|
||||||
|
3.88 20.03
|
||||||
|
5.15 20.75
|
||||||
|
6.42 21.11
|
||||||
|
7.69 21.5
|
||||||
|
8.96 21.94
|
||||||
|
10.23 22.51
|
||||||
|
11.5 22.56
|
||||||
|
12.77 22.92
|
||||||
|
15.31 23.27
|
||||||
|
17.85 23.66
|
||||||
|
20.39 23.96
|
||||||
|
22.93 24.01
|
||||||
|
28.01 24.57
|
||||||
|
33.09 25.16
|
||||||
|
38.17 24.98
|
||||||
|
43.11 25.57
|
||||||
|
48.19 25.95
|
||||||
|
53.27 26.32
|
||||||
|
55.81 26.71
|
||||||
|
58.35 27.13
|
||||||
|
60.89 27.12
|
||||||
|
63.43 27.51
|
||||||
|
64.7 27.84
|
||||||
|
65.97 28.2
|
||||||
|
67.24 28.2
|
||||||
|
68.51 28.43
|
||||||
|
69.78 28.76
|
||||||
|
71.05 29.4
|
||||||
|
72.32 29.86
|
||||||
|
72.95 30.7
|
||||||
|
73.59 31.43
|
||||||
|
74.09 31.72
|
||||||
|
74.6 32.47
|
||||||
|
75.11 33.07
|
||||||
|
75.36 33.45
|
||||||
|
75.62 33.95
|
||||||
|
75.87 34.23
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Mean temperature profile through z=0, y/H=0.70
|
||||||
|
# x (mm) T (deg C)
|
||||||
|
0.33 15.84
|
||||||
|
0.58 16.3
|
||||||
|
0.84 16.61
|
||||||
|
1.09 16.92
|
||||||
|
1.6 17.9
|
||||||
|
2.11 18.77
|
||||||
|
2.61 19.1
|
||||||
|
3.25 20.04
|
||||||
|
3.88 20.44
|
||||||
|
5.15 21.13
|
||||||
|
6.42 21.78
|
||||||
|
7.69 22.22
|
||||||
|
8.96 22.46
|
||||||
|
10.23 22.94
|
||||||
|
11.5 23.11
|
||||||
|
12.77 23.45
|
||||||
|
15.31 23.51
|
||||||
|
17.85 24.08
|
||||||
|
20.39 24.32
|
||||||
|
22.93 24.44
|
||||||
|
25.47 24.98
|
||||||
|
28.01 24.88
|
||||||
|
30.55 24.81
|
||||||
|
33.09 25.3
|
||||||
|
35.63 25.5
|
||||||
|
38.17 25.38
|
||||||
|
40.57 25.65
|
||||||
|
43.11 25.94
|
||||||
|
45.65 26.25
|
||||||
|
48.19 26.41
|
||||||
|
50.73 26.65
|
||||||
|
53.27 26.96
|
||||||
|
55.81 27.16
|
||||||
|
58.35 27.46
|
||||||
|
60.89 27.6
|
||||||
|
63.43 27.7
|
||||||
|
64.7 27.84
|
||||||
|
65.97 28.24
|
||||||
|
67.24 28.58
|
||||||
|
68.51 28.87
|
||||||
|
69.78 29.1
|
||||||
|
71.05 29.75
|
||||||
|
72.32 30.4
|
||||||
|
72.95 30.62
|
||||||
|
73.59 31.37
|
||||||
|
74.09 32.07
|
||||||
|
74.6 32.38
|
||||||
|
75.11 33.3
|
||||||
|
75.36 33.6
|
||||||
|
75.62 34.13
|
||||||
|
75.87 34.37
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Mean temperature profile through z=0, y/H=0.90
|
||||||
|
# x (mm) T (deg C)
|
||||||
|
0.33 15.61
|
||||||
|
0.58 16.32
|
||||||
|
0.84 16.8
|
||||||
|
1.09 17.38
|
||||||
|
1.6 18.36
|
||||||
|
2.11 19.52
|
||||||
|
2.61 20.39
|
||||||
|
3.25 21.64
|
||||||
|
3.88 22.49
|
||||||
|
5.15 24.23
|
||||||
|
6.42 25.68
|
||||||
|
7.69 26.84
|
||||||
|
8.96 27.48
|
||||||
|
10.23 28.1
|
||||||
|
11.5 28.55
|
||||||
|
12.77 28.97
|
||||||
|
15.31 29.26
|
||||||
|
17.85 29.52
|
||||||
|
20.39 29.53
|
||||||
|
22.93 29.54
|
||||||
|
25.47 29.55
|
||||||
|
28.01 29.6
|
||||||
|
30.55 29.67
|
||||||
|
33.09 29.71
|
||||||
|
35.63 29.74
|
||||||
|
38.17 29.73
|
||||||
|
40.57 29.93
|
||||||
|
43.11 29.99
|
||||||
|
45.65 30.07
|
||||||
|
48.19 30.1
|
||||||
|
50.73 30.12
|
||||||
|
53.27 30.18
|
||||||
|
55.81 30.29
|
||||||
|
58.35 30.4
|
||||||
|
60.89 30.57
|
||||||
|
63.43 30.69
|
||||||
|
64.7 30.85
|
||||||
|
65.97 31.02
|
||||||
|
67.24 31.19
|
||||||
|
68.51 31.48
|
||||||
|
69.78 31.68
|
||||||
|
71.05 32.06
|
||||||
|
72.32 32.52
|
||||||
|
72.95 32.77
|
||||||
|
73.59 33.2
|
||||||
|
74.09 33.49
|
||||||
|
74.6 33.78
|
||||||
|
75.11 34.19
|
||||||
|
75.36 34.38
|
||||||
|
75.62 34.6
|
||||||
|
75.87 34.77
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Vertical mean velocity profile through z=0, y/H=0.10
|
||||||
|
# x (mm) V (m/s)
|
||||||
|
1.5 -0.049
|
||||||
|
3.5 -0.086
|
||||||
|
5.5 -0.095
|
||||||
|
7.5 -0.101
|
||||||
|
9.5 -0.098
|
||||||
|
10.5 -0.096
|
||||||
|
12.5 -0.087
|
||||||
|
14.5 -0.081
|
||||||
|
16.5 -0.078
|
||||||
|
18.5 -0.07
|
||||||
|
20.5 -0.064
|
||||||
|
25.5 -0.052
|
||||||
|
30.5 -0.044
|
||||||
|
35.5 -0.028
|
||||||
|
38.2 -0.019
|
||||||
|
43.2 -0.011
|
||||||
|
48.2 0.003
|
||||||
|
53.2 0.023
|
||||||
|
58.2 0.038
|
||||||
|
60.2 0.055
|
||||||
|
62.2 0.07
|
||||||
|
64.2 0.09
|
||||||
|
66.2 0.121
|
||||||
|
68.2 0.151
|
||||||
|
69.2 0.168
|
||||||
|
70.2 0.18
|
||||||
|
71.2 0.19
|
||||||
|
72.2 0.192
|
||||||
|
73.2 0.193
|
||||||
|
74.2 0.16
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Vertical mean velocity profile through z=0, y/H=0.30
|
||||||
|
# x (mm) V (m/s)
|
||||||
|
3 -0.114
|
||||||
|
5 -0.123
|
||||||
|
7 -0.131
|
||||||
|
8 -0.135
|
||||||
|
9 -0.129
|
||||||
|
10 -0.121
|
||||||
|
12 -0.11
|
||||||
|
14 -0.099
|
||||||
|
16 -0.09
|
||||||
|
18 -0.08
|
||||||
|
23 -0.059
|
||||||
|
28 -0.043
|
||||||
|
33 -0.02
|
||||||
|
38 -0.006
|
||||||
|
43 0.016
|
||||||
|
48 0.051
|
||||||
|
51.2 0.063
|
||||||
|
56.2 0.092
|
||||||
|
58.2 0.097
|
||||||
|
60.2 0.105
|
||||||
|
62.2 0.118
|
||||||
|
64.2 0.124
|
||||||
|
66.2 0.132
|
||||||
|
68.2 0.136
|
||||||
|
70.2 0.142
|
||||||
|
71.2 0.141
|
||||||
|
72.2 0.14
|
||||||
|
73.2 0.121
|
||||||
|
74.2 0.089
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Vertical mean velocity profile through z=0, y/H=0.40
|
||||||
|
# x (mm) V (m/s)
|
||||||
|
2.2 -0.101
|
||||||
|
3.2 -0.119
|
||||||
|
4.2 -0.123
|
||||||
|
6.2 -0.127
|
||||||
|
8.2 -0.123
|
||||||
|
10.2 -0.121
|
||||||
|
12.2 -0.113
|
||||||
|
14.2 -0.1
|
||||||
|
16.2 -0.088
|
||||||
|
18.2 -0.08
|
||||||
|
23.2 -0.065
|
||||||
|
28.2 -0.036
|
||||||
|
33.2 -0.008
|
||||||
|
38.2 0.006
|
||||||
|
43.2 0.018
|
||||||
|
48.2 0.047
|
||||||
|
53.2 0.063
|
||||||
|
58.2 0.077
|
||||||
|
60.2 0.097
|
||||||
|
62.2 0.104
|
||||||
|
64.2 0.117
|
||||||
|
66.2 0.124
|
||||||
|
68.2 0.133
|
||||||
|
69.2 0.137
|
||||||
|
70.2 0.146
|
||||||
|
71.2 0.137
|
||||||
|
72.2 0.131
|
||||||
|
73.2 0.125
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Vertical mean velocity profile through z=0, y/H=0.50
|
||||||
|
# x (mm) V (m/s)
|
||||||
|
1.2 -0.081
|
||||||
|
2.2 -0.115
|
||||||
|
3.2 -0.124
|
||||||
|
4.2 -0.133
|
||||||
|
6.2 -0.135
|
||||||
|
8.2 -0.134
|
||||||
|
10.2 -0.12
|
||||||
|
12.2 -0.112
|
||||||
|
14.2 -0.11
|
||||||
|
16.2 -0.1
|
||||||
|
18.2 -0.089
|
||||||
|
23.2 -0.062
|
||||||
|
28.2 -0.048
|
||||||
|
33.2 -0.011
|
||||||
|
38.2 0.012
|
||||||
|
43.2 0.041
|
||||||
|
48.2 0.054
|
||||||
|
53.2 0.077
|
||||||
|
58.2 0.091
|
||||||
|
60.2 0.099
|
||||||
|
62.2 0.106
|
||||||
|
64.2 0.12
|
||||||
|
66.2 0.127
|
||||||
|
68.2 0.133
|
||||||
|
70.2 0.137
|
||||||
|
71.2 0.14
|
||||||
|
72.2 0.131
|
||||||
|
73.2 0.121
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Vertical mean velocity profile through z=0, y/H=0.60
|
||||||
|
# x (mm) V (m/s)
|
||||||
|
3 -0.12
|
||||||
|
4 -0.137
|
||||||
|
5 -0.144
|
||||||
|
7 -0.134
|
||||||
|
8 -0.122
|
||||||
|
9 -0.116
|
||||||
|
11 -0.107
|
||||||
|
13 -0.09
|
||||||
|
17 -0.072
|
||||||
|
22 -0.058
|
||||||
|
27 -0.041
|
||||||
|
32 -0.014
|
||||||
|
37 -0.003
|
||||||
|
43.2 0.029
|
||||||
|
48.2 0.05
|
||||||
|
53.2 0.066
|
||||||
|
58.2 0.083
|
||||||
|
60.2 0.093
|
||||||
|
62.2 0.105
|
||||||
|
64.2 0.116
|
||||||
|
66.2 0.124
|
||||||
|
69.2 0.132
|
||||||
|
71.2 0.139
|
||||||
|
72.2 0.121
|
||||||
|
73.2 0.11
|
||||||
|
74.2 0.099
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Vertical mean velocity profile through z=0, y/H=0.70
|
||||||
|
# x (mm) V (m/s)
|
||||||
|
1.2 -0.069
|
||||||
|
2.2 -0.106
|
||||||
|
4.2 -0.137
|
||||||
|
6.2 -0.15
|
||||||
|
8.2 -0.141
|
||||||
|
10.2 -0.135
|
||||||
|
12.2 -0.134
|
||||||
|
14.2 -0.109
|
||||||
|
16.2 -0.102
|
||||||
|
18.2 -0.101
|
||||||
|
23.2 -0.065
|
||||||
|
28.2 -0.044
|
||||||
|
33.2 -0.025
|
||||||
|
38.2 0.017
|
||||||
|
43.2 0.039
|
||||||
|
48.2 0.057
|
||||||
|
53.2 0.08
|
||||||
|
58.2 0.095
|
||||||
|
60.2 0.112
|
||||||
|
62.2 0.112
|
||||||
|
64.2 0.128
|
||||||
|
66.2 0.128
|
||||||
|
68.2 0.128
|
||||||
|
70.2 0.131
|
||||||
|
72.2 0.118
|
||||||
|
73.2 0.103
|
||||||
|
74.2 0.094
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
# Natural Convection in Tall Cavity: Ra=8.6E+5
|
||||||
|
# Expts of Betts and Bokhari
|
||||||
|
# Vertical mean velocity profile through z=0, y/H=0.90
|
||||||
|
# x (mm) V (m/s)
|
||||||
|
1.7 -0.14
|
||||||
|
2.7 -0.172
|
||||||
|
3.7 -0.18
|
||||||
|
4.7 -0.179
|
||||||
|
5.7 -0.164
|
||||||
|
6.7 -0.15
|
||||||
|
7.7 -0.133
|
||||||
|
8.7 -0.122
|
||||||
|
10.7 -0.09
|
||||||
|
12.7 -0.067
|
||||||
|
14.7 -0.051
|
||||||
|
16.7 -0.036
|
||||||
|
18.7 -0.025
|
||||||
|
23.7 -0.006
|
||||||
|
28.7 0.012
|
||||||
|
33.7 0.02
|
||||||
|
38.7 0.032
|
||||||
|
43.7 0.04
|
||||||
|
48.7 0.058
|
||||||
|
53.7 0.067
|
||||||
|
58.7 0.08
|
||||||
|
60.7 0.088
|
||||||
|
62.7 0.09
|
||||||
|
64.7 0.096
|
||||||
|
65.7 0.097
|
||||||
|
66.7 0.101
|
||||||
|
67.7 0.102
|
||||||
|
68.7 0.103
|
||||||
|
69.7 0.102
|
||||||
|
70.7 0.096
|
||||||
|
71.7 0.089
|
||||||
|
72.7 0.085
|
||||||
|
73.7 0.069
|
||||||
|
74.7 0.052
|
||||||
Reference in New Issue
Block a user