diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index a993ecf92ae31cf47dcd94125b5e2cee77ebfbb8..7bd992fdc1f2149bc14443e62487f3be459186d6 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -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); diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatchDict b/applications/utilities/mesh/manipulation/createPatch/createPatchDict index 5f3597f21af7ebb740e5dac56e5076c26fee4953..991d4d68f67124da1ef14153babc75d0bcf24241 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatchDict +++ b/applications/utilities/mesh/manipulation/createPatch/createPatchDict @@ -1,77 +1,74 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------*- 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; +// face times this factor. To load incorrectly matches meshes set this +// to a higher value. +matchTolerance 1E-3; -// Do a synchronisation of coupled points. +// 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; + } ); diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C index 73aff8a1fd2c711402e5ddd3a201583166df211b..5fbaa3fa95f10fa529c2b933ba840f2579aed1b4 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C @@ -320,9 +320,9 @@ void Foam::coupledPolyPatch::calcTransformTensors if (debug) { - Pout<< " rotation " << sum(mag(forwardT_ - forwardT_[0])) - << " more than local tolerance " << error - << ". Assuming uniform rotation." << endl; + Pout<< " difference in rotation less than" + << " local tolerance " + << error << ". Assuming uniform rotation." << endl; } } }