From 700551e34d5361f63ad3f35176c9e19e020ab63b Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 6 Oct 2010 17:32:29 +0100 Subject: [PATCH 1/4] STYLE : snappyHexMeshDict : removed unused entry --- .../cavitatingBullet/system/snappyHexMeshDict | 3 --- 1 file changed, 3 deletions(-) diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict index 1131e5288c..3cb346dcf3 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict @@ -288,9 +288,6 @@ meshQualityControls // Set to 180 to disable. maxConcave 80; - //- Minimum projected area v.s. actual area. Set to -1 to disable. - minFlatness 0.5; - //- Minimum pyramid volume. Is absolute volume of cell pyramid. // Set to very negative number (e.g. -1E30) to disable. minVol 1e-20; From eb82cac8627ff000b6ebfe2b4fc949c16259b61a Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 6 Oct 2010 17:32:57 +0100 Subject: [PATCH 2/4] ENH: motorBike tutorial : added streamlines --- .../simpleFoam/motorBike/system/controlDict | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict index 17167a646f..7be247e079 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict @@ -46,4 +46,60 @@ timePrecision 6; runTimeModifiable true; + +functions +{ + // Make sure all fields for functionObjects are loaded. Prevents any + // problems running with execFlowFunctionObjects. + readFields + { + // Where to load it from (if not already in solver) + functionObjectLibs ("libfieldFunctionObjects.so"); + + type readFields; + fields (p U k); + } + + streamLines + { + type streamLine; + + // Output every + outputControl outputTime; + // outputInterval 10; + + setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; + + // Velocity field to use for tracking. + U U; + + // Tracked forwards (+U) or backwards (-U) + trackForward true; + + // Names of fields to sample. Should contain above velocity field! + fields (p U k); + + // Cells particles can travel before being removed + lifeTime 1000; + + // Cloud name to use + cloudName particleTracks; + + // Seeding method. See the sampleSets in sampleDict. + seedSampleSet uniform; //cloud;//triSurfaceMeshPointSet; + + uniformCoeffs + { + type uniform; + axis x; //distance; + + // Note: tracks slightly offset so as not to be on a face + start (-1.001 1E-7 0.0011); + end (-1.001 1E-7 1.0011); + nPoints 20; + } + } +} + + // ************************************************************************* // From 32eb92667f9ac7a6c57245c6241c64edd2294d77 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 6 Oct 2010 17:34:52 +0100 Subject: [PATCH 3/4] ENH: ReleaseNotes-dev : update --- ReleaseNotes-dev | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ReleaseNotes-dev b/ReleaseNotes-dev index 18a61718b0..0a6041c55b 100644 --- a/ReleaseNotes-dev +++ b/ReleaseNotes-dev @@ -69,7 +69,10 @@ * Post-processing + =foamToEnsight=: new =-nodeValues= option to generate and output nodal - field data. + field data. This is optional and saves memory (compared to letting EnSight + do the interpolation) in case of meshes with large + amounts of polyhedral cells. On typical snappyHexMesh generated meshes + we've seen differences of 0.4 v.s. 2.5Gb memory usage. * New tutorials There is a large number of new tutorials to support the new solvers in the From 197b3f398e1b9d850f3b4be5676407e7fe8a1466 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 7 Oct 2010 12:15:35 +0100 Subject: [PATCH 4/4] ENH: CompactIOList test app --- applications/test/CompactIOList/Make/files | 4 + applications/test/CompactIOList/Make/options | 3 + .../test/CompactIOList/testCompactIOList.C | 181 ++++++++++++++++++ 3 files changed, 188 insertions(+) create mode 100644 applications/test/CompactIOList/Make/files create mode 100644 applications/test/CompactIOList/Make/options create mode 100644 applications/test/CompactIOList/testCompactIOList.C diff --git a/applications/test/CompactIOList/Make/files b/applications/test/CompactIOList/Make/files new file mode 100644 index 0000000000..7e2cf985bf --- /dev/null +++ b/applications/test/CompactIOList/Make/files @@ -0,0 +1,4 @@ + +testCompactIOList.C + +EXE = $(FOAM_APPBIN)/CompactIOList diff --git a/applications/test/CompactIOList/Make/options b/applications/test/CompactIOList/Make/options new file mode 100644 index 0000000000..4c3dd783cb --- /dev/null +++ b/applications/test/CompactIOList/Make/options @@ -0,0 +1,3 @@ +EXE_INC = + +EXE_LIBS = diff --git a/applications/test/CompactIOList/testCompactIOList.C b/applications/test/CompactIOList/testCompactIOList.C new file mode 100644 index 0000000000..e8c8248aae --- /dev/null +++ b/applications/test/CompactIOList/testCompactIOList.C @@ -0,0 +1,181 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Application + testCompactIOList + +Description + Simple demonstration and test application for the CompactIOList container + +\*---------------------------------------------------------------------------*/ + +#include "IOstreams.H" +#include "argList.H" +#include "Time.H" +#include "polyMesh.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// Main program: + +int main(int argc, char *argv[]) +{ +# include "setRootCase.H" +# include "createTime.H" + + IOstream::streamFormat format=IOstream::BINARY; + // IOstream::streamFormat format=IOstream::ASCII; + + const label size = 20000000; + + // Old format + // ~~~~~~~~~~ + + { + // Construct big faceList in old format + faceIOList faces2 + ( + IOobject + ( + "faces2", + runTime.constant(), + polyMesh::meshSubDir, + runTime, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + size + ); + + const face f(identity(4)); + + forAll(faces2, i) + { + faces2[i] = f; + } + + Info<< "Constructed faceList in = " + << runTime.cpuTimeIncrement() << " s" << nl << endl; + + + // Write binary + faces2.writeObject + ( + format, + IOstream::currentVersion, + IOstream::UNCOMPRESSED + ); + + Info<< "Written old format faceList in = " + << runTime.cpuTimeIncrement() << " s" << nl << endl; + + // Read + faceIOList faces3 + ( + IOobject + ( + "faces2", + runTime.constant(), + polyMesh::meshSubDir, + runTime, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) + ); + + Info<< "Read old format " << faces3.size() << " faceList in = " + << runTime.cpuTimeIncrement() << " s" << nl << endl; + } + + + // New format + // ~~~~~~~~~~ + + { + // Construct big faceList in new format + faceCompactIOList faces2 + ( + IOobject + ( + "faces2", + runTime.constant(), + polyMesh::meshSubDir, + runTime, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + size + ); + + const face f(identity(4)); + + forAll(faces2, i) + { + faces2[i] = f; + } + + Info<< "Constructed new format faceList in = " + << runTime.cpuTimeIncrement() << " s" << nl << endl; + + + // Write binary + faces2.writeObject + ( + format, + IOstream::currentVersion, + IOstream::UNCOMPRESSED + ); + + Info<< "Written new format faceList in = " + << runTime.cpuTimeIncrement() << " s" << nl << endl; + + // Read + faceCompactIOList faces3 + ( + IOobject + ( + "faces2", + runTime.constant(), + polyMesh::meshSubDir, + runTime, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) + ); + + Info<< "Read new format " << faces3.size() << " faceList in = " + << runTime.cpuTimeIncrement() << " s" << nl << endl; + } + + return 0; +} + + +// ************************************************************************* //