mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge commit 'OpenCFD/master' into olesenm
This commit is contained in:
@ -225,6 +225,8 @@ void dumpCyclicMatch(const fileName& prefix, const polyMesh& mesh)
|
||||
// Dump halves
|
||||
{
|
||||
OFstream str(prefix+cycPatch.name()+"_half0.obj");
|
||||
Pout<< "Dumping cycPatch.name() half0 faces to " << str.name()
|
||||
<< endl;
|
||||
meshTools::writeOBJ
|
||||
(
|
||||
str,
|
||||
@ -241,6 +243,8 @@ void dumpCyclicMatch(const fileName& prefix, const polyMesh& mesh)
|
||||
}
|
||||
{
|
||||
OFstream str(prefix+cycPatch.name()+"_half1.obj");
|
||||
Pout<< "Dumping cycPatch.name() half1 faces to " << str.name()
|
||||
<< endl;
|
||||
meshTools::writeOBJ
|
||||
(
|
||||
str,
|
||||
@ -262,6 +266,9 @@ void dumpCyclicMatch(const fileName& prefix, const polyMesh& mesh)
|
||||
OFstream str(prefix+cycPatch.name()+"_match.obj");
|
||||
label vertI = 0;
|
||||
|
||||
Pout<< "Dumping cyclic match as lines between face centres to "
|
||||
<< str.name() << endl;
|
||||
|
||||
for (label faceI = 0; faceI < halfSize; faceI++)
|
||||
{
|
||||
const point& fc0 = mesh.faceCentres()[cycPatch.start()+faceI];
|
||||
@ -773,6 +780,8 @@ int main(int argc, char *argv[])
|
||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, true);
|
||||
mesh.movePoints(map().preMotionPoints());
|
||||
|
||||
dumpCyclicMatch("coupled_", mesh);
|
||||
|
||||
// Synchronise points.
|
||||
if (!pointSync)
|
||||
{
|
||||
@ -890,6 +899,8 @@ int main(int argc, char *argv[])
|
||||
filterPatches(mesh);
|
||||
|
||||
|
||||
dumpCyclicMatch("final_", mesh);
|
||||
|
||||
|
||||
// Set the precision of the points data to 10
|
||||
IOstream::defaultPrecision(10);
|
||||
|
||||
@ -1,77 +1,96 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.0 |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "system";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object createPatcheDict;
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object createPatchDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Tolerance used in matching faces. Absolute tolerance is span of
|
||||
// face times this factor.
|
||||
matchTolerance 1E-6;
|
||||
// This application/dictionary controls:
|
||||
// - optional: create new patches from boundary faces (either given as
|
||||
// a set of patches or as a faceSet)
|
||||
// - always: order faces on coupled patches such that they are opposite. This
|
||||
// is done for all coupled faces, not just for any patches created.
|
||||
// - optional: synchronise points on coupled patches.
|
||||
|
||||
// Do a synchronisation of coupled points.
|
||||
// 1. Create cyclic:
|
||||
// - specify where the faces should come from
|
||||
// - specify the type of cyclic. If a rotational specify the rotationAxis
|
||||
// and centre to make matching easier
|
||||
// - pointSync true to guarantee points to line up.
|
||||
|
||||
// 2. Correct incorrect cyclic:
|
||||
// This will usually fail upon loading:
|
||||
// "face 0 area does not match neighbour 2 by 0.0100005%"
|
||||
// " -- possible face ordering problem."
|
||||
// - change patch type from 'cyclic' to 'patch' in the polyMesh/boundary file.
|
||||
// - loosen match tolerance to get case to load
|
||||
// - regenerate cyclic as above
|
||||
|
||||
|
||||
// Tolerance used in matching faces. Absolute tolerance is span of
|
||||
// face times this factor. To load incorrectly matches meshes set this
|
||||
// to a higher value.
|
||||
matchTolerance 1E-3;
|
||||
|
||||
// Do a synchronisation of coupled points after creation of any patches.
|
||||
pointSync true;
|
||||
|
||||
|
||||
// Patches to create.
|
||||
// If no patches does a coupled point and face synchronisation anyway.
|
||||
patches
|
||||
(
|
||||
{
|
||||
// Name of new patch
|
||||
name sidePatches;
|
||||
|
||||
// Dictionary for new patch
|
||||
dictionary
|
||||
{
|
||||
// Type of new patch
|
||||
dictionary
|
||||
{
|
||||
type cyclic;
|
||||
// Optional: used when matching and synchronising points.
|
||||
|
||||
// Optional: explicitly set transformation tensor.
|
||||
// Used when matching and synchronising points.
|
||||
//transform translational;
|
||||
//separationVector (-2289 0 0);
|
||||
}
|
||||
transform rotational;
|
||||
rotationAxis (1 0 0);
|
||||
rotationCentre (0 0 0);
|
||||
}
|
||||
|
||||
// How to construct: either 'patches' or 'set'
|
||||
// How to construct: either from 'patches' or 'set'
|
||||
constructFrom patches;
|
||||
|
||||
// If constructFrom = patches : names of patches
|
||||
//patches (periodic-1 periodic-2);
|
||||
patches (outlet-side1 outlet-side2);
|
||||
patches (periodic-1 periodic-2);
|
||||
|
||||
// If constructFrom = set : name of faceSet
|
||||
set f0;
|
||||
}
|
||||
|
||||
//{
|
||||
// name bottom;
|
||||
// // Dictionary for new patch
|
||||
// dictionary
|
||||
// {
|
||||
// type patch;
|
||||
// }
|
||||
//
|
||||
// constructFrom set;
|
||||
//
|
||||
// patches (half0 half1);
|
||||
//
|
||||
// set bottomFaces;
|
||||
//}
|
||||
{
|
||||
name bottom;
|
||||
|
||||
// Type of new patch
|
||||
dictionary
|
||||
{
|
||||
type wall;
|
||||
}
|
||||
|
||||
constructFrom set;
|
||||
|
||||
patches ();
|
||||
|
||||
set bottomFaces;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user