Merge commit 'OpenCFD/master' into olesenm

This commit is contained in:
Mark Olesen
2009-12-15 10:48:51 +01:00
161 changed files with 4698 additions and 51200 deletions

View File

@ -0,0 +1,3 @@
PolynomialTest.C
EXE = $(FOAM_USER_APPBIN)/PolynomialTest

View File

@ -0,0 +1,3 @@
EXE_INC = \
EXE_LIBS = \

View 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;
}
// ************************************************************************* //

View File

@ -0,0 +1,11 @@
testPoly
(
0.11
0.45
-0.94
1.58
-2.58
0.08
3.15
-4.78
)

View File

@ -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
IOobjectList objects(mesh, runTime.timeName());
@ -167,7 +167,11 @@ int main(int argc, char *argv[])
"vector",
"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
(
"scale",
@ -176,16 +180,29 @@ int main(int argc, char *argv[])
"uniform [mm] to [m] scaling"
);
# include "addRegionOption.H"
# include "setRootCase.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
(
IOobject
(
"points",
runTime.findInstance(polyMesh::meshSubDir, "points"),
polyMesh::meshSubDir,
runTime.findInstance(meshDir, "points"),
meshDir,
runTime,
IOobject::MUST_READ,
IOobject::NO_WRITE,
@ -224,7 +241,7 @@ int main(int argc, char *argv[])
if (args.optionFound("rotateFields"))
{
rotateFields(runTime, T);
rotateFields(args, runTime, T);
}
}
else if (args.optionFound("rollPitchYaw"))
@ -247,7 +264,7 @@ int main(int argc, char *argv[])
if (args.optionFound("rotateFields"))
{
rotateFields(runTime, R.R());
rotateFields(args, runTime, R.R());
}
}
else if (args.optionFound("yawPitchRoll"))
@ -276,7 +293,7 @@ int main(int argc, char *argv[])
if (args.optionFound("rotateFields"))
{
rotateFields(runTime, R.R());
rotateFields(args, runTime, R.R());
}
}

View File

@ -34,13 +34,19 @@ Description
Can also work like decomposePar:
@verbatim
# Create empty processor directories (have to exist for argList)
mkdir processor0
..
mkdir processorN
# Copy undecomposed polyMesh
cp -r constant processor0
# Distribute
mpirun -np ddd redistributeMeshPar -parallel
@endverbatim
\*---------------------------------------------------------------------------*/
#include "Field.H"
#include "fvMesh.H"
#include "decompositionMethod.H"
#include "PstreamReduceOps.H"
@ -62,6 +68,7 @@ static const scalar defaultMergeTol = 1E-6;
autoPtr<fvMesh> createMesh
(
const Time& runTime,
const word& regionName,
const fileName& instDir,
const bool haveMesh
)
@ -69,43 +76,33 @@ autoPtr<fvMesh> createMesh
Pout<< "Create mesh for time = "
<< runTime.timeName() << nl << endl;
// Create dummy mesh. Only used on procs that don't have mesh.
// Note constructed on all processors since does parallel comms.
fvMesh dummyMesh
IOobject io
(
IOobject
(
fvMesh::defaultRegion,
regionName,
instDir,
runTime,
IOobject::MUST_READ
),
xferCopy(pointField()),
xferCopy(faceList()),
xferCopy(labelList()),
xferCopy(labelList())
);
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();
}
Pout<< "Reading mesh from " << runTime.path()/instDir << endl;
autoPtr<fvMesh> meshPtr
(
new fvMesh
(
IOobject
(
fvMesh::defaultRegion,
instDir,
runTime,
IOobject::MUST_READ
)
)
);
Pout<< "Reading mesh from " << io.objectPath() << endl;
autoPtr<fvMesh> meshPtr(new fvMesh(io));
fvMesh& mesh = meshPtr();
@ -229,8 +226,9 @@ autoPtr<fvMesh> createMesh
if (!haveMesh)
{
// We created a dummy mesh file above. Delete it.
Pout<< "Removing dummy mesh in " << runTime.path()/instDir << endl;
rmDir(runTime.path()/instDir/polyMesh::meshSubDir);
Pout<< "Removing dummy mesh " << io.objectPath()
<< endl;
rmDir(io.objectPath());
}
// Force recreation of globalMeshData.
@ -285,7 +283,6 @@ scalar getMergeDistance
void printMeshData(Ostream& os, const polyMesh& mesh)
{
os << "Number of points: " << mesh.points().size() << nl
<< " edges: " << mesh.edges().size() << nl
<< " faces: " << mesh.faces().size() << nl
<< " internal faces: " << mesh.faceNeighbour().size() << nl
<< " cells: " << mesh.cells().size() << nl
@ -506,33 +503,53 @@ void compareFields
int main(int argc, char *argv[])
{
# include "addRegionOption.H"
argList::addOption("mergeTol", "relative merge distance");
// Create argList. This will check for non-existing processor dirs.
# include "setRootCase.H"
// Create processor directory if non-existing
if (!Pstream::master() && !isDir(args.path()))
{
Pout<< "Creating case directory " << args.path() << endl;
mkDir(args.path());
}
//- Not useful anymore. See above.
//// Create processor directory if non-existing
//if (!Pstream::master() && !isDir(args.path()))
//{
// Pout<< "Creating case directory " << args.path() << endl;
// mkDir(args.path());
//}
# 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
// just use the master one everywhere.
fileName masterInstDir;
if (Pstream::master())
{
masterInstDir = runTime.findInstance(polyMesh::meshSubDir, "points");
masterInstDir = runTime.findInstance(meshSubDir, "points");
}
Pstream::scatter(masterInstDir);
// 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);
haveMesh[Pstream::myProcNo()] = isDir(meshDir);
haveMesh[Pstream::myProcNo()] = isDir(meshPath);
Pstream::gatherList(haveMesh);
Pstream::scatterList(haveMesh);
Info<< "Per processor mesh availability : " << haveMesh << endl;
@ -542,6 +559,7 @@ int main(int argc, char *argv[])
autoPtr<fvMesh> meshPtr = createMesh
(
runTime,
regionName,
masterInstDir,
haveMesh[Pstream::myProcNo()]
);
@ -799,7 +817,7 @@ int main(int argc, char *argv[])
<< nl
<< "the processor directories with 0 sized meshes in them." << nl
<< "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;
forAll(nFaces, procI)
@ -812,8 +830,8 @@ int main(int argc, char *argv[])
}
else
{
fileName timeDir = procDir/runTime.timeName()/polyMesh::meshSubDir;
fileName constDir = procDir/runTime.constant()/polyMesh::meshSubDir;
fileName timeDir = procDir/runTime.timeName()/meshSubDir;
fileName constDir = procDir/runTime.constant()/meshSubDir;
Info<< " rm -r " << constDir.c_str() << nl
<< " mv " << timeDir.c_str()

View File

@ -9,4 +9,5 @@ EXE_LIBS = \
-ltecio \
-llagrangian \
-lfiniteVolume \
-lgenericPatchFields \
-lmeshTools

View File

@ -909,6 +909,8 @@ int main(int argc, char *argv[])
const polyPatch& pp = patches[patchID];
//INTEGER4 strandID = 1 + i;
if (pp.size() > 0)
{
Info<< " Writing patch " << patchID << "\t" << pp.name()
<< "\tstrand:" << strandID << nl << endl;
@ -1010,6 +1012,13 @@ int main(int argc, char *argv[])
writer.writeConnectivity(ipp);
}
else
{
Info<< " Skipping zero sized patch " << patchID
<< "\t" << pp.name()
<< nl << endl;
}
}
writer.writeEnd();

View File

@ -5,7 +5,7 @@ set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
case "$ParaView_VERSION" in
3*)
3* | git)
wmake libso vtkPV3Readers
PV3blockMeshReader/Allwmake
PV3FoamReader/Allwmake

View File

@ -5,7 +5,7 @@ set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
case "$ParaView_VERSION" in
3*)
3* | git)
wmake libso vtkPV3Foam
(
cd PV3FoamReader

View File

@ -5,7 +5,7 @@ set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
case "$ParaView_VERSION" in
3*)
3* | git)
wmake libso vtkPV3blockMesh
(
cd PV3blockMeshReader

View File

@ -130,7 +130,7 @@ OpenFOAM)
esac
case "$ParaView_VERSION" in
3*)
3* | git)
# only create/remove caseFile if it didn't already exist
[ -e $caseFile ] || {
trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT

View File

@ -122,7 +122,7 @@ Foam::dictionary::dictionary
const dictionary& dict
)
:
dictionaryName(parentDict.name() + "::" + dict.name()),
dictionaryName(dict.name()),
IDLList<entry>(dict, *this),
parent_(parentDict)
{
@ -489,7 +489,7 @@ Foam::dictionary Foam::dictionary::subOrEmptyDict
if (entryPtr == NULL)
{
return dictionary(*this, dictionary(keyword));
return dictionary(*this, dictionary(name() + "::" + keyword));
}
else
{

View File

@ -1461,7 +1461,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
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
// can be sent.
mesh_.clearOut();

View File

@ -54,7 +54,6 @@ SourceFiles
#define fvMeshDistribute_H
#include "Field.H"
#include "uLabel.H"
#include "fvMeshSubset.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -264,6 +264,10 @@ public:
" const face& f,\n"
" const label owner,"
" 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 zoneID"
")"
@ -292,6 +296,7 @@ public:
" const label masterPointID,\n"
" const label masterEdgeID,\n"
" const label masterFaceID,\n"
" const bool flipFaceFlux,\n"
" const label patchID,\n"
" const label zoneID,\n"
" const bool zoneFlip\n"

View File

@ -2207,6 +2207,7 @@ void Foam::polyTopoChange::addMesh
// Extend
points_.setCapacity(points_.size() + points.size());
pointMap_.setCapacity(pointMap_.size() + points.size());
reversePointMap_.setCapacity(reversePointMap_.size() + points.size());
pointZone_.resize(pointZone_.size() + points.size()/100);
// Precalc offset zones
@ -2246,6 +2247,7 @@ void Foam::polyTopoChange::addMesh
label nAllCells = mesh.nCells();
cellMap_.setCapacity(cellMap_.size() + nAllCells);
reverseCellMap_.setCapacity(reverseCellMap_.size() + nAllCells);
cellFromPoint_.resize(cellFromPoint_.size() + nAllCells/100);
cellFromEdge_.resize(cellFromEdge_.size() + nAllCells/100);
cellFromFace_.resize(cellFromFace_.size() + nAllCells/100);
@ -2310,6 +2312,7 @@ void Foam::polyTopoChange::addMesh
faceOwner_.setCapacity(faceOwner_.size() + nAllFaces);
faceNeighbour_.setCapacity(faceNeighbour_.size() + nAllFaces);
faceMap_.setCapacity(faceMap_.size() + nAllFaces);
reverseFaceMap_.setCapacity(reverseFaceMap_.size() + nAllFaces);
faceFromPoint_.resize(faceFromPoint_.size() + nAllFaces/100);
faceFromEdge_.resize(faceFromEdge_.size() + nAllFaces/100);
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)
{
if (isType<polyAddPoint>(action))

View File

@ -472,6 +472,15 @@ public:
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.
void movePoints(const pointField& newPoints);

View File

@ -339,7 +339,7 @@ void Foam::removeCells::setRefinement
faceI, // label of face being modified
nei, // owner
-1, // neighbour
false, // face flip
true, // face flip
newPatchID[faceI], // patch for face
false, // remove from zone
zoneID, // zone for face

View File

@ -137,8 +137,7 @@ class removeFaces
) const;
//- Return face with all pointsToRemove removed.
face filterFace(const labelHashSet& pointsToRemove, const label)
const;
face filterFace(const labelHashSet&, const label) const;
//- Wrapper for meshMod.modifyFace. Reverses face if own>nei.
void modFace

View File

@ -31,10 +31,5 @@ pointPatchFields/derived/oscillatingDisplacement/oscillatingDisplacementPointPat
pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C
pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.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

View File

@ -10,4 +10,4 @@ LIB_LIBS = \
-lmeshTools \
-ldynamicMesh \
-lfiniteVolume \
-lforces
/*-lforces include in controlDict if needed */

View File

@ -176,7 +176,7 @@ void surfaceSlipDisplacementPointPatchVectorField::calcProjection
// Knock out any wedge component
scalarField offset(start.size(), 0.0);
if (wedgePlane_ >= 0 && wedgePlane_ <= vector::nComponents)
if (wedgePlane_ >= 0 && wedgePlane_ < vector::nComponents)
{
forAll(offset, i)
{
@ -262,7 +262,7 @@ void surfaceSlipDisplacementPointPatchVectorField::calcProjection
if (interPt.hit())
{
if (wedgePlane_ >= 0 && wedgePlane_ <= vector::nComponents)
if (wedgePlane_ >= 0 && wedgePlane_ < vector::nComponents)
{
interPt.rawPoint()[wedgePlane_] += offset[i];
}

View File

@ -344,7 +344,7 @@ void Foam::ReactingParcel<ParcelType>::calc
td.cloud().hcTrans()[cellI] +=
np0
*dMassPC[i]
*td.cloud().mcCarrierThermo().speciesData()[gid].H(T0);
*td.cloud().mcCarrierThermo().speciesData()[gid].Hc();
}
// Update momentum transfer
@ -423,6 +423,11 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
scalarField& Cs
)
{
typedef PhaseChangeModel
<
typename ReactingParcel<ParcelType>::trackData::cloudType
> phaseChangeModelType;
if
(
!td.cloud().phaseChange().active()
@ -464,17 +469,26 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
td.cloud().composition().localToGlobalCarrierId(idPhase, i);
const label idl = td.cloud().composition().globalIds(idPhase)[i];
const scalar hv = td.cloud().mcCarrierThermo().speciesData()[idc].H(Ts);
const scalar hl =
td.cloud().composition().liquids().properties()[idl].h(pc_, Ts);
if
(
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]*(hl - hv)/dt;
Sh -= dMassPC[i]*hlp/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
// const scalar hl =
// td.cloud().composition().liquids().properties()[idl].hl(pc_, Ts);
// Sh -= dMassPC[i]*hl/dt;
Sh -= dMassPC[i]*(hc - hp)/dt;
}
// Update particle surface thermo properties
const scalar Dab =

View File

@ -136,6 +136,9 @@ public:
public:
typedef ReactingCloud<ParcelType> cloudType;
// Constructors
//- Construct from components

View File

@ -26,6 +26,48 @@ License
#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 * * * * * * * * * * * * * * //
template<class CloudType>
@ -36,7 +78,8 @@ Foam::PhaseChangeModel<CloudType>::PhaseChangeModel
:
dict_(dictionary::null),
owner_(owner),
coeffDict_(dictionary::null)
coeffDict_(dictionary::null),
enthalpyTransfer_(etLatentHeat)
{}
@ -50,7 +93,11 @@ Foam::PhaseChangeModel<CloudType>::PhaseChangeModel
:
dict_(dict),
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"

View File

@ -53,6 +53,21 @@ namespace Foam
template<class CloudType>
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 data
@ -66,9 +81,15 @@ protected:
//- The coefficient dictionary
const dictionary coeffDict_;
//- Enthalpy transfer type enumeration
enthalpyTransferType enthalpyTransfer_;
// Protected member functions
//- Convert word to enthalpy transfer type
enthalpyTransferType wordToEnthalpyTransfer(const word& etName) const;
//- Sherwood number
scalar Sh() const;
@ -129,6 +150,9 @@ public:
//- Return the coefficient dictionary
const dictionary& coeffDict() const;
//- Return the enthalpy transfer type enumeration
const enthalpyTransferType& enthalpyTransfer() const;
// Member Functions

View File

@ -560,7 +560,11 @@ void Foam::autoRefineDriver::zonify
const_cast<Time&>(mesh.time())++;
}
meshRefiner_.zonify(refineParams.keepPoints()[0]);
meshRefiner_.zonify
(
refineParams.keepPoints()[0],
refineParams.allowFreeStandingZoneFaces()
);
if (debug)
{

View File

@ -44,6 +44,7 @@ Foam::refinementParameters::refinementParameters
curvature_(readScalar(dict.lookup("curvature"))),
nBufferLayers_(readLabel(dict.lookup("nBufferLayers"))),
keepPoints_(dict.lookup("keepPoints")),
allowFreeStandingZoneFaces_(dict.lookup("allowFreeStandingZoneFaces")),
maxLoadUnbalance_(dict.lookupOrDefault<scalar>("maxLoadUnbalance",0))
{}
@ -55,6 +56,7 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict)
minRefineCells_(readLabel(dict.lookup("minRefinementCells"))),
nBufferLayers_(readLabel(dict.lookup("nCellsBetweenLevels"))),
keepPoints_(pointField(1, dict.lookup("locationInMesh"))),
allowFreeStandingZoneFaces_(dict.lookup("allowFreeStandingZoneFaces")),
maxLoadUnbalance_(dict.lookupOrDefault<scalar>("maxLoadUnbalance",0))
{
scalar featAngle(readScalar(dict.lookup("resolveFeatureAngle")));

View File

@ -38,6 +38,7 @@ SourceFiles
#include "dictionary.H"
#include "pointField.H"
#include "Switch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -73,6 +74,10 @@ class refinementParameters
//- Areas to keep
const pointField keepPoints_;
//- FaceZone faces allowed which have owner and neighbour in same
// cellZone?
Switch allowFreeStandingZoneFaces_;
//- Allowed load unbalance
scalar maxLoadUnbalance_;
@ -137,6 +142,13 @@ public:
return keepPoints_;
}
//- Are zone faces allowed only inbetween different cell zones
// or also just free standing?
bool allowFreeStandingZoneFaces() const
{
return allowFreeStandingZoneFaces_;
}
//- Allowed load unbalance
scalar maxLoadUnbalance() const
{

View File

@ -704,7 +704,11 @@ public:
//- Put faces/cells into zones according to surface specification.
// Returns null if no zone surfaces present. Region containing
// 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

View File

@ -2032,7 +2032,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::dupNonManifoldPoints()
// Zoning
Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
(
const point& keepPoint
const point& keepPoint,
const bool allowFreeStandingZoneFaces
)
{
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.
//makeConsistentFaceIndex(cellToZone, namedSurfaceIndex);
// Make sure namedSurfaceIndex is unset inbetween same cell cell zones.
if (!allowFreeStandingZoneFaces)
{
makeConsistentFaceIndex(cellToZone, namedSurfaceIndex);
}
// Topochange container
polyTopoChange meshMod(mesh_);
@ -2440,7 +2443,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
}
else if (ownZone == neiZone)
{
// Can only happen for coupled boundaries. Keep master
// Free-standing zone face or coupled boundary. Keep master
// face unflipped.
flip = !isMasterFace[faceI];
}

View File

@ -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 * * * * * * * * * * * * * * //
Foam::triSurfaceMesh::triSurfaceMesh(const IOobject& io, const triSurface& s)
@ -620,27 +683,14 @@ void Foam::triSurfaceMesh::findLineAll
hits.clear();
hits.append(inter);
point pt = inter.hitPoint() + smallVec[pointI];
while (((pt-start[pointI])&dirVec[pointI]) <= magSqrDirVec[pointI])
{
// See if any intersection between pt and end
pointIndexHit inter = octree.findLine(pt, end[pointI]);
// Check for not hit or hit same triangle as before (can happen
// if vector along surface of triangle)
if
getNextIntersections
(
!inter.hit()
|| (inter.index() == hits.last().index())
)
{
break;
}
hits.append(inter);
pt = inter.hitPoint() + smallVec[pointI];
}
octree,
start[pointI],
end[pointI],
smallVec[pointI],
hits
);
info[pointI].transfer(hits);
}

View File

@ -111,6 +111,17 @@ private:
// addressing.
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
triSurfaceMesh(const triSurfaceMesh&);

View File

@ -4,4 +4,10 @@ forces/forcesFunctionObject.C
forceCoeffs/forceCoeffs.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

View File

@ -449,7 +449,7 @@ template<class CompType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
{
scalar pf,cf,pr,cr;
scalar pf, cf, pr, cr;
label lRef, rRef;
const volScalarField rho

View File

@ -81,7 +81,7 @@ greyDiffusiveRadiationMixedFvPatchScalarField
TName_(dict.lookup("T")),
emissivity_(readScalar(dict.lookup("emissivity")))
{
if (dict.found("value"))
if (dict.found("refValue"))
{
fvPatchScalarField::operator=
(

View File

@ -39,7 +39,9 @@ icoPolynomial<PolySize>::icoPolynomial(Istream& is)
:
specie(is),
rhoPolynomial_("rhoPolynomial", is)
{}
{
rhoPolynomial_ *= this->W();
}
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
@ -47,7 +49,8 @@ icoPolynomial<PolySize>::icoPolynomial(Istream& is)
template<int PolySize>
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
(

View File

@ -99,7 +99,8 @@ class icoPolynomial
{
// Private data
//- Density [kg/m^3]
//- Density
// Note: input in [kg/m3], but internally uses [kg/m3/kmol]
Polynomial<PolySize> rhoPolynomial_;
@ -117,6 +118,9 @@ public:
//- Construct from Istream
icoPolynomial(Istream&);
//- Construct as copy
inline icoPolynomial(const icoPolynomial&);
//- Construct as named copy
inline icoPolynomial(const word& name, const icoPolynomial&);
@ -141,6 +145,7 @@ public:
// Member operators
inline icoPolynomial& operator=(const icoPolynomial&);
inline void operator+=(const icoPolynomial&);
inline void operator-=(const icoPolynomial&);

View File

@ -42,6 +42,17 @@ inline Foam::icoPolynomial<PolySize>::icoPolynomial
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<int PolySize>
inline Foam::icoPolynomial<PolySize>::icoPolynomial
(
const icoPolynomial<PolySize>& ip
)
:
specie(ip),
rhoPolynomial_(ip.rhoPolynomial_)
{}
template<int PolySize>
inline Foam::icoPolynomial<PolySize>::icoPolynomial
(
@ -78,7 +89,7 @@ Foam::icoPolynomial<PolySize>::New(Istream& is)
template<int PolySize>
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 * * * * * * * * * * * * * //
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>
inline void Foam::icoPolynomial<PolySize>::operator+=
(
@ -122,6 +147,7 @@ inline void Foam::icoPolynomial<PolySize>::operator-=
)
{
scalar molr1 = this->nMoles();
specie::operator-=(ip);
molr1 /= this->nMoles();
@ -147,15 +173,15 @@ Foam::icoPolynomial<PolySize> Foam::operator+
const icoPolynomial<PolySize>& ip2
)
{
scalar mol1 = ip1.nMoles();
scalar mol2 = ip2.nMoles();
scalar nMoles = mol1 + mol2;
scalar nMoles = ip1.nMoles() + ip2.nMoles();
scalar molr1 = ip1.nMoles()/nMoles;
scalar molr2 = ip2.nMoles()/nMoles;
return icoPolynomial<PolySize>
(
static_cast<const specie&>(ip1)
+ 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
)
{
scalar mol1 = ip1.nMoles();
scalar mol2 = ip2.nMoles();
scalar nMoles = mol1 + mol2;
scalar nMoles = ip1.nMoles() + ip2.nMoles();
scalar molr1 = ip1.nMoles()/nMoles;
scalar molr2 = ip2.nMoles()/nMoles;
return icoPolynomial<PolySize>
(
static_cast<const specie&>(ip1)
- static_cast<const specie&>(ip2),
(mol1/nMoles)*ip1.rhoPolynomial_ - (mol2/nMoles)*ip2.rhoPolynomial_
molr1*ip1.rhoPolynomial_ - molr2*ip2.rhoPolynomial_
);
}

View File

@ -54,7 +54,6 @@ inline specie::specie
const scalar molWeight
)
:
//name_(),
nMoles_(nMoles),
molWeight_(molWeight)
{}
@ -113,29 +112,29 @@ 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_ =
nMoles_/sumNmoles_*molWeight_
+ st.nMoles_/sumNmoles_*st.molWeight_;
nMoles_/sumNmoles*molWeight_
+ st.nMoles_/sumNmoles*st.molWeight_;
nMoles_ = sumNmoles_;
nMoles_ = sumNmoles;
}
inline void specie::operator-=(const specie& st)
{
scalar diffnMoles_ = nMoles_ - st.nMoles_;
if (mag(diffnMoles_) < SMALL)
scalar diffnMoles = nMoles_ - st.nMoles_;
if (mag(diffnMoles) < SMALL)
{
diffnMoles_ = SMALL;
diffnMoles = SMALL;
}
molWeight_ =
nMoles_/diffnMoles_*molWeight_
- st.nMoles_/diffnMoles_*st.molWeight_;
nMoles_/diffnMoles*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)
{
scalar sumNmoles_ = max(st1.nMoles_ + st2.nMoles_, SMALL);
scalar sumNmoles = max(st1.nMoles_ + st2.nMoles_, SMALL);
return specie
(
sumNmoles_,
st1.nMoles_/sumNmoles_*st1.molWeight_
+ st2.nMoles_/sumNmoles_*st2.molWeight_
sumNmoles,
st1.nMoles_/sumNmoles*st1.molWeight_
+ st2.nMoles_/sumNmoles*st2.molWeight_
);
}
inline specie operator-(const specie& st1, const specie& st2)
{
scalar diffNmoles_ = st1.nMoles_ - st2.nMoles_;
if (mag(diffNmoles_) < SMALL)
scalar diffNmoles = st1.nMoles_ - st2.nMoles_;
if (mag(diffNmoles) < SMALL)
{
diffNmoles_ = SMALL;
diffNmoles = SMALL;
}
return specie
(
diffNmoles_,
st1.nMoles_/diffNmoles_*st1.molWeight_
- st2.nMoles_/diffNmoles_*st2.molWeight_
diffNmoles,
st1.nMoles_/diffNmoles*st1.molWeight_
- st2.nMoles_/diffNmoles*st2.molWeight_
);
}

View File

@ -39,11 +39,21 @@ Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
Hf_(readScalar(is)),
Sf_(readScalar(is)),
cpPolynomial_("cpPolynomial", is),
dhPolynomial_(cpPolynomial_.integrate()),
dsPolynomial_(cpPolynomial_.integrateMinus1())
hPolynomial_(),
sPolynomial_()
{
// Offset dh poly so that it is relative to the enthalpy at Tstd
dhPolynomial_[0] -= dhPolynomial_.evaluate(specie::Tstd);
Hf_ *= this->W();
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
<< pt.Hf_ << tab
<< pt.Hf_/pt.W() << tab
<< pt.Sf_ << tab
<< pt.cpPolynomial_ << tab
<< pt.dhPolynomial_ << tab
<< pt.dsPolynomial;
<< "cpPolynomial" << tab << pt.cpPolynomial_/pt.W();
os.check
(
"operator<<(Ostream& os, const hPolynomialThermo<EquationOfState>& pt)"
"operator<<"
"("
"Ostream&, "
"const hPolynomialThermo<EquationOfState, PolySize>&"
")"
);
return os;

View File

@ -100,20 +100,22 @@ class hPolynomialThermo
{
// Private data
//- Heat of formation [J/kg]
//- Heat of formation
// Note: input in [J/kg], but internally uses [J/kmol]
scalar Hf_;
//- Standard entropy [J/(kg.K)]
//- Standard entropy
// Note: input in [J/kg/K], but internally uses [J/kmol/K]
scalar Sf_;
//- Specific heat at constant pressure [J/(kg.K)]
Polynomial<PolySize> cpPolynomial_;
//- 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)]
Polynomial<PolySize> dsPolynomial_;
//- Entropy - derived from cp [J/(kg.K)] - relative to Tstd
Polynomial<PolySize> sPolynomial_;
// Private member functions
@ -125,8 +127,8 @@ class hPolynomialThermo
const scalar Hf,
const scalar Sf,
const Polynomial<PolySize>& cpPoly,
const typename Polynomial<PolySize>::intPolyType& dhPoly,
const Polynomial<PolySize>& dsPoly
const typename Polynomial<PolySize>::intPolyType& hPoly,
const Polynomial<PolySize>& sPoly
);
@ -137,6 +139,9 @@ public:
//- Construct from dictionary
hPolynomialThermo(Istream& is);
//- Construct as copy
inline hPolynomialThermo(const hPolynomialThermo&);
//- Construct as a named copy
inline hPolynomialThermo(const word&, const hPolynomialThermo&);
@ -161,8 +166,10 @@ public:
// Member operators
inline hPolynomialThermo& operator=(const hPolynomialThermo&);
inline void operator+=(const hPolynomialThermo&);
inline void operator-=(const hPolynomialThermo&);
inline void operator*=(const scalar);
// Friend operators

View File

@ -35,21 +35,36 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
const scalar Hf,
const scalar Sf,
const Polynomial<PolySize>& cpPoly,
const typename Polynomial<PolySize>::intPolyType& dhPoly,
const Polynomial<PolySize>& dsPoly
const typename Polynomial<PolySize>::intPolyType& hPoly,
const Polynomial<PolySize>& sPoly
)
:
EquationOfState(pt),
Hf_(Hf),
Sf_(Sf),
cpPolynomial_(cpPoly),
dhPolynomial_(dhPoly),
dsPolynomial_(dsPoly)
hPolynomial_(hPoly),
sPolynomial_(sPoly)
{}
// * * * * * * * * * * * * * * * * 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>
inline Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
(
@ -61,8 +76,8 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
Hf_(pt.Hf_),
Sf_(pt.Sf_),
cpPolynomial_(pt.cpPolynomial_),
dhPolynomial_(pt.dhPolynomial_),
dsPolynomial_(pt.dsPolynomial_)
hPolynomial_(pt.hPolynomial_),
sPolynomial_(pt.sPolynomial_)
{}
@ -74,7 +89,7 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::cp
const scalar T
) 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
{
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
{
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()
const
{
return Hf_*this->W();
return Hf_;
}
@ -112,12 +127,31 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::s
const scalar T
) const
{
return (dsPolynomial_.evaluate(T) + Sf_)*this->W();
return sPolynomial_.evaluate(T);
}
// * * * * * * * * * * * * * * * 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>
inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator+=
(
@ -134,8 +168,8 @@ inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator+=
Hf_ = molr1*Hf_ + molr2*pt.Hf_;
Sf_ = molr1*Sf_ + molr2*pt.Sf_;
cpPolynomial_ = molr1*cpPolynomial_ + molr2*pt.cpPolynomial_;
dhPolynomial_ = molr1*dhPolynomial_ + molr2*pt.dhPolynomial_;
dsPolynomial_ = molr1*dsPolynomial_ + molr2*pt.dsPolynomial_;
hPolynomial_ = molr1*hPolynomial_ + molr2*pt.hPolynomial_;
sPolynomial_ = molr1*sPolynomial_ + molr2*pt.sPolynomial_;
}
@ -155,8 +189,18 @@ inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator-=
Hf_ = molr1*Hf_ - molr2*pt.Hf_;
Sf_ = molr1*Sf_ - molr2*pt.Sf_;
cpPolynomial_ = molr1*cpPolynomial_ - molr2*pt.cpPolynomial_;
dhPolynomial_ = molr1*dhPolynomial_ - molr2*pt.dhPolynomial_;
dsPolynomial_ = molr1*dsPolynomial_ - molr2*pt.dsPolynomial_;
hPolynomial_ = molr1*hPolynomial_ - molr2*pt.hPolynomial_;
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
)
{
EquationOfState eofs
(
static_cast<const EquationOfState&>(pt1)
+ static_cast<const EquationOfState&>(pt2)
);
EquationOfState eofs = pt1;
eofs += pt2;
scalar molr1 = pt1.nMoles()/eofs.nMoles();
scalar molr2 = pt2.nMoles()/eofs.nMoles();
return hPolynomialThermo<EquationOfState, PolySize>
(
eofs,
molr1*pt1.Hf_ + molr2*pt2.Hf_,
molr1*pt1.Sf_ + molr2*pt2.Sf_,
molr1*pt1.cpPolynomial_ + molr2*pt2.cpPolynomial_,
molr1*pt1.dhPolynomial_ + molr2*pt2.dhPolynomial_,
molr1*pt1.dsPolynomial_ + molr2*pt2.dsPolynomial_
molr1*pt1.hPolynomial_ + molr2*pt2.hPolynomial_,
molr1*pt1.sPolynomial_ + molr2*pt2.sPolynomial_
);
}
@ -196,22 +238,20 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize> Foam::operator-
const hPolynomialThermo<EquationOfState, PolySize>& pt2
)
{
EquationOfState eofs
(
static_cast<const EquationOfState&>(pt1)
- static_cast<const EquationOfState&>(pt2)
);
EquationOfState eofs = pt1;
eofs -= pt2;
scalar molr1 = pt1.nMoles()/eofs.nMoles();
scalar molr2 = pt2.nMoles()/eofs.nMoles();
return hPolynomialThermo<EquationOfState, PolySize>
(
eofs,
molr1*pt1.Hf_ - molr2*pt2.Hf_,
molr1*pt1.Sf_ - molr2*pt2.Sf_,
molr1*pt1.cpPolynomial_ - molr2*pt2.cpPolynomial_,
molr1*pt1.dhPolynomial_ - molr2*pt2.dhPolynomial_,
molr1*pt1.dsPolynomial_ - molr2*pt2.dsPolynomial_
molr1*pt1.hPolynomial_ - molr2*pt2.hPolynomial_,
molr1*pt1.sPolynomial_ - molr2*pt2.sPolynomial_
);
}
@ -229,8 +269,8 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize> Foam::operator*
pt.Hf_,
pt.Sf_,
pt.cpPolynomial_,
pt.dhPolynomial_,
pt.dsPolynomial_
pt.hPolynomial_,
pt.sPolynomial_
);
}

View File

@ -303,6 +303,7 @@ inline void Foam::specieThermo<thermo>::operator+=
thermo::operator+=(st);
}
template<class thermo>
inline void Foam::specieThermo<thermo>::operator-=
(
@ -312,6 +313,7 @@ inline void Foam::specieThermo<thermo>::operator-=
thermo::operator-=(st);
}
template<class thermo>
inline void Foam::specieThermo<thermo>::operator*=(const scalar s)
{

View File

@ -35,7 +35,10 @@ Foam::polynomialTransport<Thermo, PolySize>::polynomialTransport(Istream& is)
Thermo(is),
muPolynomial_("muPolynomial", is),
kappaPolynomial_("kappaPolynomial", is)
{}
{
muPolynomial_ *= this->W();
kappaPolynomial_ *= this->W();
}
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
@ -47,7 +50,9 @@ Foam::Ostream& Foam::operator<<
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
(

View File

@ -96,9 +96,11 @@ class polynomialTransport
// Private data
//- Dynamic viscosity
// Note: input in [Pa.s], but internally uses [Pa.s/kmol]
Polynomial<PolySize> muPolynomial_;
//- Thermal conductivity
// Note: input in [W/m/K], but internally uses [W/m/K/kmol]
Polynomial<PolySize> kappaPolynomial_;
@ -117,6 +119,9 @@ public:
// Constructors
//- Construct copy
inline polynomialTransport(const polynomialTransport&);
//- Construct as named copy
inline polynomialTransport(const word&, const polynomialTransport&);
@ -148,6 +153,9 @@ public:
// Member operators
inline polynomialTransport& operator=(const polynomialTransport&);
inline void operator+=(const polynomialTransport&);
inline void operator-=(const polynomialTransport&);
inline void operator*=(const scalar);
// Friend operators

View File

@ -28,6 +28,18 @@ License
// * * * * * * * * * * * * * * * * 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>
inline Foam::polynomialTransport<Thermo, PolySize>::polynomialTransport
(
@ -85,7 +97,7 @@ inline Foam::scalar Foam::polynomialTransport<Thermo, PolySize>::mu
const scalar T
) 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
{
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 * * * * * * * * * * * * * //
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)
);
scalar molr1 = pt1.nMoles()/t.nMoles();
scalar molr2 = pt2.nMoles()/t.nMoles();

View File

@ -161,7 +161,18 @@ LaunderSharmaKE::LaunderSharmaKE
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_
(

View File

@ -79,6 +79,7 @@ void omegaWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
os.writeKeyword("kappa") << kappa_ << 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),
kappa_(0.41),
E_(9.8),
beta1_(0.075),
yPlusLam_(calcYPlusLam(kappa_, E_))
{
@ -115,6 +117,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
Cmu_(ptf.Cmu_),
kappa_(ptf.kappa_),
E_(ptf.E_),
beta1_(ptf.beta1_),
yPlusLam_(ptf.yPlusLam_)
{
checkType();
@ -133,6 +136,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
beta1_(dict.lookupOrDefault<scalar>("beta1", 0.075)),
yPlusLam_(calcYPlusLam(kappa_, E_))
{
checkType();
@ -149,6 +153,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
Cmu_(owfpsf.Cmu_),
kappa_(owfpsf.kappa_),
E_(owfpsf.E_),
beta1_(owfpsf.beta1_),
yPlusLam_(owfpsf.yPlusLam_)
{
checkType();
@ -166,6 +171,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
Cmu_(owfpsf.Cmu_),
kappa_(owfpsf.kappa_),
E_(owfpsf.E_),
beta1_(owfpsf.beta1_),
yPlusLam_(owfpsf.yPlusLam_)
{
@ -222,7 +228,11 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
Cmu25*y[faceI]*sqrt(k[faceCellI])
/(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_)
{

View File

@ -26,7 +26,23 @@ Class
Foam::compressible::RASModels::omegaWallFunctionFvPatchScalarField
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
omegaWallFunctionFvPatchScalarField.C
@ -71,6 +87,9 @@ protected:
//- E coefficient
scalar E_;
//- beta1 coefficient
scalar beta1_;
//- Y+ at the edge of the laminar sublayer
scalar yPlusLam_;

View File

@ -79,6 +79,7 @@ void omegaWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
os.writeKeyword("kappa") << kappa_ << 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),
kappa_(0.41),
E_(9.8),
beta1_(0.075),
yPlusLam_(calcYPlusLam(kappa_, E_))
{
checkType();
@ -114,6 +116,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
Cmu_(ptf.Cmu_),
kappa_(ptf.kappa_),
E_(ptf.E_),
beta1_(ptf.beta1_),
yPlusLam_(ptf.yPlusLam_)
{
checkType();
@ -132,6 +135,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
Cmu_(dict.lookupOrDefault<scalar>("Cmu", 0.09)),
kappa_(dict.lookupOrDefault<scalar>("kappa", 0.41)),
E_(dict.lookupOrDefault<scalar>("E", 9.8)),
beta1_(dict.lookupOrDefault<scalar>("beta1", 0.075)),
yPlusLam_(calcYPlusLam(kappa_, E_))
{
checkType();
@ -148,6 +152,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
Cmu_(owfpsf.Cmu_),
kappa_(owfpsf.kappa_),
E_(owfpsf.E_),
beta1_(owfpsf.beta1_),
yPlusLam_(owfpsf.yPlusLam_)
{
checkType();
@ -165,8 +170,8 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
Cmu_(owfpsf.Cmu_),
kappa_(owfpsf.kappa_),
E_(owfpsf.E_),
beta1_(owfpsf.beta1_),
yPlusLam_(owfpsf.yPlusLam_)
{
checkType();
}
@ -217,7 +222,11 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
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_)
{

View File

@ -26,7 +26,23 @@ Class
Foam::incompressible::RASModels::omegaWallFunctionFvPatchScalarField
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
omegaWallFunctionFvPatchScalarField.C
@ -71,6 +87,9 @@ protected:
//- E coefficient
scalar E_;
//- beta1 coefficient
scalar beta1_;
//- Y+ at the edge of the laminar sublayer
scalar yPlusLam_;

View File

@ -158,7 +158,7 @@ cp ${MAIN_CONTROL_DICT} ${MAIN_CONTROL_DICT}.org
sed \
-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}
echo "Copying the tutorials"

View File

@ -20,31 +20,9 @@ internalField uniform 80;
boundaryField
{
minX
".*"
{
type zeroGradient;
}
maxX
{
type zeroGradient;
}
minY
{
type zeroGradient;
}
maxY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
type calculated;
}
}

View File

@ -20,32 +20,9 @@ internalField uniform 300;
boundaryField
{
minX
".*"
{
type fixedValue;
value uniform 300;
}
maxX
{
type zeroGradient;
}
minY
{
type zeroGradient;
}
maxY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
type calculated;
}
}

View File

@ -20,37 +20,9 @@ internalField uniform (0.01 0 0);
boundaryField
{
minX
".*"
{
type fixedValue;
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);
type calculated;
}
}

View File

@ -20,31 +20,9 @@ internalField uniform 450;
boundaryField
{
minX
".*"
{
type zeroGradient;
}
maxX
{
type zeroGradient;
}
minY
{
type zeroGradient;
}
maxY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
type calculated;
}
}

View File

@ -21,46 +21,9 @@ internalField uniform 0.01;
boundaryField
{
minY
".*"
{
type epsilonWallFunction;
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;
type calculated;
}
}

View File

@ -21,46 +21,9 @@ internalField uniform 0.1;
boundaryField
{
minY
".*"
{
type kqRWallFunction;
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;
type calculated;
}
}

View File

@ -20,36 +20,9 @@ internalField uniform 1e5;
boundaryField
{
minX
".*"
{
type buoyantPressure;
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;
type calculated;
}
}

View File

@ -20,31 +20,9 @@ internalField uniform 8000;
boundaryField
{
minX
".*"
{
type zeroGradient;
}
maxX
{
type zeroGradient;
}
minY
{
type zeroGradient;
}
maxY
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
type calculated;
}
}

View File

@ -13,11 +13,6 @@ rm -f constant/polyMesh/sets/*_old
runApplication setsToZones -noFlipMap
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)
for i in heater leftSolid rightSolid
do
@ -27,7 +22,12 @@ done
# remove solid fields from fluid regions (important for post-processing)
for i in bottomAir topAir
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

View File

@ -0,0 +1,2 @@
The 0/ field files contain nonsense patchFields. All interesting
work is done using the changeDictionaryDicts.

View File

@ -14,9 +14,9 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kEpsilon;
RASModel laminar;
turbulence off;
turbulence on;
printCoeffs on;

View File

@ -10,13 +10,11 @@ FoamFile
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 -9.81 0 );
value (0 -9.81 0);
// ************************************************************************* //

View File

@ -14,9 +14,9 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel kEpsilon;
RASModel laminar;
turbulence off;
turbulence on;
printCoeffs on;

View File

@ -10,13 +10,11 @@ FoamFile
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 -9.81 0 );
value (0 -9.81 0);
// ************************************************************************* //

View File

@ -18,6 +18,10 @@ dictionaryReplacement
{
boundary
{
".*"
{
type wall;
}
bottomAir_to_leftSolid
{
offset ( 0 0 0 );
@ -43,32 +47,11 @@ dictionaryReplacement
U
{
internalField uniform (0 0 0);
internalField uniform (0.01 0 0);
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;
value uniform (0 0 0);
@ -78,28 +61,16 @@ dictionaryReplacement
T
{
internalField uniform 300;
boundaryField
{
minX
".*"
{
type zeroGradient;
}
bottomAir_to_leftSolid
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
bottomAir_to_heater
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
bottomAir_to_rightSolid
"bottomAir_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
@ -111,58 +82,13 @@ dictionaryReplacement
epsilon
{
// Set the value on all bc to non-zero. Not used in simulation
// since zeroGradient; only used in initialisation.
internalField uniform 0.01;
boundaryField
{
minX
".*"
{
type zeroGradient;
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;
type compressible::epsilonWallFunction;
value uniform 0.01;
}
}
@ -171,54 +97,12 @@ dictionaryReplacement
k
{
internalField uniform 0.1;
boundaryField
{
minX
".*"
{
type zeroGradient;
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;
type compressible::kqRWallFunction;
value uniform 0.1;
}
}
@ -226,53 +110,17 @@ dictionaryReplacement
p
{
internalField uniform 1E5;
internalField uniform 100000;
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;
value 1e5;
}
}
}
}
// ************************************************************************* //

View File

@ -18,6 +18,10 @@ dictionaryReplacement
{
boundary
{
".*"
{
type patch;
}
heater_to_bottomAir
{
offset ( 0 0 0 );
@ -54,50 +58,23 @@ dictionaryReplacement
boundaryField
{
".*"
{
type zeroGradient;
value uniform 300;
}
"heater_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
minY
{
type fixedValue;
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
{
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 calculated;
}
}
}
@ -144,31 +97,7 @@ dictionaryReplacement
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;
}
@ -181,31 +110,7 @@ dictionaryReplacement
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;
}

View File

@ -18,6 +18,10 @@ dictionaryReplacement
{
boundary
{
".*"
{
type patch;
}
leftSolid_to_bottomAir
{
offset ( 0 0 0 );
@ -47,34 +51,12 @@ dictionaryReplacement
boundaryField
{
minX
".*"
{
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;
}
leftSolid_to_topAir
"leftSolid_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
@ -90,29 +72,9 @@ dictionaryReplacement
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 calculated;
}
}
}
@ -123,27 +85,7 @@ dictionaryReplacement
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;
}
@ -156,27 +98,7 @@ dictionaryReplacement
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;
}

View File

@ -18,6 +18,10 @@ dictionaryReplacement
{
boundary
{
".*"
{
type patch;
}
rightSolid_to_heater
{
offset ( 0 0 0 );
@ -47,33 +51,12 @@ dictionaryReplacement
boundaryField
{
maxX
".*"
{
type zeroGradient;
}
minZ
{
type zeroGradient;
}
maxZ
{
type zeroGradient;
}
rightSolid_to_heater
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
rightSolid_to_bottomAir
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
rightSolid_to_topAir
"rightSolid_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
@ -89,29 +72,9 @@ dictionaryReplacement
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 calculated;
}
}
}
@ -122,27 +85,7 @@ dictionaryReplacement
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;
}
@ -155,27 +98,7 @@ dictionaryReplacement
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;
}

View File

@ -18,6 +18,18 @@ dictionaryReplacement
{
boundary
{
".*"
{
type wall;
}
minX
{
type patch;
}
maxX
{
type patch;
}
topAir_to_leftSolid
{
offset ( 0 0 0 );
@ -43,64 +55,53 @@ dictionaryReplacement
U
{
internalField uniform ( 0.01 0 0 );
internalField uniform (0.01 0 0);
boundaryField
{
".*"
{
type fixedValue;
value uniform (0 0 0);
}
minX
{
type fixedValue;
value uniform (0.01 0 0);
value uniform ( 0.01 0 0 );
}
maxX
{
type inletOutlet;
inletValue 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);
inletValue uniform ( 0 0 0 );
value uniform ( 0 0 0 );
}
}
}
T
{
internalField uniform 300;
boundaryField
{
".*"
{
type zeroGradient;
}
minX
{
type fixedValue;
value uniform 300;
}
topAir_to_leftSolid
maxX
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
type inletOutlet;
inletValue uniform 300;
value uniform 300;
}
}
topAir_to_heater
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
K K;
value uniform 300;
}
topAir_to_rightSolid
"topAir_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffle;
neighbourFieldName T;
@ -112,10 +113,16 @@ dictionaryReplacement
epsilon
{
// Set the value on all bc to non-zero. Not used in simulation
// since zeroGradient; only used in initialisation.
internalField uniform 0.01;
boundaryField
{
".*"
{
type compressible::epsilonWallFunction;
value uniform 0.01;
}
minX
{
type fixedValue;
@ -123,44 +130,8 @@ dictionaryReplacement
}
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;
}
topAir_to_leftSolid
{
type zeroGradient;
value uniform 0.01;
}
topAir_to_heater
{
type zeroGradient;
value uniform 0.01;
}
topAir_to_rightSolid
{
type zeroGradient;
type inletOutlet;
inletValue uniform 0.01;
value uniform 0.01;
}
}
@ -169,55 +140,24 @@ dictionaryReplacement
k
{
internalField uniform 0.1;
boundaryField
{
".*"
{
type compressible::kqRWallFunction;
value uniform 0.1;
}
minX
{
type fixedValue;
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;
}
topAir_to_leftSolid
{
type zeroGradient;
value uniform 0.1;
}
topAir_to_heater
{
type zeroGradient;
value uniform 0.1;
}
topAir_to_rightSolid
{
type zeroGradient;
type inletOutlet;
inletValue uniform 0.1;
value uniform 0.1;
}
}
@ -225,59 +165,23 @@ dictionaryReplacement
p
{
internalField uniform 1E5;
internalField uniform 100000;
boundaryField
{
minX
".*"
{
type buoyantPressure;
value 1e5;
}
maxX
{
type waveTransmissive;
//field p;
phi phi;
rho rho;
psi psi;
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;
gamma 1.4;
fieldInf 100000;
lInf 0.4;
value uniform 100000;
}
}
}

View File

@ -27,33 +27,7 @@ boundaryField
}
farFieldMoving
{
//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;
type slip;
}
fixedWall
{
@ -71,28 +45,7 @@ boundaryField
}
farField
{
//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;
type slip;
}
back
{

View File

@ -17,9 +17,6 @@ FoamFile
application pimpleDyMFoam;
// For surfaceSlip boundary conditions
libs ("libfvMotionSolvers.so");
startFrom startTime;
startTime 0;

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application rhoPorousSimpleFoam;
application porousSimpleFoam;
startFrom startTime;

View File

@ -23,25 +23,25 @@ boundaryField
{
front
{
type nutWallFunction;
type nutkWallFunction;
value uniform 0;
}
back
{
type nutWallFunction;
type nutkWallFunction;
value uniform 0;
}
wall
{
type nutWallFunction;
type nutkWallFunction;
value uniform 0;
}
porosityWall
{
type nutWallFunction;
type nutkWallFunction;
value uniform 0;
}

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application rhoPorousSimpleFoam;
application porousSimpleFoam;
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

View File

@ -144,6 +144,8 @@ SingleMixtureFractionCoeffs
LiquidEvaporationCoeffs
{
enthalpyTransfer enthalpyDifference;
activeLiquids
(
H2O

View File

@ -146,6 +146,8 @@ SinglePhaseMixtureCoeffs
LiquidEvaporationCoeffs
{
enthalpyTransfer enthalpyDifference;
activeLiquids
(
H2O

View File

@ -1,35 +1,34 @@
(
// Nitrogen
N2 N2 1 28.0134
N2 N2 1 28.0134
rhoPolynomial
(
3.88E+000
-1.64E-002
3.18E-005
-2.89E-008
9.90E-012
3.8936E+00
-1.6463E-02
3.2101E-05
-2.9174E-08
9.9889E-12
0
0
0
)
0.0 // Heat of formation [J/kg]
6840 // Standard entropy [J/kg/K]
0.0 // Heat of formation
0.0 // Standard entropy
cpPolynomial
(
2.75E+004
1.12E+001
-3.12E-002
4.45E-005
-1.92E-008
9.7908E+02
4.1787E-01
-1.1761E-03
1.6742E-06
-7.2559E-10
0
0
0
)
muPolynomial
(
1.54E-006
6.15E-008
-1.81E-011
1.5068E-06
6.1598E-08
-1.8188E-11
0
0
0
@ -38,47 +37,45 @@
)
kappaPolynomial
(
3.15E-003
8.49E-005
-1.25E-008
3.1494E-03
8.4997E-05
-1.2621E-08
0
0
0
0
0
)
// Oxygen
O2 O2 1 31.9988
O2 O2 1 31.9988
rhoPolynomial
(
4.43E+000
-1.87E-002
3.64E-005
-3.30E-008
1.13E-011
4.4475E+00
-1.8805E-02
3.6667E-05
-3.3323E-08
1.1410E-11
0
0
0
)
0.0 // Heat of formation [J/kg]
6408 // Standard entropy [J/kg/K]
0.0 // Heat of formation
0.0 // Standard entropy
cpPolynomial
(
2.67E+004
9.93E+000
-7.09E-003
1.45E-005
-9.13E-009
8.3484E+02
2.9297E-01
-1.4959E-04
3.4143E-07
-2.2786E-10
0
0
0
)
muPolynomial
(
1.54E-006
6.15E-008
-1.81E-011
1.5068E-06
6.1598E-08
-1.8188E-11
0
0
0
@ -87,25 +84,23 @@
)
kappaPolynomial
(
2.09E-004
8.52E-005
-1.49E-008
1.6082E-04
8.5301E-05
-1.4998E-08
0
0
0
0
0
)
// Water vapour
H2O H2O 1 18.0153
H2O H2O 1 18.0153
rhoPolynomial
(
2.49E+000
-1.05E-002
2.03E-005
-1.84E-008
6.28E-012
2.5039E+00
-1.0587E-02
2.0643E-05
-1.8761E-08
6.4237E-12
0
0
0
@ -114,20 +109,20 @@
1.0482e04 // Standard entropy [J/kg/K]
cpPolynomial
(
2.85E+004
2.63E+001
-4.63E-002
5.11E-005
-1.83E-008
1.5631E+03
1.6040E+00
-2.9334E-03
3.2168E-06
-1.1571E-09
0
0
0
)
muPolynomial
(
1.54E-006
6.15E-008
-1.81E-011
1.5068E-06
6.1598E-08
-1.8188E-11
0
0
0
@ -136,9 +131,56 @@
)
kappaPolynomial
(
3.79E-003
1.53E-004
-1.22E-008
3.7972E-03
1.5336E-04
-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
@ -146,3 +188,4 @@
0
)
)

View File

@ -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;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object 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;
}
}
// ************************************************************************* //

View File

@ -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;
}
}
// ************************************************************************* //

View File

@ -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);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.99;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
walls
{
type zeroGradient;
}
outlet
{
// type zeroGradient;
type inletOutlet;
inletValue uniform 0.99;
}
inlet
{
type fixedValue;
value uniform 0.99;
}
}
// ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show More