From df4dc659d7b6a66d2c0e1993a5fc857da29c3d1a Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 22 Oct 2010 13:09:13 +0100 Subject: [PATCH 01/32] ENH: ReleaseNotes-dev : update --- ReleaseNotes-dev | 8 ++++++++ doc/changes/splitCyclic.txt | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/ReleaseNotes-dev b/ReleaseNotes-dev index 12aa0ed485..9b807b4971 100644 --- a/ReleaseNotes-dev +++ b/ReleaseNotes-dev @@ -87,6 +87,10 @@ *** *Updated* particle tracking algorithm *** *Updated* split cyclics into two separate patches. See doc/changed/splitCyclics.txt *** *New* compact binary I/O for faces and cells. This speeds up reading/writing meshes in binary. +*** *Updated* runTimeModifiable + + on linux uses inotify instead of time stamps - more efficient for large + numbers of monitored files. No more fileModificationSkew needed. + + single integer reduction instead of one reduction per monitored file. * Solvers A number of new solvers have been developed for a range of engineering applications. There has been a set of improvements to certain classes of @@ -125,6 +129,8 @@ (nonuniformTransform)cyclic _ + extrudes into master direction (i.e. away from the owner cell if flipMap is false) + + =topoSet=: replacement of cellSet,faceSet,pointSet utilities. + Comparable to a dictionary driven =setSet= utility. *** Updated utilities + =setFields=: optionally use faceSets to set patch values (see e.g. hotRoom tutorial). + =blockMesh=: specify patches via dictionary instead of type only. This @@ -133,6 +139,8 @@ * Post-processing + =foamToEnsight=: parallel continuous data. new =-nodeValues= option to generate and output nodal field data. + + =singleCellMesh=: new utility to convert mesh and fields to a single cell + mesh. Great for postprocessing. + Function objects: + =residualControl=: new function object to allow users to terminate steady state calculations when the defined residual levels are achieved diff --git a/doc/changes/splitCyclic.txt b/doc/changes/splitCyclic.txt index 3d0ffb71cf..0797151faf 100644 --- a/doc/changes/splitCyclic.txt +++ b/doc/changes/splitCyclic.txt @@ -59,6 +59,14 @@ It will check if anything needs to be converted, backup the current file to .old and split any cyclic patchFields into two entries. +Mesh converters +--------------- +Most mesh formats use cyclics in a single patch (i.e. the old way). +The converters have been adapted to use the patch 'oldCyclic' instead of +'cyclic'. oldCyclic uses the 17x automatic ordering but writes 'type cyclic' +so afterwards foamUpgradeCyclics can be run to upgrade. + + decomposePar ------------ Decomposes cyclics into processorCyclic: From 6261ef058b2a47880217606547e48069fe2c146c Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 25 Oct 2010 12:22:25 +0100 Subject: [PATCH 02/32] ENH: setSet : proper exit upon eof --- .../mesh/manipulation/setSet/setSet.C | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 7b204e984f..117d5283a5 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -934,18 +934,31 @@ int main(int argc, char *argv[]) { char* linePtr = readline("readline>"); - rawLine = string(linePtr); - - if (*linePtr) + if (linePtr) { - add_history(linePtr); - write_history(historyFile); - } + rawLine = string(linePtr); - free(linePtr); // readline uses malloc, not new. + if (*linePtr) + { + add_history(linePtr); + write_history(historyFile); + } + + free(linePtr); // readline uses malloc, not new. + } + else + { + break; + } } # else { + if (!std::cin.good()) + { + Info<< "End of cin" << endl; + // No error. + break; + } Info<< "Command>" << flush; std::getline(std::cin, rawLine); } From 5e320e9695bfef26097b00758eb42d5f226b6bc3 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 25 Oct 2010 12:22:45 +0100 Subject: [PATCH 03/32] ENH: ReleaseNotes-dev : updated --- ReleaseNotes-dev | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ReleaseNotes-dev b/ReleaseNotes-dev index 9b807b4971..a135a9b086 100644 --- a/ReleaseNotes-dev +++ b/ReleaseNotes-dev @@ -66,6 +66,11 @@ -doc display application documentation in browser -help print the usage +*** *New* basicSolidThermo solids thermophysical library + + Used in all conjugate heat transfer solvers + + constant properties + + temperature dependent properties + + temperature and direction (in local coordinate system) dependent properties *** *New* Surface film library + Creation of films by particle addition, or initial film distribution + Coupled with the lagrangian/intermediate cloud hierarchy library @@ -152,7 +157,9 @@ + =streamLine=: generate streamlines; ouputs both trajectory and field data * New tutorials - There is a large number of new tutorials to support the new solvers in the + There is a large number of new tutorials for existing and new solvers in the release. + =reactingParcelFilmFoam= tutorials: + multipleBoxes, hotBoxes, panel, evaporationTest + + =interDyMFoam= tutorials: + + testTubeMixer: showcases =solidBodyMotionFunction= From a67a967d9ac3a2066d06740f2924ccab8c9b7751 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 25 Oct 2010 17:49:04 +0100 Subject: [PATCH 04/32] finiteVolume: Added fvcSmooth which provides field smoothing operations: smooth, sweep and spread --- src/finiteVolume/Make/files | 1 + .../finiteVolume/fvc/fvcSmooth/fvcSmooth.C | 318 ++++++++++++++++++ .../finiteVolume/fvc/fvcSmooth/fvcSmooth.H | 73 ++++ .../finiteVolume/fvc/fvcSmooth/smoothData.H | 204 +++++++++++ .../finiteVolume/fvc/fvcSmooth/smoothDataI.H | 192 +++++++++++ .../finiteVolume/fvc/fvcSmooth/sweepData.H | 205 +++++++++++ .../finiteVolume/fvc/fvcSmooth/sweepDataI.H | 208 ++++++++++++ 7 files changed, 1201 insertions(+) create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.H create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothDataI.H create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepDataI.H diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 21b90fa409..dc325c1ddf 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -337,6 +337,7 @@ $(laplacianSchemes)/laplacianScheme/laplacianSchemes.C $(laplacianSchemes)/gaussLaplacianScheme/gaussLaplacianSchemes.C finiteVolume/fvc/fvcMeshPhi.C +finiteVolume/fvc/fvcSmooth/fvcSmooth.C general = cfdTools/general $(general)/findRefCell/findRefCell.C diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C new file mode 100644 index 0000000000..c04d16dcc9 --- /dev/null +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C @@ -0,0 +1,318 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "fvcSmooth.H" +#include "volFields.H" +#include "FaceCellWave.H" +#include "smoothData.H" +#include "sweepData.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::scalar Foam::smoothData::maxRatio = 1.0; + +void Foam::fvc::smooth +( + volScalarField& field, + const scalar coeff +) +{ + const fvMesh& mesh = field.mesh(); + smoothData::maxRatio = 1 + coeff; + + DynamicList