diff --git a/ReleaseNotes-dev b/ReleaseNotes-dev index 81161c42d7..67e9bc7f33 100644 --- a/ReleaseNotes-dev +++ b/ReleaseNotes-dev @@ -281,7 +281,7 @@ to provide an in-line functionObject. E.g. #+BEGIN_SRC c++ functions - ( + { pAverage { functionObjectLibs ("libutilityFunctionObjects.so"); @@ -293,7 +293,7 @@ Info<<"p avg:" << average(p) << endl; #}; } - ); + } #+END_SRC See also [[./doc/changes/dynamicCode.org]] diff --git a/applications/solvers/compressible/rhoPimpleFoam/Allwmake b/applications/solvers/compressible/rhoPimpleFoam/Allwmake index 29bc918085..e47a184d7a 100755 --- a/applications/solvers/compressible/rhoPimpleFoam/Allwmake +++ b/applications/solvers/compressible/rhoPimpleFoam/Allwmake @@ -3,6 +3,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x wmake +wmake rhoLTSPimpleFoam wmake rhoPorousMRFPimpleFoam # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/files b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/files new file mode 100644 index 0000000000..ff61e6022f --- /dev/null +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/files @@ -0,0 +1,3 @@ +rhoLTSPimpleFoam.C + +EXE = $(FOAM_APPBIN)/rhoLTSPimpleFoam diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/options new file mode 100644 index 0000000000..d16a0ee1d8 --- /dev/null +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/Make/options @@ -0,0 +1,15 @@ +EXE_INC = \ + -I.. \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/finiteVolume/cfdTools \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lbasicThermophysicalModels \ + -lspecie \ + -lcompressibleTurbulenceModel \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/rhoLTSPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/rhoLTSPimpleFoam.C new file mode 100644 index 0000000000..20870bc650 --- /dev/null +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/rhoLTSPimpleFoam.C @@ -0,0 +1,117 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2011 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 + rhoLTSPimpleFoam + +Description + Transient solver for laminar or turbulent flow of compressible fluids + for HVAC and similar applications. + + Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and + pseudo-transient simulations with support for local time-stepping for + efficient steady-state solution. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "basicPsiThermo.H" +#include "turbulenceModel.H" +#include "fvcSmooth.H" +#include "bound.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readPIMPLEControls.H" + #include "setInitialrDeltaT.H" + #include "createFields.H" + #include "initContinuityErrs.H" + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readTimeControls.H" + #include "readPIMPLEControls.H" + #include "compressibleCourantNo.H" + #include "setDeltaT.H" + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + #include "setrDeltaT.H" + + #include "rhoEqn.H" + + // --- Pressure-velocity PIMPLE corrector loop + for (int oCorr=0; oCorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } + } + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/setInitialrDeltaT.H b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/setInitialrDeltaT.H new file mode 100644 index 0000000000..6a397be9c2 --- /dev/null +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/setInitialrDeltaT.H @@ -0,0 +1,19 @@ +scalar maxDeltaT +( + pimple.lookupOrDefault("maxDeltaT", GREAT) +); + +volScalarField rDeltaT +( + IOobject + ( + "rDeltaT", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), + zeroGradientFvPatchScalarField::typeName +); diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/setrDeltaT.H b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/setrDeltaT.H new file mode 100644 index 0000000000..42fbe7e76b --- /dev/null +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoLTSPimpleFoam/setrDeltaT.H @@ -0,0 +1,79 @@ +{ + scalar maxCo + ( + pimple.lookupOrDefault("maxCo", 0.8) + ); + + scalar rDeltaTSmoothingCoeff + ( + pimple.lookupOrDefault("rDeltaTSmoothingCoeff", 0.02) + ); + + scalar rDeltaTDampingCoeff + ( + pimple.lookupOrDefault("rDeltaTDampingCoeff", 1.0) + ); + + scalar maxDeltaT + ( + pimple.lookupOrDefault("maxDeltaT", GREAT) + ); + + volScalarField rDeltaT0 = rDeltaT; + + // Set the reciprocal time-step from the local Courant number + rDeltaT.dimensionedInternalField() = max + ( + 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), + fvc::surfaceSum(mag(phi))().dimensionedInternalField() + /((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) + ); + + if (transonic) + { + surfaceScalarField phid + ( + "phid", + fvc::interpolate(psi)*(fvc::interpolate(U) & mesh.Sf()) + ); + + rDeltaT.dimensionedInternalField() = max + ( + rDeltaT.dimensionedInternalField(), + fvc::surfaceSum(mag(phid))().dimensionedInternalField() + /((2*maxCo)*mesh.V()*psi.dimensionedInternalField()) + ); + } + + // Update tho boundary values of the reciprocal time-step + rDeltaT.correctBoundaryConditions(); + + Info<< "Flow time scale min/max = " + << gMin(1/rDeltaT.internalField()) + << ", " << gMax(1/rDeltaT.internalField()) << endl; + + if (rDeltaTSmoothingCoeff < 1.0) + { + fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff); + } + + Info<< "Smoothed flow time scale min/max = " + << gMin(1/rDeltaT.internalField()) + << ", " << gMax(1/rDeltaT.internalField()) << endl; + + // Limit rate of change of time scale + // - reduce as much as required + // - only increase at a fraction of old time scale + if + ( + rDeltaTDampingCoeff < 1.0 + && runTime.timeIndex() > runTime.startTimeIndex() + 1 + ) + { + rDeltaT = rDeltaT0*max(rDeltaT/rDeltaT0, 1.0 - rDeltaTDampingCoeff); + + Info<< "Damped flow time scale min/max = " + << gMin(1/rDeltaT.internalField()) + << ", " << gMax(1/rDeltaT.internalField()) << endl; + } +} diff --git a/doc/changes/dynamicCode.org b/doc/changes/dynamicCode.org index 16c0b39143..a6d9dbbe8e 100644 --- a/doc/changes/dynamicCode.org +++ b/doc/changes/dynamicCode.org @@ -104,7 +104,7 @@ =functionObject=. #+BEGIN_SRC c++ functions - ( + { pAverage { functionObjectLibs ("libutilityFunctionObjects.so"); @@ -117,7 +117,7 @@ Info<<"p avg:" << average(p) << endl; #}; } - ); + } #+END_SRC This dynamic code framework uses the following entries + =codeData=: declaration (in .H file) of local (null-constructable) data @@ -233,7 +233,11 @@ - codedFixedValue could be extended to provide local data however in terms of complexity this is not really worthwhile. - - all templates come from - =etc/codeTemplates/dynamicCode= - =~/.OpenFOAM/dev/codeTemplates/dynamicCode= + - all templates come from (in order of preference) =FOAM_TEMPLATE_DIR= + =~/.OpenFOAM/dev/codeTemplates/dynamicCode= + =etc/codeTemplates/dynamicCode= + + - any generated C++ code will display line numbers relative to the original + dictionary (using the '#line' directive) to ease finding compilation + errors. diff --git a/src/OSspecific/POSIX/POSIX.C b/src/OSspecific/POSIX/POSIX.C index 95372bc96b..48e4b3a4df 100644 --- a/src/OSspecific/POSIX/POSIX.C +++ b/src/OSspecific/POSIX/POSIX.C @@ -1215,7 +1215,7 @@ Foam::fileNameList Foam::dlLoaded() { std::cout << "dlLoaded()" - << " : determined loaded libraries :" << libs.size() << endl; + << " : determined loaded libraries :" << libs.size() << std::endl; } return libs; } diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C index d28494463f..56402b28e5 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C @@ -522,7 +522,7 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const bool Foam::dynamicCode::wmakeLibso() const { - const Foam::string wmakeCmd("wmake -s libso " + this->codeRelPath()); + const Foam::string wmakeCmd("wmake -s libso " + this->codePath()); Info<< "Invoking " << wmakeCmd << endl; if (Foam::system(wmakeCmd)) diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C index ef6231d9b3..81c1a50ceb 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C @@ -34,44 +34,57 @@ License Foam::dynamicCodeContext::dynamicCodeContext(const dictionary& dict) : dict_(dict), - code_(stringOps::trim(dict["code"])), + code_(), localCode_(), include_(), options_(), libs_() { // expand dictionary entries - stringOps::inplaceExpand(code_, dict); + + { + const entry& codeEntry = dict.lookupEntry("code", false, false); + code_ = stringOps::trim(codeEntry.stream()); + stringOps::inplaceExpand(code_, dict); + addLineDirective(code_, codeEntry.startLineNumber(), dict.name()); + } // note: removes any leading/trailing whitespace // - necessary for compilation options, convenient for includes // and body. // optional - if (dict.found("localCode")) + const entry* includePtr = dict.lookupEntryPtr + ( + "codeInclude", + false, + false + ); + if (includePtr) { - localCode_ = stringOps::trim(dict["localCode"]); - stringOps::inplaceExpand(localCode_, dict); - } - - // optional - if (dict.found("codeInclude")) - { - include_ = stringOps::trim(dict["codeInclude"]); + include_ = stringOps::trim(includePtr->stream()); stringOps::inplaceExpand(include_, dict); + addLineDirective(include_, includePtr->startLineNumber(), dict.name()); } // optional - if (dict.found("codeOptions")) + const entry* optionsPtr = dict.lookupEntryPtr + ( + "codeOptions", + false, + false + ); + if (optionsPtr) { - options_ = stringOps::trim(dict["codeOptions"]); + options_ = stringOps::trim(optionsPtr->stream()); stringOps::inplaceExpand(options_, dict); } // optional - if (dict.found("codeLibs")) + const entry* libsPtr = dict.lookupEntryPtr("codeLibs", false, false); + if (libsPtr) { - libs_ = stringOps::trim(dict["codeLibs"]); + libs_ = stringOps::trim(libsPtr->stream()); stringOps::inplaceExpand(libs_, dict); } @@ -82,4 +95,17 @@ Foam::dynamicCodeContext::dynamicCodeContext(const dictionary& dict) } +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::dynamicCodeContext::addLineDirective +( + string& code, + const label lineNum, + const fileName& name +) +{ + code = "#line " + Foam::name(lineNum) + " \"" + name + "\"\n" + code; +} + + // ************************************************************************* // diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.H b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.H index f4a38695b7..8ff83b0724 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.H +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.H @@ -51,6 +51,7 @@ namespace Foam class dynamicCodeContext { // Private data + //- The parent dictionary context const dictionary& dict_; @@ -123,6 +124,13 @@ public: return sha1_; } + //- Helper: add #line directive + static void addLineDirective + ( + string&, + const label lineNum, + const fileName& name + ); }; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C index 208077b262..8dd28c5e07 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/codedFixedValue/codedFixedValueFvPatchField.C @@ -241,10 +241,6 @@ void Foam::codedFixedValueFvPatchField::createLibrary // Write files for new library if (!dynCode.upToDate(context)) { - Info<< "Using dynamicCode for patch " << this->patch().name() - << " on field " << this->dimensionedInternalField().name() - << endl; - // filter with this context dynCode.reset(context); @@ -271,7 +267,7 @@ void Foam::codedFixedValueFvPatchField::createLibrary dynCode.setMakeOptions ( "EXE_INC = -g \\\n" - "-I$(LIB_SRC)/finiteVolume/lnInclude\\\n" + "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n" + context.options() + "\n\nLIB_LIBS = \\\n" + " -lOpenFOAM \\\n" @@ -343,6 +339,12 @@ void Foam::codedFixedValueFvPatchField::updateLibrary() const return; } + Info<< "Using dynamicCode for patch " << this->patch().name() + << " on field " << this->dimensionedInternalField().name() << nl + << "at line " << codeDict.startLineNumber() + << " in " << codeDict.name() << endl; + + // remove instantiation of fvPatchField provided by library redirectPatchFieldPtr_.clear(); diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C index de0ba87587..0c5945f464 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C @@ -213,6 +213,14 @@ void Foam::meshRefinement::updateIntersections(const labelList& changedFaces) } } + // Extend segments a bit + { + const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); + start += smallVec; + end -= smallVec; + } + + // Do tests in one go labelList surfaceHit; { @@ -316,6 +324,14 @@ void Foam::meshRefinement::checkData() } } + // Extend segments a bit + { + const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); + start += smallVec; + end -= smallVec; + } + + // Do tests in one go labelList surfaceHit; { @@ -2247,6 +2263,14 @@ void Foam::meshRefinement::dumpIntersections(const fileName& prefix) const } } + // Extend segments a bit + { + const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); + start += smallVec; + end -= smallVec; + } + + // Do tests in one go labelList surfaceHit; List surfaceHitInfo; diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C index c4846a0265..8f8a532e2c 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C @@ -283,6 +283,13 @@ void Foam::meshRefinement::getBafflePatches } } + // Extend segments a bit + { + const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); + start += smallVec; + end -= smallVec; + } + // Do test for intersections // ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -2447,6 +2454,13 @@ Foam::autoPtr Foam::meshRefinement::zonify } } + // Extend segments a bit + { + const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); + start += smallVec; + end -= smallVec; + } + // Do test for intersections // ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C index c2e7a6ffd0..96821d4718 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C @@ -626,6 +626,13 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement } } + // Extend segments a bit + { + const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); + start += smallVec; + end -= smallVec; + } + // Do test for higher intersections // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -835,6 +842,14 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement } } + // Extend segments a bit + { + const vectorField smallVec(Foam::sqrt(SMALL)*(end-start)); + start += smallVec; + end -= smallVec; + } + + // Test for all intersections (with surfaces of higher max level than // minLevel) and cache per cell the max surface level and the local normal // on that surface. diff --git a/src/meshTools/searchableSurface/searchableSurfaceWithGaps.C b/src/meshTools/searchableSurface/searchableSurfaceWithGaps.C index 80dc1cda45..e96d0a4c3d 100644 --- a/src/meshTools/searchableSurface/searchableSurfaceWithGaps.C +++ b/src/meshTools/searchableSurface/searchableSurfaceWithGaps.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,14 +72,14 @@ Foam::Pair Foam::searchableSurfaceWithGaps::offsetVecs } offsets[0][minCmpt] = 1.0; - // Orthogonalise + // Orthonormalise offsets[0] -= n[minCmpt]*n; - // Scale - offsets[0] *= gap_/mag(offsets[0]); - - + offsets[0] /= mag(offsets[0]); // Do second offset vector perp to original edge and first offset vector offsets[1] = n ^ offsets[0]; + + // Scale + offsets[0] *= gap_; offsets[1] *= gap_; } @@ -240,7 +240,7 @@ void Foam::searchableSurfaceWithGaps::findLine // test in pairs: only if both perturbations hit something // do we accept the hit. - const vectorField smallVec(SMALL*(compactEnd-compactStart)); + const vectorField smallVec(1E-6*(compactEnd-compactStart)); List plusInfo; surface().findLine @@ -294,7 +294,7 @@ void Foam::searchableSurfaceWithGaps::findLine offset0.setSize(plusMissMap.size()); offset1.setSize(plusMissMap.size()); - const vectorField smallVec(SMALL*(compactEnd-compactStart)); + const vectorField smallVec(1E-6*(compactEnd-compactStart)); surface().findLine ( diff --git a/src/meshTools/searchableSurface/triSurfaceMesh.C b/src/meshTools/searchableSurface/triSurfaceMesh.C index deb92ee00f..c3c7c69b34 100644 --- a/src/meshTools/searchableSurface/triSurfaceMesh.C +++ b/src/meshTools/searchableSurface/triSurfaceMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -573,6 +573,9 @@ const Foam::indexedOctree& bb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); bb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL); + scalar oldTol = indexedOctree::perturbTol(); + indexedOctree::perturbTol() = tolerance_; + edgeTree_.reset ( new indexedOctree @@ -590,6 +593,8 @@ const Foam::indexedOctree& 3.0 // duplicity ) ); + + indexedOctree::perturbTol() = oldTol; } return edgeTree_(); } diff --git a/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C b/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C index 36da451a63..5dcdf627c7 100644 --- a/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C +++ b/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C @@ -188,9 +188,6 @@ void Foam::codedFunctionObject::createLibrary // Write files for new library if (!dynCode.upToDate(context)) { - Info<< "Using dynamicCode for functionObject " << name() - << endl; - // filter with this context dynCode.reset(context); @@ -282,6 +279,11 @@ void Foam::codedFunctionObject::updateLibrary() const return; } + Info<< "Using dynamicCode for functionObject " << name() + << " at line " << dict_.startLineNumber() + << " in " << dict_.name() << endl; + + // remove instantiation of fvPatchField provided by library redirectFunctionObjectPtr_.clear(); @@ -375,21 +377,60 @@ bool Foam::codedFunctionObject::read(const dictionary& dict) { dict.lookup("redirectType") >> redirectType_; - if (dict.found("codeRead")) + const entry* readPtr = dict.lookupEntryPtr + ( + "codeRead", + false, + false + ); + if (readPtr) { - codeRead_ = stringOps::trim(dict["codeRead"]); + codeRead_ = stringOps::trim(readPtr->stream()); stringOps::inplaceExpand(codeRead_, dict); + dynamicCodeContext::addLineDirective + ( + codeRead_, + readPtr->startLineNumber(), + dict.name() + ); } - if (dict.found("codeExecute")) + + const entry* execPtr = dict.lookupEntryPtr + ( + "codeExecute", + false, + false + ); + if (execPtr) { - codeExecute_ = stringOps::trim(dict["codeExecute"]); + codeExecute_ = stringOps::trim(execPtr->stream()); stringOps::inplaceExpand(codeExecute_, dict); + dynamicCodeContext::addLineDirective + ( + codeExecute_, + execPtr->startLineNumber(), + dict.name() + ); } - if (dict.found("codeEnd")) + + const entry* endPtr = dict.lookupEntryPtr + ( + "codeEnd", + false, + false + ); + if (execPtr) { - codeEnd_ = stringOps::trim(dict["codeEnd"]); + codeEnd_ = stringOps::trim(endPtr->stream()); stringOps::inplaceExpand(codeEnd_, dict); + dynamicCodeContext::addLineDirective + ( + codeEnd_, + endPtr->startLineNumber(), + dict.name() + ); } + updateLibrary(); return redirectFunctionObject().read(dict); } diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C index b3e2fc7394..4968f0a00f 100644 --- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C +++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C @@ -277,6 +277,8 @@ void Foam::sampledSurfaces::read(const dictionary& dict) void Foam::sampledSurfaces::updateMesh(const mapPolyMesh&) { expire(); + + // pointMesh and interpolation will have been reset in mesh.update } @@ -327,10 +329,6 @@ bool Foam::sampledSurfaces::expire() } } - // reset interpolation - pointMesh::Delete(mesh_); - volPointInterpolation::Delete(mesh_); - // true if any surfaces just expired return justExpired; } diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun index de516b423f..036fff2ae0 100755 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun @@ -12,6 +12,6 @@ runApplication setSet -batch makeBlockedFaceSet.setSet runApplication PDRMesh # Run -runApplication PDRFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/combustion/XiFoam/ras/Allrun b/tutorials/combustion/XiFoam/ras/Allrun index 6cb09e37d9..352a424e97 100755 --- a/tutorials/combustion/XiFoam/ras/Allrun +++ b/tutorials/combustion/XiFoam/ras/Allrun @@ -4,9 +4,6 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -# Set application name -application="XiFoam" - setControlDict() { controlDict="system/controlDict" @@ -32,7 +29,7 @@ cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2 cp -r ../moriyoshiHomogeneous/0.005 . setControlDict - runApplication $application + runApplication `getApplication` ) # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/combustion/chemFoam/gri/Allrun b/tutorials/combustion/chemFoam/gri/Allrun index 081d23cad5..9296dc6763 100755 --- a/tutorials/combustion/chemFoam/gri/Allrun +++ b/tutorials/combustion/chemFoam/gri/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="chemFoam" +application=`getApplication` runApplication $application diff --git a/tutorials/combustion/chemFoam/h2/Allrun b/tutorials/combustion/chemFoam/h2/Allrun index 081d23cad5..9296dc6763 100755 --- a/tutorials/combustion/chemFoam/h2/Allrun +++ b/tutorials/combustion/chemFoam/h2/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="chemFoam" +application=`getApplication` runApplication $application diff --git a/tutorials/combustion/chemFoam/ic8h18/Allrun b/tutorials/combustion/chemFoam/ic8h18/Allrun index 081d23cad5..9296dc6763 100755 --- a/tutorials/combustion/chemFoam/ic8h18/Allrun +++ b/tutorials/combustion/chemFoam/ic8h18/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="chemFoam" +application=`getApplication` runApplication $application diff --git a/tutorials/combustion/chemFoam/nc7h16/Allrun b/tutorials/combustion/chemFoam/nc7h16/Allrun index 081d23cad5..9296dc6763 100755 --- a/tutorials/combustion/chemFoam/nc7h16/Allrun +++ b/tutorials/combustion/chemFoam/nc7h16/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="chemFoam" +application=`getApplication` runApplication $application diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/Allrun b/tutorials/combustion/fireFoam/les/smallPoolFire2D/Allrun index 029f052ef4..23c0a4ac9a 100755 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/Allrun +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/Allrun @@ -10,6 +10,6 @@ runApplication setSet -batch makeFaceSet.setSet runApplication createPatch -overwrite # Run -runApplication fireFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun b/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun index 9ea9e89ae6..1bfc061053 100755 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun @@ -4,7 +4,7 @@ . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="fireFoam" +application=`getApplication` runApplication blockMesh runApplication setSet -batch makeFaceSet.setSet diff --git a/tutorials/compressible/rhoCentralFoam/Allrun b/tutorials/compressible/rhoCentralFoam/Allrun index fb311218eb..e1e13d8a08 100755 --- a/tutorials/compressible/rhoCentralFoam/Allrun +++ b/tutorials/compressible/rhoCentralFoam/Allrun @@ -4,9 +4,6 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -# Get application name -application="rhoCentralFoam" - cases=" \ shockTube \ wedge15Ma5 \ @@ -55,7 +52,7 @@ do ;; esac - runApplication $application + runApplication `getApplication` ) done diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/T b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/T new file mode 100644 index 0000000000..04da8a4eb2 --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/T @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 293; + +boundaryField +{ + + front + { + type zeroGradient; + } + back + { + type zeroGradient; + } + wall + { + type zeroGradient; + } + porosityWall + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type inletOutlet; + value $internalField; + inletValue $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/U b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/U new file mode 100644 index 0000000000..a6d6006af9 --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/U @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + front + { + type fixedValue; + value uniform (0 0 0); + } + back + { + type fixedValue; + value uniform (0 0 0); + } + wall + { + type fixedValue; + value uniform (0 0 0); + } + porosityWall + { + type slip; + value uniform (0 0 0); + } + inlet + { + type flowRateInletVelocity; + flowRate 0.1; + value uniform (0 0 0); + } + outlet + { + type fluxCorrectedVelocity; //inletOutlet; + value uniform (0 0 0); + inletValue uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/alphat b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/alphat new file mode 100644 index 0000000000..440c84f8ff --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/alphat @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + front + { + type alphatWallFunction; + value uniform 0; + } + back + { + type alphatWallFunction; + value uniform 0; + } + wall + { + type alphatWallFunction; + value uniform 0; + } + porosityWall + { + type alphatWallFunction; + value uniform 0; + } + inlet + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/epsilon b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/epsilon new file mode 100644 index 0000000000..d81f1db665 --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/epsilon @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 200; + +boundaryField +{ + front + { + type compressible::epsilonWallFunction; + value uniform 200; + } + back + { + type compressible::epsilonWallFunction; + value uniform 200; + } + wall + { + type compressible::epsilonWallFunction; + value uniform 200; + } + porosityWall + { + type compressible::epsilonWallFunction; + value uniform 200; + } + inlet + { + type compressible::turbulentMixingLengthDissipationRateInlet; + mixingLength 0.005; + value uniform 200; + } + outlet + { + type inletOutlet; + inletValue uniform 200; + value uniform 200; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/k b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/k new file mode 100644 index 0000000000..1d958cfff9 --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/k @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + front + { + type compressible::kqRWallFunction; + value uniform 1; + } + back + { + type compressible::kqRWallFunction; + value uniform 1; + } + wall + { + type compressible::kqRWallFunction; + value uniform 1; + } + porosityWall + { + type compressible::kqRWallFunction; + value uniform 1; + } + inlet + { + type turbulentIntensityKineticEnergyInlet; + intensity 0.05; + value uniform 1; + } + outlet + { + type inletOutlet; + inletValue uniform 1; + value uniform 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/mut b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/mut new file mode 100644 index 0000000000..0e11f50c54 --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/mut @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + front + { + type mutkWallFunction; + value uniform 0; + } + back + { + type mutkWallFunction; + value uniform 0; + } + wall + { + type mutkWallFunction; + value uniform 0; + } + porosityWall + { + type mutkWallFunction; + value uniform 0; + } + inlet + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/p b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/p new file mode 100644 index 0000000000..2e94ff795e --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/0/p @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1.0e5; + +boundaryField +{ + front + { + type zeroGradient; + } + back + { + type zeroGradient; + } + wall + { + type zeroGradient; + } + porosityWall + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + outlet + { + type fixedValue; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/Allrun b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/Allrun new file mode 100755 index 0000000000..d72de07446 --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/Allrun @@ -0,0 +1,9 @@ +cd ${0%/*} || exit 1 # run from this directory + +m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication `getApplication` diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/RASProperties b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/RASProperties new file mode 100644 index 0000000000..67d4d8212c --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/RASProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 new file mode 100644 index 0000000000..fb67da75da --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 @@ -0,0 +1,165 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + `format' ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// block definition for a porosity with an angled inlet/outlet +// the porosity is not aligned with the main axes +// +dnl> ----------------------------------------------------------------- +dnl> +dnl> +changecom(//)changequote([,]) dnl> +define(calc, [esyscmd(perl -e 'print ($1)')]) dnl> +define(VCOUNT, 0) dnl> +define(vlabel, [[// ]pt VCOUNT ($1) define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) dnl> +dnl> +define(hex2D, hex ($1b $2b $3b $4b $1f $2f $3f $4f)) dnl> +define(quad2D, ($1f $1b $2b $2f)) dnl> +define(frontQuad, ($1f $2f $3f $4f)) dnl> +define(backQuad, ($4b $3b $2b $1b)) dnl> +dnl> +dnl> +dnl> ----------------------------------------------------------------- +dnl> +define(ncells, 20) dnl> +define(ninlet, 15) dnl> +define(nporo, 20) dnl> +define(noutlet, 20) dnl> +dnl> +define(x0,0) dnl> +define(y0,0) dnl> +define(y0,0) dnl> +define(Cos,0.7071067812) dnl> == cos(45) +define(Sin,0.7071067812) dnl> == sin(45) +dnl> +define(width,50) dnl> +define(zBack,calc(-width/2)) dnl> +define(zFront,calc(width/2)) dnl> +define(leninlet,150)dnl> +define(lenporo,100)dnl> +define(lenoutlet,100)dnl> +dnl> +define(xhyp,calc(Sin*width)) dnl> +define(yhyp,calc(Cos*width)) dnl> +define(xinlet,leninlet)dnl> +define(xporo,calc(Cos*lenporo)) dnl> +define(yporo,calc(Sin*lenporo)) dnl> +define(xoutlet,calc(xporo + Cos*lenoutlet)) dnl> +define(youtlet,calc(yporo + Sin*lenoutlet)) dnl> +dnl> + +convertToMeters 0.001; + +vertices +( + // inlet region + ( -xinlet y0 zBack ) vlabel(in1b) + ( -xinlet yhyp zBack ) vlabel(in2b) + ( -xinlet y0 zFront ) vlabel(in1f) + ( -xinlet yhyp zFront ) vlabel(in2f) + + // join inlet->outlet + ( x0 y0 zBack ) vlabel(join1b) + ( -xhyp yhyp zBack ) vlabel(join2b) + ( x0 y0 zFront ) vlabel(join1f) + ( -xhyp yhyp zFront ) vlabel(join2f) + + // porosity ends ->outlet + ( xporo yporo zBack ) vlabel(poro1b) + ( calc(xporo - xhyp) calc(yporo + yhyp) zBack ) vlabel(poro2b) + ( xporo yporo zFront ) vlabel(poro1f) + ( calc(xporo - xhyp) calc(yporo + yhyp) zFront ) vlabel(poro2f) + + // outlet + ( xoutlet youtlet zBack ) vlabel(out1b) + ( calc(xoutlet - xhyp) calc(youtlet + yhyp) zBack ) vlabel(out2b) + ( xoutlet youtlet zFront ) vlabel(out1f) + ( calc(xoutlet - xhyp) calc(youtlet + yhyp) zFront ) vlabel(out2f) +); + +blocks +( + // inlet block + hex2D(in1, join1, join2, in2) + inlet ( ninlet ncells ncells ) simpleGrading (1 1 1) + + // porosity block + hex2D(join1, poro1, poro2, join2) + porosity ( nporo ncells ncells ) simpleGrading (1 1 1) + + // outlet block + hex2D(poro1, out1, out2, poro2) + outlet ( noutlet ncells ncells ) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + // is there no way of defining all my 'defaultFaces' to be 'wall'? + wall front + ( + // inlet block + frontQuad(in1, join1, join2, in2) + // outlet block + frontQuad(poro1, out1, out2, poro2) + ) + + wall back + ( + // inlet block + backQuad(in1, join1, join2, in2) + // outlet block + backQuad(poro1, out1, out2, poro2) + ) + + wall wall + ( + // inlet block + quad2D(in1, join1) + quad2D(join2, in2) + // outlet block + quad2D(poro1, out1) + quad2D(out2, poro2) + ) + + wall porosityWall + ( + // porosity block + frontQuad(join1, poro1, poro2, join2) + // porosity block + backQuad(join1, poro1, poro2, join2) + // porosity block + quad2D(join1, poro1) + quad2D(poro2, join2) + ) + + patch inlet + ( + quad2D(in2, in1) + ) + + patch outlet + ( + quad2D(out2, out1) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/polyMesh/boundary b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/polyMesh/boundary new file mode 100644 index 0000000000..dc9ecffb7b --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/polyMesh/boundary @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +6 +( + front + { + type wall; + nFaces 700; + startFace 63400; + } + back + { + type wall; + nFaces 700; + startFace 64100; + } + wall + { + type wall; + nFaces 1400; + startFace 64800; + } + porosityWall + { + type wall; + nFaces 1600; + startFace 66200; + } + inlet + { + type patch; + nFaces 400; + startFace 67800; + } + outlet + { + type patch; + nFaces 400; + startFace 68200; + } +) + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/porousZones b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/porousZones new file mode 100644 index 0000000000..02c2bd82cb --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/porousZones @@ -0,0 +1,36 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object porousZones; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +1 +( + porosity + { + coordinateSystem + { + e1 (0.70710678 0.70710678 0); + e2 (0 0 1); + } + + Darcy + { + d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000); + f f [0 -1 0 0 0 0 0] (0 0 0); + } + } +) + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/thermophysicalProperties b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/thermophysicalProperties new file mode 100644 index 0000000000..686497a1c7 --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/thermophysicalProperties @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType hPsiThermo>>>>; + +mixture +{ + nMoles 1; + molWeight 28.9; + Cp 1007; + Hf 0; + As 1.4792e-06; + Ts 116; +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/turbulenceProperties b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/turbulenceProperties new file mode 100644 index 0000000000..3e945495c5 --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RASModel; + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/controlDict b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/controlDict new file mode 100644 index 0000000000..ad6e941334 --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/controlDict @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application rhoLTSPimpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 500; + +deltaT 1; + +writeControl adjustableRunTime; + +writeInterval 50; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSchemes b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSchemes new file mode 100644 index 0000000000..e2381721e8 --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSchemes @@ -0,0 +1,76 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default localEuler rDeltaT; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss upwind; + div(phid,p) Gauss upwind; + div(phiU,p) Gauss linear; + div(phi,h) Gauss upwind; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,R) Gauss upwind; + div(phi,omega) Gauss upwind; + div((rho*R)) Gauss linear; + div(R) Gauss linear; + div(U) Gauss linear; + div((muEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default none; + laplacian(muEff,U) Gauss linear corrected; + laplacian(mut,U) Gauss linear corrected; + laplacian(DkEff,k) Gauss linear corrected; + laplacian(DepsilonEff,epsilon) Gauss linear corrected; + laplacian(DREff,R) Gauss linear corrected; + laplacian(DomegaEff,omega) Gauss linear corrected; + laplacian((rho*(1|A(U))),p) Gauss linear corrected; + laplacian(alphaEff,h) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p ; +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSolution b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSolution new file mode 100644 index 0000000000..7367176b72 --- /dev/null +++ b/tutorials/compressible/rhoLTSPimpleFoam/angledDuct/system/fvSolution @@ -0,0 +1,68 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0.1; + } + + pFinal + { + $p; + tolerance 1e-06; + relTol 0.1; + } + + "(rho|U|h|k|epsilon|omega)" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + "(rho|U|h|k|epsilon|omega)Final" + { + $U; + tolerance 1e-05; + relTol 0.1; + } + +} + +PIMPLE +{ + momentumPredictor yes; + nOuterCorrectors 1; + nCorrectors 1; + nNonOrthogonalCorrectors 0; + rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5; + rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0; + + maxCo 0.8; + rDeltaTSmoothingCoeff 0.02; + rDeltaTDampingCoeff 1; + maxDeltaT 1; +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun index 13c8195c59..d72de07446 100755 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/Allrun @@ -1,4 +1,4 @@ -cd ${0%/*} || exit 1 # run from this directory +cd ${0%/*} || exit 1 # run from this directory m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict @@ -6,5 +6,4 @@ m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict . $WM_PROJECT_DIR/bin/tools/RunFunctions runApplication blockMesh -runApplication rhoPimpleFoam - +runApplication `getApplication` diff --git a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/Allrun b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/Allrun index ad77d33e3d..e51c24da58 100755 --- a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/Allrun +++ b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/Allrun @@ -1,10 +1,14 @@ -cd ${0%/*} || exit 1 # run from this directory +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -runApplication blockMesh -runApplication rhoPorousSimpleFoam +application=`getApplication` +runApplication blockMesh +runApplication $application + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/MRFZones b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/MRFZones new file mode 100644 index 0000000000..8ed8ab7d22 --- /dev/null +++ b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/MRFZones @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object MRFZones; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +0 +() + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/polyMesh/boundary b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/polyMesh/boundary index 117139f505..dc9ecffb7b 100644 --- a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/polyMesh/boundary +++ b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/polyMesh/boundary @@ -8,7 +8,7 @@ FoamFile { version 2.0; - format binary; + format ascii; class polyBoundaryMesh; location "constant/polyMesh"; object boundary; diff --git a/tutorials/compressible/sonicLiquidFoam/Allrun b/tutorials/compressible/sonicLiquidFoam/Allrun index 16f2029d18..b9aa32c894 100755 --- a/tutorials/compressible/sonicLiquidFoam/Allrun +++ b/tutorials/compressible/sonicLiquidFoam/Allrun @@ -4,9 +4,6 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -# Set application name -application="sonicLiquidFoam" - setDecompressionTankFine() { blockMeshDict="constant/polyMesh/blockMeshDict" @@ -42,7 +39,7 @@ cloneCase decompressionTank decompressionTankFine # And execute runApplication blockMesh - runApplication $application + runApplication `getApplication` ) # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/discreteMethods/dsmcFoam/README b/tutorials/discreteMethods/dsmcFoam/README new file mode 100644 index 0000000000..1c6b83c1ce --- /dev/null +++ b/tutorials/discreteMethods/dsmcFoam/README @@ -0,0 +1,52 @@ +Fields are used by dsmcFoam in several ways, some of which are different to +their use elsewhere in OpenFOAM. None of these fields are solved by partial +differential equations, they are used either to record simulation data, or to +supply boundary data. + +In each case there are 11 fields: + + boundaryT, boundaryU: + + The wall and free stream conditions at the boundary are specified for + velocity and temperature with these fields - only the data on the + patches is used, the cell data is not. These are the only two fields + which supply data to the case. + + dsmcRhoN: + + The population of dsmc particles in cells is recorded to visualise how + well the cell population conditions required for dsmc are met. The + boundary conditions are zeroGradient because only cell data is + meaningful. + + fD, q: + + The wall heat flux (q) and force density (fD, i.e. stress vector) is + recorded with these fields - only the data on wall patches is relevant, + the cell data is not. + + iDof, internalE, linearKE, momentum, rhoM, rhoN: + + These fields are the densities of extensive quantities in the + simulation, i.e. of number, mass, momentum, energy. Cell data is + recorded in the internal field and the boundaryField is used to record + the data of particles that strike wall patches. The properties of + particles striking wall faces are weighted by 1/(Un*fA), where Un is the + normal component of the particle's velocity and fA is the face area. + This is done so that when intensive quantities, such as velocity or + temperature, are evaluated on the wall the values are correct this + allows velocity slip and temperature jump to be evaluated. + + Therefore, the data in these fields on wall patches is of a different + type to the volume data. This may cause problems when post-processing, + as any interpolation of these fields will have a artifacts in the near + wall cells because the values on the faces are radically different. + This can be overcome by visualising the data uninterpolated, or by + copying the fields and setting zeroGradient boundary conditions on + walls. Calculated intensive fields do not have this issue. + +Further fields are produced by dsmcFoam, i.e. dsmcSigmaTcRMax (used in the +selection of collision partners) and by the fieldAverage (averaging the +extensive quantity densities) and dsmcFields (calculating intensive quantities, +i.e. velocity and temperature, from extensive quantities) function objects in +each case as it runs. diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun index 09d9f0ea78..99108969cd 100755 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allrun @@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # run from this directory runApplication blockMesh runApplication dsmcInitialise -runApplication dsmcFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun index 09d9f0ea78..99108969cd 100755 --- a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun +++ b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allrun @@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # run from this directory runApplication blockMesh runApplication dsmcInitialise -runApplication dsmcFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun index 71795a47e0..dfe52836b5 100755 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allrun @@ -8,7 +8,6 @@ runApplication blockMesh runApplication decomposePar runParallel dsmcInitialise 4 runParallel dsmcFoam 4 -runApplication reconstructPar -noLagrangian - +runApplication `getApplication` -noLagrangian # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun index 71795a47e0..cc49dc56ed 100755 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun @@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # run from this directory runApplication blockMesh runApplication decomposePar runParallel dsmcInitialise 4 -runParallel dsmcFoam 4 +runParallel `getApplication` 4 runApplication reconstructPar -noLagrangian diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/Allrun b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/Allrun index e849cf219a..cd864c8362 100755 --- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/Allrun +++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/Allrun @@ -5,8 +5,6 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -application="mdEquilibrationFoam" - for caseName in periodicCubeArgon periodicCubeWater do ( @@ -14,7 +12,7 @@ do runApplication blockMesh runApplication mdInitialise - runApplication $application + runApplication `getApplication` ) done # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/electromagnetics/mhdFoam/Allclean b/tutorials/electromagnetics/mhdFoam/hartmann/Allclean similarity index 78% rename from tutorials/electromagnetics/mhdFoam/Allclean rename to tutorials/electromagnetics/mhdFoam/hartmann/Allclean index f7eb365e0c..c8b9d25607 100755 --- a/tutorials/electromagnetics/mhdFoam/Allclean +++ b/tutorials/electromagnetics/mhdFoam/hartmann/Allclean @@ -4,11 +4,7 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -( - cd hartmann || exit - - cleanCase - cleanSamples -) +cleanCase +cleanSamples # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/electromagnetics/mhdFoam/Allrun b/tutorials/electromagnetics/mhdFoam/hartmann/Allrun similarity index 57% rename from tutorials/electromagnetics/mhdFoam/Allrun rename to tutorials/electromagnetics/mhdFoam/hartmann/Allrun index 1b1a18565f..e5a7d9bcc4 100755 --- a/tutorials/electromagnetics/mhdFoam/Allrun +++ b/tutorials/electromagnetics/mhdFoam/hartmann/Allrun @@ -5,15 +5,11 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="mhdFoam" +application=`getApplication` -( - cd hartmann || exit - - runApplication blockMesh - runApplication $application - runApplication foamCalc components U - runApplication sample -) +runApplication blockMesh +runApplication $application +runApplication foamCalc components U +runApplication sample # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun index 6fa85b7103..6184f799f6 100755 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/Allrun @@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # run from this directory runApplication blockMesh runApplication snappyHexMesh -overwrite -runApplication buoyantBoussinesqSimpleFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun index 66c6a95897..459a702ad3 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="buoyantSimpleFoam" +application=`getApplication` runApplication blockMesh runApplication $application diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun index 85a8f5d227..30952a60f1 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun @@ -28,7 +28,7 @@ done #-- Run on single processor -#runApplication chtMultiRegionFoam +#runApplication `getApplication` # Decompose for i in bottomAir topAir heater leftSolid rightSolid @@ -37,7 +37,7 @@ do done # Run -runParallel chtMultiRegionFoam 4 +runParallel `getApplication` 4 # Reconstruct for i in bottomAir topAir heater leftSolid rightSolid diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/Allrun index 7365475b4e..db414bf592 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/Allrun @@ -37,7 +37,7 @@ do done # Run -runParallel chtMultiRegionFoam 4 +runParallel `getApplication` 4 # Reconstruct for i in bottomWater topAir heater leftSolid rightSolid diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun index 0a301f9095..fc668e806c 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun @@ -30,7 +30,7 @@ done #-- Run on single processor -runApplication chtMultiRegionFoam +runApplication `getApplication` ## Decompose @@ -40,7 +40,7 @@ runApplication chtMultiRegionFoam #done # ## Run -#runParallel chtMultiRegionFoam 4 +#runParallel `getApplication` 4 # ## Reconstruct #for i in bottomAir topAir heater leftSolid rightSolid diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/Allrun index ab054e410d..f473e787d0 100755 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/Allrun @@ -28,7 +28,7 @@ done #-- Run on single processor -runApplication chtMultiRegionSimpleFoam +runApplication `getApplication` ## Decompose #for i in bottomAir topAir heater leftSolid rightSolid @@ -37,7 +37,7 @@ runApplication chtMultiRegionSimpleFoam #done # ## Run -#runParallel chtMultiRegionSimpleFoam 4 +#runParallel `getApplication` 4 # ## Reconstruct #for i in bottomAir topAir heater leftSolid rightSolid diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun index e40aa7850a..3176a9f913 100755 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun @@ -40,7 +40,7 @@ done #-- Run on single processor -runApplication chtMultiRegionSimpleFoam +runApplication `getApplication` ## Decompose #for i in bottomAir topAir heater leftSolid rightSolid @@ -49,7 +49,7 @@ runApplication chtMultiRegionSimpleFoam #done # ## Run -#runParallel chtMultiRegionSimpleFoam 4 +#runParallel `getApplication` 4 # ## Reconstruct #for i in bottomAir topAir heater leftSolid rightSolid diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun index 9a27a17f14..99209508d7 100755 --- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun @@ -17,7 +17,7 @@ do sed "s/XXX/$e/g" constant/transportProperties.template \ > constant/transportProperties - runApplication boundaryFoam + runApplication `getApplication` mv log.boundaryFoam log.boundaryFoam_$e diff --git a/tutorials/incompressible/icoFoam/Allrun b/tutorials/incompressible/icoFoam/Allrun index 185f95b979..6486d9db11 100755 --- a/tutorials/incompressible/icoFoam/Allrun +++ b/tutorials/incompressible/icoFoam/Allrun @@ -4,9 +4,6 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -# Get application name -application="icoFoam" - cavityCases="cavity cavityFine cavityGrade cavityHighRe cavityClipped" runMapFields() @@ -97,7 +94,7 @@ do esac previousCase="$caseName" - ( cd $caseName && runApplication $application ) + ( cd $caseName && runApplication `getApplication` ) done # elbow case for testing Fluent-FOAM conversion tools @@ -107,7 +104,7 @@ runFluentMeshToFoam elbow elbow/elbow.msh ( cd elbow || exit - runApplication $application + runApplication `getApplication` runApplication foamMeshToFluent runApplication foamDataToFluent ) diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun index aab4860421..33da567345 100755 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun @@ -23,7 +23,7 @@ cp -r 0.org 0 runApplication mapFields ../wingMotion2D_simpleFoam -sourceTime latestTime -consistent mv 0/pointDisplacement.unmapped 0/pointDisplacement runApplication decomposePar -runParallel pimpleDyMFoam 3 +runParallel `getApplication` 3 runApplication reconstructPar # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun index 689a832a04..624c62312e 100755 --- a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun +++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/Allrun @@ -1,4 +1,4 @@ -cd ${0%/*} || exit 1 # run from this directory +cd ${0%/*} || exit 1 # run from this directory m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict @@ -6,5 +6,5 @@ m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict . $WM_PROJECT_DIR/bin/tools/RunFunctions runApplication blockMesh -runApplication porousSimpleFoam +runApplication `getApplication` diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allrun b/tutorials/incompressible/simpleFoam/motorBike/Allrun index ea47b0746d..22be2d3fb7 100755 --- a/tutorials/incompressible/simpleFoam/motorBike/Allrun +++ b/tutorials/incompressible/simpleFoam/motorBike/Allrun @@ -12,4 +12,4 @@ sed -i 's/\(nNonOrthogonalCorrectors\).*;/\1 10;/g' system/fvSolution runApplication potentialFoam -writep sed -i 's/\(nNonOrthogonalCorrectors\).*;/\1 0;/g' system/fvSolution -runApplication simpleFoam +runApplication `getApplication` diff --git a/tutorials/incompressible/simpleWindFoam/turbineSiting/Allrun b/tutorials/incompressible/simpleWindFoam/turbineSiting/Allrun index b1c95c766f..e47a188063 100755 --- a/tutorials/incompressible/simpleWindFoam/turbineSiting/Allrun +++ b/tutorials/incompressible/simpleWindFoam/turbineSiting/Allrun @@ -11,7 +11,7 @@ runApplication decomposePar #runApplication snappyHexMesh -overwrite #runApplication setSet -batch makeZones #runApplication setsToZones -noFlipMap -#runApplication windSimpleFoam +#runApplication `getApplication` cp system/decomposeParDict-par system/decomposeParDict runParallel snappyHexMesh 2 -overwrite @@ -31,7 +31,7 @@ runParallel renumberMesh 4 -overwrite #runParallel changeDictionary 4 -literalRE runParallel setSet 4 -batch makeZones -runParallel simpleWindFoam 4 +runParallel `getApplication` 4 runApplication reconstructParMesh -constant runApplication reconstructPar diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/Allrun b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/Allrun index ce144f896a..b729092026 100755 --- a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/Allrun +++ b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/Allrun @@ -8,4 +8,4 @@ cd ${0%/*} || exit 1 # run from this directory runApplication blockMesh # run the solver -runApplication LTSReactingParcelFoam +runApplication `getApplication` diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/Allrun b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/Allrun index 192c30fd62..3aa141a08b 100755 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/Allrun +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/Allrun @@ -8,6 +8,6 @@ cd ${0%/*} || exit 1 # run from this directory runApplication blockMesh # run the solver -runApplication LTSReactingParcelFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/Allrun b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/Allrun index 40f241728a..8d4cb3681e 100755 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/Allrun +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/Allrun @@ -12,6 +12,6 @@ runApplication potentialFoam rm -f 0/phi # run the solver -runApplication porousExplicitSourceReactingParcelFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/Allrun b/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/Allrun index 01302f3e31..d4d7bdd7f7 100755 --- a/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/Allrun +++ b/tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/Allrun @@ -3,4 +3,4 @@ ./Allrun.pre -runApplication reactingParcelFilmFoam +runApplication `getApplication` diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun index f5789d3b76..ac44d91761 100755 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun @@ -6,4 +6,4 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions ./Allrun.pre -runApplication reactingParcelFilmFoam +runApplication `getApplication` diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel index 818c810f17..115ddddb60 100755 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel @@ -10,7 +10,7 @@ cd ${0%/*} || exit 1 # run from this directory decomposePar -region wallFilmRegion > log.decomposePar.wallFilmRegion 2>&1 decomposePar > log.decomposePar.primaryRegion 2>&1 -runParallel reactingParcelFilmFoam 4 +runParallel `getApplication` 4 reconstructPar -region wallFilmRegion > log.reconstructPar.wallFilmRegion 2>&1 reconstructPar > log.reconstructPar.primaryRegion 2>&1 diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/Allrun b/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/Allrun index a9f606ee2c..4c1131986d 100755 --- a/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/Allrun +++ b/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/Allrun @@ -3,4 +3,4 @@ . $WM_PROJECT_DIR/bin/tools/RunFunctions ./Allrun.pre -runApplication reactingParcelFilmFoam +runApplication `getApplication` diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/Allrun-parallel b/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/Allrun-parallel index c88abfd1af..dc7fb41d64 100755 --- a/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/Allrun-parallel +++ b/tutorials/lagrangian/reactingParcelFilmFoam/multipleBoxes/Allrun-parallel @@ -7,7 +7,7 @@ decomposePar -region wallFilmRegion > log.decomposePar.wallFilmRegion 2>&1 decomposePar > log.decomposePar.primaryRegion 2>&1 -runParallel reactingParcelFilmFoam 4 +runParallel `getApplication` 4 reconstructPar -region wallFilmRegion > log.reconstructPar.wallFilmRegion 2>&1 reconstructPar > log.reconstructPar.primaryRegion 2>&1 diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/panel/Allrun b/tutorials/lagrangian/reactingParcelFilmFoam/panel/Allrun index 01302f3e31..d4d7bdd7f7 100755 --- a/tutorials/lagrangian/reactingParcelFilmFoam/panel/Allrun +++ b/tutorials/lagrangian/reactingParcelFilmFoam/panel/Allrun @@ -3,4 +3,4 @@ ./Allrun.pre -runApplication reactingParcelFilmFoam +runApplication `getApplication` diff --git a/tutorials/mesh/moveDynamicMesh/simpleHarmonicMotion/Allrun b/tutorials/mesh/moveDynamicMesh/simpleHarmonicMotion/Allrun index f7afb77a5b..a0ea6affe8 100755 --- a/tutorials/mesh/moveDynamicMesh/simpleHarmonicMotion/Allrun +++ b/tutorials/mesh/moveDynamicMesh/simpleHarmonicMotion/Allrun @@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="moveDynamicMesh" +application=`getApplication` runApplication blockMesh runApplication topoSet diff --git a/tutorials/mesh/moveDynamicMesh/simpleHarmonicMotion/system/controlDict b/tutorials/mesh/moveDynamicMesh/simpleHarmonicMotion/system/controlDict index c2c955ea67..8e0e02d84d 100644 --- a/tutorials/mesh/moveDynamicMesh/simpleHarmonicMotion/system/controlDict +++ b/tutorials/mesh/moveDynamicMesh/simpleHarmonicMotion/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application interDyMFoam; +application moveDynamicMesh; startFrom startTime; diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/Allrun b/tutorials/multiphase/cavitatingFoam/les/throttle/Allrun index 7b19d67145..93db53b842 100755 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/Allrun +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="cavitatingFoam" +application=`getApplication` refineMeshByCellSet() { diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun index e93a056053..f345d7dc04 100755 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="cavitatingFoam" +application=`getApplication` refineMeshByCellSet() { diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allrun b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allrun index f6ff3740d8..4dff677039 100755 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allrun +++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/Allrun @@ -9,6 +9,6 @@ runApplication blockMesh runApplication setSet -batch createObstacle.setSet runApplication subsetMesh -overwrite c0 -patch walls runApplication setFields -runApplication interDyMFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun index 5613186ba2..8ca61574f2 100755 --- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="interDyMFoam" +application=`getApplication` runApplication blockMesh runApplication topoSet diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allrun b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allrun index 593a959d00..3b8cb649c2 100755 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allrun +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/Allrun @@ -8,6 +8,6 @@ m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict runApplication blockMesh cp 0/alpha1.org 0/alpha1 runApplication setFields -runApplication interDyMFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allrun b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allrun index 593a959d00..3b8cb649c2 100755 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allrun +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/Allrun @@ -8,6 +8,6 @@ m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict runApplication blockMesh cp 0/alpha1.org 0/alpha1 runApplication setFields -runApplication interDyMFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allrun b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allrun index 593a959d00..3b8cb649c2 100755 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allrun +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/Allrun @@ -8,6 +8,6 @@ m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict runApplication blockMesh cp 0/alpha1.org 0/alpha1 runApplication setFields -runApplication interDyMFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allrun b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allrun index 593a959d00..3b8cb649c2 100755 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allrun +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/Allrun @@ -8,6 +8,6 @@ m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict runApplication blockMesh cp 0/alpha1.org 0/alpha1 runApplication setFields -runApplication interDyMFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allrun b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allrun index 593a959d00..3b8cb649c2 100755 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allrun +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/Allrun @@ -8,6 +8,6 @@ m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict runApplication blockMesh cp 0/alpha1.org 0/alpha1 runApplication setFields -runApplication interDyMFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allrun b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allrun index 9b42e0115f..0f2a6dea43 100755 --- a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allrun +++ b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/Allrun @@ -7,6 +7,6 @@ cd ${0%/*} || exit 1 # run from this directory runApplication blockMesh cp 0/alpha1.org 0/alpha1 runApplication setFields -runApplication interDyMFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interFoam/laminar/Allrun b/tutorials/multiphase/interFoam/laminar/Allrun index 50f30eed5f..510e4498db 100755 --- a/tutorials/multiphase/interFoam/laminar/Allrun +++ b/tutorials/multiphase/interFoam/laminar/Allrun @@ -4,9 +4,6 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -# Set application name -application="interFoam" - setDamBreakFine () { blockMeshDict="constant/polyMesh/blockMeshDict" @@ -33,7 +30,7 @@ setDamBreakFine () runApplication blockMesh cp 0/alpha1.org 0/alpha1 runApplication setFields - runApplication $application + runApplication `getApplication` ) # Clone case @@ -50,7 +47,7 @@ cloneCase damBreak damBreakFine cp ../damBreak/0/alpha1.org 0/alpha1 runApplication setFields runApplication decomposePar - runParallel $application 4 + runParallel `getApplication` 4 runApplication reconstructPar ) @@ -61,7 +58,7 @@ cloneCase damBreak damBreakFine runApplication blockMesh cp 0/alpha1.org 0/alpha1 runApplication setFields - runApplication $application + runApplication `getApplication` ) # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interFoam/ras/Allrun b/tutorials/multiphase/interFoam/ras/Allrun index 056ec6d2ed..2e138973f2 100755 --- a/tutorials/multiphase/interFoam/ras/Allrun +++ b/tutorials/multiphase/interFoam/ras/Allrun @@ -4,9 +4,6 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -# Set application name -application="interFoam" - setDamBreakFine () { blockMeshDict="constant/polyMesh/blockMeshDict" @@ -42,7 +39,7 @@ cloneCase damBreak damBreakFine runApplication blockMesh runApplication setFields runApplication decomposePar - runParallel $application 4 + runParallel `getApplication` 4 runApplication reconstructPar ) diff --git a/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun b/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun index ea8cb0136a..9bb76eb3c7 100755 --- a/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun +++ b/tutorials/multiphase/interMixingFoam/laminar/damBreak/Allrun @@ -9,6 +9,6 @@ cp 0/alpha1.org 0/alpha1 cp 0/alpha2.org 0/alpha2 cp 0/alpha3.org 0/alpha3 runApplication setFields -runApplication interMixingFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/controlDict b/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/controlDict index 86d15afac4..dd84a8b65c 100644 --- a/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/controlDict +++ b/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application interFoam; +application interMixingFoam; startFrom startTime; diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun index 019100e5d8..ade57d36eb 100755 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/Allrun @@ -11,6 +11,6 @@ runApplication blockMesh runApplication snappyHexMesh -overwrite # Run the solver -runApplication interPhaseChangeFoam +runApplication `getApplication` # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun index 82cf78f2f0..d8dfa3c1bd 100755 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="multiphaseInterFoam" +application=`getApplication` runApplication blockMesh runApplication setFields diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun index 82cf78f2f0..d8dfa3c1bd 100755 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Set application name -application="multiphaseInterFoam" +application=`getApplication` runApplication blockMesh runApplication setFields