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

This commit is contained in:
andy
2013-04-05 11:37:32 +01:00
8 changed files with 90 additions and 59 deletions

View File

@ -337,48 +337,68 @@ addLayersControls
// Advanced settings // Advanced settings
// Static analysis of starting mesh
// When not to extrude surface. 0 is flat surface, 90 is when two faces // When not to extrude surface. 0 is flat surface, 90 is when two faces
// are perpendicular // are perpendicular
featureAngle 60; featureAngle 130;
// At non-patched sides allow mesh to slip if extrusion direction makes // Stop layer growth on highly warped cells
// angle larger than slipFeatureAngle. maxFaceThicknessRatio 0.5;
// Patch displacement
// Number of smoothing iterations of surface normals
nSmoothSurfaceNormals 1;
// Smooth layer thickness over surface patches
nSmoothThickness 10;
// Medial axis analysis
// Angle used to pick up medial axis points
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130
// in 17x.
minMedianAxisAngle 90;
// Reduce layer growth where ratio thickness to medial
// distance is large
maxThicknessToMedialRatio 0.3;
// Number of smoothing iterations of interior mesh movement direction
nSmoothNormals 3;
// Optional: smooth displacement after medial axis determination.
// default is 0.
nSmoothDisplacement 90;
// Mesh shrinking
// Optional: at non-patched sides allow mesh to slip if extrusion
// direction makes angle larger than slipFeatureAngle. Default is
// 0.5*featureAngle.
slipFeatureAngle 30; slipFeatureAngle 30;
// Maximum number of snapping relaxation iterations. Should stop // Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh. // before upon reaching a correct mesh.
nRelaxIter 5; nRelaxIter 5;
// Number of smoothing iterations of surface normals
nSmoothSurfaceNormals 1;
// Number of smoothing iterations of interior mesh movement direction
nSmoothNormals 3;
// Smooth layer thickness over surface patches
nSmoothThickness 10;
// Stop layer growth on highly warped cells
maxFaceThicknessRatio 0.5;
// Reduce layer growth where ratio thickness to medial
// distance is large
maxThicknessToMedialRatio 0.3;
// Angle used to pick up medial axis points
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
minMedianAxisAngle 90;
// Create buffer region for new layer terminations // Create buffer region for new layer terminations
nBufferCellsNoExtrude 0; nBufferCellsNoExtrude 0;
// Overall max number of layer addition iterations. The mesher will exit // Overall max number of layer addition iterations. The mesher will
// if it reaches this number of iterations; possibly with an illegal // exit if it reaches this number of iterations; possibly with an
// mesh. // illegal mesh.
nLayerIter 50; nLayerIter 50;
// Max number of iterations after which relaxed meshQuality controls // Max number of iterations after which relaxed meshQuality controls
// get used. Up to nRelaxIter it uses the settings in meshQualityControls, // get used. Up to nRelaxIter it uses the settings in
// meshQualityControls,
// after nRelaxIter it uses the values in meshQualityControls::relaxed. // after nRelaxIter it uses the values in meshQualityControls::relaxed.
nRelaxedIter 20; nRelaxedIter 20;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -97,7 +97,7 @@ void Foam::faceSelections::searchableSurfaceSelection::select
// Boundary faces // Boundary faces
vectorField neighbourCellCentres; vectorField neighbourCellCentres;
syncTools::swapBoundaryCellList syncTools::swapBoundaryCellPositions
( (
mesh_, mesh_,
mesh_.cellCentres(), mesh_.cellCentres(),

View File

@ -1404,6 +1404,7 @@ int main(int argc, char *argv[])
( (
"splits mesh into multiple regions (detected by walking across faces)" "splits mesh into multiple regions (detected by walking across faces)"
); );
# include "addRegionOption.H"
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
argList::addBoolOption argList::addBoolOption
( (
@ -1467,7 +1468,7 @@ int main(int argc, char *argv[])
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
runTime.functionObjects().off(); runTime.functionObjects().off();
#include "createMesh.H" #include "createNamedMesh.H"
const word oldInstance = mesh.pointsInstance(); const word oldInstance = mesh.pointsInstance();
word blockedFacesName; word blockedFacesName;

View File

@ -254,8 +254,8 @@ public:
); );
//- Gather points and faces onto master and merge (geometrically) into //- Gather points and faces onto master and merge into single patch.
// single patch. // Note: uses faces/points, not localFaces/localPoints.
template template
< <
class Face, class Face,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -52,7 +52,8 @@ void Foam::PatchTools::gatherAndMerge
labelList pointSizes; labelList pointSizes;
{ {
List<Field<PointType> > gatheredPoints(Pstream::nProcs()); List<Field<PointType> > gatheredPoints(Pstream::nProcs());
gatheredPoints[Pstream::myProcNo()] = p.localPoints(); gatheredPoints[Pstream::myProcNo()] = p.points();
Pstream::gatherList(gatheredPoints); Pstream::gatherList(gatheredPoints);
if (Pstream::master()) if (Pstream::master())
@ -75,7 +76,7 @@ void Foam::PatchTools::gatherAndMerge
// gathered points // gathered points
{ {
List<List<Face> > gatheredFaces(Pstream::nProcs()); List<List<Face> > gatheredFaces(Pstream::nProcs());
gatheredFaces[Pstream::myProcNo()] = p.localFaces(); gatheredFaces[Pstream::myProcNo()] = p;
Pstream::gatherList(gatheredFaces); Pstream::gatherList(gatheredFaces);
if (Pstream::master()) if (Pstream::master())

View File

@ -1529,13 +1529,18 @@ void Foam::autoSnapDriver::doSnap
if (!meshOk) if (!meshOk)
{ {
Info<< "Did not succesfully snap mesh. Giving up." WarningIn("autoSnapDriver::doSnap(..)")
<< nl << endl; << "Did not succesfully snap mesh."
<< " Continuing to snap to resolve easy surfaces but the"
// Use current mesh as base mesh << " resulting mesh will not satisfy your quality"
meshMover.correct(); << " constraints" << nl << endl;
//Info<< "Did not succesfully snap mesh. Giving up."
break; // << nl << endl;
//
//// Use current mesh as base mesh
//meshMover.correct();
//
//break;
} }
if (debug&meshRefinement::MESH) if (debug&meshRefinement::MESH)

View File

@ -40,17 +40,17 @@ writeInterval 100;
purgeWrite 0; purgeWrite 0;
//- Have regular restart files //- Uncomment to have regular (every 2 hours of run time) restart files
secondaryWriteControl cpuTime; //secondaryWriteControl cpuTime; // runtime
secondaryWriteInterval 3600; //secondaryWriteInterval 7200; // seconds
secondaryPurgeWrite 1; //secondaryPurgeWrite 1; // keep all but last dump
writeFormat ascii; writeFormat binary;
writePrecision 6; writePrecision 6;
writeCompression compressed; writeCompression uncompressed;
timeFormat general; timeFormat general;

View File

@ -9,8 +9,12 @@
forceCoeffs1 forceCoeffs1
{ {
type forceCoeffs; type forceCoeffs;
functionObjectLibs ( "libforces.so" ); functionObjectLibs ( "libforces.so" );
outputControl outputTime;
outputControl timeStep;
outputInterval 1;
log yes; log yes;
patches ( "motorBike.*" ); patches ( "motorBike.*" );