From 41088f3d06f7aaa3a113c62857683067d0a20de9 Mon Sep 17 00:00:00 2001 From: henry Date: Mon, 19 May 2008 13:23:49 +0100 Subject: [PATCH 1/9] Remove lookup of the debug switch as the debug switch dictionary might use includeEntry and inputModeEntry --- .../functionEntries/includeEntry/includeEntry.C | 11 +++++++++-- .../functionEntries/inputModeEntry/inputModeEntry.C | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C index 49679209db..81a8c0b23f 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C @@ -31,12 +31,19 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // +const Foam::word Foam::functionEntries::includeEntry::typeName +( + Foam::functionEntries::includeEntry::typeName_() +); + +// Don't lookup the debug switch here as the debug switch dictionary +// might include includeEntry +int Foam::functionEntries::includeEntry::debug(0); + namespace Foam { namespace functionEntries { - defineTypeNameAndDebug(includeEntry, 0); - addToMemberFunctionSelectionTable ( functionEntry, diff --git a/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.C index b75ffa1d32..27b1e78f5e 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/inputModeEntry/inputModeEntry.C @@ -30,12 +30,19 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // +const Foam::word Foam::functionEntries::inputModeEntry::typeName +( + Foam::functionEntries::inputModeEntry::typeName_() +); + +// Don't lookup the debug switch here as the debug switch dictionary +// might include inputModeEntries +int Foam::functionEntries::inputModeEntry::debug(0); + namespace Foam { namespace functionEntries { - defineTypeNameAndDebug(inputModeEntry, 0); - addToMemberFunctionSelectionTable ( functionEntry, From 93fcc53edfc1eba313734815a0c39acf74bc811d Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 20 May 2008 12:03:12 +0100 Subject: [PATCH 2/9] Comment-out the setting of WM_PROJECT_VERSION to allow it to be set externally --- etc/bashrc | 2 +- etc/cshrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/bashrc b/etc/bashrc index 99f0d872a5..298849ed79 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -32,7 +32,7 @@ #------------------------------------------------------------------------------ export WM_PROJECT=OpenFOAM -export WM_PROJECT_VERSION=dev +#export WM_PROJECT_VERSION=dev #!!User: # either set $FOAM_INST_DIR before sourcing this file or set diff --git a/etc/cshrc b/etc/cshrc index a4bd6bc430..203466dd7d 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -32,7 +32,7 @@ #------------------------------------------------------------------------------ setenv WM_PROJECT OpenFOAM -setenv WM_PROJECT_VERSION dev +#setenv WM_PROJECT_VERSION dev #!!User: # either setenv FOAM_INST_DIR before sourcing this file or set From 29cf5c8eb2db83a86bfda4ab0ab5c9e437302160 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 20 May 2008 12:11:07 +0100 Subject: [PATCH 3/9] adding components utility --- .../Field/components/Make/files | 3 + .../Field/components/Make/options | 6 + .../Field/components/components.C | 142 ++++++++++++++++++ 3 files changed, 151 insertions(+) create mode 100644 applications/utilities/postProcessing/Field/components/Make/files create mode 100644 applications/utilities/postProcessing/Field/components/Make/options create mode 100644 applications/utilities/postProcessing/Field/components/components.C diff --git a/applications/utilities/postProcessing/Field/components/Make/files b/applications/utilities/postProcessing/Field/components/Make/files new file mode 100644 index 0000000000..1f61233dd1 --- /dev/null +++ b/applications/utilities/postProcessing/Field/components/Make/files @@ -0,0 +1,3 @@ +components.C + +EXE = $(FOAM_APPBIN)/components diff --git a/applications/utilities/postProcessing/Field/components/Make/options b/applications/utilities/postProcessing/Field/components/Make/options new file mode 100644 index 0000000000..be7f7d631d --- /dev/null +++ b/applications/utilities/postProcessing/Field/components/Make/options @@ -0,0 +1,6 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + diff --git a/applications/utilities/postProcessing/Field/components/components.C b/applications/utilities/postProcessing/Field/components/components.C new file mode 100644 index 0000000000..354d70c3e5 --- /dev/null +++ b/applications/utilities/postProcessing/Field/components/components.C @@ -0,0 +1,142 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Application + components + +Description + Writes scalar fields corresponding to each component of the supplied + field (name) for each time. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template +void writeComponents +( + const IOobject& header, + const fvMesh& mesh, + bool& processed +) +{ + typedef GeometricField fieldType; + + if (header.headerClassName() == fieldType::typeName) + { + Info<< " Reading " << header.name() << endl; + fieldType field(header, mesh); + + for (direction i=0; i Date: Tue, 20 May 2008 12:20:10 +0100 Subject: [PATCH 4/9] adding (missing) tensor functionality --- .../utilities/postProcessing/Field/components/components.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/utilities/postProcessing/Field/components/components.C b/applications/utilities/postProcessing/Field/components/components.C index 354d70c3e5..5dae20f760 100644 --- a/applications/utilities/postProcessing/Field/components/components.C +++ b/applications/utilities/postProcessing/Field/components/components.C @@ -116,8 +116,9 @@ int main(int argc, char *argv[]) bool processed = false; writeComponents(fieldHeader, mesh, processed); - writeComponents(fieldHeader, mesh, processed); writeComponents(fieldHeader, mesh, processed); + writeComponents(fieldHeader, mesh, processed); + writeComponents(fieldHeader, mesh, processed); if (!processed) { FatalError From be61421fd221c80c0f111c73f20816e36eb68f43 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 20 May 2008 12:59:17 +0100 Subject: [PATCH 5/9] adding (missed) volTensorFields --- .../fieldAverage/fieldAverage/fieldAverage.C | 24 +++++++++++++------ .../fieldAverage/fieldAverage/fieldAverage.H | 3 ++- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.C b/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.C index 2cdd6bb70b..86da03c2c1 100644 --- a/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.C +++ b/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.C @@ -54,11 +54,14 @@ void Foam::fieldAverage::resetLists(const label nItems) meanVectorFields_.clear(); meanVectorFields_.setSize(nItems); + meanSphericalTensorFields_.clear(); + meanSphericalTensorFields_.setSize(nItems); + meanSymmTensorFields_.clear(); meanSymmTensorFields_.setSize(nItems); - meanSphericalTensorFields_.clear(); - meanSphericalTensorFields_.setSize(nItems); + meanTensorFields_.clear(); + meanTensorFields_.setSize(nItems); prime2MeanScalarFields_.clear(); prime2MeanScalarFields_.setSize(nItems); @@ -88,13 +91,17 @@ void Foam::fieldAverage::initialise() { addMeanFields(i, meanVectorFields_); } + else if (obr_.foundObject(fieldName)) + { + addMeanFields(i, meanSphericalTensorFields_); + } else if (obr_.foundObject(fieldName)) { addMeanFields(i, meanSymmTensorFields_); } - else if (obr_.foundObject(fieldName)) + else if (obr_.foundObject(fieldName)) { - addMeanFields(i, meanSphericalTensorFields_); + addMeanFields(i, meanTensorFields_); } else { @@ -166,8 +173,9 @@ Foam::fieldAverage::fieldAverage faItems_(dict.lookup("fields")), meanScalarFields_(faItems_.size()), meanVectorFields_(faItems_.size()), - meanSymmTensorFields_(faItems_.size()), meanSphericalTensorFields_(faItems_.size()), + meanSymmTensorFields_(faItems_.size()), + meanTensorFields_(faItems_.size()), prime2MeanScalarFields_(faItems_.size()), prime2MeanSymmTensorFields_(faItems_.size()), totalIter_(faItems_.size(), 1), @@ -248,8 +256,9 @@ void Foam::fieldAverage::calcAverages() calculateMeanFields(meanScalarFields_); calculateMeanFields(meanVectorFields_); - calculateMeanFields(meanSymmTensorFields_); calculateMeanFields(meanSphericalTensorFields_); + calculateMeanFields(meanSymmTensorFields_); + calculateMeanFields(meanTensorFields_); calculatePrime2MeanFields(prime2MeanScalarFields_); calculatePrime2MeanFields(prime2MeanSymmTensorFields_); @@ -260,8 +269,9 @@ void Foam::fieldAverage::writeAverages() const { writeFieldList(meanScalarFields_); writeFieldList(meanVectorFields_); - writeFieldList(meanSymmTensorFields_); writeFieldList(meanSphericalTensorFields_); + writeFieldList(meanSymmTensorFields_); + writeFieldList(meanTensorFields_); writeFieldList(prime2MeanScalarFields_); writeFieldList(prime2MeanSymmTensorFields_); diff --git a/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H b/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H index aabcd2cfa9..7ebe098446 100644 --- a/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H +++ b/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H @@ -132,8 +132,9 @@ protected: // Arithmetic mean fields PtrList meanScalarFields_; PtrList meanVectorFields_; - PtrList meanSymmTensorFields_; PtrList meanSphericalTensorFields_; + PtrList meanSymmTensorFields_; + PtrList meanTensorFields_; // Prime-squared fields - applicable to volVectorFields only PtrList prime2MeanScalarFields_; From dc24b8be82e1ae90fa0aef32b134c373d76a7946 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 20 May 2008 13:14:57 +0100 Subject: [PATCH 6/9] adding mag post-processing utility --- .../postProcessing/Field/mag/Make/files | 3 + .../postProcessing/Field/mag/Make/options | 6 + .../utilities/postProcessing/Field/mag/mag.C | 140 ++++++++++++++++++ 3 files changed, 149 insertions(+) create mode 100644 applications/utilities/postProcessing/Field/mag/Make/files create mode 100644 applications/utilities/postProcessing/Field/mag/Make/options create mode 100644 applications/utilities/postProcessing/Field/mag/mag.C diff --git a/applications/utilities/postProcessing/Field/mag/Make/files b/applications/utilities/postProcessing/Field/mag/Make/files new file mode 100644 index 0000000000..a661e8243e --- /dev/null +++ b/applications/utilities/postProcessing/Field/mag/Make/files @@ -0,0 +1,3 @@ +mag.C + +EXE = $(FOAM_APPBIN)/mag diff --git a/applications/utilities/postProcessing/Field/mag/Make/options b/applications/utilities/postProcessing/Field/mag/Make/options new file mode 100644 index 0000000000..be7f7d631d --- /dev/null +++ b/applications/utilities/postProcessing/Field/mag/Make/options @@ -0,0 +1,6 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + diff --git a/applications/utilities/postProcessing/Field/mag/mag.C b/applications/utilities/postProcessing/Field/mag/mag.C new file mode 100644 index 0000000000..6e5ef307ac --- /dev/null +++ b/applications/utilities/postProcessing/Field/mag/mag.C @@ -0,0 +1,140 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Application + mag + +Description + Calculates and writes the magnitude of a field for each time + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template +void writeMagField +( + const IOobject& header, + const fvMesh& mesh, + bool& processed +) +{ + typedef GeometricField fieldType; + + if (header.headerClassName() == fieldType::typeName) + { + Info<< " Reading " << header.name() << endl; + fieldType field(header, mesh); + + Info<< " Calculating mag" << header.name() << endl; + volScalarField magField + ( + IOobject + ( + "mag" + header.name(), + mesh.time().timeName(), + mesh, + IOobject::NO_READ + ), + mag(field) + ); + magField.write(); + + processed = true; + } +} + + +int main(int argc, char *argv[]) +{ + argList::validArgs.append("fieldName"); + +# include "addTimeOptions.H" +# include "setRootCase.H" + + word fieldName(args.additionalArgs()[0]); + +# include "createTime.H" + + // Get times list + instantList Times = runTime.times(); + + // set startTime and endTime depending on -time and -latestTime options +# include "checkTimeOptions.H" + + runTime.setTime(Times[startTime], startTime); + +# include "createMesh.H" + + for (label i=startTime; i(fieldHeader, mesh, processed); + writeMagField(fieldHeader, mesh, processed); + writeMagField(fieldHeader, mesh, processed); + writeMagField(fieldHeader, mesh, processed); + writeMagField(fieldHeader, mesh, processed); + if (!processed) + { + FatalError + << "Unable to process " << fieldName << nl + << "No call to mag for fields of type " + << fieldHeader.headerClassName() << nl << nl + << exit(FatalError); + } + } + else + { + Info<< " No " << fieldName << endl; + } + + Info<< endl; + } + + Info<< "End\n" << endl; + + return(0); +} + + +// ************************************************************************* // From ad148d718e08c3916b61d476012b853fddfca43d Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 20 May 2008 13:17:51 +0100 Subject: [PATCH 7/9] adding magSqr post-processing utility --- .../postProcessing/Field/magSqr/Make/files | 3 + .../postProcessing/Field/magSqr/Make/options | 6 + .../postProcessing/Field/magSqr/magSqr.C | 140 ++++++++++++++++++ 3 files changed, 149 insertions(+) create mode 100644 applications/utilities/postProcessing/Field/magSqr/Make/files create mode 100644 applications/utilities/postProcessing/Field/magSqr/Make/options create mode 100644 applications/utilities/postProcessing/Field/magSqr/magSqr.C diff --git a/applications/utilities/postProcessing/Field/magSqr/Make/files b/applications/utilities/postProcessing/Field/magSqr/Make/files new file mode 100644 index 0000000000..7f7b96ef99 --- /dev/null +++ b/applications/utilities/postProcessing/Field/magSqr/Make/files @@ -0,0 +1,3 @@ +magSqr.C + +EXE = $(FOAM_APPBIN)/magSqr diff --git a/applications/utilities/postProcessing/Field/magSqr/Make/options b/applications/utilities/postProcessing/Field/magSqr/Make/options new file mode 100644 index 0000000000..be7f7d631d --- /dev/null +++ b/applications/utilities/postProcessing/Field/magSqr/Make/options @@ -0,0 +1,6 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + diff --git a/applications/utilities/postProcessing/Field/magSqr/magSqr.C b/applications/utilities/postProcessing/Field/magSqr/magSqr.C new file mode 100644 index 0000000000..db08c32260 --- /dev/null +++ b/applications/utilities/postProcessing/Field/magSqr/magSqr.C @@ -0,0 +1,140 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Application + mag + +Description + Calculates and writes the magnitude-squared of a field for each time + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template +void writeMagSqrField +( + const IOobject& header, + const fvMesh& mesh, + bool& processed +) +{ + typedef GeometricField fieldType; + + if (header.headerClassName() == fieldType::typeName) + { + Info<< " Reading " << header.name() << endl; + fieldType field(header, mesh); + + Info<< " Calculating magSqr" << header.name() << endl; + volScalarField magSqrField + ( + IOobject + ( + "magSqr" + header.name(), + mesh.time().timeName(), + mesh, + IOobject::NO_READ + ), + magSqr(field) + ); + magSqrField.write(); + + processed = true; + } +} + + +int main(int argc, char *argv[]) +{ + argList::validArgs.append("fieldName"); + +# include "addTimeOptions.H" +# include "setRootCase.H" + + word fieldName(args.additionalArgs()[0]); + +# include "createTime.H" + + // Get times list + instantList Times = runTime.times(); + + // set startTime and endTime depending on -time and -latestTime options +# include "checkTimeOptions.H" + + runTime.setTime(Times[startTime], startTime); + +# include "createMesh.H" + + for (label i=startTime; i(fieldHeader, mesh, processed); + writeMagSqrField(fieldHeader, mesh, processed); + writeMagSqrField(fieldHeader, mesh, processed); + writeMagSqrField(fieldHeader, mesh, processed); + writeMagSqrField(fieldHeader, mesh, processed); + if (!processed) + { + FatalError + << "Unable to process " << fieldName << nl + << "No call to mag for fields of type " + << fieldHeader.headerClassName() << nl << nl + << exit(FatalError); + } + } + else + { + Info<< " No " << fieldName << endl; + } + + Info<< endl; + } + + Info<< "End\n" << endl; + + return(0); +} + + +// ************************************************************************* // From dd0def28caa5edc91fe7d1aa8bef974f4e8cc1de Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 20 May 2008 13:34:48 +0100 Subject: [PATCH 8/9] removing redundant functionality --- .../{Field => field}/components/Make/files | 0 .../{Field => field}/components/Make/options | 0 .../{Field => field}/components/components.C | 0 .../{Field => field}/mag/Make/files | 0 .../{Field => field}/mag/Make/options | 0 .../postProcessing/{Field => field}/mag/mag.C | 0 .../magGrad/FoamX/magGradU.cfg | 0 .../{Field => field}/magGrad/Make/files | 0 .../{Field => field}/magGrad/Make/options | 0 .../{Field => field}/magGrad/magGrad.C | 0 .../{Field => field}/magSqr/Make/files | 0 .../{Field => field}/magSqr/Make/options | 0 .../{Field => field}/magSqr/magSqr.C | 0 .../sigmaComponents/FoamX/sigmaComponents.cfg | 27 ----- .../stressField/sigmaComponents/Make/files | 3 - .../stressField/sigmaComponents/Make/options | 5 - .../sigmaComponents/sigmaComponents.C | 108 ----------------- .../Ucomponents/FoamX/Ucomponents.cfg | 27 ----- .../velocityField/Ucomponents/Make/files | 3 - .../velocityField/Ucomponents/Make/options | 6 - .../velocityField/Ucomponents/Ucomponents.C | 108 ----------------- .../velocityField/magU/FoamX/magU.cfg | 27 ----- .../velocityField/magU/Make/files | 3 - .../velocityField/magU/Make/options | 6 - .../postProcessing/velocityField/magU/magU.C | 110 ------------------ 25 files changed, 433 deletions(-) rename applications/utilities/postProcessing/{Field => field}/components/Make/files (100%) rename applications/utilities/postProcessing/{Field => field}/components/Make/options (100%) rename applications/utilities/postProcessing/{Field => field}/components/components.C (100%) rename applications/utilities/postProcessing/{Field => field}/mag/Make/files (100%) rename applications/utilities/postProcessing/{Field => field}/mag/Make/options (100%) rename applications/utilities/postProcessing/{Field => field}/mag/mag.C (100%) rename applications/utilities/postProcessing/{Field => field}/magGrad/FoamX/magGradU.cfg (100%) rename applications/utilities/postProcessing/{Field => field}/magGrad/Make/files (100%) rename applications/utilities/postProcessing/{Field => field}/magGrad/Make/options (100%) rename applications/utilities/postProcessing/{Field => field}/magGrad/magGrad.C (100%) rename applications/utilities/postProcessing/{Field => field}/magSqr/Make/files (100%) rename applications/utilities/postProcessing/{Field => field}/magSqr/Make/options (100%) rename applications/utilities/postProcessing/{Field => field}/magSqr/magSqr.C (100%) delete mode 100644 applications/utilities/postProcessing/stressField/sigmaComponents/FoamX/sigmaComponents.cfg delete mode 100644 applications/utilities/postProcessing/stressField/sigmaComponents/Make/files delete mode 100644 applications/utilities/postProcessing/stressField/sigmaComponents/Make/options delete mode 100644 applications/utilities/postProcessing/stressField/sigmaComponents/sigmaComponents.C delete mode 100644 applications/utilities/postProcessing/velocityField/Ucomponents/FoamX/Ucomponents.cfg delete mode 100644 applications/utilities/postProcessing/velocityField/Ucomponents/Make/files delete mode 100644 applications/utilities/postProcessing/velocityField/Ucomponents/Make/options delete mode 100644 applications/utilities/postProcessing/velocityField/Ucomponents/Ucomponents.C delete mode 100644 applications/utilities/postProcessing/velocityField/magU/FoamX/magU.cfg delete mode 100644 applications/utilities/postProcessing/velocityField/magU/Make/files delete mode 100644 applications/utilities/postProcessing/velocityField/magU/Make/options delete mode 100644 applications/utilities/postProcessing/velocityField/magU/magU.C diff --git a/applications/utilities/postProcessing/Field/components/Make/files b/applications/utilities/postProcessing/field/components/Make/files similarity index 100% rename from applications/utilities/postProcessing/Field/components/Make/files rename to applications/utilities/postProcessing/field/components/Make/files diff --git a/applications/utilities/postProcessing/Field/components/Make/options b/applications/utilities/postProcessing/field/components/Make/options similarity index 100% rename from applications/utilities/postProcessing/Field/components/Make/options rename to applications/utilities/postProcessing/field/components/Make/options diff --git a/applications/utilities/postProcessing/Field/components/components.C b/applications/utilities/postProcessing/field/components/components.C similarity index 100% rename from applications/utilities/postProcessing/Field/components/components.C rename to applications/utilities/postProcessing/field/components/components.C diff --git a/applications/utilities/postProcessing/Field/mag/Make/files b/applications/utilities/postProcessing/field/mag/Make/files similarity index 100% rename from applications/utilities/postProcessing/Field/mag/Make/files rename to applications/utilities/postProcessing/field/mag/Make/files diff --git a/applications/utilities/postProcessing/Field/mag/Make/options b/applications/utilities/postProcessing/field/mag/Make/options similarity index 100% rename from applications/utilities/postProcessing/Field/mag/Make/options rename to applications/utilities/postProcessing/field/mag/Make/options diff --git a/applications/utilities/postProcessing/Field/mag/mag.C b/applications/utilities/postProcessing/field/mag/mag.C similarity index 100% rename from applications/utilities/postProcessing/Field/mag/mag.C rename to applications/utilities/postProcessing/field/mag/mag.C diff --git a/applications/utilities/postProcessing/Field/magGrad/FoamX/magGradU.cfg b/applications/utilities/postProcessing/field/magGrad/FoamX/magGradU.cfg similarity index 100% rename from applications/utilities/postProcessing/Field/magGrad/FoamX/magGradU.cfg rename to applications/utilities/postProcessing/field/magGrad/FoamX/magGradU.cfg diff --git a/applications/utilities/postProcessing/Field/magGrad/Make/files b/applications/utilities/postProcessing/field/magGrad/Make/files similarity index 100% rename from applications/utilities/postProcessing/Field/magGrad/Make/files rename to applications/utilities/postProcessing/field/magGrad/Make/files diff --git a/applications/utilities/postProcessing/Field/magGrad/Make/options b/applications/utilities/postProcessing/field/magGrad/Make/options similarity index 100% rename from applications/utilities/postProcessing/Field/magGrad/Make/options rename to applications/utilities/postProcessing/field/magGrad/Make/options diff --git a/applications/utilities/postProcessing/Field/magGrad/magGrad.C b/applications/utilities/postProcessing/field/magGrad/magGrad.C similarity index 100% rename from applications/utilities/postProcessing/Field/magGrad/magGrad.C rename to applications/utilities/postProcessing/field/magGrad/magGrad.C diff --git a/applications/utilities/postProcessing/Field/magSqr/Make/files b/applications/utilities/postProcessing/field/magSqr/Make/files similarity index 100% rename from applications/utilities/postProcessing/Field/magSqr/Make/files rename to applications/utilities/postProcessing/field/magSqr/Make/files diff --git a/applications/utilities/postProcessing/Field/magSqr/Make/options b/applications/utilities/postProcessing/field/magSqr/Make/options similarity index 100% rename from applications/utilities/postProcessing/Field/magSqr/Make/options rename to applications/utilities/postProcessing/field/magSqr/Make/options diff --git a/applications/utilities/postProcessing/Field/magSqr/magSqr.C b/applications/utilities/postProcessing/field/magSqr/magSqr.C similarity index 100% rename from applications/utilities/postProcessing/Field/magSqr/magSqr.C rename to applications/utilities/postProcessing/field/magSqr/magSqr.C diff --git a/applications/utilities/postProcessing/stressField/sigmaComponents/FoamX/sigmaComponents.cfg b/applications/utilities/postProcessing/stressField/sigmaComponents/FoamX/sigmaComponents.cfg deleted file mode 100644 index fcd3fcb03c..0000000000 --- a/applications/utilities/postProcessing/stressField/sigmaComponents/FoamX/sigmaComponents.cfg +++ /dev/null @@ -1,27 +0,0 @@ -/*---------------------------------------------------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.0 | -| \\ / A nd | Web: http://www.openfoam.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -// stressComponents tool definition - -description "Decompose general stress tensor into individual components"; - -sigmaComponentsDict -{ - type dictionary; - description "sigmaComponents control dictionary"; - dictionaryPath "system"; - - entries - { - arguments - { - type rootCaseTimeArguments; - } - } -} - -// ************************************************************************* // diff --git a/applications/utilities/postProcessing/stressField/sigmaComponents/Make/files b/applications/utilities/postProcessing/stressField/sigmaComponents/Make/files deleted file mode 100644 index 528b49906d..0000000000 --- a/applications/utilities/postProcessing/stressField/sigmaComponents/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -sigmaComponents.C - -EXE = $(FOAM_APPBIN)/sigmaComponents diff --git a/applications/utilities/postProcessing/stressField/sigmaComponents/Make/options b/applications/utilities/postProcessing/stressField/sigmaComponents/Make/options deleted file mode 100644 index fa15f12452..0000000000 --- a/applications/utilities/postProcessing/stressField/sigmaComponents/Make/options +++ /dev/null @@ -1,5 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -lfiniteVolume diff --git a/applications/utilities/postProcessing/stressField/sigmaComponents/sigmaComponents.C b/applications/utilities/postProcessing/stressField/sigmaComponents/sigmaComponents.C deleted file mode 100644 index f41f03104d..0000000000 --- a/applications/utilities/postProcessing/stressField/sigmaComponents/sigmaComponents.C +++ /dev/null @@ -1,108 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - Rcomponents - -Description - Calculates and writes the scalar fields of the six components of the - stress sigma for each time. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - -# include "addTimeOptions.H" -# include "setRootCase.H" - -# include "createTime.H" - - // Get times list - instantList Times = runTime.times(); - - // set startTime and endTime depending on -time and -latestTime options -# include "checkTimeOptions.H" - - runTime.setTime(Times[startTime], startTime); - -# include "createMesh.H" - - for (label i=startTime; i Date: Tue, 20 May 2008 18:05:07 +0100 Subject: [PATCH 9/9] There's a bug in Schaeffer's expression for the frictional viscosity, which was pointed out by Rasmus. The alpha[celli] term in muf should not be there. --- .../Schaeffer/SchaefferFrictionalStress.C | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModel/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModel/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C index 5f6dcd8735..b3ddd44ff2 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModel/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModel/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C @@ -71,8 +71,8 @@ frictionalPressure const dimensionedScalar& eta, const dimensionedScalar& p ) const -{ - return +{ + return dimensionedScalar("1e24", dimensionSet(1, -1, -2, 0, 0), 1e24) *pow(Foam::max(alpha - alphaMinFriction, scalar(0)), 10.0); } @@ -89,7 +89,7 @@ frictionalPressurePrime const dimensionedScalar& p ) const { - return + return dimensionedScalar("1e25", dimensionSet(1, -1, -2, 0, 0), 1e25) *pow(Foam::max(alpha - alphaMinFriction, scalar(0)), 9.0); } @@ -129,8 +129,8 @@ Foam::tmp Foam::SchaefferFrictionalStress::muf { if (alpha[celli] > alphaMax.value()-5e-2) { - muf_[celli] = - 0.5*alpha[celli]*pf[celli]*sin(phi.value()) + muf_[celli] = + 0.5*pf[celli]*sin(phi.value()) /( sqrt(1.0/6.0*(sqr(D[celli].xx() - D[celli].yy()) + sqr(D[celli].yy() - D[celli].zz())