Merge branch 'master' of /home/dm4/OpenFOAM/repositories/OpenFOAM-dev

This commit is contained in:
andy
2013-12-09 10:33:07 +00:00
240 changed files with 4899 additions and 512 deletions

View File

@ -91,7 +91,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa
return da*sqrt(Theta)*
(
2.0*sqr(alpha1)*g0*(1.0 + e)/sqrtPi
+ (9.0/8.0)*sqrtPi*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha1)
+ (9.0/8.0)*sqrtPi*g0*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha1)
/(49.0/16.0 - 33.0*e/16.0)
+ (15.0/16.0)*sqrtPi*alpha1*(0.5*sqr(e) + 0.25*e - 0.75 + lamda)
/((49.0/16.0 - 33.0*e/16.0)*lamda)

View File

@ -1,9 +1,9 @@
EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
EXE_LIBS = \
-lmeshTools \
-lsampling \
-lfiniteVolume \
-ldynamicMesh

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -33,6 +33,7 @@ using std::ios;
#include "fluentFvMesh.H"
#include "primitiveMesh.H"
#include "wallFvPatch.H"
#include "symmetryPlaneFvPatch.H"
#include "symmetryFvPatch.H"
#include "cellModeller.H"
@ -177,7 +178,11 @@ void Foam::fluentFvMesh::writeFluentMesh() const
{
fluentMeshFile << 3;
}
else if (isA<symmetryFvPatch>(boundary()[patchI]))
else if
(
isA<symmetryPlaneFvPatch>(boundary()[patchI])
|| isA<symmetryFvPatch>(boundary()[patchI])
)
{
fluentMeshFile << 7;
}
@ -280,7 +285,11 @@ void Foam::fluentFvMesh::writeFluentMesh() const
{
fluentMeshFile << "wall ";
}
else if (isA<symmetryFvPatch>(boundary()[patchI]))
else if
(
isA<symmetryPlaneFvPatch>(boundary()[patchI])
|| isA<symmetryFvPatch>(boundary()[patchI])
)
{
fluentMeshFile << "symmetry ";
}

View File

@ -401,7 +401,7 @@ addLayersControls
// Angle used to pick up medial axis points
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130
// in 17x.
minMedianAxisAngle 90;
minMedialAxisAngle 90;
// Reduce layer growth where ratio thickness to medial
// distance is large
@ -414,6 +414,9 @@ addLayersControls
// default is 0.
nSmoothDisplacement 90;
// Optional: limit the number of steps walking away from the surface
nMedialAxisIter 10;
// Mesh shrinking

View File

@ -1,5 +1,6 @@
EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \

View File

@ -619,19 +619,41 @@ int main(int argc, char *argv[])
const word masterName = groupName + "_master";
const word slaveName = groupName + "_slave";
dictionary patchDict = patchSource;
patchDict.set("nFaces", 0);
patchDict.set("startFace", 0);
patchDict.set("coupleGroup", groupName);
word groupNameMaster = groupName;
word groupNameSlave = groupName;
addPatch(mesh, masterName, groupName, patchDict);
addPatch(mesh, slaveName, groupName, patchDict);
dictionary patchDictMaster(patchSource);
patchDictMaster.set("nFaces", 0);
patchDictMaster.set("startFace", 0);
patchDictMaster.set("coupleGroup", groupName);
dictionary patchDictSlave(patchDictMaster);
// Note: This is added for the particular case where we want
// master and slave in different groupNames
// (ie 3D thermal baffles)
bool groupBase = false;
if (patchSource.found("groupBase"))
{
groupBase = readBool(patchSource.lookup("groupBase"));
if (groupBase)
{
groupNameMaster = groupName + "Group_master";
groupNameSlave = groupName + "Group_slave";
patchDictMaster.set("coupleGroup", groupNameMaster);
patchDictSlave.set("coupleGroup", groupNameSlave);
}
}
addPatch(mesh, masterName, groupNameMaster, patchDictMaster);
addPatch(mesh, slaveName, groupNameSlave, patchDictSlave);
}
}
}
// Make sure patches and zoneFaces are synchronised across couples
mesh.boundaryMesh().checkParallelSync(true);
mesh.faceZones().checkParallelSync(true);
@ -793,6 +815,12 @@ int main(int argc, char *argv[])
else
{
const dictionary& patchSource = dict.subDict("patchPairs");
bool groupBase = false;
if (patchSource.found("groupBase"))
{
groupBase = readBool(patchSource.lookup("groupBase"));
}
const word& groupName = selectors[selectorI].name();
if (patchSource.found("patchFields"))
@ -801,23 +829,51 @@ int main(int argc, char *argv[])
(
"patchFields"
);
// Add coupleGroup to all entries
forAllIter(dictionary, patchFieldsDict, iter)
if (!groupBase)
{
if (iter().isDict())
// Add coupleGroup to all entries
forAllIter(dictionary, patchFieldsDict, iter)
{
dictionary& dict = iter().dict();
dict.set("coupleGroup", groupName);
if (iter().isDict())
{
dictionary& dict = iter().dict();
dict.set("coupleGroup", groupName);
}
}
const labelList& patchIDs =
pbm.groupPatchIDs()[groupName];
forAll(patchIDs, i)
{
fvMeshTools::setPatchFields
(
mesh,
patchIDs[i],
patchFieldsDict
);
}
}
const labelList& patchIDs = pbm.groupPatchIDs()[groupName];
forAll(patchIDs, i)
else
{
const word masterPatchName(groupName + "_master");
const word slavePatchName(groupName + "_slave");
label patchIMaster = pbm.findPatchID(masterPatchName);
label patchISlave = pbm.findPatchID(slavePatchName);
fvMeshTools::setPatchFields
(
mesh,
patchIDs[i],
patchIMaster,
patchFieldsDict
);
fvMeshTools::setPatchFields
(
mesh,
patchISlave,
patchFieldsDict
);
}

View File

@ -210,6 +210,14 @@ int main(int argc, char *argv[])
outFile << pt.x() << ' ' << pt.y() << ' ' << pt.z() << nl;
}
outFile
<< "VERTICES " << points.size() << ' ' << (2 * points.size()) << nl;
forAll(points, i)
{
outFile << 1 << ' ' << i << nl;
}
label nItems = 0;
forAll(polyLines, polyI)
{

View File

@ -33,6 +33,7 @@ Description
#include "fvCFD.H"
#include "pointFields.H"
#include "emptyPolyPatch.H"
#include "symmetryPlanePolyPatch.H"
#include "symmetryPolyPatch.H"
#include "wedgePolyPatch.H"
#include "OSspecific.H"
@ -286,6 +287,8 @@ int main(int argc, char *argv[])
(
!isType<emptyPolyPatch>
(patches[patchNo])
&& !isType<symmetryPlanePolyPatch>
(patches[patchNo])
&& !isType<symmetryPolyPatch>
(patches[patchNo])
&& !isType<wedgePolyPatch>