mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -952,7 +952,7 @@ int main(int argc, char *argv[])
|
||||
const word shellRegionName(dict.lookup("region"));
|
||||
const wordList zoneNames(dict.lookup("faceZones"));
|
||||
const Switch oneD(dict.lookup("oneD"));
|
||||
|
||||
const Switch adaptMesh(dict.lookup("adaptMesh"));
|
||||
|
||||
Info<< "Extruding zones " << zoneNames
|
||||
<< " on mesh " << regionName
|
||||
@ -1096,6 +1096,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Add interface patches
|
||||
// ~~~~~~~~~~~~~~~~~~~~~
|
||||
// Note that these actually get added to the original mesh
|
||||
// so the shell mesh creation copies them. They then get removed
|
||||
// from the original mesh.
|
||||
|
||||
Info<< "Adding coupling patches:" << nl << nl
|
||||
<< "patchID\tpatch\ttype" << nl
|
||||
@ -1707,6 +1710,8 @@ int main(int argc, char *argv[])
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
autoPtr<mapPolyMesh> addBafflesMap;
|
||||
|
||||
if (adaptMesh)
|
||||
{
|
||||
polyTopoChange meshMod(mesh);
|
||||
|
||||
@ -1817,6 +1822,7 @@ int main(int argc, char *argv[])
|
||||
// Change master and slave boundary conditions on originating mesh
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
if (adaptMesh)
|
||||
{
|
||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
List<polyPatch*> newPatches(patches.size());
|
||||
@ -1878,22 +1884,27 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
mesh.removeFvBoundary();
|
||||
mesh.addFvPatches(newPatches, true);
|
||||
}
|
||||
|
||||
// Remove any unused patches
|
||||
deleteEmptyPatches(mesh);
|
||||
}
|
||||
|
||||
|
||||
Info<< "Writing mesh " << mesh.name()
|
||||
<< " to " << mesh.facesInstance() << nl
|
||||
<< endl;
|
||||
|
||||
if (!mesh.write())
|
||||
if (adaptMesh)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
<< "Failed writing mesh " << mesh.name()
|
||||
<< " at location " << mesh.facesInstance()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
Info<< "Writing mesh " << mesh.name()
|
||||
<< " to " << mesh.facesInstance() << nl
|
||||
<< endl;
|
||||
|
||||
if (!mesh.write())
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
<< "Failed writing mesh " << mesh.name()
|
||||
<< " at location " << mesh.facesInstance()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
Info << "End\n" << endl;
|
||||
|
||||
|
||||
@ -17,9 +17,18 @@ FoamFile
|
||||
// Name of region to create
|
||||
region liquidFilm;
|
||||
|
||||
// faceZones to extrude
|
||||
// FaceZones to extrude
|
||||
faceZones (f0);
|
||||
|
||||
// Adapt the original mesh to have directMapped patches at where the
|
||||
// faceZones are?
|
||||
// If true:
|
||||
// - extruding internal faces: become baffles on directMapped patches
|
||||
// - extruding boundary faces: repatched to be on directMapped patches
|
||||
// If false: leave original mesh intact. Extruded mesh will still have
|
||||
// directMapped patch which might need to be adapted.
|
||||
adaptMesh true;
|
||||
|
||||
// Extrude 1D-columns of cells?
|
||||
oneD false;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -86,51 +86,11 @@ autoPtr<fvMesh> createMesh
|
||||
if (!haveMesh)
|
||||
{
|
||||
// Create dummy mesh. Only used on procs that don't have mesh.
|
||||
|
||||
{
|
||||
IOdictionary fvSolution
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"fvSolution",
|
||||
runTime.system(),
|
||||
runTime,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
Pout<< "Writing dummy " << fvSolution.objectPath() << endl;
|
||||
fvSolution.regIOobject::write();
|
||||
}
|
||||
{
|
||||
IOdictionary fvSchemes
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"fvSchemes",
|
||||
runTime.system(),
|
||||
runTime,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
fvSchemes.add("divSchemes", dictionary());
|
||||
fvSchemes.add("gradSchemes", dictionary());
|
||||
fvSchemes.add("laplacianSchemes", dictionary());
|
||||
Pout<< "Writing dummy " << fvSchemes.objectPath() << endl;
|
||||
fvSchemes.regIOobject::write();
|
||||
}
|
||||
|
||||
Pout<< "Creating dummy mesh from " << io.objectPath() << endl;
|
||||
IOobject noReadIO(io);
|
||||
noReadIO.readOpt() = IOobject::NO_READ;
|
||||
fvMesh dummyMesh
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
io.name(),
|
||||
io.instance(),
|
||||
io.db(),
|
||||
IOobject::NO_READ
|
||||
),
|
||||
noReadIO,
|
||||
xferCopy(pointField()),
|
||||
xferCopy(faceList()),
|
||||
xferCopy(labelList()),
|
||||
@ -521,7 +481,7 @@ void compareFields
|
||||
{
|
||||
if (mag(aBoundary[i] - bBoundary[i]) > tolDim)
|
||||
{
|
||||
FatalErrorIn
|
||||
WarningIn
|
||||
(
|
||||
"compareFields"
|
||||
"(const scalar, const volVectorField&"
|
||||
@ -532,7 +492,9 @@ void compareFields
|
||||
<< " cc:" << endl
|
||||
<< " real :" << aBoundary[i] << endl
|
||||
<< " mapped :" << bBoundary[i] << endl
|
||||
<< abort(FatalError);
|
||||
<< "This might be just a precision entry"
|
||||
<< " on writing the mesh." << endl;
|
||||
//<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -554,16 +516,16 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
# 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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user