mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge commit 'OpenCFD/master' into olesenm
This commit is contained in:
3
applications/test/Polynomial/Make/files
Normal file
3
applications/test/Polynomial/Make/files
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PolynomialTest.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_USER_APPBIN)/PolynomialTest
|
||||||
3
applications/test/Polynomial/Make/options
Normal file
3
applications/test/Polynomial/Make/options
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
128
applications/test/Polynomial/PolynomialTest.C
Normal file
128
applications/test/Polynomial/PolynomialTest.C
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / 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
|
||||||
|
|
||||||
|
Application
|
||||||
|
PolynomialTest
|
||||||
|
|
||||||
|
Description
|
||||||
|
Test application for the templated Polynomial class
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "IFstream.H"
|
||||||
|
#include "Polynomial.H"
|
||||||
|
#include "Random.H"
|
||||||
|
|
||||||
|
using namespace Foam;
|
||||||
|
|
||||||
|
scalar polyValue(const scalar x)
|
||||||
|
{
|
||||||
|
// Hard-coded polynomial 8 coeff (7th order)
|
||||||
|
return
|
||||||
|
0.11
|
||||||
|
+ 0.45*x
|
||||||
|
- 0.94*sqr(x)
|
||||||
|
+ 1.58*pow3(x)
|
||||||
|
- 2.58*pow4(x)
|
||||||
|
+ 0.08*pow5(x)
|
||||||
|
+ 3.15*pow6(x)
|
||||||
|
- 4.78*x*pow6(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
scalar intPolyValue(const scalar x)
|
||||||
|
{
|
||||||
|
// Hard-coded integrated form of above polynomial
|
||||||
|
return
|
||||||
|
0.11*x
|
||||||
|
+ 0.45/2.0*sqr(x)
|
||||||
|
- 0.94/3.0*pow3(x)
|
||||||
|
+ 1.58/4.0*pow4(x)
|
||||||
|
- 2.58/5.0*pow5(x)
|
||||||
|
+ 0.08/6.0*pow6(x)
|
||||||
|
+ 3.15/7.0*x*pow6(x)
|
||||||
|
- 4.78/8.0*x*x*pow6(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
IFstream is("polyTestInput");
|
||||||
|
|
||||||
|
Polynomial<8> poly("testPoly", is);
|
||||||
|
Polynomial<9> intPoly(poly.integrate(0.0));
|
||||||
|
|
||||||
|
Info<< "poly = " << poly << endl;
|
||||||
|
Info<< "intPoly = " << intPoly << nl << endl;
|
||||||
|
|
||||||
|
Info<< "2*poly = " << 2*poly << endl;
|
||||||
|
Info<< "poly+poly = " << poly + poly << nl << endl;
|
||||||
|
|
||||||
|
Info<< "3*poly = " << 3*poly << endl;
|
||||||
|
Info<< "poly+poly+poly = " << poly + poly + poly << nl << endl;
|
||||||
|
|
||||||
|
Info<< "3*poly - 2*poly = " << 3*poly - 2*poly << nl << endl;
|
||||||
|
|
||||||
|
Polynomial<8> polyCopy = poly;
|
||||||
|
Info<< "poly, polyCopy = " << poly << ", " << polyCopy << nl << endl;
|
||||||
|
polyCopy = 2.5*poly;
|
||||||
|
Info<< "2.5*polyCopy = " << polyCopy << nl << endl;
|
||||||
|
|
||||||
|
Random rnd(123456);
|
||||||
|
for (int i=0; i<10; i++)
|
||||||
|
{
|
||||||
|
scalar x = rnd.scalar01()*100;
|
||||||
|
|
||||||
|
scalar px = polyValue(x);
|
||||||
|
scalar ipx = intPolyValue(x);
|
||||||
|
|
||||||
|
scalar pxTest = poly.evaluate(x);
|
||||||
|
scalar ipxTest = intPoly.evaluate(x);
|
||||||
|
|
||||||
|
Info<<"\nx = " << x << endl;
|
||||||
|
Info<< " px, pxTest = " << px << ", " << pxTest << endl;
|
||||||
|
Info<< " ipx, ipxTest = " << ipx << ", " << ipxTest << endl;
|
||||||
|
|
||||||
|
if (mag(px - pxTest) > SMALL)
|
||||||
|
{
|
||||||
|
Info<< " *** WARNING: px != pxTest: " << px - pxTest << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mag(ipx - ipxTest) > SMALL)
|
||||||
|
{
|
||||||
|
Info<< " *** WARNING: ipx != ipxTest: " << ipx - ipxTest << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< nl << "Done." << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
11
applications/test/Polynomial/polyTestInput
Normal file
11
applications/test/Polynomial/polyTestInput
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
testPoly
|
||||||
|
(
|
||||||
|
0.11
|
||||||
|
0.45
|
||||||
|
-0.94
|
||||||
|
1.58
|
||||||
|
-2.58
|
||||||
|
0.08
|
||||||
|
3.15
|
||||||
|
-4.78
|
||||||
|
)
|
||||||
@ -93,9 +93,9 @@ void readAndRotateFields
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rotateFields(const Time& runTime, const tensor& T)
|
void rotateFields(const argList& args, const Time& runTime, const tensor& T)
|
||||||
{
|
{
|
||||||
# include "createMesh.H"
|
# include "createNamedMesh.H"
|
||||||
|
|
||||||
// Read objects in time directory
|
// Read objects in time directory
|
||||||
IOobjectList objects(mesh, runTime.timeName());
|
IOobjectList objects(mesh, runTime.timeName());
|
||||||
@ -167,7 +167,11 @@ int main(int argc, char *argv[])
|
|||||||
"vector",
|
"vector",
|
||||||
"transform in terms of '( yaw pitch roll )' in degrees"
|
"transform in terms of '( yaw pitch roll )' in degrees"
|
||||||
);
|
);
|
||||||
argList::addBoolOption("rotateFields");
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"rotateFields",
|
||||||
|
"read and transform vector and tensor fields too"
|
||||||
|
);
|
||||||
argList::addOption
|
argList::addOption
|
||||||
(
|
(
|
||||||
"scale",
|
"scale",
|
||||||
@ -176,16 +180,29 @@ int main(int argc, char *argv[])
|
|||||||
"uniform [mm] to [m] scaling"
|
"uniform [mm] to [m] scaling"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# include "addRegionOption.H"
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
word regionName = polyMesh::defaultRegion;
|
||||||
|
fileName meshDir;
|
||||||
|
|
||||||
|
if (args.optionReadIfPresent("region", regionName))
|
||||||
|
{
|
||||||
|
meshDir = regionName/polyMesh::meshSubDir;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
meshDir = polyMesh::meshSubDir;
|
||||||
|
}
|
||||||
|
|
||||||
pointIOField points
|
pointIOField points
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"points",
|
"points",
|
||||||
runTime.findInstance(polyMesh::meshSubDir, "points"),
|
runTime.findInstance(meshDir, "points"),
|
||||||
polyMesh::meshSubDir,
|
meshDir,
|
||||||
runTime,
|
runTime,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
@ -224,7 +241,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (args.optionFound("rotateFields"))
|
if (args.optionFound("rotateFields"))
|
||||||
{
|
{
|
||||||
rotateFields(runTime, T);
|
rotateFields(args, runTime, T);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (args.optionFound("rollPitchYaw"))
|
else if (args.optionFound("rollPitchYaw"))
|
||||||
@ -247,7 +264,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (args.optionFound("rotateFields"))
|
if (args.optionFound("rotateFields"))
|
||||||
{
|
{
|
||||||
rotateFields(runTime, R.R());
|
rotateFields(args, runTime, R.R());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (args.optionFound("yawPitchRoll"))
|
else if (args.optionFound("yawPitchRoll"))
|
||||||
@ -276,7 +293,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (args.optionFound("rotateFields"))
|
if (args.optionFound("rotateFields"))
|
||||||
{
|
{
|
||||||
rotateFields(runTime, R.R());
|
rotateFields(args, runTime, R.R());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,13 +34,19 @@ Description
|
|||||||
|
|
||||||
Can also work like decomposePar:
|
Can also work like decomposePar:
|
||||||
@verbatim
|
@verbatim
|
||||||
|
# Create empty processor directories (have to exist for argList)
|
||||||
mkdir processor0
|
mkdir processor0
|
||||||
|
..
|
||||||
|
mkdir processorN
|
||||||
|
|
||||||
|
# Copy undecomposed polyMesh
|
||||||
cp -r constant processor0
|
cp -r constant processor0
|
||||||
|
|
||||||
|
# Distribute
|
||||||
mpirun -np ddd redistributeMeshPar -parallel
|
mpirun -np ddd redistributeMeshPar -parallel
|
||||||
@endverbatim
|
@endverbatim
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "Field.H"
|
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "decompositionMethod.H"
|
#include "decompositionMethod.H"
|
||||||
#include "PstreamReduceOps.H"
|
#include "PstreamReduceOps.H"
|
||||||
@ -62,6 +68,7 @@ static const scalar defaultMergeTol = 1E-6;
|
|||||||
autoPtr<fvMesh> createMesh
|
autoPtr<fvMesh> createMesh
|
||||||
(
|
(
|
||||||
const Time& runTime,
|
const Time& runTime,
|
||||||
|
const word& regionName,
|
||||||
const fileName& instDir,
|
const fileName& instDir,
|
||||||
const bool haveMesh
|
const bool haveMesh
|
||||||
)
|
)
|
||||||
@ -69,43 +76,33 @@ autoPtr<fvMesh> createMesh
|
|||||||
Pout<< "Create mesh for time = "
|
Pout<< "Create mesh for time = "
|
||||||
<< runTime.timeName() << nl << endl;
|
<< runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
// Create dummy mesh. Only used on procs that don't have mesh.
|
IOobject io
|
||||||
// Note constructed on all processors since does parallel comms.
|
|
||||||
fvMesh dummyMesh
|
|
||||||
(
|
(
|
||||||
IOobject
|
regionName,
|
||||||
(
|
instDir,
|
||||||
fvMesh::defaultRegion,
|
runTime,
|
||||||
instDir,
|
IOobject::MUST_READ
|
||||||
runTime,
|
|
||||||
IOobject::MUST_READ
|
|
||||||
),
|
|
||||||
xferCopy(pointField()),
|
|
||||||
xferCopy(faceList()),
|
|
||||||
xferCopy(labelList()),
|
|
||||||
xferCopy(labelList())
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!haveMesh)
|
if (!haveMesh)
|
||||||
{
|
{
|
||||||
Pout<< "Writing dummy mesh to " << runTime.path()/instDir << endl;
|
// Create dummy mesh. Only used on procs that don't have mesh.
|
||||||
|
fvMesh dummyMesh
|
||||||
|
(
|
||||||
|
io,
|
||||||
|
xferCopy(pointField()),
|
||||||
|
xferCopy(faceList()),
|
||||||
|
xferCopy(labelList()),
|
||||||
|
xferCopy(labelList()),
|
||||||
|
false
|
||||||
|
);
|
||||||
|
Pout<< "Writing dummy mesh to " << dummyMesh.polyMesh::objectPath()
|
||||||
|
<< endl;
|
||||||
dummyMesh.write();
|
dummyMesh.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
Pout<< "Reading mesh from " << runTime.path()/instDir << endl;
|
Pout<< "Reading mesh from " << io.objectPath() << endl;
|
||||||
autoPtr<fvMesh> meshPtr
|
autoPtr<fvMesh> meshPtr(new fvMesh(io));
|
||||||
(
|
|
||||||
new fvMesh
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
fvMesh::defaultRegion,
|
|
||||||
instDir,
|
|
||||||
runTime,
|
|
||||||
IOobject::MUST_READ
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
fvMesh& mesh = meshPtr();
|
fvMesh& mesh = meshPtr();
|
||||||
|
|
||||||
|
|
||||||
@ -229,8 +226,9 @@ autoPtr<fvMesh> createMesh
|
|||||||
if (!haveMesh)
|
if (!haveMesh)
|
||||||
{
|
{
|
||||||
// We created a dummy mesh file above. Delete it.
|
// We created a dummy mesh file above. Delete it.
|
||||||
Pout<< "Removing dummy mesh in " << runTime.path()/instDir << endl;
|
Pout<< "Removing dummy mesh " << io.objectPath()
|
||||||
rmDir(runTime.path()/instDir/polyMesh::meshSubDir);
|
<< endl;
|
||||||
|
rmDir(io.objectPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force recreation of globalMeshData.
|
// Force recreation of globalMeshData.
|
||||||
@ -285,7 +283,6 @@ scalar getMergeDistance
|
|||||||
void printMeshData(Ostream& os, const polyMesh& mesh)
|
void printMeshData(Ostream& os, const polyMesh& mesh)
|
||||||
{
|
{
|
||||||
os << "Number of points: " << mesh.points().size() << nl
|
os << "Number of points: " << mesh.points().size() << nl
|
||||||
<< " edges: " << mesh.edges().size() << nl
|
|
||||||
<< " faces: " << mesh.faces().size() << nl
|
<< " faces: " << mesh.faces().size() << nl
|
||||||
<< " internal faces: " << mesh.faceNeighbour().size() << nl
|
<< " internal faces: " << mesh.faceNeighbour().size() << nl
|
||||||
<< " cells: " << mesh.cells().size() << nl
|
<< " cells: " << mesh.cells().size() << nl
|
||||||
@ -506,33 +503,53 @@ void compareFields
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addRegionOption.H"
|
||||||
argList::addOption("mergeTol", "relative merge distance");
|
argList::addOption("mergeTol", "relative merge distance");
|
||||||
|
// Create argList. This will check for non-existing processor dirs.
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
// Create processor directory if non-existing
|
//- Not useful anymore. See above.
|
||||||
if (!Pstream::master() && !isDir(args.path()))
|
//// Create processor directory if non-existing
|
||||||
{
|
//if (!Pstream::master() && !isDir(args.path()))
|
||||||
Pout<< "Creating case directory " << args.path() << endl;
|
//{
|
||||||
mkDir(args.path());
|
// Pout<< "Creating case directory " << args.path() << endl;
|
||||||
}
|
// mkDir(args.path());
|
||||||
|
//}
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
word regionName = polyMesh::defaultRegion;
|
||||||
|
fileName meshSubDir;
|
||||||
|
|
||||||
|
if (args.optionReadIfPresent("region", regionName))
|
||||||
|
{
|
||||||
|
meshSubDir = regionName/polyMesh::meshSubDir;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
meshSubDir = polyMesh::meshSubDir;
|
||||||
|
}
|
||||||
|
Info<< "Using mesh subdirectory " << meshSubDir << nl << endl;
|
||||||
|
|
||||||
|
|
||||||
// Get time instance directory. Since not all processors have meshes
|
// Get time instance directory. Since not all processors have meshes
|
||||||
// just use the master one everywhere.
|
// just use the master one everywhere.
|
||||||
|
|
||||||
fileName masterInstDir;
|
fileName masterInstDir;
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
masterInstDir = runTime.findInstance(polyMesh::meshSubDir, "points");
|
masterInstDir = runTime.findInstance(meshSubDir, "points");
|
||||||
}
|
}
|
||||||
Pstream::scatter(masterInstDir);
|
Pstream::scatter(masterInstDir);
|
||||||
|
|
||||||
// Check who has a mesh
|
// Check who has a mesh
|
||||||
const fileName meshDir = runTime.path()/masterInstDir/polyMesh::meshSubDir;
|
const fileName meshPath = runTime.path()/masterInstDir/meshSubDir;
|
||||||
|
|
||||||
|
Info<< "Found points in " << meshPath << nl << endl;
|
||||||
|
|
||||||
|
|
||||||
boolList haveMesh(Pstream::nProcs(), false);
|
boolList haveMesh(Pstream::nProcs(), false);
|
||||||
haveMesh[Pstream::myProcNo()] = isDir(meshDir);
|
haveMesh[Pstream::myProcNo()] = isDir(meshPath);
|
||||||
Pstream::gatherList(haveMesh);
|
Pstream::gatherList(haveMesh);
|
||||||
Pstream::scatterList(haveMesh);
|
Pstream::scatterList(haveMesh);
|
||||||
Info<< "Per processor mesh availability : " << haveMesh << endl;
|
Info<< "Per processor mesh availability : " << haveMesh << endl;
|
||||||
@ -542,6 +559,7 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<fvMesh> meshPtr = createMesh
|
autoPtr<fvMesh> meshPtr = createMesh
|
||||||
(
|
(
|
||||||
runTime,
|
runTime,
|
||||||
|
regionName,
|
||||||
masterInstDir,
|
masterInstDir,
|
||||||
haveMesh[Pstream::myProcNo()]
|
haveMesh[Pstream::myProcNo()]
|
||||||
);
|
);
|
||||||
@ -799,7 +817,7 @@ int main(int argc, char *argv[])
|
|||||||
<< nl
|
<< nl
|
||||||
<< "the processor directories with 0 sized meshes in them." << nl
|
<< "the processor directories with 0 sized meshes in them." << nl
|
||||||
<< "Below is a sample set of commands to do this."
|
<< "Below is a sample set of commands to do this."
|
||||||
<< " Take care when issueing these" << nl
|
<< " Take care when issuing these" << nl
|
||||||
<< "commands." << nl << endl;
|
<< "commands." << nl << endl;
|
||||||
|
|
||||||
forAll(nFaces, procI)
|
forAll(nFaces, procI)
|
||||||
@ -812,8 +830,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fileName timeDir = procDir/runTime.timeName()/polyMesh::meshSubDir;
|
fileName timeDir = procDir/runTime.timeName()/meshSubDir;
|
||||||
fileName constDir = procDir/runTime.constant()/polyMesh::meshSubDir;
|
fileName constDir = procDir/runTime.constant()/meshSubDir;
|
||||||
|
|
||||||
Info<< " rm -r " << constDir.c_str() << nl
|
Info<< " rm -r " << constDir.c_str() << nl
|
||||||
<< " mv " << timeDir.c_str()
|
<< " mv " << timeDir.c_str()
|
||||||
|
|||||||
@ -9,4 +9,5 @@ EXE_LIBS = \
|
|||||||
-ltecio \
|
-ltecio \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
-lgenericPatchFields \
|
||||||
-lmeshTools
|
-lmeshTools
|
||||||
|
|||||||
@ -909,106 +909,115 @@ int main(int argc, char *argv[])
|
|||||||
const polyPatch& pp = patches[patchID];
|
const polyPatch& pp = patches[patchID];
|
||||||
//INTEGER4 strandID = 1 + i;
|
//INTEGER4 strandID = 1 + i;
|
||||||
|
|
||||||
Info<< " Writing patch " << patchID << "\t" << pp.name()
|
if (pp.size() > 0)
|
||||||
<< "\tstrand:" << strandID << nl << endl;
|
|
||||||
|
|
||||||
const indirectPrimitivePatch ipp
|
|
||||||
(
|
|
||||||
IndirectList<face>(pp, identity(pp.size())),
|
|
||||||
pp.points()
|
|
||||||
);
|
|
||||||
|
|
||||||
writer.writePolygonalZone
|
|
||||||
(
|
|
||||||
pp.name(),
|
|
||||||
strandID++, //strandID,
|
|
||||||
ipp,
|
|
||||||
allVarLocation
|
|
||||||
);
|
|
||||||
|
|
||||||
// Write coordinates
|
|
||||||
writer.writeField(ipp.localPoints().component(0)());
|
|
||||||
writer.writeField(ipp.localPoints().component(1)());
|
|
||||||
writer.writeField(ipp.localPoints().component(2)());
|
|
||||||
|
|
||||||
// Write all fields
|
|
||||||
forAll(vsf, i)
|
|
||||||
{
|
{
|
||||||
writer.writeField
|
Info<< " Writing patch " << patchID << "\t" << pp.name()
|
||||||
|
<< "\tstrand:" << strandID << nl << endl;
|
||||||
|
|
||||||
|
const indirectPrimitivePatch ipp
|
||||||
(
|
(
|
||||||
writer.getPatchField
|
IndirectList<face>(pp, identity(pp.size())),
|
||||||
|
pp.points()
|
||||||
|
);
|
||||||
|
|
||||||
|
writer.writePolygonalZone
|
||||||
|
(
|
||||||
|
pp.name(),
|
||||||
|
strandID++, //strandID,
|
||||||
|
ipp,
|
||||||
|
allVarLocation
|
||||||
|
);
|
||||||
|
|
||||||
|
// Write coordinates
|
||||||
|
writer.writeField(ipp.localPoints().component(0)());
|
||||||
|
writer.writeField(ipp.localPoints().component(1)());
|
||||||
|
writer.writeField(ipp.localPoints().component(2)());
|
||||||
|
|
||||||
|
// Write all fields
|
||||||
|
forAll(vsf, i)
|
||||||
|
{
|
||||||
|
writer.writeField
|
||||||
(
|
(
|
||||||
nearCellValue,
|
writer.getPatchField
|
||||||
vsf[i],
|
(
|
||||||
patchID
|
nearCellValue,
|
||||||
)()
|
vsf[i],
|
||||||
);
|
patchID
|
||||||
}
|
)()
|
||||||
forAll(vvf, i)
|
);
|
||||||
{
|
}
|
||||||
writer.writeField
|
forAll(vvf, i)
|
||||||
(
|
{
|
||||||
writer.getPatchField
|
writer.writeField
|
||||||
(
|
(
|
||||||
nearCellValue,
|
writer.getPatchField
|
||||||
vvf[i],
|
(
|
||||||
patchID
|
nearCellValue,
|
||||||
)()
|
vvf[i],
|
||||||
);
|
patchID
|
||||||
}
|
)()
|
||||||
forAll(vSpheretf, i)
|
);
|
||||||
{
|
}
|
||||||
writer.writeField
|
forAll(vSpheretf, i)
|
||||||
(
|
{
|
||||||
writer.getPatchField
|
writer.writeField
|
||||||
(
|
(
|
||||||
nearCellValue,
|
writer.getPatchField
|
||||||
vSpheretf[i],
|
(
|
||||||
patchID
|
nearCellValue,
|
||||||
)()
|
vSpheretf[i],
|
||||||
);
|
patchID
|
||||||
}
|
)()
|
||||||
forAll(vSymmtf, i)
|
);
|
||||||
{
|
}
|
||||||
writer.writeField
|
forAll(vSymmtf, i)
|
||||||
(
|
{
|
||||||
writer.getPatchField
|
writer.writeField
|
||||||
(
|
(
|
||||||
nearCellValue,
|
writer.getPatchField
|
||||||
vSymmtf[i],
|
(
|
||||||
patchID
|
nearCellValue,
|
||||||
)()
|
vSymmtf[i],
|
||||||
);
|
patchID
|
||||||
}
|
)()
|
||||||
forAll(vtf, i)
|
);
|
||||||
{
|
}
|
||||||
writer.writeField
|
forAll(vtf, i)
|
||||||
(
|
{
|
||||||
writer.getPatchField
|
writer.writeField
|
||||||
(
|
(
|
||||||
nearCellValue,
|
writer.getPatchField
|
||||||
vtf[i],
|
(
|
||||||
patchID
|
nearCellValue,
|
||||||
)()
|
vtf[i],
|
||||||
);
|
patchID
|
||||||
}
|
)()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
forAll(psf, i)
|
forAll(psf, i)
|
||||||
{
|
{
|
||||||
writer.writeField
|
writer.writeField
|
||||||
(
|
(
|
||||||
psf[i].boundaryField()[patchID].patchInternalField()()
|
psf[i].boundaryField()[patchID].patchInternalField()()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
forAll(pvf, i)
|
forAll(pvf, i)
|
||||||
{
|
{
|
||||||
writer.writeField
|
writer.writeField
|
||||||
(
|
(
|
||||||
pvf[i].boundaryField()[patchID].patchInternalField()()
|
pvf[i].boundaryField()[patchID].patchInternalField()()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
writer.writeConnectivity(ipp);
|
writer.writeConnectivity(ipp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< " Skipping zero sized patch " << patchID
|
||||||
|
<< "\t" << pp.name()
|
||||||
|
<< nl << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
writer.writeEnd();
|
writer.writeEnd();
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ set -x
|
|||||||
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
||||||
then
|
then
|
||||||
case "$ParaView_VERSION" in
|
case "$ParaView_VERSION" in
|
||||||
3*)
|
3* | git)
|
||||||
wmake libso vtkPV3Readers
|
wmake libso vtkPV3Readers
|
||||||
PV3blockMeshReader/Allwmake
|
PV3blockMeshReader/Allwmake
|
||||||
PV3FoamReader/Allwmake
|
PV3FoamReader/Allwmake
|
||||||
|
|||||||
@ -5,7 +5,7 @@ set -x
|
|||||||
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
||||||
then
|
then
|
||||||
case "$ParaView_VERSION" in
|
case "$ParaView_VERSION" in
|
||||||
3*)
|
3* | git)
|
||||||
wmake libso vtkPV3Foam
|
wmake libso vtkPV3Foam
|
||||||
(
|
(
|
||||||
cd PV3FoamReader
|
cd PV3FoamReader
|
||||||
|
|||||||
@ -5,7 +5,7 @@ set -x
|
|||||||
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
|
||||||
then
|
then
|
||||||
case "$ParaView_VERSION" in
|
case "$ParaView_VERSION" in
|
||||||
3*)
|
3* | git)
|
||||||
wmake libso vtkPV3blockMesh
|
wmake libso vtkPV3blockMesh
|
||||||
(
|
(
|
||||||
cd PV3blockMeshReader
|
cd PV3blockMeshReader
|
||||||
|
|||||||
@ -130,7 +130,7 @@ OpenFOAM)
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
case "$ParaView_VERSION" in
|
case "$ParaView_VERSION" in
|
||||||
3*)
|
3* | git)
|
||||||
# only create/remove caseFile if it didn't already exist
|
# only create/remove caseFile if it didn't already exist
|
||||||
[ -e $caseFile ] || {
|
[ -e $caseFile ] || {
|
||||||
trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT
|
trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT
|
||||||
|
|||||||
@ -122,7 +122,7 @@ Foam::dictionary::dictionary
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
dictionaryName(parentDict.name() + "::" + dict.name()),
|
dictionaryName(dict.name()),
|
||||||
IDLList<entry>(dict, *this),
|
IDLList<entry>(dict, *this),
|
||||||
parent_(parentDict)
|
parent_(parentDict)
|
||||||
{
|
{
|
||||||
@ -489,7 +489,7 @@ Foam::dictionary Foam::dictionary::subOrEmptyDict
|
|||||||
|
|
||||||
if (entryPtr == NULL)
|
if (entryPtr == NULL)
|
||||||
{
|
{
|
||||||
return dictionary(*this, dictionary(keyword));
|
return dictionary(*this, dictionary(name() + "::" + keyword));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1461,7 +1461,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
|
|||||||
getNeighbourData(distribution, sourceFace, sourceProc, sourceNewProc);
|
getNeighbourData(distribution, sourceFace, sourceProc, sourceNewProc);
|
||||||
|
|
||||||
|
|
||||||
// Remove meshPhi. Since this would otherwise dissappear anyway
|
// Remove meshPhi. Since this would otherwise disappear anyway
|
||||||
// during topo changes and we have to guarantee that all the fields
|
// during topo changes and we have to guarantee that all the fields
|
||||||
// can be sent.
|
// can be sent.
|
||||||
mesh_.clearOut();
|
mesh_.clearOut();
|
||||||
|
|||||||
@ -54,7 +54,6 @@ SourceFiles
|
|||||||
#define fvMeshDistribute_H
|
#define fvMeshDistribute_H
|
||||||
|
|
||||||
#include "Field.H"
|
#include "Field.H"
|
||||||
#include "uLabel.H"
|
|
||||||
#include "fvMeshSubset.H"
|
#include "fvMeshSubset.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -264,6 +264,10 @@ public:
|
|||||||
" const face& f,\n"
|
" const face& f,\n"
|
||||||
" const label owner,"
|
" const label owner,"
|
||||||
" const label neighbour,\n"
|
" const label neighbour,\n"
|
||||||
|
" const label masterPointID,\n"
|
||||||
|
" const label masterEdgeID,\n"
|
||||||
|
" const label masterFaceID,\n"
|
||||||
|
" const bool flipFaceFlux,\n"
|
||||||
" const label patchID,\n"
|
" const label patchID,\n"
|
||||||
" const label zoneID"
|
" const label zoneID"
|
||||||
")"
|
")"
|
||||||
@ -292,6 +296,7 @@ public:
|
|||||||
" const label masterPointID,\n"
|
" const label masterPointID,\n"
|
||||||
" const label masterEdgeID,\n"
|
" const label masterEdgeID,\n"
|
||||||
" const label masterFaceID,\n"
|
" const label masterFaceID,\n"
|
||||||
|
" const bool flipFaceFlux,\n"
|
||||||
" const label patchID,\n"
|
" const label patchID,\n"
|
||||||
" const label zoneID,\n"
|
" const label zoneID,\n"
|
||||||
" const bool zoneFlip\n"
|
" const bool zoneFlip\n"
|
||||||
|
|||||||
@ -2207,6 +2207,7 @@ void Foam::polyTopoChange::addMesh
|
|||||||
// Extend
|
// Extend
|
||||||
points_.setCapacity(points_.size() + points.size());
|
points_.setCapacity(points_.size() + points.size());
|
||||||
pointMap_.setCapacity(pointMap_.size() + points.size());
|
pointMap_.setCapacity(pointMap_.size() + points.size());
|
||||||
|
reversePointMap_.setCapacity(reversePointMap_.size() + points.size());
|
||||||
pointZone_.resize(pointZone_.size() + points.size()/100);
|
pointZone_.resize(pointZone_.size() + points.size()/100);
|
||||||
|
|
||||||
// Precalc offset zones
|
// Precalc offset zones
|
||||||
@ -2246,6 +2247,7 @@ void Foam::polyTopoChange::addMesh
|
|||||||
label nAllCells = mesh.nCells();
|
label nAllCells = mesh.nCells();
|
||||||
|
|
||||||
cellMap_.setCapacity(cellMap_.size() + nAllCells);
|
cellMap_.setCapacity(cellMap_.size() + nAllCells);
|
||||||
|
reverseCellMap_.setCapacity(reverseCellMap_.size() + nAllCells);
|
||||||
cellFromPoint_.resize(cellFromPoint_.size() + nAllCells/100);
|
cellFromPoint_.resize(cellFromPoint_.size() + nAllCells/100);
|
||||||
cellFromEdge_.resize(cellFromEdge_.size() + nAllCells/100);
|
cellFromEdge_.resize(cellFromEdge_.size() + nAllCells/100);
|
||||||
cellFromFace_.resize(cellFromFace_.size() + nAllCells/100);
|
cellFromFace_.resize(cellFromFace_.size() + nAllCells/100);
|
||||||
@ -2310,6 +2312,7 @@ void Foam::polyTopoChange::addMesh
|
|||||||
faceOwner_.setCapacity(faceOwner_.size() + nAllFaces);
|
faceOwner_.setCapacity(faceOwner_.size() + nAllFaces);
|
||||||
faceNeighbour_.setCapacity(faceNeighbour_.size() + nAllFaces);
|
faceNeighbour_.setCapacity(faceNeighbour_.size() + nAllFaces);
|
||||||
faceMap_.setCapacity(faceMap_.size() + nAllFaces);
|
faceMap_.setCapacity(faceMap_.size() + nAllFaces);
|
||||||
|
reverseFaceMap_.setCapacity(reverseFaceMap_.size() + nAllFaces);
|
||||||
faceFromPoint_.resize(faceFromPoint_.size() + nAllFaces/100);
|
faceFromPoint_.resize(faceFromPoint_.size() + nAllFaces/100);
|
||||||
faceFromEdge_.resize(faceFromEdge_.size() + nAllFaces/100);
|
faceFromEdge_.resize(faceFromEdge_.size() + nAllFaces/100);
|
||||||
flipFaceFlux_.setCapacity(faces_.size() + nAllFaces);
|
flipFaceFlux_.setCapacity(faces_.size() + nAllFaces);
|
||||||
@ -2394,6 +2397,39 @@ void Foam::polyTopoChange::addMesh
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::polyTopoChange::setCapacity
|
||||||
|
(
|
||||||
|
const label nPoints,
|
||||||
|
const label nFaces,
|
||||||
|
const label nCells
|
||||||
|
)
|
||||||
|
{
|
||||||
|
points_.setCapacity(nPoints);
|
||||||
|
pointMap_.setCapacity(nPoints);
|
||||||
|
reversePointMap_.setCapacity(nPoints);
|
||||||
|
pointZone_.resize(pointZone_.size() + nPoints/100);
|
||||||
|
|
||||||
|
faces_.setCapacity(nFaces);
|
||||||
|
region_.setCapacity(nFaces);
|
||||||
|
faceOwner_.setCapacity(nFaces);
|
||||||
|
faceNeighbour_.setCapacity(nFaces);
|
||||||
|
faceMap_.setCapacity(nFaces);
|
||||||
|
reverseFaceMap_.setCapacity(nFaces);
|
||||||
|
faceFromPoint_.resize(faceFromPoint_.size() + nFaces/100);
|
||||||
|
faceFromEdge_.resize(faceFromEdge_.size() + nFaces/100);
|
||||||
|
flipFaceFlux_.setCapacity(nFaces);
|
||||||
|
faceZone_.resize(faceZone_.size() + nFaces/100);
|
||||||
|
faceZoneFlip_.setCapacity(nFaces);
|
||||||
|
|
||||||
|
cellMap_.setCapacity(nCells);
|
||||||
|
reverseCellMap_.setCapacity(nCells);
|
||||||
|
cellFromPoint_.resize(cellFromPoint_.size() + nCells/100);
|
||||||
|
cellFromEdge_.resize(cellFromEdge_.size() + nCells/100);
|
||||||
|
cellFromFace_.resize(cellFromFace_.size() + nCells/100);
|
||||||
|
cellZone_.setCapacity(nCells);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::label Foam::polyTopoChange::setAction(const topoAction& action)
|
Foam::label Foam::polyTopoChange::setAction(const topoAction& action)
|
||||||
{
|
{
|
||||||
if (isType<polyAddPoint>(action))
|
if (isType<polyAddPoint>(action))
|
||||||
|
|||||||
@ -472,6 +472,15 @@ public:
|
|||||||
const labelList& cellZoneMap
|
const labelList& cellZoneMap
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Explicitly pre-size the dynamic storage for expected mesh
|
||||||
|
// size for if construct-without-mesh
|
||||||
|
void setCapacity
|
||||||
|
(
|
||||||
|
const label nPoints,
|
||||||
|
const label nFaces,
|
||||||
|
const label nCells
|
||||||
|
);
|
||||||
|
|
||||||
//- Move all points. Incompatible with other topology changes.
|
//- Move all points. Incompatible with other topology changes.
|
||||||
void movePoints(const pointField& newPoints);
|
void movePoints(const pointField& newPoints);
|
||||||
|
|
||||||
|
|||||||
@ -339,7 +339,7 @@ void Foam::removeCells::setRefinement
|
|||||||
faceI, // label of face being modified
|
faceI, // label of face being modified
|
||||||
nei, // owner
|
nei, // owner
|
||||||
-1, // neighbour
|
-1, // neighbour
|
||||||
false, // face flip
|
true, // face flip
|
||||||
newPatchID[faceI], // patch for face
|
newPatchID[faceI], // patch for face
|
||||||
false, // remove from zone
|
false, // remove from zone
|
||||||
zoneID, // zone for face
|
zoneID, // zone for face
|
||||||
|
|||||||
@ -137,8 +137,7 @@ class removeFaces
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Return face with all pointsToRemove removed.
|
//- Return face with all pointsToRemove removed.
|
||||||
face filterFace(const labelHashSet& pointsToRemove, const label)
|
face filterFace(const labelHashSet&, const label) const;
|
||||||
const;
|
|
||||||
|
|
||||||
//- Wrapper for meshMod.modifyFace. Reverses face if own>nei.
|
//- Wrapper for meshMod.modifyFace. Reverses face if own>nei.
|
||||||
void modFace
|
void modFace
|
||||||
|
|||||||
@ -31,10 +31,5 @@ pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPat
|
|||||||
pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C
|
pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C
|
||||||
pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C
|
pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C
|
||||||
pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C
|
pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C
|
||||||
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
|
|
||||||
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C
|
|
||||||
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C
|
|
||||||
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C
|
|
||||||
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C
|
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libfvMotionSolvers
|
LIB = $(FOAM_LIBBIN)/libfvMotionSolvers
|
||||||
|
|||||||
@ -10,4 +10,4 @@ LIB_LIBS = \
|
|||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lforces
|
/*-lforces include in controlDict if needed */
|
||||||
|
|||||||
@ -176,7 +176,7 @@ void surfaceSlipDisplacementPointPatchVectorField::calcProjection
|
|||||||
|
|
||||||
// Knock out any wedge component
|
// Knock out any wedge component
|
||||||
scalarField offset(start.size(), 0.0);
|
scalarField offset(start.size(), 0.0);
|
||||||
if (wedgePlane_ >= 0 && wedgePlane_ <= vector::nComponents)
|
if (wedgePlane_ >= 0 && wedgePlane_ < vector::nComponents)
|
||||||
{
|
{
|
||||||
forAll(offset, i)
|
forAll(offset, i)
|
||||||
{
|
{
|
||||||
@ -262,7 +262,7 @@ void surfaceSlipDisplacementPointPatchVectorField::calcProjection
|
|||||||
|
|
||||||
if (interPt.hit())
|
if (interPt.hit())
|
||||||
{
|
{
|
||||||
if (wedgePlane_ >= 0 && wedgePlane_ <= vector::nComponents)
|
if (wedgePlane_ >= 0 && wedgePlane_ < vector::nComponents)
|
||||||
{
|
{
|
||||||
interPt.rawPoint()[wedgePlane_] += offset[i];
|
interPt.rawPoint()[wedgePlane_] += offset[i];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -344,7 +344,7 @@ void Foam::ReactingParcel<ParcelType>::calc
|
|||||||
td.cloud().hcTrans()[cellI] +=
|
td.cloud().hcTrans()[cellI] +=
|
||||||
np0
|
np0
|
||||||
*dMassPC[i]
|
*dMassPC[i]
|
||||||
*td.cloud().mcCarrierThermo().speciesData()[gid].H(T0);
|
*td.cloud().mcCarrierThermo().speciesData()[gid].Hc();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update momentum transfer
|
// Update momentum transfer
|
||||||
@ -423,6 +423,11 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
|||||||
scalarField& Cs
|
scalarField& Cs
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
typedef PhaseChangeModel
|
||||||
|
<
|
||||||
|
typename ReactingParcel<ParcelType>::trackData::cloudType
|
||||||
|
> phaseChangeModelType;
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!td.cloud().phaseChange().active()
|
!td.cloud().phaseChange().active()
|
||||||
@ -464,17 +469,26 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
|||||||
td.cloud().composition().localToGlobalCarrierId(idPhase, i);
|
td.cloud().composition().localToGlobalCarrierId(idPhase, i);
|
||||||
const label idl = td.cloud().composition().globalIds(idPhase)[i];
|
const label idl = td.cloud().composition().globalIds(idPhase)[i];
|
||||||
|
|
||||||
const scalar hv = td.cloud().mcCarrierThermo().speciesData()[idc].H(Ts);
|
if
|
||||||
const scalar hl =
|
(
|
||||||
td.cloud().composition().liquids().properties()[idl].h(pc_, Ts);
|
td.cloud().phaseChange().enthalpyTransfer()
|
||||||
|
== phaseChangeModelType::etLatentHeat
|
||||||
|
)
|
||||||
|
{
|
||||||
|
scalar hlp =
|
||||||
|
td.cloud().composition().liquids().properties()[idl].hl(pc_, T);
|
||||||
|
|
||||||
// Enthalphy transfer to carrier phase - method 1 using enthalpy diff
|
Sh -= dMassPC[i]*hlp/dt;
|
||||||
Sh += dMassPC[i]*(hl - hv)/dt;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Note: enthalpies of both phases must use the same reference
|
||||||
|
scalar hc = td.cloud().mcCarrierThermo().speciesData()[idc].H(T);
|
||||||
|
scalar hp =
|
||||||
|
td.cloud().composition().liquids().properties()[idl].h(pc_, T);
|
||||||
|
|
||||||
// Enthalphy transfer to carrier phase - method 2 using latent heat
|
Sh -= dMassPC[i]*(hc - hp)/dt;
|
||||||
// const scalar hl =
|
}
|
||||||
// td.cloud().composition().liquids().properties()[idl].hl(pc_, Ts);
|
|
||||||
// Sh -= dMassPC[i]*hl/dt;
|
|
||||||
|
|
||||||
// Update particle surface thermo properties
|
// Update particle surface thermo properties
|
||||||
const scalar Dab =
|
const scalar Dab =
|
||||||
|
|||||||
@ -136,6 +136,9 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
typedef ReactingCloud<ParcelType> cloudType;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
|
|||||||
@ -26,6 +26,48 @@ License
|
|||||||
|
|
||||||
#include "PhaseChangeModel.H"
|
#include "PhaseChangeModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
const Foam::wordList Foam::PhaseChangeModel<CloudType>::
|
||||||
|
enthalpyTransferTypeNames
|
||||||
|
(
|
||||||
|
IStringStream
|
||||||
|
(
|
||||||
|
"("
|
||||||
|
"latentHeat "
|
||||||
|
"enthalpyDifference"
|
||||||
|
")"
|
||||||
|
)()
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
typename Foam::PhaseChangeModel<CloudType>::enthalpyTransferType
|
||||||
|
Foam::PhaseChangeModel<CloudType>::wordToEnthalpyTransfer(const word& etName)
|
||||||
|
const
|
||||||
|
{
|
||||||
|
forAll(enthalpyTransferTypeNames, i)
|
||||||
|
{
|
||||||
|
if (etName == enthalpyTransferTypeNames[i])
|
||||||
|
{
|
||||||
|
return enthalpyTransferType(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"PhaseChangeModel<CloudType>::enthalpyTransferType"
|
||||||
|
"PhaseChangeModel<CloudType>::wordToEnthalpyTransfer(const word&) const"
|
||||||
|
) << "Unknown enthalpyType " << etName << ". Valid selections are:" << nl
|
||||||
|
<< enthalpyTransferTypeNames << exit(FatalError);
|
||||||
|
|
||||||
|
return enthalpyTransferType(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
@ -36,7 +78,8 @@ Foam::PhaseChangeModel<CloudType>::PhaseChangeModel
|
|||||||
:
|
:
|
||||||
dict_(dictionary::null),
|
dict_(dictionary::null),
|
||||||
owner_(owner),
|
owner_(owner),
|
||||||
coeffDict_(dictionary::null)
|
coeffDict_(dictionary::null),
|
||||||
|
enthalpyTransfer_(etLatentHeat)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -50,7 +93,11 @@ Foam::PhaseChangeModel<CloudType>::PhaseChangeModel
|
|||||||
:
|
:
|
||||||
dict_(dict),
|
dict_(dict),
|
||||||
owner_(owner),
|
owner_(owner),
|
||||||
coeffDict_(dict.subDict(type + "Coeffs"))
|
coeffDict_(dict.subDict(type + "Coeffs")),
|
||||||
|
enthalpyTransfer_
|
||||||
|
(
|
||||||
|
wordToEnthalpyTransfer(coeffDict_.lookup("enthalpyTransfer"))
|
||||||
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -83,6 +130,14 @@ const Foam::dictionary& Foam::PhaseChangeModel<CloudType>::coeffDict() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
const typename Foam::PhaseChangeModel<CloudType>::enthalpyTransferType&
|
||||||
|
Foam::PhaseChangeModel<CloudType>::enthalpyTransfer() const
|
||||||
|
{
|
||||||
|
return enthalpyTransfer_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "NewPhaseChangeModel.C"
|
#include "NewPhaseChangeModel.C"
|
||||||
|
|||||||
@ -53,6 +53,21 @@ namespace Foam
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
class PhaseChangeModel
|
class PhaseChangeModel
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Public enumerations
|
||||||
|
|
||||||
|
//- Enthalpy transfer type
|
||||||
|
enum enthalpyTransferType
|
||||||
|
{
|
||||||
|
etLatentHeat,
|
||||||
|
etEnthalpyDifference
|
||||||
|
};
|
||||||
|
|
||||||
|
//- Name representations of enthalpy transfer types
|
||||||
|
static const Foam::wordList enthalpyTransferTypeNames;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
@ -66,9 +81,15 @@ protected:
|
|||||||
//- The coefficient dictionary
|
//- The coefficient dictionary
|
||||||
const dictionary coeffDict_;
|
const dictionary coeffDict_;
|
||||||
|
|
||||||
|
//- Enthalpy transfer type enumeration
|
||||||
|
enthalpyTransferType enthalpyTransfer_;
|
||||||
|
|
||||||
|
|
||||||
// Protected member functions
|
// Protected member functions
|
||||||
|
|
||||||
|
//- Convert word to enthalpy transfer type
|
||||||
|
enthalpyTransferType wordToEnthalpyTransfer(const word& etName) const;
|
||||||
|
|
||||||
//- Sherwood number
|
//- Sherwood number
|
||||||
scalar Sh() const;
|
scalar Sh() const;
|
||||||
|
|
||||||
@ -129,6 +150,9 @@ public:
|
|||||||
//- Return the coefficient dictionary
|
//- Return the coefficient dictionary
|
||||||
const dictionary& coeffDict() const;
|
const dictionary& coeffDict() const;
|
||||||
|
|
||||||
|
//- Return the enthalpy transfer type enumeration
|
||||||
|
const enthalpyTransferType& enthalpyTransfer() const;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
|||||||
@ -560,7 +560,11 @@ void Foam::autoRefineDriver::zonify
|
|||||||
const_cast<Time&>(mesh.time())++;
|
const_cast<Time&>(mesh.time())++;
|
||||||
}
|
}
|
||||||
|
|
||||||
meshRefiner_.zonify(refineParams.keepPoints()[0]);
|
meshRefiner_.zonify
|
||||||
|
(
|
||||||
|
refineParams.keepPoints()[0],
|
||||||
|
refineParams.allowFreeStandingZoneFaces()
|
||||||
|
);
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -44,6 +44,7 @@ Foam::refinementParameters::refinementParameters
|
|||||||
curvature_(readScalar(dict.lookup("curvature"))),
|
curvature_(readScalar(dict.lookup("curvature"))),
|
||||||
nBufferLayers_(readLabel(dict.lookup("nBufferLayers"))),
|
nBufferLayers_(readLabel(dict.lookup("nBufferLayers"))),
|
||||||
keepPoints_(dict.lookup("keepPoints")),
|
keepPoints_(dict.lookup("keepPoints")),
|
||||||
|
allowFreeStandingZoneFaces_(dict.lookup("allowFreeStandingZoneFaces")),
|
||||||
maxLoadUnbalance_(dict.lookupOrDefault<scalar>("maxLoadUnbalance",0))
|
maxLoadUnbalance_(dict.lookupOrDefault<scalar>("maxLoadUnbalance",0))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -55,6 +56,7 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict)
|
|||||||
minRefineCells_(readLabel(dict.lookup("minRefinementCells"))),
|
minRefineCells_(readLabel(dict.lookup("minRefinementCells"))),
|
||||||
nBufferLayers_(readLabel(dict.lookup("nCellsBetweenLevels"))),
|
nBufferLayers_(readLabel(dict.lookup("nCellsBetweenLevels"))),
|
||||||
keepPoints_(pointField(1, dict.lookup("locationInMesh"))),
|
keepPoints_(pointField(1, dict.lookup("locationInMesh"))),
|
||||||
|
allowFreeStandingZoneFaces_(dict.lookup("allowFreeStandingZoneFaces")),
|
||||||
maxLoadUnbalance_(dict.lookupOrDefault<scalar>("maxLoadUnbalance",0))
|
maxLoadUnbalance_(dict.lookupOrDefault<scalar>("maxLoadUnbalance",0))
|
||||||
{
|
{
|
||||||
scalar featAngle(readScalar(dict.lookup("resolveFeatureAngle")));
|
scalar featAngle(readScalar(dict.lookup("resolveFeatureAngle")));
|
||||||
|
|||||||
@ -38,6 +38,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "pointField.H"
|
#include "pointField.H"
|
||||||
|
#include "Switch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -73,6 +74,10 @@ class refinementParameters
|
|||||||
//- Areas to keep
|
//- Areas to keep
|
||||||
const pointField keepPoints_;
|
const pointField keepPoints_;
|
||||||
|
|
||||||
|
//- FaceZone faces allowed which have owner and neighbour in same
|
||||||
|
// cellZone?
|
||||||
|
Switch allowFreeStandingZoneFaces_;
|
||||||
|
|
||||||
//- Allowed load unbalance
|
//- Allowed load unbalance
|
||||||
scalar maxLoadUnbalance_;
|
scalar maxLoadUnbalance_;
|
||||||
|
|
||||||
@ -137,6 +142,13 @@ public:
|
|||||||
return keepPoints_;
|
return keepPoints_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Are zone faces allowed only inbetween different cell zones
|
||||||
|
// or also just free standing?
|
||||||
|
bool allowFreeStandingZoneFaces() const
|
||||||
|
{
|
||||||
|
return allowFreeStandingZoneFaces_;
|
||||||
|
}
|
||||||
|
|
||||||
//- Allowed load unbalance
|
//- Allowed load unbalance
|
||||||
scalar maxLoadUnbalance() const
|
scalar maxLoadUnbalance() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -704,7 +704,11 @@ public:
|
|||||||
//- Put faces/cells into zones according to surface specification.
|
//- Put faces/cells into zones according to surface specification.
|
||||||
// Returns null if no zone surfaces present. Region containing
|
// Returns null if no zone surfaces present. Region containing
|
||||||
// the keepPoint will not be put into a cellZone.
|
// the keepPoint will not be put into a cellZone.
|
||||||
autoPtr<mapPolyMesh> zonify(const point& keepPoint);
|
autoPtr<mapPolyMesh> zonify
|
||||||
|
(
|
||||||
|
const point& keepPoint,
|
||||||
|
const bool allowFreeStandingZoneFaces
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Other topo changes
|
// Other topo changes
|
||||||
|
|||||||
@ -2032,7 +2032,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::dupNonManifoldPoints()
|
|||||||
// Zoning
|
// Zoning
|
||||||
Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
|
Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
|
||||||
(
|
(
|
||||||
const point& keepPoint
|
const point& keepPoint,
|
||||||
|
const bool allowFreeStandingZoneFaces
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const wordList& cellZoneNames = surfaces_.cellZoneNames();
|
const wordList& cellZoneNames = surfaces_.cellZoneNames();
|
||||||
@ -2344,9 +2345,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//// Make sure namedSurfaceIndex is unset inbetween same cell cell zones.
|
// Make sure namedSurfaceIndex is unset inbetween same cell cell zones.
|
||||||
//makeConsistentFaceIndex(cellToZone, namedSurfaceIndex);
|
if (!allowFreeStandingZoneFaces)
|
||||||
|
{
|
||||||
|
makeConsistentFaceIndex(cellToZone, namedSurfaceIndex);
|
||||||
|
}
|
||||||
|
|
||||||
// Topochange container
|
// Topochange container
|
||||||
polyTopoChange meshMod(mesh_);
|
polyTopoChange meshMod(mesh_);
|
||||||
@ -2440,7 +2443,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
|
|||||||
}
|
}
|
||||||
else if (ownZone == neiZone)
|
else if (ownZone == neiZone)
|
||||||
{
|
{
|
||||||
// Can only happen for coupled boundaries. Keep master
|
// Free-standing zone face or coupled boundary. Keep master
|
||||||
// face unflipped.
|
// face unflipped.
|
||||||
flip = !isMasterFace[faceI];
|
flip = !isMasterFace[faceI];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -291,7 +291,7 @@ public:
|
|||||||
(
|
(
|
||||||
const labelList& surfacesToTest,
|
const labelList& surfacesToTest,
|
||||||
const pointField& samples,
|
const pointField& samples,
|
||||||
const scalarField& nearestDistSqr,
|
const scalarField& nearestDistSqr,
|
||||||
labelList& hitSurface,
|
labelList& hitSurface,
|
||||||
labelList& hitRegion
|
labelList& hitRegion
|
||||||
) const;
|
) const;
|
||||||
|
|||||||
@ -218,6 +218,69 @@ bool Foam::triSurfaceMesh::isSurfaceClosed() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Gets all intersections after initial one. Adds smallVec and starts tracking
|
||||||
|
// from there.
|
||||||
|
void Foam::triSurfaceMesh::getNextIntersections
|
||||||
|
(
|
||||||
|
const indexedOctree<treeDataTriSurface>& octree,
|
||||||
|
const point& start,
|
||||||
|
const point& end,
|
||||||
|
const vector& smallVec,
|
||||||
|
DynamicList<pointIndexHit, 1, 1>& hits
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const vector dirVec(end-start);
|
||||||
|
const scalar magSqrDirVec(magSqr(dirVec));
|
||||||
|
|
||||||
|
// Initial perturbation amount
|
||||||
|
vector perturbVec(smallVec);
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
// Start tracking from last hit.
|
||||||
|
point pt = hits[hits.size()-1].hitPoint() + perturbVec;
|
||||||
|
|
||||||
|
if (((pt-start)&dirVec) > magSqrDirVec)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// See if any intersection between pt and end
|
||||||
|
pointIndexHit inter = octree.findLine(pt, end);
|
||||||
|
|
||||||
|
if (!inter.hit())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if already found this intersection
|
||||||
|
bool duplicateHit = false;
|
||||||
|
forAllReverse(hits, i)
|
||||||
|
{
|
||||||
|
if (hits[i].index() == inter.index())
|
||||||
|
{
|
||||||
|
duplicateHit = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (duplicateHit)
|
||||||
|
{
|
||||||
|
// Hit same triangle again. Increase perturbVec and try again.
|
||||||
|
perturbVec *= 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Proper hit
|
||||||
|
hits.append(inter);
|
||||||
|
// Restore perturbVec
|
||||||
|
perturbVec = smallVec;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::triSurfaceMesh::triSurfaceMesh(const IOobject& io, const triSurface& s)
|
Foam::triSurfaceMesh::triSurfaceMesh(const IOobject& io, const triSurface& s)
|
||||||
@ -620,27 +683,14 @@ void Foam::triSurfaceMesh::findLineAll
|
|||||||
hits.clear();
|
hits.clear();
|
||||||
hits.append(inter);
|
hits.append(inter);
|
||||||
|
|
||||||
point pt = inter.hitPoint() + smallVec[pointI];
|
getNextIntersections
|
||||||
|
(
|
||||||
while (((pt-start[pointI])&dirVec[pointI]) <= magSqrDirVec[pointI])
|
octree,
|
||||||
{
|
start[pointI],
|
||||||
// See if any intersection between pt and end
|
end[pointI],
|
||||||
pointIndexHit inter = octree.findLine(pt, end[pointI]);
|
smallVec[pointI],
|
||||||
|
hits
|
||||||
// Check for not hit or hit same triangle as before (can happen
|
);
|
||||||
// if vector along surface of triangle)
|
|
||||||
if
|
|
||||||
(
|
|
||||||
!inter.hit()
|
|
||||||
|| (inter.index() == hits.last().index())
|
|
||||||
)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
hits.append(inter);
|
|
||||||
|
|
||||||
pt = inter.hitPoint() + smallVec[pointI];
|
|
||||||
}
|
|
||||||
|
|
||||||
info[pointI].transfer(hits);
|
info[pointI].transfer(hits);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,6 +111,17 @@ private:
|
|||||||
// addressing.
|
// addressing.
|
||||||
bool isSurfaceClosed() const;
|
bool isSurfaceClosed() const;
|
||||||
|
|
||||||
|
//- Steps to next intersection. Adds smallVec and starts tracking
|
||||||
|
// from there.
|
||||||
|
static void getNextIntersections
|
||||||
|
(
|
||||||
|
const indexedOctree<treeDataTriSurface>& octree,
|
||||||
|
const point& start,
|
||||||
|
const point& end,
|
||||||
|
const vector& smallVec,
|
||||||
|
DynamicList<pointIndexHit, 1, 1>& hits
|
||||||
|
);
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
triSurfaceMesh(const triSurfaceMesh&);
|
triSurfaceMesh(const triSurfaceMesh&);
|
||||||
|
|
||||||
|
|||||||
@ -4,4 +4,10 @@ forces/forcesFunctionObject.C
|
|||||||
forceCoeffs/forceCoeffs.C
|
forceCoeffs/forceCoeffs.C
|
||||||
forceCoeffs/forceCoeffsFunctionObject.C
|
forceCoeffs/forceCoeffsFunctionObject.C
|
||||||
|
|
||||||
|
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C
|
||||||
|
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C
|
||||||
|
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C
|
||||||
|
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionState.C
|
||||||
|
pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionStateIO.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libforces
|
LIB = $(FOAM_LIBBIN)/libforces
|
||||||
|
|||||||
@ -449,7 +449,7 @@ template<class CompType, class ThermoType>
|
|||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::volScalarField>
|
||||||
Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
|
Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
|
||||||
{
|
{
|
||||||
scalar pf,cf,pr,cr;
|
scalar pf, cf, pr, cr;
|
||||||
label lRef, rRef;
|
label lRef, rRef;
|
||||||
|
|
||||||
const volScalarField rho
|
const volScalarField rho
|
||||||
|
|||||||
@ -81,7 +81,7 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
TName_(dict.lookup("T")),
|
TName_(dict.lookup("T")),
|
||||||
emissivity_(readScalar(dict.lookup("emissivity")))
|
emissivity_(readScalar(dict.lookup("emissivity")))
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("refValue"))
|
||||||
{
|
{
|
||||||
fvPatchScalarField::operator=
|
fvPatchScalarField::operator=
|
||||||
(
|
(
|
||||||
|
|||||||
@ -39,7 +39,9 @@ icoPolynomial<PolySize>::icoPolynomial(Istream& is)
|
|||||||
:
|
:
|
||||||
specie(is),
|
specie(is),
|
||||||
rhoPolynomial_("rhoPolynomial", is)
|
rhoPolynomial_("rhoPolynomial", is)
|
||||||
{}
|
{
|
||||||
|
rhoPolynomial_ *= this->W();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||||
@ -47,7 +49,8 @@ icoPolynomial<PolySize>::icoPolynomial(Istream& is)
|
|||||||
template<int PolySize>
|
template<int PolySize>
|
||||||
Ostream& operator<<(Ostream& os, const icoPolynomial<PolySize>& ip)
|
Ostream& operator<<(Ostream& os, const icoPolynomial<PolySize>& ip)
|
||||||
{
|
{
|
||||||
os << static_cast<const specie&>(ip);
|
os << static_cast<const specie&>(ip) << tab
|
||||||
|
<< "rhoPolynomial" << tab << ip.rhoPolynomial_/ip.W();
|
||||||
|
|
||||||
os.check
|
os.check
|
||||||
(
|
(
|
||||||
|
|||||||
@ -99,7 +99,8 @@ class icoPolynomial
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Density [kg/m^3]
|
//- Density
|
||||||
|
// Note: input in [kg/m3], but internally uses [kg/m3/kmol]
|
||||||
Polynomial<PolySize> rhoPolynomial_;
|
Polynomial<PolySize> rhoPolynomial_;
|
||||||
|
|
||||||
|
|
||||||
@ -117,6 +118,9 @@ public:
|
|||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
icoPolynomial(Istream&);
|
icoPolynomial(Istream&);
|
||||||
|
|
||||||
|
//- Construct as copy
|
||||||
|
inline icoPolynomial(const icoPolynomial&);
|
||||||
|
|
||||||
//- Construct as named copy
|
//- Construct as named copy
|
||||||
inline icoPolynomial(const word& name, const icoPolynomial&);
|
inline icoPolynomial(const word& name, const icoPolynomial&);
|
||||||
|
|
||||||
@ -141,6 +145,7 @@ public:
|
|||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
|
inline icoPolynomial& operator=(const icoPolynomial&);
|
||||||
inline void operator+=(const icoPolynomial&);
|
inline void operator+=(const icoPolynomial&);
|
||||||
inline void operator-=(const icoPolynomial&);
|
inline void operator-=(const icoPolynomial&);
|
||||||
|
|
||||||
|
|||||||
@ -42,6 +42,17 @@ inline Foam::icoPolynomial<PolySize>::icoPolynomial
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<int PolySize>
|
||||||
|
inline Foam::icoPolynomial<PolySize>::icoPolynomial
|
||||||
|
(
|
||||||
|
const icoPolynomial<PolySize>& ip
|
||||||
|
)
|
||||||
|
:
|
||||||
|
specie(ip),
|
||||||
|
rhoPolynomial_(ip.rhoPolynomial_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<int PolySize>
|
template<int PolySize>
|
||||||
inline Foam::icoPolynomial<PolySize>::icoPolynomial
|
inline Foam::icoPolynomial<PolySize>::icoPolynomial
|
||||||
(
|
(
|
||||||
@ -78,7 +89,7 @@ Foam::icoPolynomial<PolySize>::New(Istream& is)
|
|||||||
template<int PolySize>
|
template<int PolySize>
|
||||||
inline Foam::scalar Foam::icoPolynomial<PolySize>::rho(scalar, scalar T) const
|
inline Foam::scalar Foam::icoPolynomial<PolySize>::rho(scalar, scalar T) const
|
||||||
{
|
{
|
||||||
return rhoPolynomial_.evaluate(T);
|
return rhoPolynomial_.evaluate(T)/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -98,6 +109,20 @@ inline Foam::scalar Foam::icoPolynomial<PolySize>::Z(scalar, scalar) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<int PolySize>
|
||||||
|
inline Foam::icoPolynomial<PolySize>& Foam::icoPolynomial<PolySize>::operator=
|
||||||
|
(
|
||||||
|
const icoPolynomial<PolySize>& ip
|
||||||
|
)
|
||||||
|
{
|
||||||
|
specie::operator=(ip);
|
||||||
|
|
||||||
|
rhoPolynomial_ = ip.rhoPolynomial_;
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<int PolySize>
|
template<int PolySize>
|
||||||
inline void Foam::icoPolynomial<PolySize>::operator+=
|
inline void Foam::icoPolynomial<PolySize>::operator+=
|
||||||
(
|
(
|
||||||
@ -122,6 +147,7 @@ inline void Foam::icoPolynomial<PolySize>::operator-=
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar molr1 = this->nMoles();
|
scalar molr1 = this->nMoles();
|
||||||
|
|
||||||
specie::operator-=(ip);
|
specie::operator-=(ip);
|
||||||
|
|
||||||
molr1 /= this->nMoles();
|
molr1 /= this->nMoles();
|
||||||
@ -147,15 +173,15 @@ Foam::icoPolynomial<PolySize> Foam::operator+
|
|||||||
const icoPolynomial<PolySize>& ip2
|
const icoPolynomial<PolySize>& ip2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar mol1 = ip1.nMoles();
|
scalar nMoles = ip1.nMoles() + ip2.nMoles();
|
||||||
scalar mol2 = ip2.nMoles();
|
scalar molr1 = ip1.nMoles()/nMoles;
|
||||||
scalar nMoles = mol1 + mol2;
|
scalar molr2 = ip2.nMoles()/nMoles;
|
||||||
|
|
||||||
return icoPolynomial<PolySize>
|
return icoPolynomial<PolySize>
|
||||||
(
|
(
|
||||||
static_cast<const specie&>(ip1)
|
static_cast<const specie&>(ip1)
|
||||||
+ static_cast<const specie&>(ip2),
|
+ static_cast<const specie&>(ip2),
|
||||||
(mol1/nMoles)*ip1.rhoPolynomial_ + (mol2/nMoles)*ip2.rhoPolynomial_
|
molr1*ip1.rhoPolynomial_ + molr2*ip2.rhoPolynomial_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,15 +193,15 @@ Foam::icoPolynomial<PolySize> Foam::operator-
|
|||||||
const icoPolynomial<PolySize>& ip2
|
const icoPolynomial<PolySize>& ip2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar mol1 = ip1.nMoles();
|
scalar nMoles = ip1.nMoles() + ip2.nMoles();
|
||||||
scalar mol2 = ip2.nMoles();
|
scalar molr1 = ip1.nMoles()/nMoles;
|
||||||
scalar nMoles = mol1 + mol2;
|
scalar molr2 = ip2.nMoles()/nMoles;
|
||||||
|
|
||||||
return icoPolynomial<PolySize>
|
return icoPolynomial<PolySize>
|
||||||
(
|
(
|
||||||
static_cast<const specie&>(ip1)
|
static_cast<const specie&>(ip1)
|
||||||
- static_cast<const specie&>(ip2),
|
- static_cast<const specie&>(ip2),
|
||||||
(mol1/nMoles)*ip1.rhoPolynomial_ - (mol2/nMoles)*ip2.rhoPolynomial_
|
molr1*ip1.rhoPolynomial_ - molr2*ip2.rhoPolynomial_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,6 @@ inline specie::specie
|
|||||||
const scalar molWeight
|
const scalar molWeight
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
//name_(),
|
|
||||||
nMoles_(nMoles),
|
nMoles_(nMoles),
|
||||||
molWeight_(molWeight)
|
molWeight_(molWeight)
|
||||||
{}
|
{}
|
||||||
@ -113,29 +112,29 @@ inline void specie::operator=(const specie& st)
|
|||||||
|
|
||||||
inline void specie::operator+=(const specie& st)
|
inline void specie::operator+=(const specie& st)
|
||||||
{
|
{
|
||||||
scalar sumNmoles_ = max(nMoles_ + st.nMoles_, SMALL);
|
scalar sumNmoles = max(nMoles_ + st.nMoles_, SMALL);
|
||||||
|
|
||||||
molWeight_ =
|
molWeight_ =
|
||||||
nMoles_/sumNmoles_*molWeight_
|
nMoles_/sumNmoles*molWeight_
|
||||||
+ st.nMoles_/sumNmoles_*st.molWeight_;
|
+ st.nMoles_/sumNmoles*st.molWeight_;
|
||||||
|
|
||||||
nMoles_ = sumNmoles_;
|
nMoles_ = sumNmoles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void specie::operator-=(const specie& st)
|
inline void specie::operator-=(const specie& st)
|
||||||
{
|
{
|
||||||
scalar diffnMoles_ = nMoles_ - st.nMoles_;
|
scalar diffnMoles = nMoles_ - st.nMoles_;
|
||||||
if (mag(diffnMoles_) < SMALL)
|
if (mag(diffnMoles) < SMALL)
|
||||||
{
|
{
|
||||||
diffnMoles_ = SMALL;
|
diffnMoles = SMALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
molWeight_ =
|
molWeight_ =
|
||||||
nMoles_/diffnMoles_*molWeight_
|
nMoles_/diffnMoles*molWeight_
|
||||||
- st.nMoles_/diffnMoles_*st.molWeight_;
|
- st.nMoles_/diffnMoles*st.molWeight_;
|
||||||
|
|
||||||
nMoles_ = diffnMoles_;
|
nMoles_ = diffnMoles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -149,30 +148,30 @@ inline void specie::operator*=(const scalar s)
|
|||||||
|
|
||||||
inline specie operator+(const specie& st1, const specie& st2)
|
inline specie operator+(const specie& st1, const specie& st2)
|
||||||
{
|
{
|
||||||
scalar sumNmoles_ = max(st1.nMoles_ + st2.nMoles_, SMALL);
|
scalar sumNmoles = max(st1.nMoles_ + st2.nMoles_, SMALL);
|
||||||
|
|
||||||
return specie
|
return specie
|
||||||
(
|
(
|
||||||
sumNmoles_,
|
sumNmoles,
|
||||||
st1.nMoles_/sumNmoles_*st1.molWeight_
|
st1.nMoles_/sumNmoles*st1.molWeight_
|
||||||
+ st2.nMoles_/sumNmoles_*st2.molWeight_
|
+ st2.nMoles_/sumNmoles*st2.molWeight_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline specie operator-(const specie& st1, const specie& st2)
|
inline specie operator-(const specie& st1, const specie& st2)
|
||||||
{
|
{
|
||||||
scalar diffNmoles_ = st1.nMoles_ - st2.nMoles_;
|
scalar diffNmoles = st1.nMoles_ - st2.nMoles_;
|
||||||
if (mag(diffNmoles_) < SMALL)
|
if (mag(diffNmoles) < SMALL)
|
||||||
{
|
{
|
||||||
diffNmoles_ = SMALL;
|
diffNmoles = SMALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return specie
|
return specie
|
||||||
(
|
(
|
||||||
diffNmoles_,
|
diffNmoles,
|
||||||
st1.nMoles_/diffNmoles_*st1.molWeight_
|
st1.nMoles_/diffNmoles*st1.molWeight_
|
||||||
- st2.nMoles_/diffNmoles_*st2.molWeight_
|
- st2.nMoles_/diffNmoles*st2.molWeight_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,11 +39,21 @@ Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
|||||||
Hf_(readScalar(is)),
|
Hf_(readScalar(is)),
|
||||||
Sf_(readScalar(is)),
|
Sf_(readScalar(is)),
|
||||||
cpPolynomial_("cpPolynomial", is),
|
cpPolynomial_("cpPolynomial", is),
|
||||||
dhPolynomial_(cpPolynomial_.integrate()),
|
hPolynomial_(),
|
||||||
dsPolynomial_(cpPolynomial_.integrateMinus1())
|
sPolynomial_()
|
||||||
{
|
{
|
||||||
// Offset dh poly so that it is relative to the enthalpy at Tstd
|
Hf_ *= this->W();
|
||||||
dhPolynomial_[0] -= dhPolynomial_.evaluate(specie::Tstd);
|
Sf_ *= this->W();
|
||||||
|
cpPolynomial_ *= this->W();
|
||||||
|
|
||||||
|
hPolynomial_ = cpPolynomial_.integrate();
|
||||||
|
sPolynomial_ = cpPolynomial_.integrateMinus1();
|
||||||
|
|
||||||
|
// Offset h poly so that it is relative to the enthalpy at Tstd
|
||||||
|
hPolynomial_[0] += Hf_ - hPolynomial_.evaluate(specie::Tstd);
|
||||||
|
|
||||||
|
// Offset s poly so that it is relative to the entropy at Tstd
|
||||||
|
sPolynomial_[0] += Sf_ - sPolynomial_.evaluate(specie::Tstd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -57,15 +67,17 @@ Foam::Ostream& Foam::operator<<
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
os << static_cast<const EquationOfState&>(pt) << tab
|
os << static_cast<const EquationOfState&>(pt) << tab
|
||||||
<< pt.Hf_ << tab
|
<< pt.Hf_/pt.W() << tab
|
||||||
<< pt.Sf_ << tab
|
<< pt.Sf_ << tab
|
||||||
<< pt.cpPolynomial_ << tab
|
<< "cpPolynomial" << tab << pt.cpPolynomial_/pt.W();
|
||||||
<< pt.dhPolynomial_ << tab
|
|
||||||
<< pt.dsPolynomial;
|
|
||||||
|
|
||||||
os.check
|
os.check
|
||||||
(
|
(
|
||||||
"operator<<(Ostream& os, const hPolynomialThermo<EquationOfState>& pt)"
|
"operator<<"
|
||||||
|
"("
|
||||||
|
"Ostream&, "
|
||||||
|
"const hPolynomialThermo<EquationOfState, PolySize>&"
|
||||||
|
")"
|
||||||
);
|
);
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
|
|||||||
@ -100,20 +100,22 @@ class hPolynomialThermo
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Heat of formation [J/kg]
|
//- Heat of formation
|
||||||
|
// Note: input in [J/kg], but internally uses [J/kmol]
|
||||||
scalar Hf_;
|
scalar Hf_;
|
||||||
|
|
||||||
//- Standard entropy [J/(kg.K)]
|
//- Standard entropy
|
||||||
|
// Note: input in [J/kg/K], but internally uses [J/kmol/K]
|
||||||
scalar Sf_;
|
scalar Sf_;
|
||||||
|
|
||||||
//- Specific heat at constant pressure [J/(kg.K)]
|
//- Specific heat at constant pressure [J/(kg.K)]
|
||||||
Polynomial<PolySize> cpPolynomial_;
|
Polynomial<PolySize> cpPolynomial_;
|
||||||
|
|
||||||
//- Enthalpy - derived from cp [J/kg] - relative to Tstd
|
//- Enthalpy - derived from cp [J/kg] - relative to Tstd
|
||||||
typename Polynomial<PolySize>::intPolyType dhPolynomial_;
|
typename Polynomial<PolySize>::intPolyType hPolynomial_;
|
||||||
|
|
||||||
//- Entropy - derived from cp [J/(kg.K)]
|
//- Entropy - derived from cp [J/(kg.K)] - relative to Tstd
|
||||||
Polynomial<PolySize> dsPolynomial_;
|
Polynomial<PolySize> sPolynomial_;
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
@ -125,8 +127,8 @@ class hPolynomialThermo
|
|||||||
const scalar Hf,
|
const scalar Hf,
|
||||||
const scalar Sf,
|
const scalar Sf,
|
||||||
const Polynomial<PolySize>& cpPoly,
|
const Polynomial<PolySize>& cpPoly,
|
||||||
const typename Polynomial<PolySize>::intPolyType& dhPoly,
|
const typename Polynomial<PolySize>::intPolyType& hPoly,
|
||||||
const Polynomial<PolySize>& dsPoly
|
const Polynomial<PolySize>& sPoly
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -137,6 +139,9 @@ public:
|
|||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
hPolynomialThermo(Istream& is);
|
hPolynomialThermo(Istream& is);
|
||||||
|
|
||||||
|
//- Construct as copy
|
||||||
|
inline hPolynomialThermo(const hPolynomialThermo&);
|
||||||
|
|
||||||
//- Construct as a named copy
|
//- Construct as a named copy
|
||||||
inline hPolynomialThermo(const word&, const hPolynomialThermo&);
|
inline hPolynomialThermo(const word&, const hPolynomialThermo&);
|
||||||
|
|
||||||
@ -161,8 +166,10 @@ public:
|
|||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
|
inline hPolynomialThermo& operator=(const hPolynomialThermo&);
|
||||||
inline void operator+=(const hPolynomialThermo&);
|
inline void operator+=(const hPolynomialThermo&);
|
||||||
inline void operator-=(const hPolynomialThermo&);
|
inline void operator-=(const hPolynomialThermo&);
|
||||||
|
inline void operator*=(const scalar);
|
||||||
|
|
||||||
|
|
||||||
// Friend operators
|
// Friend operators
|
||||||
|
|||||||
@ -35,21 +35,36 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
|||||||
const scalar Hf,
|
const scalar Hf,
|
||||||
const scalar Sf,
|
const scalar Sf,
|
||||||
const Polynomial<PolySize>& cpPoly,
|
const Polynomial<PolySize>& cpPoly,
|
||||||
const typename Polynomial<PolySize>::intPolyType& dhPoly,
|
const typename Polynomial<PolySize>::intPolyType& hPoly,
|
||||||
const Polynomial<PolySize>& dsPoly
|
const Polynomial<PolySize>& sPoly
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
EquationOfState(pt),
|
EquationOfState(pt),
|
||||||
Hf_(Hf),
|
Hf_(Hf),
|
||||||
Sf_(Sf),
|
Sf_(Sf),
|
||||||
cpPolynomial_(cpPoly),
|
cpPolynomial_(cpPoly),
|
||||||
dhPolynomial_(dhPoly),
|
hPolynomial_(hPoly),
|
||||||
dsPolynomial_(dsPoly)
|
sPolynomial_(sPoly)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class EquationOfState, int PolySize>
|
||||||
|
inline Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
||||||
|
(
|
||||||
|
const hPolynomialThermo& pt
|
||||||
|
)
|
||||||
|
:
|
||||||
|
EquationOfState(pt),
|
||||||
|
Hf_(pt.Hf_),
|
||||||
|
Sf_(pt.Sf_),
|
||||||
|
cpPolynomial_(pt.cpPolynomial_),
|
||||||
|
hPolynomial_(pt.hPolynomial_),
|
||||||
|
sPolynomial_(pt.sPolynomial_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class EquationOfState, int PolySize>
|
template<class EquationOfState, int PolySize>
|
||||||
inline Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
inline Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
||||||
(
|
(
|
||||||
@ -61,8 +76,8 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
|||||||
Hf_(pt.Hf_),
|
Hf_(pt.Hf_),
|
||||||
Sf_(pt.Sf_),
|
Sf_(pt.Sf_),
|
||||||
cpPolynomial_(pt.cpPolynomial_),
|
cpPolynomial_(pt.cpPolynomial_),
|
||||||
dhPolynomial_(pt.dhPolynomial_),
|
hPolynomial_(pt.hPolynomial_),
|
||||||
dsPolynomial_(pt.dsPolynomial_)
|
sPolynomial_(pt.sPolynomial_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -74,7 +89,7 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::cp
|
|||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return cpPolynomial_.evaluate(T)*this->W();
|
return cpPolynomial_.evaluate(T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -84,7 +99,7 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::h
|
|||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return (dhPolynomial_.evaluate(T) + Hf_)*this->W();
|
return hPolynomial_.evaluate(T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -94,7 +109,7 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::hs
|
|||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return dhPolynomial_.evaluate(T)*this->W();
|
return h(T) - hc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -102,7 +117,7 @@ template<class EquationOfState, int PolySize>
|
|||||||
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::hc()
|
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::hc()
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
return Hf_*this->W();
|
return Hf_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -112,12 +127,31 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::s
|
|||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return (dsPolynomial_.evaluate(T) + Sf_)*this->W();
|
return sPolynomial_.evaluate(T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class EquationOfState, int PolySize>
|
||||||
|
inline Foam::hPolynomialThermo<EquationOfState, PolySize>&
|
||||||
|
Foam::hPolynomialThermo<EquationOfState, PolySize>::operator=
|
||||||
|
(
|
||||||
|
const hPolynomialThermo<EquationOfState, PolySize>& pt
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EquationOfState::operator=(pt);
|
||||||
|
|
||||||
|
Hf_ = pt.Hf_;
|
||||||
|
Sf_ = pt.Sf_;
|
||||||
|
cpPolynomial_ = pt.cpPolynomial_;
|
||||||
|
hPolynomial_ = pt.hPolynomial_;
|
||||||
|
sPolynomial_ = pt.sPolynomial_;
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class EquationOfState, int PolySize>
|
template<class EquationOfState, int PolySize>
|
||||||
inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator+=
|
inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator+=
|
||||||
(
|
(
|
||||||
@ -134,8 +168,8 @@ inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator+=
|
|||||||
Hf_ = molr1*Hf_ + molr2*pt.Hf_;
|
Hf_ = molr1*Hf_ + molr2*pt.Hf_;
|
||||||
Sf_ = molr1*Sf_ + molr2*pt.Sf_;
|
Sf_ = molr1*Sf_ + molr2*pt.Sf_;
|
||||||
cpPolynomial_ = molr1*cpPolynomial_ + molr2*pt.cpPolynomial_;
|
cpPolynomial_ = molr1*cpPolynomial_ + molr2*pt.cpPolynomial_;
|
||||||
dhPolynomial_ = molr1*dhPolynomial_ + molr2*pt.dhPolynomial_;
|
hPolynomial_ = molr1*hPolynomial_ + molr2*pt.hPolynomial_;
|
||||||
dsPolynomial_ = molr1*dsPolynomial_ + molr2*pt.dsPolynomial_;
|
sPolynomial_ = molr1*sPolynomial_ + molr2*pt.sPolynomial_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -155,8 +189,18 @@ inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator-=
|
|||||||
Hf_ = molr1*Hf_ - molr2*pt.Hf_;
|
Hf_ = molr1*Hf_ - molr2*pt.Hf_;
|
||||||
Sf_ = molr1*Sf_ - molr2*pt.Sf_;
|
Sf_ = molr1*Sf_ - molr2*pt.Sf_;
|
||||||
cpPolynomial_ = molr1*cpPolynomial_ - molr2*pt.cpPolynomial_;
|
cpPolynomial_ = molr1*cpPolynomial_ - molr2*pt.cpPolynomial_;
|
||||||
dhPolynomial_ = molr1*dhPolynomial_ - molr2*pt.dhPolynomial_;
|
hPolynomial_ = molr1*hPolynomial_ - molr2*pt.hPolynomial_;
|
||||||
dsPolynomial_ = molr1*dsPolynomial_ - molr2*pt.dsPolynomial_;
|
sPolynomial_ = molr1*sPolynomial_ - molr2*pt.sPolynomial_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class EquationOfState, int PolySize>
|
||||||
|
inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator*=
|
||||||
|
(
|
||||||
|
const scalar s
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EquationOfState::operator*=(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -169,22 +213,20 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize> Foam::operator+
|
|||||||
const hPolynomialThermo<EquationOfState, PolySize>& pt2
|
const hPolynomialThermo<EquationOfState, PolySize>& pt2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EquationOfState eofs
|
EquationOfState eofs = pt1;
|
||||||
(
|
eofs += pt2;
|
||||||
static_cast<const EquationOfState&>(pt1)
|
|
||||||
+ static_cast<const EquationOfState&>(pt2)
|
|
||||||
);
|
|
||||||
|
|
||||||
scalar molr1 = pt1.nMoles()/eofs.nMoles();
|
scalar molr1 = pt1.nMoles()/eofs.nMoles();
|
||||||
scalar molr2 = pt2.nMoles()/eofs.nMoles();
|
scalar molr2 = pt2.nMoles()/eofs.nMoles();
|
||||||
|
|
||||||
return hPolynomialThermo<EquationOfState, PolySize>
|
return hPolynomialThermo<EquationOfState, PolySize>
|
||||||
(
|
(
|
||||||
eofs,
|
eofs,
|
||||||
molr1*pt1.Hf_ + molr2*pt2.Hf_,
|
molr1*pt1.Hf_ + molr2*pt2.Hf_,
|
||||||
molr1*pt1.Sf_ + molr2*pt2.Sf_,
|
molr1*pt1.Sf_ + molr2*pt2.Sf_,
|
||||||
molr1*pt1.cpPolynomial_ + molr2*pt2.cpPolynomial_,
|
molr1*pt1.cpPolynomial_ + molr2*pt2.cpPolynomial_,
|
||||||
molr1*pt1.dhPolynomial_ + molr2*pt2.dhPolynomial_,
|
molr1*pt1.hPolynomial_ + molr2*pt2.hPolynomial_,
|
||||||
molr1*pt1.dsPolynomial_ + molr2*pt2.dsPolynomial_
|
molr1*pt1.sPolynomial_ + molr2*pt2.sPolynomial_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,22 +238,20 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize> Foam::operator-
|
|||||||
const hPolynomialThermo<EquationOfState, PolySize>& pt2
|
const hPolynomialThermo<EquationOfState, PolySize>& pt2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EquationOfState eofs
|
EquationOfState eofs = pt1;
|
||||||
(
|
eofs -= pt2;
|
||||||
static_cast<const EquationOfState&>(pt1)
|
|
||||||
- static_cast<const EquationOfState&>(pt2)
|
|
||||||
);
|
|
||||||
|
|
||||||
scalar molr1 = pt1.nMoles()/eofs.nMoles();
|
scalar molr1 = pt1.nMoles()/eofs.nMoles();
|
||||||
scalar molr2 = pt2.nMoles()/eofs.nMoles();
|
scalar molr2 = pt2.nMoles()/eofs.nMoles();
|
||||||
|
|
||||||
return hPolynomialThermo<EquationOfState, PolySize>
|
return hPolynomialThermo<EquationOfState, PolySize>
|
||||||
(
|
(
|
||||||
eofs,
|
eofs,
|
||||||
molr1*pt1.Hf_ - molr2*pt2.Hf_,
|
molr1*pt1.Hf_ - molr2*pt2.Hf_,
|
||||||
molr1*pt1.Sf_ - molr2*pt2.Sf_,
|
molr1*pt1.Sf_ - molr2*pt2.Sf_,
|
||||||
molr1*pt1.cpPolynomial_ - molr2*pt2.cpPolynomial_,
|
molr1*pt1.cpPolynomial_ - molr2*pt2.cpPolynomial_,
|
||||||
molr1*pt1.dhPolynomial_ - molr2*pt2.dhPolynomial_,
|
molr1*pt1.hPolynomial_ - molr2*pt2.hPolynomial_,
|
||||||
molr1*pt1.dsPolynomial_ - molr2*pt2.dsPolynomial_
|
molr1*pt1.sPolynomial_ - molr2*pt2.sPolynomial_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,8 +269,8 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize> Foam::operator*
|
|||||||
pt.Hf_,
|
pt.Hf_,
|
||||||
pt.Sf_,
|
pt.Sf_,
|
||||||
pt.cpPolynomial_,
|
pt.cpPolynomial_,
|
||||||
pt.dhPolynomial_,
|
pt.hPolynomial_,
|
||||||
pt.dsPolynomial_
|
pt.sPolynomial_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -303,6 +303,7 @@ inline void Foam::specieThermo<thermo>::operator+=
|
|||||||
thermo::operator+=(st);
|
thermo::operator+=(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class thermo>
|
||||||
inline void Foam::specieThermo<thermo>::operator-=
|
inline void Foam::specieThermo<thermo>::operator-=
|
||||||
(
|
(
|
||||||
@ -312,6 +313,7 @@ inline void Foam::specieThermo<thermo>::operator-=
|
|||||||
thermo::operator-=(st);
|
thermo::operator-=(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class thermo>
|
||||||
inline void Foam::specieThermo<thermo>::operator*=(const scalar s)
|
inline void Foam::specieThermo<thermo>::operator*=(const scalar s)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -35,7 +35,10 @@ Foam::polynomialTransport<Thermo, PolySize>::polynomialTransport(Istream& is)
|
|||||||
Thermo(is),
|
Thermo(is),
|
||||||
muPolynomial_("muPolynomial", is),
|
muPolynomial_("muPolynomial", is),
|
||||||
kappaPolynomial_("kappaPolynomial", is)
|
kappaPolynomial_("kappaPolynomial", is)
|
||||||
{}
|
{
|
||||||
|
muPolynomial_ *= this->W();
|
||||||
|
kappaPolynomial_ *= this->W();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
@ -47,7 +50,9 @@ Foam::Ostream& Foam::operator<<
|
|||||||
const polynomialTransport<Thermo, PolySize>& pt
|
const polynomialTransport<Thermo, PolySize>& pt
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
os << static_cast<const Thermo&>(pt);
|
os << static_cast<const Thermo&>(pt) << tab
|
||||||
|
<< "muPolynomial" << tab << pt.muPolynomial_/pt.W() << tab
|
||||||
|
<< "kappaPolynomial" << tab << pt.kappaPolynomial_/pt.W();
|
||||||
|
|
||||||
os.check
|
os.check
|
||||||
(
|
(
|
||||||
|
|||||||
@ -96,9 +96,11 @@ class polynomialTransport
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Dynamic viscosity
|
//- Dynamic viscosity
|
||||||
|
// Note: input in [Pa.s], but internally uses [Pa.s/kmol]
|
||||||
Polynomial<PolySize> muPolynomial_;
|
Polynomial<PolySize> muPolynomial_;
|
||||||
|
|
||||||
//- Thermal conductivity
|
//- Thermal conductivity
|
||||||
|
// Note: input in [W/m/K], but internally uses [W/m/K/kmol]
|
||||||
Polynomial<PolySize> kappaPolynomial_;
|
Polynomial<PolySize> kappaPolynomial_;
|
||||||
|
|
||||||
|
|
||||||
@ -117,6 +119,9 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct copy
|
||||||
|
inline polynomialTransport(const polynomialTransport&);
|
||||||
|
|
||||||
//- Construct as named copy
|
//- Construct as named copy
|
||||||
inline polynomialTransport(const word&, const polynomialTransport&);
|
inline polynomialTransport(const word&, const polynomialTransport&);
|
||||||
|
|
||||||
@ -148,6 +153,9 @@ public:
|
|||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
inline polynomialTransport& operator=(const polynomialTransport&);
|
inline polynomialTransport& operator=(const polynomialTransport&);
|
||||||
|
inline void operator+=(const polynomialTransport&);
|
||||||
|
inline void operator-=(const polynomialTransport&);
|
||||||
|
inline void operator*=(const scalar);
|
||||||
|
|
||||||
|
|
||||||
// Friend operators
|
// Friend operators
|
||||||
|
|||||||
@ -28,6 +28,18 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Thermo, int PolySize>
|
||||||
|
inline Foam::polynomialTransport<Thermo, PolySize>::polynomialTransport
|
||||||
|
(
|
||||||
|
const polynomialTransport& pt
|
||||||
|
)
|
||||||
|
:
|
||||||
|
Thermo(pt),
|
||||||
|
muPolynomial_(pt.muPolynomial_),
|
||||||
|
kappaPolynomial_(pt.kappaPolynomial_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class Thermo, int PolySize>
|
template<class Thermo, int PolySize>
|
||||||
inline Foam::polynomialTransport<Thermo, PolySize>::polynomialTransport
|
inline Foam::polynomialTransport<Thermo, PolySize>::polynomialTransport
|
||||||
(
|
(
|
||||||
@ -85,7 +97,7 @@ inline Foam::scalar Foam::polynomialTransport<Thermo, PolySize>::mu
|
|||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return muPolynomial_.evaluate(T);
|
return muPolynomial_.evaluate(T)/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,7 +107,7 @@ inline Foam::scalar Foam::polynomialTransport<Thermo, PolySize>::kappa
|
|||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return kappaPolynomial_.evaluate(T);
|
return kappaPolynomial_.evaluate(T)/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -132,6 +144,52 @@ Foam::polynomialTransport<Thermo, PolySize>::operator=
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Thermo, int PolySize>
|
||||||
|
inline void Foam::polynomialTransport<Thermo, PolySize>::operator+=
|
||||||
|
(
|
||||||
|
const polynomialTransport<Thermo, PolySize>& pt
|
||||||
|
)
|
||||||
|
{
|
||||||
|
scalar molr1 = this->nMoles();
|
||||||
|
|
||||||
|
Thermo::operator+=(pt);
|
||||||
|
|
||||||
|
molr1 /= this->nMoles();
|
||||||
|
scalar molr2 = pt.nMoles()/this->nMoles();
|
||||||
|
|
||||||
|
muPolynomial_ = molr1*muPolynomial_ + molr2*pt.muPolynomial_;
|
||||||
|
kappaPolynomial_ = molr1*kappaPolynomial_ + molr2*pt.kappaPolynomial_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Thermo, int PolySize>
|
||||||
|
inline void Foam::polynomialTransport<Thermo, PolySize>::operator-=
|
||||||
|
(
|
||||||
|
const polynomialTransport<Thermo, PolySize>& pt
|
||||||
|
)
|
||||||
|
{
|
||||||
|
scalar molr1 = this->nMoles();
|
||||||
|
|
||||||
|
Thermo::operator-=(pt);
|
||||||
|
|
||||||
|
molr1 /= this->nMoles();
|
||||||
|
scalar molr2 = pt.nMoles()/this->nMoles();
|
||||||
|
|
||||||
|
muPolynomial_ = molr1*muPolynomial_ - molr2*pt.muPolynomial_;
|
||||||
|
kappaPolynomial_ = molr1*kappaPolynomial_ - molr2*pt.kappaPolynomial_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Thermo, int PolySize>
|
||||||
|
inline void Foam::polynomialTransport<Thermo, PolySize>::operator*=
|
||||||
|
(
|
||||||
|
const scalar s
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Thermo::operator*=(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Thermo, int PolySize>
|
template<class Thermo, int PolySize>
|
||||||
@ -146,7 +204,6 @@ inline Foam::polynomialTransport<Thermo, PolySize> Foam::operator+
|
|||||||
static_cast<const Thermo&>(pt1) + static_cast<const Thermo&>(pt2)
|
static_cast<const Thermo&>(pt1) + static_cast<const Thermo&>(pt2)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
scalar molr1 = pt1.nMoles()/t.nMoles();
|
scalar molr1 = pt1.nMoles()/t.nMoles();
|
||||||
scalar molr2 = pt2.nMoles()/t.nMoles();
|
scalar molr2 = pt2.nMoles()/t.nMoles();
|
||||||
|
|
||||||
|
|||||||
@ -161,7 +161,18 @@ LaunderSharmaKE::LaunderSharmaKE
|
|||||||
mesh_
|
mesh_
|
||||||
),
|
),
|
||||||
|
|
||||||
mut_(rho_*Cmu_*fMu()*sqr(k_)/(epsilon_ + epsilonSmall_)),
|
mut_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"mut",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
rho_*Cmu_*fMu()*sqr(k_)/(epsilon_ + epsilonSmall_)
|
||||||
|
),
|
||||||
|
|
||||||
alphat_
|
alphat_
|
||||||
(
|
(
|
||||||
|
|||||||
@ -79,6 +79,7 @@ void omegaWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
|
|||||||
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
|
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||||
|
os.writeKeyword("beta1") << beta1_ << token::END_STATEMENT << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,6 +96,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
Cmu_(0.09),
|
Cmu_(0.09),
|
||||||
kappa_(0.41),
|
kappa_(0.41),
|
||||||
E_(9.8),
|
E_(9.8),
|
||||||
|
beta1_(0.075),
|
||||||
yPlusLam_(calcYPlusLam(kappa_, E_))
|
yPlusLam_(calcYPlusLam(kappa_, E_))
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -115,6 +117,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
Cmu_(ptf.Cmu_),
|
Cmu_(ptf.Cmu_),
|
||||||
kappa_(ptf.kappa_),
|
kappa_(ptf.kappa_),
|
||||||
E_(ptf.E_),
|
E_(ptf.E_),
|
||||||
|
beta1_(ptf.beta1_),
|
||||||
yPlusLam_(ptf.yPlusLam_)
|
yPlusLam_(ptf.yPlusLam_)
|
||||||
{
|
{
|
||||||
checkType();
|
checkType();
|
||||||
@ -133,6 +136,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
||||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||||
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
||||||
|
beta1_(dict.lookupOrDefault<scalar>("beta1", 0.075)),
|
||||||
yPlusLam_(calcYPlusLam(kappa_, E_))
|
yPlusLam_(calcYPlusLam(kappa_, E_))
|
||||||
{
|
{
|
||||||
checkType();
|
checkType();
|
||||||
@ -149,6 +153,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
Cmu_(owfpsf.Cmu_),
|
Cmu_(owfpsf.Cmu_),
|
||||||
kappa_(owfpsf.kappa_),
|
kappa_(owfpsf.kappa_),
|
||||||
E_(owfpsf.E_),
|
E_(owfpsf.E_),
|
||||||
|
beta1_(owfpsf.beta1_),
|
||||||
yPlusLam_(owfpsf.yPlusLam_)
|
yPlusLam_(owfpsf.yPlusLam_)
|
||||||
{
|
{
|
||||||
checkType();
|
checkType();
|
||||||
@ -166,6 +171,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
Cmu_(owfpsf.Cmu_),
|
Cmu_(owfpsf.Cmu_),
|
||||||
kappa_(owfpsf.kappa_),
|
kappa_(owfpsf.kappa_),
|
||||||
E_(owfpsf.E_),
|
E_(owfpsf.E_),
|
||||||
|
beta1_(owfpsf.beta1_),
|
||||||
yPlusLam_(owfpsf.yPlusLam_)
|
yPlusLam_(owfpsf.yPlusLam_)
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -222,7 +228,11 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
Cmu25*y[faceI]*sqrt(k[faceCellI])
|
Cmu25*y[faceI]*sqrt(k[faceCellI])
|
||||||
/(muw[faceI]/rhow[faceI]);
|
/(muw[faceI]/rhow[faceI]);
|
||||||
|
|
||||||
omega[faceCellI] = sqrt(k[faceCellI])/(Cmu25*kappa_*y[faceI]);
|
scalar omegaVis = 6.0*muw[faceI]/(rhow[faceI]*beta1_*sqr(y[faceI]));
|
||||||
|
|
||||||
|
scalar omegaLog = sqrt(k[faceCellI])/(Cmu25*kappa_*y[faceI]);
|
||||||
|
|
||||||
|
omega[faceCellI] = sqrt(sqr(omegaVis) + sqr(omegaLog));
|
||||||
|
|
||||||
if (yPlus > yPlusLam_)
|
if (yPlus > yPlusLam_)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,7 +26,23 @@ Class
|
|||||||
Foam::compressible::RASModels::omegaWallFunctionFvPatchScalarField
|
Foam::compressible::RASModels::omegaWallFunctionFvPatchScalarField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Replaces functionality in wallFunctionsI.H
|
Provides a wall function boundary condition/constraint on omega
|
||||||
|
|
||||||
|
Computed value is:
|
||||||
|
|
||||||
|
omega = sqrt(omega_vis^2 + omega_log^2)
|
||||||
|
|
||||||
|
where
|
||||||
|
omega_vis = omega in viscous region
|
||||||
|
omega_log = omega in logarithmic region
|
||||||
|
|
||||||
|
Model described by Eq.(15) of:
|
||||||
|
@verbatim
|
||||||
|
Menter, F., Esch, T.
|
||||||
|
"Elements of Industrial Heat Transfer Prediction"
|
||||||
|
16th Brazilian Congress of Mechanical Engineering (COBEM),
|
||||||
|
Nov. 2001
|
||||||
|
@endverbatim
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
omegaWallFunctionFvPatchScalarField.C
|
omegaWallFunctionFvPatchScalarField.C
|
||||||
@ -71,6 +87,9 @@ protected:
|
|||||||
//- E coefficient
|
//- E coefficient
|
||||||
scalar E_;
|
scalar E_;
|
||||||
|
|
||||||
|
//- beta1 coefficient
|
||||||
|
scalar beta1_;
|
||||||
|
|
||||||
//- Y+ at the edge of the laminar sublayer
|
//- Y+ at the edge of the laminar sublayer
|
||||||
scalar yPlusLam_;
|
scalar yPlusLam_;
|
||||||
|
|
||||||
|
|||||||
@ -79,6 +79,7 @@ void omegaWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
|
|||||||
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
|
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
|
||||||
|
os.writeKeyword("beta1") << beta1_ << token::END_STATEMENT << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,6 +96,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
Cmu_(0.09),
|
Cmu_(0.09),
|
||||||
kappa_(0.41),
|
kappa_(0.41),
|
||||||
E_(9.8),
|
E_(9.8),
|
||||||
|
beta1_(0.075),
|
||||||
yPlusLam_(calcYPlusLam(kappa_, E_))
|
yPlusLam_(calcYPlusLam(kappa_, E_))
|
||||||
{
|
{
|
||||||
checkType();
|
checkType();
|
||||||
@ -114,6 +116,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
Cmu_(ptf.Cmu_),
|
Cmu_(ptf.Cmu_),
|
||||||
kappa_(ptf.kappa_),
|
kappa_(ptf.kappa_),
|
||||||
E_(ptf.E_),
|
E_(ptf.E_),
|
||||||
|
beta1_(ptf.beta1_),
|
||||||
yPlusLam_(ptf.yPlusLam_)
|
yPlusLam_(ptf.yPlusLam_)
|
||||||
{
|
{
|
||||||
checkType();
|
checkType();
|
||||||
@ -132,6 +135,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
|
||||||
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
|
||||||
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
|
||||||
|
beta1_(dict.lookupOrDefault<scalar>("beta1", 0.075)),
|
||||||
yPlusLam_(calcYPlusLam(kappa_, E_))
|
yPlusLam_(calcYPlusLam(kappa_, E_))
|
||||||
{
|
{
|
||||||
checkType();
|
checkType();
|
||||||
@ -148,6 +152,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
Cmu_(owfpsf.Cmu_),
|
Cmu_(owfpsf.Cmu_),
|
||||||
kappa_(owfpsf.kappa_),
|
kappa_(owfpsf.kappa_),
|
||||||
E_(owfpsf.E_),
|
E_(owfpsf.E_),
|
||||||
|
beta1_(owfpsf.beta1_),
|
||||||
yPlusLam_(owfpsf.yPlusLam_)
|
yPlusLam_(owfpsf.yPlusLam_)
|
||||||
{
|
{
|
||||||
checkType();
|
checkType();
|
||||||
@ -165,8 +170,8 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
Cmu_(owfpsf.Cmu_),
|
Cmu_(owfpsf.Cmu_),
|
||||||
kappa_(owfpsf.kappa_),
|
kappa_(owfpsf.kappa_),
|
||||||
E_(owfpsf.E_),
|
E_(owfpsf.E_),
|
||||||
|
beta1_(owfpsf.beta1_),
|
||||||
yPlusLam_(owfpsf.yPlusLam_)
|
yPlusLam_(owfpsf.yPlusLam_)
|
||||||
|
|
||||||
{
|
{
|
||||||
checkType();
|
checkType();
|
||||||
}
|
}
|
||||||
@ -217,7 +222,11 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI];
|
scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI];
|
||||||
|
|
||||||
omega[faceCellI] = sqrt(k[faceCellI])/(Cmu25*kappa_*y[faceI]);
|
scalar omegaVis = 6.0*nuw[faceI]/(beta1_*sqr(y[faceI]));
|
||||||
|
|
||||||
|
scalar omegaLog = sqrt(k[faceCellI])/(Cmu25*kappa_*y[faceI]);
|
||||||
|
|
||||||
|
omega[faceCellI] = sqrt(sqr(omegaVis) + sqr(omegaLog));
|
||||||
|
|
||||||
if (yPlus > yPlusLam_)
|
if (yPlus > yPlusLam_)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,7 +26,23 @@ Class
|
|||||||
Foam::incompressible::RASModels::omegaWallFunctionFvPatchScalarField
|
Foam::incompressible::RASModels::omegaWallFunctionFvPatchScalarField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Replaces functionality in wallFunctionsI.H
|
Provides a wall function boundary condition/constraint on omega
|
||||||
|
|
||||||
|
Computed value is:
|
||||||
|
|
||||||
|
omega = sqrt(omega_vis^2 + omega_log^2)
|
||||||
|
|
||||||
|
where
|
||||||
|
omega_vis = omega in viscous region
|
||||||
|
omega_log = omega in logarithmic region
|
||||||
|
|
||||||
|
Model described by Eq.(15) of:
|
||||||
|
@verbatim
|
||||||
|
Menter, F., Esch, T.
|
||||||
|
"Elements of Industrial Heat Transfer Prediction"
|
||||||
|
16th Brazilian Congress of Mechanical Engineering (COBEM),
|
||||||
|
Nov. 2001
|
||||||
|
@endverbatim
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
omegaWallFunctionFvPatchScalarField.C
|
omegaWallFunctionFvPatchScalarField.C
|
||||||
@ -71,6 +87,9 @@ protected:
|
|||||||
//- E coefficient
|
//- E coefficient
|
||||||
scalar E_;
|
scalar E_;
|
||||||
|
|
||||||
|
//- beta1 coefficient
|
||||||
|
scalar beta1_;
|
||||||
|
|
||||||
//- Y+ at the edge of the laminar sublayer
|
//- Y+ at the edge of the laminar sublayer
|
||||||
scalar yPlusLam_;
|
scalar yPlusLam_;
|
||||||
|
|
||||||
|
|||||||
@ -158,7 +158,7 @@ cp ${MAIN_CONTROL_DICT} ${MAIN_CONTROL_DICT}.org
|
|||||||
|
|
||||||
sed \
|
sed \
|
||||||
-e s/"\(fvSchemes[ \t]*\)\([0-9]\);"/"\1 1;"/g \
|
-e s/"\(fvSchemes[ \t]*\)\([0-9]\);"/"\1 1;"/g \
|
||||||
-e s/"\(fvSolution[ \t]*\)\([0-9]\);"/"\1 1;"/g \
|
-e s/"\(solution[ \t]*\)\([0-9]\);"/"\1 1;"/g \
|
||||||
${MAIN_CONTROL_DICT}.org > ${MAIN_CONTROL_DICT}
|
${MAIN_CONTROL_DICT}.org > ${MAIN_CONTROL_DICT}
|
||||||
|
|
||||||
echo "Copying the tutorials"
|
echo "Copying the tutorials"
|
||||||
|
|||||||
@ -20,31 +20,9 @@ internalField uniform 80;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type calculated;
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,32 +20,9 @@ internalField uniform 300;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type calculated;
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,37 +20,9 @@ internalField uniform (0.01 0 0);
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type calculated;
|
||||||
value uniform (0.01 0 0);
|
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type inletOutlet;
|
|
||||||
inletValue uniform (0 0 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,31 +20,9 @@ internalField uniform 450;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type calculated;
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,46 +21,9 @@ internalField uniform 0.01;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minY
|
".*"
|
||||||
{
|
{
|
||||||
type epsilonWallFunction;
|
type calculated;
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type epsilonWallFunction;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
minX
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type epsilonWallFunction;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type epsilonWallFunction;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
topAir_to_leftSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
topAir_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
topAir_to_rightSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,46 +21,9 @@ internalField uniform 0.1;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minY
|
".*"
|
||||||
{
|
{
|
||||||
type kqRWallFunction;
|
type calculated;
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type kqRWallFunction;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
minX
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type kqRWallFunction;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type kqRWallFunction;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
topAir_to_leftSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
topAir_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
topAir_to_rightSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,36 +20,9 @@ internalField uniform 1e5;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type buoyantPressure;
|
type calculated;
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,31 +20,9 @@ internalField uniform 8000;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type calculated;
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,11 +13,6 @@ rm -f constant/polyMesh/sets/*_old
|
|||||||
runApplication setsToZones -noFlipMap
|
runApplication setsToZones -noFlipMap
|
||||||
runApplication splitMeshRegions -cellZones
|
runApplication splitMeshRegions -cellZones
|
||||||
|
|
||||||
for i in bottomAir topAir heater leftSolid rightSolid
|
|
||||||
do
|
|
||||||
changeDictionary -region $i >& log.changeDictionary.$i
|
|
||||||
done
|
|
||||||
|
|
||||||
# remove fluid fields from solid regions (important for post-processing)
|
# remove fluid fields from solid regions (important for post-processing)
|
||||||
for i in heater leftSolid rightSolid
|
for i in heater leftSolid rightSolid
|
||||||
do
|
do
|
||||||
@ -27,7 +22,12 @@ done
|
|||||||
# remove solid fields from fluid regions (important for post-processing)
|
# remove solid fields from fluid regions (important for post-processing)
|
||||||
for i in bottomAir topAir
|
for i in bottomAir topAir
|
||||||
do
|
do
|
||||||
rm -f 0*/$i/{cp,K}
|
rm -f 0*/$i/{cp,K,rho}
|
||||||
|
done
|
||||||
|
|
||||||
|
for i in bottomAir topAir heater leftSolid rightSolid
|
||||||
|
do
|
||||||
|
changeDictionary -region $i >& log.changeDictionary.$i
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,2 @@
|
|||||||
|
The 0/ field files contain nonsense patchFields. All interesting
|
||||||
|
work is done using the changeDictionaryDicts.
|
||||||
@ -14,9 +14,9 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
RASModel kEpsilon;
|
RASModel laminar;
|
||||||
|
|
||||||
turbulence off;
|
turbulence on;
|
||||||
|
|
||||||
printCoeffs on;
|
printCoeffs on;
|
||||||
|
|
||||||
|
|||||||
@ -10,13 +10,11 @@ FoamFile
|
|||||||
version 2.0;
|
version 2.0;
|
||||||
format ascii;
|
format ascii;
|
||||||
class uniformDimensionedVectorField;
|
class uniformDimensionedVectorField;
|
||||||
location "constant";
|
|
||||||
object g;
|
object g;
|
||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
dimensions [0 1 -2 0 0 0 0];
|
dimensions [0 1 -2 0 0 0 0];
|
||||||
value ( 0 -9.81 0 );
|
value (0 -9.81 0);
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -14,9 +14,9 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
RASModel kEpsilon;
|
RASModel laminar;
|
||||||
|
|
||||||
turbulence off;
|
turbulence on;
|
||||||
|
|
||||||
printCoeffs on;
|
printCoeffs on;
|
||||||
|
|
||||||
|
|||||||
@ -10,13 +10,11 @@ FoamFile
|
|||||||
version 2.0;
|
version 2.0;
|
||||||
format ascii;
|
format ascii;
|
||||||
class uniformDimensionedVectorField;
|
class uniformDimensionedVectorField;
|
||||||
location "constant";
|
|
||||||
object g;
|
object g;
|
||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
dimensions [0 1 -2 0 0 0 0];
|
dimensions [0 1 -2 0 0 0 0];
|
||||||
value ( 0 -9.81 0 );
|
value (0 -9.81 0);
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -18,6 +18,10 @@ dictionaryReplacement
|
|||||||
{
|
{
|
||||||
boundary
|
boundary
|
||||||
{
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
}
|
||||||
bottomAir_to_leftSolid
|
bottomAir_to_leftSolid
|
||||||
{
|
{
|
||||||
offset ( 0 0 0 );
|
offset ( 0 0 0 );
|
||||||
@ -43,32 +47,11 @@ dictionaryReplacement
|
|||||||
|
|
||||||
U
|
U
|
||||||
{
|
{
|
||||||
internalField uniform (0 0 0);
|
internalField uniform (0.01 0 0);
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
bottomAir_to_leftSolid
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
bottomAir_to_heater
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
|
||||||
bottomAir_to_rightSolid
|
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value uniform (0 0 0);
|
value uniform (0 0 0);
|
||||||
@ -78,28 +61,16 @@ dictionaryReplacement
|
|||||||
|
|
||||||
T
|
T
|
||||||
{
|
{
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
bottomAir_to_leftSolid
|
|
||||||
{
|
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
|
||||||
neighbourFieldName T;
|
|
||||||
K K;
|
|
||||||
value uniform 300;
|
|
||||||
|
|
||||||
}
|
"bottomAir_to_.*"
|
||||||
bottomAir_to_heater
|
|
||||||
{
|
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
|
||||||
neighbourFieldName T;
|
|
||||||
K K;
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
bottomAir_to_rightSolid
|
|
||||||
{
|
{
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
type compressible::turbulentTemperatureCoupledBaffle;
|
||||||
neighbourFieldName T;
|
neighbourFieldName T;
|
||||||
@ -111,58 +82,13 @@ dictionaryReplacement
|
|||||||
|
|
||||||
epsilon
|
epsilon
|
||||||
{
|
{
|
||||||
// Set the value on all bc to non-zero. Not used in simulation
|
|
||||||
// since zeroGradient; only used in initialisation.
|
|
||||||
internalField uniform 0.01;
|
internalField uniform 0.01;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type compressible::epsilonWallFunction;
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
|
|
||||||
bottomAir_to_leftSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
bottomAir_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
bottomAir_to_rightSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
value uniform 0.01;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -171,54 +97,12 @@ dictionaryReplacement
|
|||||||
k
|
k
|
||||||
{
|
{
|
||||||
internalField uniform 0.1;
|
internalField uniform 0.1;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type compressible::kqRWallFunction;
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
|
|
||||||
bottomAir_to_leftSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
bottomAir_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
bottomAir_to_rightSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
value uniform 0.1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -226,53 +110,17 @@ dictionaryReplacement
|
|||||||
|
|
||||||
p
|
p
|
||||||
{
|
{
|
||||||
internalField uniform 1E5;
|
internalField uniform 100000;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
maxX
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
bottomAir_to_leftSolid
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
bottomAir_to_heater
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
bottomAir_to_rightSolid
|
|
||||||
{
|
{
|
||||||
type buoyantPressure;
|
type buoyantPressure;
|
||||||
value 1e5;
|
value 1e5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -18,6 +18,10 @@ dictionaryReplacement
|
|||||||
{
|
{
|
||||||
boundary
|
boundary
|
||||||
{
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
}
|
||||||
heater_to_bottomAir
|
heater_to_bottomAir
|
||||||
{
|
{
|
||||||
offset ( 0 0 0 );
|
offset ( 0 0 0 );
|
||||||
@ -54,50 +58,23 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
"heater_to_.*"
|
||||||
|
{
|
||||||
|
type compressible::turbulentTemperatureCoupledBaffle;
|
||||||
|
neighbourFieldName T;
|
||||||
|
K K;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
minY
|
minY
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value uniform 500;
|
value uniform 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
heater_to_bottomAir
|
|
||||||
{
|
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
|
||||||
neighbourFieldName T;
|
|
||||||
K K;
|
|
||||||
value uniform 300;
|
|
||||||
|
|
||||||
}
|
|
||||||
heater_to_leftSolid
|
|
||||||
{
|
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
|
||||||
neighbourFieldName T;
|
|
||||||
K K;
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
heater_to_rightSolid
|
|
||||||
{
|
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
|
||||||
neighbourFieldName T;
|
|
||||||
K K;
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
heater_to_topAir
|
|
||||||
{
|
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
|
||||||
neighbourFieldName T;
|
|
||||||
K K;
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,33 +84,9 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minY
|
".*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type calculated;
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_bottomAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_leftSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_rightSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_topAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,31 +97,7 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minY
|
".*"
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_bottomAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_leftSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_rightSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_topAir
|
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
@ -181,31 +110,7 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minY
|
".*"
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_bottomAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_leftSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_rightSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
heater_to_topAir
|
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,10 @@ dictionaryReplacement
|
|||||||
{
|
{
|
||||||
boundary
|
boundary
|
||||||
{
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
}
|
||||||
leftSolid_to_bottomAir
|
leftSolid_to_bottomAir
|
||||||
{
|
{
|
||||||
offset ( 0 0 0 );
|
offset ( 0 0 0 );
|
||||||
@ -47,34 +51,12 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
leftSolid_to_bottomAir
|
|
||||||
{
|
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
|
||||||
neighbourFieldName T;
|
|
||||||
K K;
|
|
||||||
value uniform 300;
|
|
||||||
|
|
||||||
}
|
|
||||||
leftSolid_to_heater
|
|
||||||
{
|
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
|
||||||
neighbourFieldName T;
|
|
||||||
K K;
|
|
||||||
value uniform 300;
|
value uniform 300;
|
||||||
}
|
}
|
||||||
leftSolid_to_topAir
|
"leftSolid_to_.*"
|
||||||
{
|
{
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
type compressible::turbulentTemperatureCoupledBaffle;
|
||||||
neighbourFieldName T;
|
neighbourFieldName T;
|
||||||
@ -90,29 +72,9 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type calculated;
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
leftSolid_to_bottomAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
leftSolid_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
leftSolid_to_topAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -123,27 +85,7 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
leftSolid_to_bottomAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
leftSolid_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
leftSolid_to_topAir
|
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
@ -156,27 +98,7 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
leftSolid_to_bottomAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
leftSolid_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
leftSolid_to_topAir
|
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,10 @@ dictionaryReplacement
|
|||||||
{
|
{
|
||||||
boundary
|
boundary
|
||||||
{
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
}
|
||||||
rightSolid_to_heater
|
rightSolid_to_heater
|
||||||
{
|
{
|
||||||
offset ( 0 0 0 );
|
offset ( 0 0 0 );
|
||||||
@ -47,33 +51,12 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
maxX
|
".*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
rightSolid_to_heater
|
|
||||||
{
|
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
|
||||||
neighbourFieldName T;
|
|
||||||
K K;
|
|
||||||
value uniform 300;
|
value uniform 300;
|
||||||
}
|
}
|
||||||
rightSolid_to_bottomAir
|
"rightSolid_to_.*"
|
||||||
{
|
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
|
||||||
neighbourFieldName T;
|
|
||||||
K K;
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
rightSolid_to_topAir
|
|
||||||
{
|
{
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
type compressible::turbulentTemperatureCoupledBaffle;
|
||||||
neighbourFieldName T;
|
neighbourFieldName T;
|
||||||
@ -89,29 +72,9 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
maxX
|
".*"
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type calculated;
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
rightSolid_to_bottomAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
rightSolid_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
rightSolid_to_topAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,27 +85,7 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
maxX
|
".*"
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
rightSolid_to_bottomAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
rightSolid_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
rightSolid_to_topAir
|
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
@ -155,27 +98,7 @@ dictionaryReplacement
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
maxX
|
".*"
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
rightSolid_to_bottomAir
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
rightSolid_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
rightSolid_to_topAir
|
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,18 @@ dictionaryReplacement
|
|||||||
{
|
{
|
||||||
boundary
|
boundary
|
||||||
{
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
}
|
||||||
|
minX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
}
|
||||||
|
maxX
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
}
|
||||||
topAir_to_leftSolid
|
topAir_to_leftSolid
|
||||||
{
|
{
|
||||||
offset ( 0 0 0 );
|
offset ( 0 0 0 );
|
||||||
@ -43,64 +55,53 @@ dictionaryReplacement
|
|||||||
|
|
||||||
U
|
U
|
||||||
{
|
{
|
||||||
internalField uniform ( 0.01 0 0 );
|
internalField uniform (0.01 0 0);
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
minX
|
minX
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value uniform (0.01 0 0);
|
value uniform ( 0.01 0 0 );
|
||||||
}
|
}
|
||||||
maxX
|
maxX
|
||||||
{
|
{
|
||||||
type inletOutlet;
|
type inletOutlet;
|
||||||
inletValue uniform (0 0 0);
|
inletValue uniform ( 0 0 0 );
|
||||||
}
|
value uniform ( 0 0 0 );
|
||||||
|
|
||||||
topAir_to_leftSolid
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
topAir_to_heater
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
|
||||||
topAir_to_rightSolid
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform (0 0 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
T
|
T
|
||||||
{
|
{
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
minX
|
minX
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value uniform 300;
|
value uniform 300;
|
||||||
}
|
}
|
||||||
topAir_to_leftSolid
|
maxX
|
||||||
{
|
{
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
type inletOutlet;
|
||||||
neighbourFieldName T;
|
inletValue uniform 300;
|
||||||
K K;
|
|
||||||
value uniform 300;
|
value uniform 300;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
"topAir_to_.*"
|
||||||
topAir_to_heater
|
|
||||||
{
|
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
|
||||||
neighbourFieldName T;
|
|
||||||
K K;
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
topAir_to_rightSolid
|
|
||||||
{
|
{
|
||||||
type compressible::turbulentTemperatureCoupledBaffle;
|
type compressible::turbulentTemperatureCoupledBaffle;
|
||||||
neighbourFieldName T;
|
neighbourFieldName T;
|
||||||
@ -112,10 +113,16 @@ dictionaryReplacement
|
|||||||
|
|
||||||
epsilon
|
epsilon
|
||||||
{
|
{
|
||||||
// Set the value on all bc to non-zero. Not used in simulation
|
internalField uniform 0.01;
|
||||||
// since zeroGradient; only used in initialisation.
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type compressible::epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
minX
|
minX
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
@ -123,44 +130,8 @@ dictionaryReplacement
|
|||||||
}
|
}
|
||||||
maxX
|
maxX
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type inletOutlet;
|
||||||
value uniform 0.01;
|
inletValue uniform 0.01;
|
||||||
}
|
|
||||||
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
topAir_to_leftSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
topAir_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
|
||||||
}
|
|
||||||
topAir_to_rightSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.01;
|
value uniform 0.01;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -169,55 +140,24 @@ dictionaryReplacement
|
|||||||
k
|
k
|
||||||
{
|
{
|
||||||
internalField uniform 0.1;
|
internalField uniform 0.1;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
".*"
|
||||||
|
{
|
||||||
|
type compressible::kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
minX
|
minX
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
value uniform 0.1;
|
value uniform 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
maxX
|
maxX
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type inletOutlet;
|
||||||
value uniform 0.1;
|
inletValue uniform 0.1;
|
||||||
}
|
|
||||||
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
maxY
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
|
|
||||||
topAir_to_leftSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
topAir_to_heater
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
|
||||||
}
|
|
||||||
topAir_to_rightSolid
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
value uniform 0.1;
|
value uniform 0.1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -225,59 +165,23 @@ dictionaryReplacement
|
|||||||
|
|
||||||
p
|
p
|
||||||
{
|
{
|
||||||
internalField uniform 1E5;
|
internalField uniform 100000;
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
minX
|
".*"
|
||||||
{
|
{
|
||||||
type buoyantPressure;
|
type buoyantPressure;
|
||||||
value 1e5;
|
value 1e5;
|
||||||
}
|
}
|
||||||
|
|
||||||
maxX
|
maxX
|
||||||
{
|
{
|
||||||
type waveTransmissive;
|
type waveTransmissive;
|
||||||
//field p;
|
gamma 1.4;
|
||||||
phi phi;
|
fieldInf 100000;
|
||||||
rho rho;
|
lInf 0.4;
|
||||||
psi psi;
|
value uniform 100000;
|
||||||
gamma 1.4; // cp/cv
|
|
||||||
fieldInf 1e5;
|
|
||||||
lInf 0.40; // double length of domain
|
|
||||||
value uniform 1e5;
|
|
||||||
}
|
|
||||||
|
|
||||||
minY
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
|
|
||||||
minZ
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
maxZ
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
|
|
||||||
topAir_to_leftSolid
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
topAir_to_heater
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
|
||||||
topAir_to_rightSolid
|
|
||||||
{
|
|
||||||
type buoyantPressure;
|
|
||||||
value 1e5;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,33 +27,7 @@ boundaryField
|
|||||||
}
|
}
|
||||||
farFieldMoving
|
farFieldMoving
|
||||||
{
|
{
|
||||||
//type slip;
|
type slip;
|
||||||
type surfaceSlipDisplacement;
|
|
||||||
geometry
|
|
||||||
{
|
|
||||||
top
|
|
||||||
{
|
|
||||||
type searchablePlane;
|
|
||||||
planeType pointAndNormal;
|
|
||||||
basePoint (0 0.0025 0);
|
|
||||||
normalVector (0 1 0);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Find projection with surface:
|
|
||||||
// fixedNormal : intersections along prespecified direction
|
|
||||||
// pointNormal : intersections along current pointNormal of patch
|
|
||||||
// nearest : nearest point on surface
|
|
||||||
followMode fixedNormal;
|
|
||||||
|
|
||||||
// if fixedNormal : normal
|
|
||||||
projectDirection (0 1 0);
|
|
||||||
|
|
||||||
//- -1 or component to knock out before doing projection
|
|
||||||
//wedgePlane -1;
|
|
||||||
|
|
||||||
//- Points that should remain fixed
|
|
||||||
//frozenPointsZone fixedPointsZone;
|
|
||||||
}
|
}
|
||||||
fixedWall
|
fixedWall
|
||||||
{
|
{
|
||||||
@ -71,28 +45,7 @@ boundaryField
|
|||||||
}
|
}
|
||||||
farField
|
farField
|
||||||
{
|
{
|
||||||
//type slip;
|
type slip;
|
||||||
type surfaceSlipDisplacement;
|
|
||||||
geometry
|
|
||||||
{
|
|
||||||
top
|
|
||||||
{
|
|
||||||
type searchablePlane;
|
|
||||||
planeType pointAndNormal;
|
|
||||||
basePoint (0 0.0025 0);
|
|
||||||
normalVector (0 1 0);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
followMode fixedNormal;
|
|
||||||
|
|
||||||
projectDirection (0 1 0);
|
|
||||||
|
|
||||||
//- -1 or component to knock out before doing projection
|
|
||||||
wedgePlane -1;
|
|
||||||
|
|
||||||
//- Points that should remain fixed
|
|
||||||
//frozenPointsZone fixedPointsZone;
|
|
||||||
}
|
}
|
||||||
back
|
back
|
||||||
{
|
{
|
||||||
|
|||||||
@ -17,9 +17,6 @@ FoamFile
|
|||||||
|
|
||||||
application pimpleDyMFoam;
|
application pimpleDyMFoam;
|
||||||
|
|
||||||
// For surfaceSlip boundary conditions
|
|
||||||
libs ("libfvMotionSolvers.so");
|
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom startTime;
|
||||||
|
|
||||||
startTime 0;
|
startTime 0;
|
||||||
|
|||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
application rhoPorousSimpleFoam;
|
application porousSimpleFoam;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom startTime;
|
||||||
|
|
||||||
|
|||||||
@ -23,25 +23,25 @@ boundaryField
|
|||||||
{
|
{
|
||||||
front
|
front
|
||||||
{
|
{
|
||||||
type nutWallFunction;
|
type nutkWallFunction;
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
back
|
back
|
||||||
{
|
{
|
||||||
type nutWallFunction;
|
type nutkWallFunction;
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type nutWallFunction;
|
type nutkWallFunction;
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
porosityWall
|
porosityWall
|
||||||
{
|
{
|
||||||
type nutWallFunction;
|
type nutkWallFunction;
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
application rhoPorousSimpleFoam;
|
application porousSimpleFoam;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom startTime;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -144,6 +144,8 @@ SingleMixtureFractionCoeffs
|
|||||||
|
|
||||||
LiquidEvaporationCoeffs
|
LiquidEvaporationCoeffs
|
||||||
{
|
{
|
||||||
|
enthalpyTransfer enthalpyDifference;
|
||||||
|
|
||||||
activeLiquids
|
activeLiquids
|
||||||
(
|
(
|
||||||
H2O
|
H2O
|
||||||
|
|||||||
@ -146,6 +146,8 @@ SinglePhaseMixtureCoeffs
|
|||||||
|
|
||||||
LiquidEvaporationCoeffs
|
LiquidEvaporationCoeffs
|
||||||
{
|
{
|
||||||
|
enthalpyTransfer enthalpyDifference;
|
||||||
|
|
||||||
activeLiquids
|
activeLiquids
|
||||||
(
|
(
|
||||||
H2O
|
H2O
|
||||||
|
|||||||
@ -1,35 +1,34 @@
|
|||||||
(
|
(
|
||||||
// Nitrogen
|
N2 N2 1 28.0134
|
||||||
N2 N2 1 28.0134
|
|
||||||
rhoPolynomial
|
rhoPolynomial
|
||||||
(
|
(
|
||||||
3.88E+000
|
3.8936E+00
|
||||||
-1.64E-002
|
-1.6463E-02
|
||||||
3.18E-005
|
3.2101E-05
|
||||||
-2.89E-008
|
-2.9174E-08
|
||||||
9.90E-012
|
9.9889E-12
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
0.0 // Heat of formation [J/kg]
|
0.0 // Heat of formation
|
||||||
6840 // Standard entropy [J/kg/K]
|
0.0 // Standard entropy
|
||||||
cpPolynomial
|
cpPolynomial
|
||||||
(
|
(
|
||||||
2.75E+004
|
9.7908E+02
|
||||||
1.12E+001
|
4.1787E-01
|
||||||
-3.12E-002
|
-1.1761E-03
|
||||||
4.45E-005
|
1.6742E-06
|
||||||
-1.92E-008
|
-7.2559E-10
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
muPolynomial
|
muPolynomial
|
||||||
(
|
(
|
||||||
1.54E-006
|
1.5068E-06
|
||||||
6.15E-008
|
6.1598E-08
|
||||||
-1.81E-011
|
-1.8188E-11
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
@ -38,47 +37,45 @@
|
|||||||
)
|
)
|
||||||
kappaPolynomial
|
kappaPolynomial
|
||||||
(
|
(
|
||||||
3.15E-003
|
3.1494E-03
|
||||||
8.49E-005
|
8.4997E-05
|
||||||
-1.25E-008
|
-1.2621E-08
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
|
O2 O2 1 31.9988
|
||||||
// Oxygen
|
|
||||||
O2 O2 1 31.9988
|
|
||||||
rhoPolynomial
|
rhoPolynomial
|
||||||
(
|
(
|
||||||
4.43E+000
|
4.4475E+00
|
||||||
-1.87E-002
|
-1.8805E-02
|
||||||
3.64E-005
|
3.6667E-05
|
||||||
-3.30E-008
|
-3.3323E-08
|
||||||
1.13E-011
|
1.1410E-11
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
0.0 // Heat of formation [J/kg]
|
0.0 // Heat of formation
|
||||||
6408 // Standard entropy [J/kg/K]
|
0.0 // Standard entropy
|
||||||
cpPolynomial
|
cpPolynomial
|
||||||
(
|
(
|
||||||
2.67E+004
|
8.3484E+02
|
||||||
9.93E+000
|
2.9297E-01
|
||||||
-7.09E-003
|
-1.4959E-04
|
||||||
1.45E-005
|
3.4143E-07
|
||||||
-9.13E-009
|
-2.2786E-10
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
muPolynomial
|
muPolynomial
|
||||||
(
|
(
|
||||||
1.54E-006
|
1.5068E-06
|
||||||
6.15E-008
|
6.1598E-08
|
||||||
-1.81E-011
|
-1.8188E-11
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
@ -87,25 +84,23 @@
|
|||||||
)
|
)
|
||||||
kappaPolynomial
|
kappaPolynomial
|
||||||
(
|
(
|
||||||
2.09E-004
|
1.6082E-04
|
||||||
8.52E-005
|
8.5301E-05
|
||||||
-1.49E-008
|
-1.4998E-08
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
|
H2O H2O 1 18.0153
|
||||||
// Water vapour
|
|
||||||
H2O H2O 1 18.0153
|
|
||||||
rhoPolynomial
|
rhoPolynomial
|
||||||
(
|
(
|
||||||
2.49E+000
|
2.5039E+00
|
||||||
-1.05E-002
|
-1.0587E-02
|
||||||
2.03E-005
|
2.0643E-05
|
||||||
-1.84E-008
|
-1.8761E-08
|
||||||
6.28E-012
|
6.4237E-12
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
@ -114,20 +109,20 @@
|
|||||||
1.0482e04 // Standard entropy [J/kg/K]
|
1.0482e04 // Standard entropy [J/kg/K]
|
||||||
cpPolynomial
|
cpPolynomial
|
||||||
(
|
(
|
||||||
2.85E+004
|
1.5631E+03
|
||||||
2.63E+001
|
1.6040E+00
|
||||||
-4.63E-002
|
-2.9334E-03
|
||||||
5.11E-005
|
3.2168E-06
|
||||||
-1.83E-008
|
-1.1571E-09
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
muPolynomial
|
muPolynomial
|
||||||
(
|
(
|
||||||
1.54E-006
|
1.5068E-06
|
||||||
6.15E-008
|
6.1598E-08
|
||||||
-1.81E-011
|
-1.8188E-11
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
@ -136,9 +131,56 @@
|
|||||||
)
|
)
|
||||||
kappaPolynomial
|
kappaPolynomial
|
||||||
(
|
(
|
||||||
3.79E-003
|
3.7972E-03
|
||||||
1.53E-004
|
1.5336E-04
|
||||||
-1.22E-008
|
-1.1859E-08
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
)
|
||||||
|
air air 1 28.85
|
||||||
|
rhoPolynomial
|
||||||
|
(
|
||||||
|
4.0097E+00
|
||||||
|
-1.6954E-02
|
||||||
|
3.3057E-05
|
||||||
|
-3.0042E-08
|
||||||
|
1.0286E-11
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
)
|
||||||
|
0.0
|
||||||
|
0.0
|
||||||
|
cpPolynomial
|
||||||
|
(
|
||||||
|
9.4876E+02
|
||||||
|
3.9171E-01
|
||||||
|
-9.5999E-04
|
||||||
|
1.3930E-06
|
||||||
|
-6.2029E-10
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
)
|
||||||
|
muPolynomial
|
||||||
|
(
|
||||||
|
1.5061E-06
|
||||||
|
6.1600E-08
|
||||||
|
-1.8190E-11
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
)
|
||||||
|
kappaPolynomial
|
||||||
|
(
|
||||||
|
2.5219E-03
|
||||||
|
8.5060E-05
|
||||||
|
-1.3120E-08
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
@ -146,3 +188,4 @@
|
|||||||
0
|
0
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,53 @@
|
|||||||
|
/*--------------------------------*- 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 G;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 0 -3 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type symmetryPlane;
|
||||||
|
}
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type symmetryPlane;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type MarshakRadiation;
|
||||||
|
T T;
|
||||||
|
emissivity 1;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type MarshakRadiation;
|
||||||
|
T T;
|
||||||
|
emissivity 1;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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 H2O;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0.01;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type symmetryPlane;
|
||||||
|
}
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type symmetryPlane;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
// type zeroGradient;
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform 0.01;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*--------------------------------*- 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 473.0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type symmetryPlane;
|
||||||
|
}
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type symmetryPlane;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform 473.0;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 473.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*--------------------------------*- 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
|
||||||
|
{
|
||||||
|
back
|
||||||
|
{
|
||||||
|
type symmetryPlane;
|
||||||
|
}
|
||||||
|
front
|
||||||
|
{
|
||||||
|
type symmetryPlane;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 1e-8 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user