diff --git a/Allwmake b/Allwmake index c01c6c0d1a..2e570c89a5 100755 --- a/Allwmake +++ b/Allwmake @@ -1,6 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory +if [ "$PWD" != "$WM_PROJECT_DIR" ] +then + echo "Error: Current directory is not \$WM_PROJECT_DIR" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +fi + # wmake is required for subsequent targets ( cd wmake/src && make ) diff --git a/applications/Allwmake b/applications/Allwmake index 2a7eeae124..ddb5b116fc 100755 --- a/applications/Allwmake +++ b/applications/Allwmake @@ -1,5 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory + +if [ "$PWD" != "$WM_PROJECT_DIR/applications" ] +then + echo "Error: Current directory is not \$WM_PROJECT_DIR/applications" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +fi + set -x wmake all solvers diff --git a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C index 2ee69c120e..62a8db992b 100644 --- a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C +++ b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C @@ -26,8 +26,8 @@ Application boundaryFoam Description - Steady-state solver for 1D turbulent flow, typically to generate boundary - layer conditions at an inlet, for use in a simulation. + Steady-state solver for incompressible, 1D turbulent flow, typically to + generate boundary layer conditions at an inlet, for use in a simulation. Boundary layer code to calculate the U, k and epsilon distributions. Used to create inlet boundary conditions for experimental comparisons @@ -42,7 +42,6 @@ Description #include "wallFvPatch.H" #include "makeGraph.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) @@ -52,6 +51,7 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" + #include "interrogateWallPatches.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -74,66 +74,24 @@ int main(int argc, char *argv[]) UEqn.solve(); - // Correct driving force for a constant mass flow rate - + // Correct driving force for a constant volume flow rate dimensionedVector UbarStar = flowMask & U.weightedAverage(mesh.V()); U += (Ubar - UbarStar); gradP += (Ubar - UbarStar)/(1.0/UEqn.A())().weightedAverage(mesh.V()); - label id = y.size() - 1; - - scalar wallShearStress = - flowDirection & turbulence->R()()[id] & wallNormal; - - scalar yplusWall -// = ::sqrt(mag(wallShearStress))*y[id]/laminarTransport.nu()()[id]; - = ::sqrt(mag(wallShearStress))*y[id]/turbulence->nuEff()()[id]; - - Info<< "Uncorrected Ubar = " << (flowDirection & UbarStar.value())<< tab - << "pressure gradient = " << (flowDirection & gradP.value()) << tab - << "min y+ = " << yplusWall << endl; - turbulence->correct(); + Info<< "Uncorrected Ubar = " << (flowDirection & UbarStar.value()) + << ", pressure gradient = " << (flowDirection & gradP.value()) + << endl; + + #include "evaluateNearWall.H" if (runTime.outputTime()) { - volSymmTensorField R - ( - IOobject - ( - "R", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - turbulence->R() - ); - - runTime.write(); - - const word& gFormat = runTime.graphFormat(); - - makeGraph(y, flowDirection & U, "Uf", gFormat); - - makeGraph(y, laminarTransport.nu(), gFormat); - - makeGraph(y, turbulence->k(), gFormat); - makeGraph(y, turbulence->epsilon(), gFormat); - - //makeGraph(y, flowDirection & R & flowDirection, "Rff", gFormat); - //makeGraph(y, wallNormal & R & wallNormal, "Rww", gFormat); - //makeGraph(y, flowDirection & R & wallNormal, "Rfw", gFormat); - - //makeGraph(y, sqrt(R.component(tensor::XX)), "u", gFormat); - //makeGraph(y, sqrt(R.component(tensor::YY)), "v", gFormat); - //makeGraph(y, sqrt(R.component(tensor::ZZ)), "w", gFormat); - makeGraph(y, R.component(tensor::XY), "uv", gFormat); - - makeGraph(y, mag(fvc::grad(U)), "gammaDot", gFormat); + #include "makeGraphs.H" } Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/incompressible/boundaryFoam/createFields.H b/applications/solvers/incompressible/boundaryFoam/createFields.H index b7b8b32229..e99a990013 100644 --- a/applications/solvers/incompressible/boundaryFoam/createFields.H +++ b/applications/solvers/incompressible/boundaryFoam/createFields.H @@ -49,74 +49,14 @@ ) ); - dimensionedVector Ubar - ( - transportProperties.lookup("Ubar") - ); + dimensionedVector Ubar(transportProperties.lookup("Ubar")); vector flowDirection = (Ubar/mag(Ubar)).value(); tensor flowMask = sqr(flowDirection); - - // Search for wall patches faces and store normals - - scalar nWallFaces(0); - vector wallNormal(vector::zero); - - const fvPatchList& patches = mesh.boundary(); - - forAll(patches, patchi) - { - const fvPatch& currPatch = patches[patchi]; - - if (isType(currPatch)) - { - forAll(currPatch, facei) - { - nWallFaces++; - - if (nWallFaces == 1) - { - wallNormal = - - mesh.Sf().boundaryField()[patchi][facei] - /mesh.magSf().boundaryField()[patchi][facei]; - } - else if (nWallFaces == 2) - { - vector wallNormal2 = - mesh.Sf().boundaryField()[patchi][facei] - /mesh.magSf().boundaryField()[patchi][facei]; - - //- Check that wall faces are parallel - if - ( - mag(wallNormal & wallNormal2) > 1.01 - ||mag(wallNormal & wallNormal2) < 0.99 - ) - { - Info<< "boundaryFoam: wall faces are not parallel" - << endl - << abort(FatalError); - } - } - else - { - Info<< "boundaryFoam: number of wall faces > 2" - << endl - << abort(FatalError); - } - } - } - } - - - //- create position array for graph generation - scalarField y = wallNormal & mesh.C().internalField(); - - dimensionedVector gradP ( "gradP", dimensionSet(0, 1, -2, 0, 0), - vector(0, 0, 0) + vector::zero ); diff --git a/applications/solvers/incompressible/boundaryFoam/evaluateNearWall.H b/applications/solvers/incompressible/boundaryFoam/evaluateNearWall.H new file mode 100644 index 0000000000..b9683b9e68 --- /dev/null +++ b/applications/solvers/incompressible/boundaryFoam/evaluateNearWall.H @@ -0,0 +1,35 @@ +{ + // Evaluate near-wall behaviour + + scalar nu = turbulence->nu().boundaryField()[patchId][faceId]; + scalar nut = turbulence->nut()().boundaryField()[patchId][faceId]; + symmTensor R = turbulence->devReff()().boundaryField()[patchId][faceId]; + scalar epsilon = turbulence->epsilon()()[cellId]; +// scalar omega = turbulence->omega()()[cellId]; + scalar k = turbulence->k()()[cellId]; + scalar Up = + flowDirection & (U[cellId] - U.boundaryField()[patchId][faceId]); + + scalar tauw = flowDirection & R & wallNormal; + + scalar uTau = ::sqrt(mag(tauw)); + + scalar yPlus = uTau*y[cellId]/(nu + ROOTVSMALL); + + scalar uPlus = Up/(uTau + ROOTVSMALL); + + scalar nutPlus = nut/nu; + + scalar kPlus = k/(sqr(uTau) + ROOTVSMALL); + + scalar epsilonPlus = epsilon*nu/(pow4(uTau) + ROOTVSMALL); + +// scalar omegaPlus = omega*nu/(sqr(uTau) + ROOTVSMALL); + + scalar Rey = Up*y[cellId]/nu; + + Info<< "Rey = " << Rey << ", uTau = " << uTau << ", nut+ = " << nutPlus + << ", y+ = " << yPlus << ", u+ = " << uPlus + << ", k+ = " << kPlus << ", epsilon+ = " << epsilonPlus + << endl; +} \ No newline at end of file diff --git a/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H b/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H new file mode 100644 index 0000000000..27ddd24544 --- /dev/null +++ b/applications/solvers/incompressible/boundaryFoam/interrogateWallPatches.H @@ -0,0 +1,74 @@ +// Search for wall patches faces and store normals + +label faceId(-1); +label patchId(-1); +label nWallFaces(0); +vector wallNormal(vector::zero); + +const fvPatchList& patches = mesh.boundary(); + +forAll(patches, patchi) +{ + const fvPatch& currPatch = patches[patchi]; + + if (isType(currPatch)) + { + const vectorField nf = currPatch.nf(); + + forAll(nf, facei) + { + nWallFaces++; + + if (nWallFaces == 1) + { + wallNormal = -nf[facei]; + faceId = facei; + patchId = patchi; + } + else if (nWallFaces == 2) + { + const vector wallNormal2 = -nf[facei]; + + //- Check that wall faces are parallel + if + ( + mag(wallNormal & wallNormal2) > 1.01 + || mag(wallNormal & wallNormal2) < 0.99 + ) + { + FatalErrorIn(args.executable()) + << "wall faces are not parallel for patches " + << patches[patchId].name() << " and " + << currPatch.name() << nl + << exit(FatalError); + } + } + else + { + FatalErrorIn(args.executable()) << "number of wall faces > 2" + << nl << exit(FatalError); + } + } + } +} + +if (nWallFaces == 0) +{ + FatalErrorIn(args.executable()) << "No wall patches identified" + << exit(FatalError); +} +else +{ + Info<< "Generating wall data for patch: " << patches[patchId].name() << endl; +} + +// store local id of near-walll cell to process +label cellId = patches[patchId].faceCells()[faceId]; + +// create position array for graph generation +scalarField y = + wallNormal + & (mesh.C().internalField() - mesh.C().boundaryField()[patchId][faceId]); + +Info<< " Height to first cell centre y0 = " << y[cellId] << endl; + diff --git a/applications/solvers/incompressible/boundaryFoam/makeGraphs.H b/applications/solvers/incompressible/boundaryFoam/makeGraphs.H new file mode 100644 index 0000000000..7367dc7c7d --- /dev/null +++ b/applications/solvers/incompressible/boundaryFoam/makeGraphs.H @@ -0,0 +1,33 @@ +volSymmTensorField R +( + IOobject + ( + "R", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + turbulence->R() +); + +runTime.write(); + +const word& gFormat = runTime.graphFormat(); + +makeGraph(y, flowDirection & U, "Uf", gFormat); + +makeGraph(y, turbulence->nu(), gFormat); +makeGraph(y, turbulence->k(), gFormat); +makeGraph(y, turbulence->epsilon(), gFormat); + +makeGraph(y, flowDirection & R & flowDirection, "Rff", gFormat); +makeGraph(y, wallNormal & R & wallNormal, "Rww", gFormat); +makeGraph(y, flowDirection & R & wallNormal, "Rfw", gFormat); + +makeGraph(y, sqrt(mag(R.component(tensor::XX))), "u", gFormat); +makeGraph(y, sqrt(mag(R.component(tensor::YY))), "v", gFormat); +makeGraph(y, sqrt(mag(R.component(tensor::ZZ))), "w", gFormat); +makeGraph(y, R.component(tensor::XY), "uv", gFormat); + +makeGraph(y, mag(fvc::grad(U)), "gammaDot", gFormat); diff --git a/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H b/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H index f9794a914f..1ae6219fd6 100644 --- a/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H +++ b/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H @@ -82,7 +82,7 @@ ( "kappa", wallFunctionDict, - 0.4187 + 0.41 ) ); @@ -92,7 +92,7 @@ ( "E", wallFunctionDict, - 9.0 + 9.8 ) ); diff --git a/applications/solvers/multiphase/settlingFoam/createFields.H b/applications/solvers/multiphase/settlingFoam/createFields.H index 9f0ca00596..6acb19994a 100644 --- a/applications/solvers/multiphase/settlingFoam/createFields.H +++ b/applications/solvers/multiphase/settlingFoam/createFields.H @@ -304,7 +304,7 @@ ( "kappa", wallFunctionDict, - 0.4187 + 0.41 ) ); @@ -314,7 +314,7 @@ ( "E", wallFunctionDict, - 9.0 + 9.8 ) ); diff --git a/applications/test/Gstream/GsTest.C b/applications/test/Gstream/GsTest.C deleted file mode 100644 index 61e3581ae5..0000000000 --- a/applications/test/Gstream/GsTest.C +++ /dev/null @@ -1,47 +0,0 @@ -#include "Xstream.H" -#include "GLstream.H" -#include "PSstream.H" -#include "shapes2D.H" -#include "IStringStream.H" - -using namespace Foam; - -int main() -{ - colour mauve("mauve", 1, 0, 1); - - lineStyle solid("Solid", 2.0, 2.0, IStringStream("1(1.0)")()); - lineStyle broken("Broken", 2.0, 10.0, IStringStream("4(1 1 4 1)")()); - - - //Xstream wind - GLstream wind - //PSstream wind - ( - "GsTest", - primary("Black"), - primary("White"), - 0.5, 0.5, 0.5, 0.5, 500, 500 - ); - - do - { - wind << rectangle2D(point2D(0.0, 0.0), point2D(100.0, 100.0)); - - wind.setColour(mauve); - wind.setLineStyle(solid); - - wind << line2D(point2D(0.0, 0.0), point2D(0.0, 200.0)); - wind << line2D(point2D(0.0, 200.0), point2D(200.0, 200.0)); - - //wind.setLineStyle(broken); - - wind << line2D(point2D(200.0, 200.0), point2D(200.0, 0.0)); - wind << line2D(point2D(200.0, 0.0), point2D(0.0, 0.0)); - - wind << string2D(point2D(200.0, 0.0), "Hi there"); - - } while (wind.waitForEvent()); - - return 0; -} diff --git a/applications/test/Gstream/Make/files b/applications/test/Gstream/Make/files deleted file mode 100644 index 7bb7f5cb43..0000000000 --- a/applications/test/Gstream/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -GsTest.C - -EXE = $(FOAM_USER_APPBIN)/GsTest diff --git a/applications/test/Gstream/Make/options b/applications/test/Gstream/Make/options deleted file mode 100644 index 25079c86f9..0000000000 --- a/applications/test/Gstream/Make/options +++ /dev/null @@ -1,2 +0,0 @@ -EXE_INC = -I$(LIB_SRC)/Gstream/lnInclude -EXE_LIBS = -lGstream -lGL $(XLIBS) diff --git a/applications/test/findCell-octree/findSubSet.C b/applications/test/findCell-octree/findSubSet.C deleted file mode 100644 index e538efac20..0000000000 --- a/applications/test/findCell-octree/findSubSet.C +++ /dev/null @@ -1,229 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 - -Description - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "IStringStream.H" - -#include "myBoundBox.H" -#include "myBoundBoxList.H" -#include "octree.H" -#include "octreeData.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Main program: - - - -int main(int argc, char *argv[]) -{ - argList::validOptions.insert("x1", "X1"); - argList::validOptions.insert("y1", "Y1"); - argList::validOptions.insert("z1", "Z1"); - - argList::validOptions.insert("x2", "X2"); - argList::validOptions.insert("y2", "Y2"); - argList::validOptions.insert("z2", "Z2"); - -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" - - // Calculate BB of all cells - - - myBoundBoxList allBb(mesh.nCells()); - - const pointField& allPoints = mesh.points(); - - vectorField bbMin(mesh.nCells()); - bbMin = vector(GREAT, GREAT, GREAT); - vectorField bbMax(mesh.nCells()); - bbMax = vector(-GREAT, -GREAT, -GREAT); - - const labelListList& pCells = mesh.pointCells(); - - forAll(pCells, pointi) - { - const point& vertCoord = allPoints[pointi]; - - const labelList& cells = pCells[pointi]; - - forAll(cells, celli) - { - label cellNum = cells[celli]; - - bbMin[cellNum].x() = min(bbMin[cellNum].x(), vertCoord.x()); - bbMin[cellNum].y() = min(bbMin[cellNum].y(), vertCoord.y()); - bbMin[cellNum].z() = min(bbMin[cellNum].z(), vertCoord.z()); - - bbMax[cellNum].x() = max(bbMax[cellNum].x(), vertCoord.x()); - bbMax[cellNum].y() = max(bbMax[cellNum].y(), vertCoord.y()); - bbMax[cellNum].z() = max(bbMax[cellNum].z(), vertCoord.z()); - } - } - - - forAll(allBb, celli) - { - allBb[celli] = myBoundBox(bbMin[celli], bbMax[celli]); - } - - - myBoundBox meshBb(allPoints); - - scalar typDim = meshBb.minDim()/111; - - myBoundBox shiftedBb - ( - meshBb.min(), - point - ( - meshBb.max().x() + typDim, - meshBb.max().y() + typDim, - meshBb.max().z() + typDim - ) - ); - - - Info<< "Mesh" << endl; - Info<< " bounding box :" << shiftedBb << endl; - Info<< " typical dimension:" << shiftedBb.typDim() << endl; - - - /* - * Now we have allBb and shiftedBb - */ - - - - // Construct table of subset of cells - - labelList cellIndices(10); - - cellIndices[0] = 1433; - cellIndices[1] = 1434; - cellIndices[2] = 1435; - cellIndices[3] = 1436; - cellIndices[4] = 1437; - cellIndices[5] = 1438; - cellIndices[6] = 1439; - cellIndices[7] = 1440; - cellIndices[8] = 1441; - cellIndices[9] = 1442; - - // Get the corresponding bounding boxes - - forAll(cellIndices, i) - { - allBb[i] = allBb[cellIndices[i]]; - } - allBb.setSize(cellIndices.size()); - - - - // Wrap indices and mesh information into helper object - octreeData shapes(mesh, cellIndices); - - octree oc - ( - shiftedBb, // overall bounding box - shapes, // all information needed to do checks on cells - allBb, // bounding boxes of cells - 10.0 // maximum ratio of cubes v.s. cells - ); - -// scalar x1(readScalar(IStringStream(args.options()["x1"])())); -// scalar y1(readScalar(IStringStream(args.options()["y1"])())); -// scalar z1(readScalar(IStringStream(args.options()["z1"])())); - -// scalar x2(readScalar(IStringStream(args.options()["x2"])())); -// scalar y2(readScalar(IStringStream(args.options()["y2"])())); -// scalar z2(readScalar(IStringStream(args.options()["z2"])())); - - - - label nFound = 0; - - scalar x = -5.0; - for(int i = 0; i < 100; i++) - { - scalar y = -7.0; - for(int j = 0; j < 10; j++) - { - scalar z = -12.0; - for (int k = 0; k < 10; k++) - { - point sample(x, y, z); - - label index = oc.find(sample); - - // Convert index into shapes back into cellindex. - label cell; - if (index != -1) - { - cell = cellIndices[index]; - } - else - { - cell = -1; - } - Info<< "Point:" << sample - << " is in cell " << cell << "(octree) " - << mesh.findCell(sample) << "(linear)" - << endl; - - z += 1.2; - } - y += 0.9; - } - x += 0.1; - } - - - Info<< "nFound=" << nFound << endl; - - Info<< "End\n" << endl; - - - Info<< "Statistics:" << endl - << " nCells :" << allBb.size() << endl - << " nNodes :" << oc.nNodes() << endl - << " nLeaves :" << oc.nLeaves() << endl - << " nEntries :" << oc.nEntries() << endl - << " Cells per leaf :" - << oc.nEntries()/oc.nLeaves() - << endl - << " Every cell in :" - << oc.nEntries()/allBb.size() << " cubes" - << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/test/fvSolutionCombine/Make/files b/applications/test/fvSolutionCombine/Make/files new file mode 100644 index 0000000000..e16d69f14d --- /dev/null +++ b/applications/test/fvSolutionCombine/Make/files @@ -0,0 +1,3 @@ +fvSolutionCombine.C + +EXE = $(FOAM_USER_APPBIN)/fvSolutionCombine diff --git a/applications/test/fvSolutionCombine/Make/options b/applications/test/fvSolutionCombine/Make/options new file mode 100644 index 0000000000..fa15f12452 --- /dev/null +++ b/applications/test/fvSolutionCombine/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lfiniteVolume diff --git a/applications/test/fvSolutionCombine/fvSolutionCombine.C b/applications/test/fvSolutionCombine/fvSolutionCombine.C new file mode 100644 index 0000000000..1d9f1017c0 --- /dev/null +++ b/applications/test/fvSolutionCombine/fvSolutionCombine.C @@ -0,0 +1,229 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 + fvSolutionCombine + +Description + Simple utility for combining fvSolution solution entries. + +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "Time.H" +#include "wordRe.H" +#include "OSspecific.H" + +using namespace Foam; + +// check for identical dictionary content, regardless of the order +bool checkDictionaryContent(const dictionary& dict1, const dictionary& dict2) +{ + // trivial cases first + if (&dict1 == &dict2) + { + return true; + } + else if (dict1.size() != dict2.size()) + { + return false; + } + + + forAllConstIter(dictionary, dict1, iter1) + { + const entry* entryPtr = dict2.lookupEntryPtr + ( + iter1().keyword(), + false, + false + ); + + if (!entryPtr) + { + return false; + } + + const entry& entry1 = iter1(); + const entry& entry2 = *entryPtr; + + bool ok = false; + if (entry1.isDict()) + { + if (entry2.isDict()) + { + ok = checkDictionaryContent(entry1.dict(), entry2.dict()); + } + } + else + { + ok = (entry1 == entry2); + } + + + if (!ok) + { + return false; + } + } + + return true; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Main program: + +int main(int argc, char *argv[]) +{ + argList::noParallel(); + argList::validOptions.insert("rewrite", ""); + argList::validOptions.insert("show", ""); + argList args(argc, argv); + + Time runTime(args.rootPath(), args.caseName()); + + const word dictName("fvSolution"); + + bool optRewrite = args.optionFound("rewrite"); + bool optShow = args.optionFound("show"); + + IOdictionary solutionDict + ( + IOobject + ( + dictName, + "system", + runTime, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) + ); + + if (!solutionDict.found("solvers")) + { + Info<<"no solvers entry found in : " << dictName << endl; + return 2; + } + + if (optRewrite && solutionDict.instance() != "system") + { + Info<<"instance is not 'system' " + "- disabling rewrite for this file" << nl; + optRewrite = false; + } + + dictionary& solverDict = solutionDict.subDict("solvers"); + + wordList names = solverDict.toc(); + wordList oldNames = names; + + bool changed = false; + for (label orig = 0; orig < names.size()-1; ++orig) + { + // skip patterns or entries that have already been done + if (names[orig].empty() || wordRe::isPattern(names[orig])) + { + continue; + } + + const dictionary& dict1 = solverDict.subDict(names[orig]); + + for (label check = orig+1; check < names.size(); ++check) + { + // skip patterns or entries that have already been done + if (names[check].empty() || wordRe::isPattern(names[check])) + { + continue; + } + + const dictionary& dict2 = solverDict.subDict(names[check]); + + // check for identical content + if (checkDictionaryContent(dict1, dict2)) + { + names[orig] += "|" + names[check]; + names[check].clear(); + changed = true; + } + } + } + + if (changed) + { + forAll(names, nameI) + { + if (names[nameI].empty()) + { + solverDict.remove(oldNames[nameI]); + Info<<" #remove " << oldNames[nameI]; + } + else + { + Info<< " " << oldNames[nameI]; + + if (names[nameI] != oldNames[nameI]) + { + // make "(abc|def)" pattern + keyType renamed( "(" + names[nameI] + ")", true); + + solverDict.changeKeyword(oldNames[nameI], renamed); + + Info<< " -> " << renamed; + } + } + Info<< endl; + } + + if (optRewrite) + { + mvBak(solutionDict.objectPath(), "orig"); + Info<< "Backup to .orig" << nl + << "Writing " << solutionDict.objectPath() << nl << endl; + + solutionDict.regIOobject::write(); + } + else if (optShow) + { + IOobject::writeDivider(Info); + solutionDict.dictionary::write(Info, false); + } + else + { + Info<< "\nFile not rewritten" << endl; + } + } + else + { + Info<< "no changes" << endl; + } + + Info<< "Done\n" << endl; + + return changed ? 0 : 1; +} + + +// ************************************************************************* // diff --git a/applications/utilities/mesh/advanced/refineHexMesh/Make/options b/applications/utilities/mesh/advanced/refineHexMesh/Make/options index 376f4dff51..baa7b45f00 100644 --- a/applications/utilities/mesh/advanced/refineHexMesh/Make/options +++ b/applications/utilities/mesh/advanced/refineHexMesh/Make/options @@ -7,4 +7,5 @@ EXE_INC = \ EXE_LIBS = \ -ldynamicMesh \ -lmeshTools \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/mesh/advanced/removeFaces/Make/options b/applications/utilities/mesh/advanced/removeFaces/Make/options index 4acbc2cd2e..63c5dc5d78 100644 --- a/applications/utilities/mesh/advanced/removeFaces/Make/options +++ b/applications/utilities/mesh/advanced/removeFaces/Make/options @@ -6,4 +6,5 @@ EXE_INC = \ EXE_LIBS = \ -lmeshTools \ -ldynamicMesh \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/mesh/conversion/polyDualMesh/Make/options b/applications/utilities/mesh/conversion/polyDualMesh/Make/options index dc318df998..f3d9c89aac 100644 --- a/applications/utilities/mesh/conversion/polyDualMesh/Make/options +++ b/applications/utilities/mesh/conversion/polyDualMesh/Make/options @@ -5,5 +5,6 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -ldynamicMesh \ -lmeshTools diff --git a/applications/utilities/mesh/manipulation/createBaffles/Make/options b/applications/utilities/mesh/manipulation/createBaffles/Make/options index d4ab8c1b6b..f7e0c60fed 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/Make/options +++ b/applications/utilities/mesh/manipulation/createBaffles/Make/options @@ -6,4 +6,5 @@ EXE_INC = \ EXE_LIBS = \ -ldynamicMesh \ -lmeshTools \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/Make/options b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/Make/options index 792a51bf7f..523fc41d30 100644 --- a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/Make/options +++ b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/Make/options @@ -5,5 +5,6 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -lmeshTools \ -ldynamicMesh diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Make/options b/applications/utilities/mesh/manipulation/renumberMesh/Make/options index 8a7e5d1674..a8d7971b3b 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/Make/options +++ b/applications/utilities/mesh/manipulation/renumberMesh/Make/options @@ -8,4 +8,5 @@ EXE_LIBS = \ -lmeshTools \ -ldynamicMesh \ -lfiniteVolume \ + -lgenericPatchFields \ -ldecompositionMethods diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/Make/options b/applications/utilities/mesh/manipulation/splitMeshRegions/Make/options index 9b8c3dea8c..da1b9c5016 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/Make/options +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/Make/options @@ -5,5 +5,6 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -ldynamicMesh \ -lmeshTools diff --git a/applications/utilities/mesh/manipulation/stitchMesh/Make/options b/applications/utilities/mesh/manipulation/stitchMesh/Make/options index 98adec69d3..ac523b8282 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/Make/options +++ b/applications/utilities/mesh/manipulation/stitchMesh/Make/options @@ -1,9 +1,10 @@ EXE_INC = \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -ldynamicMesh \ -lmeshTools \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/mesh/manipulation/transformPoints/Make/options b/applications/utilities/mesh/manipulation/transformPoints/Make/options index fa15f12452..16eb624bec 100644 --- a/applications/utilities/mesh/manipulation/transformPoints/Make/options +++ b/applications/utilities/mesh/manipulation/transformPoints/Make/options @@ -2,4 +2,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C b/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C index cd48777de1..02d0e1e956 100644 --- a/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C +++ b/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C @@ -33,6 +33,7 @@ Description #include "argList.H" #include "IFstream.H" +#include "IOobject.H" #include "dictionary.H" using namespace Foam; @@ -42,13 +43,19 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::noBanner(); + argList::noParallel(); argList::validArgs.clear(); argList::validArgs.append("inputDict"); argList args(argc, argv); - IFstream dictStream(args.additionalArgs()[0]); - dictionary inputDict(dictStream); - Info<< inputDict << endl; + const string& dictName = args.additionalArgs()[0]; + + Info<<"//\n// expansion of dictionary " << dictName << "\n//\n"; + + dictionary(IFstream(dictName)()).write(Info, false); + + IOobject::writeDivider(Info); return 0; } diff --git a/applications/utilities/miscellaneous/foamFormatConvert/Make/options b/applications/utilities/miscellaneous/foamFormatConvert/Make/options index 10105d2d8a..b2bc2047e3 100644 --- a/applications/utilities/miscellaneous/foamFormatConvert/Make/options +++ b/applications/utilities/miscellaneous/foamFormatConvert/Make/options @@ -6,5 +6,5 @@ EXE_INC = \ EXE_LIBS = \ -lmeshTools \ -lfiniteVolume \ + -lgenericPatchFields \ -llagrangian - diff --git a/applications/utilities/miscellaneous/patchSummary/Make/options b/applications/utilities/miscellaneous/patchSummary/Make/options index fa15f12452..16eb624bec 100644 --- a/applications/utilities/miscellaneous/patchSummary/Make/options +++ b/applications/utilities/miscellaneous/patchSummary/Make/options @@ -2,4 +2,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/parallelProcessing/decomposePar/Make/options b/applications/utilities/parallelProcessing/decomposePar/Make/options index 4b1adfd7ba..a1b8151fdd 100644 --- a/applications/utilities/parallelProcessing/decomposePar/Make/options +++ b/applications/utilities/parallelProcessing/decomposePar/Make/options @@ -6,6 +6,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -ldecompositionMethods \ -llagrangian \ -lmeshTools diff --git a/applications/utilities/parallelProcessing/reconstructPar/Make/options b/applications/utilities/parallelProcessing/reconstructPar/Make/options index 6aa54bb838..b041c31836 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/Make/options +++ b/applications/utilities/parallelProcessing/reconstructPar/Make/options @@ -4,5 +4,6 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -llagrangian \ -lmeshTools diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/Make/options b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/Make/options index fa15f12452..16eb624bec 100644 --- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/Make/options +++ b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/Make/options @@ -2,4 +2,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentFields.C b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentFields.C deleted file mode 100644 index 8e3a74ec23..0000000000 --- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentFields.C +++ /dev/null @@ -1,65 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 - -Description - writeFluentFields - -\*---------------------------------------------------------------------------*/ - -#include "error.H" - -#include "writeFluentFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -#define volTypeField volScalarField -#define TypeField scalarField -#define nTypeComponents 1 - -#include "writeFluentTypeField.C" - -#undef nTypeComponents -#undef TypeField -#undef volTypeField - - -#define volTypeField volVectorField -#define TypeField vectorField -#define nTypeComponents 3 - -#include "writeFluentTypeField.C" - -#undef nTypeComponents -#undef TypeField -#undef volTypeField - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/applications/utilities/postProcessing/foamCalc/Make/options b/applications/utilities/postProcessing/foamCalc/Make/options index dbe9ddc048..a49fb12041 100644 --- a/applications/utilities/postProcessing/foamCalc/Make/options +++ b/applications/utilities/postProcessing/foamCalc/Make/options @@ -4,4 +4,5 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -lfoamCalcFunctions diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/options b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/options index b40ecb51d7..1e936c1d5d 100644 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/options +++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/options @@ -12,6 +12,7 @@ EXE_INC = \ LIB_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -llagrangian \ -lmeshTools \ $(GLIBS) diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/options b/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/options index 670c68424b..7dd2c76c8b 100644 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/options +++ b/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/options @@ -5,4 +5,5 @@ EXE_INC = \ LIB_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ $(GLIBS) diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/Make/options b/applications/utilities/postProcessing/graphics/ensightFoamReader/Make/options index 7a5a2e9b1c..8d21a9eae4 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/Make/options +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/Make/options @@ -7,5 +7,6 @@ EXE_INC = \ LIB_LIBS = \ -lOpenFOAM \ -lfiniteVolume \ + -lgenericPatchFields \ -llagrangian \ $(PROJECT_LIBS) diff --git a/applications/utilities/postProcessing/graphics/fieldview9Reader/Make/options b/applications/utilities/postProcessing/graphics/fieldview9Reader/Make/options index b21a3eef2d..1303d319af 100644 --- a/applications/utilities/postProcessing/graphics/fieldview9Reader/Make/options +++ b/applications/utilities/postProcessing/graphics/fieldview9Reader/Make/options @@ -99,4 +99,5 @@ EXE_INC = \ EXE_LIBS = \ $(FV_LIBS) \ -lfiniteVolume \ + -lgenericPatchFields \ -lmeshTools diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options b/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options index 1adeeefa12..a61c912ba0 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/Make/options @@ -4,4 +4,5 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -llagrangian diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options index fe46b10d13..66477ecd8e 100644 --- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options +++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/Make/options @@ -15,4 +15,5 @@ EXE_LIBS = \ -lspecie \ -lcompressibleRASModels \ -lcompressibleLESModels \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/Make/options b/applications/utilities/postProcessing/miscellaneous/postChannel/Make/options index b90b6fdd4e..c5e4b6238b 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/Make/options +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/Make/options @@ -6,4 +6,5 @@ EXE_INC = \ EXE_LIBS = \ -lmeshTools \ -lfiniteVolume \ + -lgenericPatchFields \ -lsampling diff --git a/applications/utilities/postProcessing/miscellaneous/ptot/Make/options b/applications/utilities/postProcessing/miscellaneous/ptot/Make/options index fa15f12452..16eb624bec 100644 --- a/applications/utilities/postProcessing/miscellaneous/ptot/Make/options +++ b/applications/utilities/postProcessing/miscellaneous/ptot/Make/options @@ -2,4 +2,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/miscellaneous/wdot/Make/options b/applications/utilities/postProcessing/miscellaneous/wdot/Make/options index fa15f12452..16eb624bec 100644 --- a/applications/utilities/postProcessing/miscellaneous/wdot/Make/options +++ b/applications/utilities/postProcessing/miscellaneous/wdot/Make/options @@ -2,4 +2,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/patch/patchAverage/Make/options b/applications/utilities/postProcessing/patch/patchAverage/Make/options index fa15f12452..16eb624bec 100644 --- a/applications/utilities/postProcessing/patch/patchAverage/Make/options +++ b/applications/utilities/postProcessing/patch/patchAverage/Make/options @@ -2,4 +2,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/patch/patchIntegrate/Make/options b/applications/utilities/postProcessing/patch/patchIntegrate/Make/options index fa15f12452..16eb624bec 100644 --- a/applications/utilities/postProcessing/patch/patchIntegrate/Make/options +++ b/applications/utilities/postProcessing/patch/patchIntegrate/Make/options @@ -2,4 +2,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/sampling/probeLocations/Make/options b/applications/utilities/postProcessing/sampling/probeLocations/Make/options index 04b22c08a4..44392ffc44 100644 --- a/applications/utilities/postProcessing/sampling/probeLocations/Make/options +++ b/applications/utilities/postProcessing/sampling/probeLocations/Make/options @@ -7,6 +7,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -lmeshTools \ -lsampling \ -ltriSurface \ diff --git a/applications/utilities/postProcessing/sampling/sample/Make/options b/applications/utilities/postProcessing/sampling/sample/Make/options index ae583f3388..4877a53003 100644 --- a/applications/utilities/postProcessing/sampling/sample/Make/options +++ b/applications/utilities/postProcessing/sampling/sample/Make/options @@ -8,6 +8,7 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -lmeshTools \ -lsampling \ -lsurfMesh \ diff --git a/applications/utilities/postProcessing/scalarField/pPrime2/Make/options b/applications/utilities/postProcessing/scalarField/pPrime2/Make/options index fa15f12452..02fc4c17b1 100644 --- a/applications/utilities/postProcessing/scalarField/pPrime2/Make/options +++ b/applications/utilities/postProcessing/scalarField/pPrime2/Make/options @@ -2,4 +2,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields + diff --git a/applications/utilities/postProcessing/stressField/stressComponents/Make/options b/applications/utilities/postProcessing/stressField/stressComponents/Make/options index be60a20b9f..d1016e9d4d 100644 --- a/applications/utilities/postProcessing/stressField/stressComponents/Make/options +++ b/applications/utilities/postProcessing/stressField/stressComponents/Make/options @@ -5,5 +5,6 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -lincompressibleRASModels \ -lincompressibleTransportModels diff --git a/applications/utilities/postProcessing/turbulence/R/Make/options b/applications/utilities/postProcessing/turbulence/R/Make/options index 5e71b80afa..0bab1a4e41 100644 --- a/applications/utilities/postProcessing/turbulence/R/Make/options +++ b/applications/utilities/postProcessing/turbulence/R/Make/options @@ -7,4 +7,5 @@ EXE_INC = \ EXE_LIBS = \ -lincompressibleRASModels \ -lincompressibleTransportModels \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options index a524a0aae5..8862565863 100644 --- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options +++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/Make/options @@ -7,4 +7,5 @@ EXE_INC = \ EXE_LIBS = \ -lincompressibleRASModels \ -lincompressibleTransportModels \ - -lfiniteVolume \ No newline at end of file + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/velocityField/Co/Make/options b/applications/utilities/postProcessing/velocityField/Co/Make/options index 7bd0a2d1e0..9103ae90ec 100644 --- a/applications/utilities/postProcessing/velocityField/Co/Make/options +++ b/applications/utilities/postProcessing/velocityField/Co/Make/options @@ -1,7 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/postProcessing/postCalc \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/velocityField/Lambda2/Make/options b/applications/utilities/postProcessing/velocityField/Lambda2/Make/options index cbe51627f2..9103ae90ec 100644 --- a/applications/utilities/postProcessing/velocityField/Lambda2/Make/options +++ b/applications/utilities/postProcessing/velocityField/Lambda2/Make/options @@ -4,4 +4,5 @@ EXE_INC = \ EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/velocityField/Mach/Make/options b/applications/utilities/postProcessing/velocityField/Mach/Make/options index 132e3be94a..c9733e397a 100644 --- a/applications/utilities/postProcessing/velocityField/Mach/Make/options +++ b/applications/utilities/postProcessing/velocityField/Mach/Make/options @@ -6,5 +6,6 @@ EXE_INC = \ EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ -lfiniteVolume \ + -lgenericPatchFields \ -lbasicThermophysicalModels \ -lspecie diff --git a/applications/utilities/postProcessing/velocityField/Pe/Make/options b/applications/utilities/postProcessing/velocityField/Pe/Make/options index aa00dc2b59..7675f43a75 100644 --- a/applications/utilities/postProcessing/velocityField/Pe/Make/options +++ b/applications/utilities/postProcessing/velocityField/Pe/Make/options @@ -18,4 +18,5 @@ EXE_LIBS = \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lfiniteVolume \ + -lgenericPatchFields \ -lmeshTools diff --git a/applications/utilities/postProcessing/velocityField/Q/Make/options b/applications/utilities/postProcessing/velocityField/Q/Make/options index cbe51627f2..9103ae90ec 100644 --- a/applications/utilities/postProcessing/velocityField/Q/Make/options +++ b/applications/utilities/postProcessing/velocityField/Q/Make/options @@ -4,4 +4,5 @@ EXE_INC = \ EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/velocityField/enstrophy/Make/options b/applications/utilities/postProcessing/velocityField/enstrophy/Make/options index cbe51627f2..9103ae90ec 100644 --- a/applications/utilities/postProcessing/velocityField/enstrophy/Make/options +++ b/applications/utilities/postProcessing/velocityField/enstrophy/Make/options @@ -4,4 +4,5 @@ EXE_INC = \ EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/velocityField/flowType/Make/options b/applications/utilities/postProcessing/velocityField/flowType/Make/options index cbe51627f2..9103ae90ec 100644 --- a/applications/utilities/postProcessing/velocityField/flowType/Make/options +++ b/applications/utilities/postProcessing/velocityField/flowType/Make/options @@ -4,4 +4,5 @@ EXE_INC = \ EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/velocityField/streamFunction/Make/options b/applications/utilities/postProcessing/velocityField/streamFunction/Make/options index fa15f12452..16eb624bec 100644 --- a/applications/utilities/postProcessing/velocityField/streamFunction/Make/options +++ b/applications/utilities/postProcessing/velocityField/streamFunction/Make/options @@ -2,4 +2,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/velocityField/uprime/Make/options b/applications/utilities/postProcessing/velocityField/uprime/Make/options index cbe51627f2..9103ae90ec 100644 --- a/applications/utilities/postProcessing/velocityField/uprime/Make/options +++ b/applications/utilities/postProcessing/velocityField/uprime/Make/options @@ -4,4 +4,5 @@ EXE_INC = \ EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/velocityField/vorticity/Make/options b/applications/utilities/postProcessing/velocityField/vorticity/Make/options index cbe51627f2..35db088457 100644 --- a/applications/utilities/postProcessing/velocityField/vorticity/Make/options +++ b/applications/utilities/postProcessing/velocityField/vorticity/Make/options @@ -4,4 +4,6 @@ EXE_INC = \ EXE_LIBS = \ $(FOAM_LIBBIN)/postCalc.o \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields + diff --git a/applications/utilities/postProcessing/wall/wallGradU/Make/options b/applications/utilities/postProcessing/wall/wallGradU/Make/options index fa15f12452..16eb624bec 100644 --- a/applications/utilities/postProcessing/wall/wallGradU/Make/options +++ b/applications/utilities/postProcessing/wall/wallGradU/Make/options @@ -2,4 +2,5 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options b/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options index 8cdfe23fd1..4d244f56ba 100644 --- a/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options +++ b/applications/utilities/postProcessing/wall/wallHeatFlux/Make/options @@ -10,5 +10,6 @@ EXE_LIBS = \ -lcompressibleRASModels \ -lreactionThermophysicalModels \ -lfiniteVolume \ + -lgenericPatchFields \ -lspecie \ -lbasicThermophysicalModels diff --git a/applications/utilities/postProcessing/wall/wallShearStress/Make/options b/applications/utilities/postProcessing/wall/wallShearStress/Make/options index 89632547e0..8862565863 100644 --- a/applications/utilities/postProcessing/wall/wallShearStress/Make/options +++ b/applications/utilities/postProcessing/wall/wallShearStress/Make/options @@ -7,4 +7,5 @@ EXE_INC = \ EXE_LIBS = \ -lincompressibleRASModels \ -lincompressibleTransportModels \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/wall/yPlusLES/Make/options b/applications/utilities/postProcessing/wall/yPlusLES/Make/options index f6131ce41c..d7446846b0 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/Make/options +++ b/applications/utilities/postProcessing/wall/yPlusLES/Make/options @@ -9,4 +9,5 @@ EXE_INC = \ EXE_LIBS = \ -lincompressibleLESModels \ -lincompressibleTransportModels \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options index 459989eb9d..888f9e440e 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/Make/options +++ b/applications/utilities/postProcessing/wall/yPlusRAS/Make/options @@ -14,5 +14,6 @@ EXE_LIBS = \ -lspecie \ -lcompressibleRASModels \ -lfiniteVolume \ + -lgenericPatchFields \ -lmeshTools \ -lsampling diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C index 91197141ef..a11404646c 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C +++ b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C @@ -38,11 +38,11 @@ Description #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" #include "incompressible/RAS/RASModel/RASModel.H" -#include "nutWallFunction/nutWallFunctionFvPatchScalarField.H" +#include "nutkWallFunction/nutkWallFunctionFvPatchScalarField.H" #include "basicPsiThermo.H" #include "compressible/RAS/RASModel/RASModel.H" -#include "mutWallFunction/mutWallFunctionFvPatchScalarField.H" +#include "mutkWallFunction/mutkWallFunctionFvPatchScalarField.H" #include "wallDist.H" @@ -56,7 +56,7 @@ void calcIncompressibleYPlus volScalarField& yPlus ) { - typedef incompressible::RASModels::nutWallFunctionFvPatchScalarField + typedef incompressible::RASModels::nutkWallFunctionFvPatchScalarField wallFunctionPatchField; #include "createPhi.H" @@ -108,7 +108,7 @@ void calcCompressibleYPlus volScalarField& yPlus ) { - typedef compressible::RASModels::mutWallFunctionFvPatchScalarField + typedef compressible::RASModels::mutkWallFunctionFvPatchScalarField wallFunctionPatchField; IOobject rhoHeader diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/Make/options b/applications/utilities/preProcessing/applyBoundaryLayer/Make/options index d27c95d033..06d42b6c3c 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/Make/options +++ b/applications/utilities/preProcessing/applyBoundaryLayer/Make/options @@ -4,4 +4,5 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -lmeshTools diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C index 8aae7e124c..5714cccbff 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C +++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C @@ -41,6 +41,11 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// turbulence constants - file-scope +static const scalar Cmu(0.09); +static const scalar kappa(0.41); + + int main(int argc, char *argv[]) { argList::validOptions.insert("ybl", "scalar"); @@ -48,7 +53,6 @@ int main(int argc, char *argv[]) argList::validOptions.insert("writenut", ""); # include "setRootCase.H" - # include "createTime.H" # include "createMesh.H" @@ -117,10 +121,6 @@ int main(int argc, char *argv[]) phi = fvc::interpolate(U) & mesh.Sf(); phi.write(); - // Set turbulence constants - dimensionedScalar kappa("kappa", dimless, 0.4187); - dimensionedScalar Cmu("Cmu", dimless, 0.09); - // Read and modify turbulence fields if present IOobject epsilonHeader @@ -182,11 +182,11 @@ int main(int argc, char *argv[]) Info<< "Reading field epsilon\n" << endl; volScalarField epsilon(epsilonHeader, mesh); - scalar ck0 = ::pow(Cmu.value(), 0.25)*kappa.value(); + scalar ck0 = ::pow(Cmu, 0.25)*kappa; k = sqr(nut/(ck0*min(y, ybl))); k.correctBoundaryConditions(); - scalar ce0 = ::pow(Cmu.value(), 0.75)/kappa.value(); + scalar ce0 = ::pow(Cmu, 0.75)/kappa; epsilon = ce0*k*sqrt(k)/min(y, ybl); epsilon.correctBoundaryConditions(); diff --git a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options index 1d01ecc4c3..7a1f8e278d 100644 --- a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options +++ b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/Make/options @@ -9,5 +9,5 @@ EXE_LIBS = \ -lbasicThermophysicalModels \ -lspecie \ -lcompressibleRASModels \ - -lfiniteVolume - + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C index 166386c8e3..d9164987ff 100644 --- a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C +++ b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C @@ -43,12 +43,12 @@ Description #include "incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H" #include "incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H" -#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H" +#include "incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H" #include "incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H" #include "compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H" #include "compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H" -#include "compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H" +#include "compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H" #include "compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H" using namespace Foam; @@ -190,13 +190,12 @@ void replaceBoundaryType const_cast(IOdictionary::typeName) = oldTypeName; const_cast(dict.type()) = dict.headerClassName(); - // Make a backup of the old field - word backupName(dict.name() + ".old"); - Info<< " copying " << dict.name() << " to " - << backupName << endl; - IOdictionary dictOld = dict; - dictOld.rename(backupName); - dictOld.regIOobject::write(); + // Make a backup of the old file + if (mvBak(dict.objectPath(), "old")) + { + Info<< " Backup original file to " + << (dict.objectPath() + ".old") << endl; + } // Loop through boundary patches and update const polyBoundaryMesh& bMesh = mesh.boundaryMesh(); @@ -234,7 +233,7 @@ void updateCompressibleCase(const fvMesh& mesh) ( mesh, "mut", - compressible::RASModels::mutWallFunctionFvPatchScalarField::typeName, + compressible::RASModels::mutkWallFunctionFvPatchScalarField::typeName, "0" ); replaceBoundaryType @@ -286,7 +285,7 @@ void updateIncompressibleCase(const fvMesh& mesh) ( mesh, "nut", - incompressible::RASModels::nutWallFunctionFvPatchScalarField::typeName, + incompressible::RASModels::nutkWallFunctionFvPatchScalarField::typeName, "0" ); replaceBoundaryType diff --git a/applications/utilities/preProcessing/engineSwirl/Make/options b/applications/utilities/preProcessing/engineSwirl/Make/options index 725122ea1d..02fc4c17b1 100644 --- a/applications/utilities/preProcessing/engineSwirl/Make/options +++ b/applications/utilities/preProcessing/engineSwirl/Make/options @@ -1,4 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude -EXE_LIBS = -lfiniteVolume +EXE_LIBS = \ + -lfiniteVolume \ + -lgenericPatchFields + diff --git a/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C b/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C index d2e7981c68..9c96a9a4c2 100644 --- a/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C +++ b/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C @@ -84,11 +84,12 @@ int main(int argc, char *argv[]) } else { - mv - ( - solutionDict.objectPath(), - solutionDict.objectPath() + ".old" - ); + if (mvBak(solutionDict.objectPath(), "old")) + { + Info<< "Backup to " + << (solutionDict.objectPath() + ".old") << nl; + } + solutionDict.writeObject ( @@ -97,8 +98,8 @@ int main(int argc, char *argv[]) IOstream::UNCOMPRESSED ); - Info<< "Backup to " << (solutionDict.objectPath() + ".old") << nl - << "Write to " << solutionDict.objectPath() << nl << endl; + Info<< "Write to " + << solutionDict.objectPath() << nl << endl; } } diff --git a/applications/utilities/preProcessing/mapFields/Make/options b/applications/utilities/preProcessing/mapFields/Make/options index 148fd04d48..7bd964094e 100644 --- a/applications/utilities/preProcessing/mapFields/Make/options +++ b/applications/utilities/preProcessing/mapFields/Make/options @@ -8,4 +8,5 @@ EXE_LIBS = \ -lsampling \ -lmeshTools \ -llagrangian \ - -lfiniteVolume + -lfiniteVolume \ + -lgenericPatchFields diff --git a/applications/utilities/preProcessing/setFields/Make/options b/applications/utilities/preProcessing/setFields/Make/options index d27c95d033..06d42b6c3c 100644 --- a/applications/utilities/preProcessing/setFields/Make/options +++ b/applications/utilities/preProcessing/setFields/Make/options @@ -4,4 +4,5 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lgenericPatchFields \ -lmeshTools diff --git a/bin/foamCheckJobs b/bin/foamCheckJobs index a2696e1f80..8812c96466 100755 --- a/bin/foamCheckJobs +++ b/bin/foamCheckJobs @@ -38,7 +38,7 @@ # #------------------------------------------------------------------------------ -PROGNAME=${0##*/} +Script=${0##*/} #------------------------------------------------------------------------------- #- User settings @@ -48,9 +48,9 @@ NDAYSLIMIT=7 #------------------------------------------------------------------------------- #- work file -TMPFILE=/tmp/${PROGNAME}$$.tmp +TMPFILE=/tmp/${Script}$$.tmp #- work dir. Needs to be accessible for all machines -MACHDIR=$HOME/.OpenFOAM/${PROGNAME} +MACHDIR=$HOME/.OpenFOAM/${Script} DEFSTATEFILE=$HOME/.OpenFOAM/foamCheckJobs.out @@ -62,6 +62,29 @@ else fi +usage() { + cat< 13 dayDiff() { date -d "$1" > /dev/null 2>&1 - if [ $? -ne 0 ]; then + if [ $? -ne 0 ] + then #- option '-d' on date not supported. Give up. echo "0" else @@ -119,12 +144,14 @@ dayDiff() { # Also handles 'slaves' entries in jobInfo: # slaves 1 ( penfold.23766 ); getAllJobs() { - if notEmpty $1; then + if notEmpty $1 + then jobs=$1/* for f in $jobs do line=`grep '^[ ]*slaves' $f 2>/dev/null` - if [ $? -eq 0 ]; then + if [ $? -eq 0 ] + then slaveJobs=`echo "$line" | sed -e 's/.*(\(.*\)).*/\1/'` jobs="$jobs $slaveJobs" fi @@ -138,34 +165,12 @@ getAllJobs() { # releaseLock jobId lockFile # Releases lock on jobId releaseLock () { - if [ -f $2 ]; then + if [ -f $2 ] + then #- move lock to finishedJobs mv $2 $FOAM_JOB_DIR/finishedJobs/ fi - $ECHO "Lock on job $1 released." -} - - -printUsage() { -cat << LABEL -Usage: $PROGNAME [stateFile] - -This program checks all the locks in the license directory to see if -their processes are still running. Processes will not release their -lock if they exit abnormally. This program will try to obtain process -information on the machine the process ran on and release the lock -if the program is no longer running. - -Requirements: the environment variable FOAM_JOB_DIR needs to point to the -license directory and all machines have to be reachable using ssh. - -The output from checking all running jobs is collected in an optional -file. - -FILES: - \$FOAM_JOB_DIR/runningJobs locks for running processes - /finishedJobs ,, finished processes -LABEL + echo "Lock on job $1 released." } @@ -175,39 +180,50 @@ LABEL # #------------------------------------------------------------------------------- -#- Check a few things - -if [ ! "$FOAM_JOB_DIR" ]; then - $ECHO "$PROGNAME : FOAM_JOB_DIR environment variable not set." - $ECHO "This should point to your central license directory." - exit 1 -fi - -if [ ! -d "$FOAM_JOB_DIR" ]; then - $ECHO "$PROGNAME : The license directory accoring to FOAM_JOB_DIR is not valid." - $ECHO "FOAM_JOB_DIR: $FOAM_JOB_DIR" - exit 1 -fi -if [ ! -d "$FOAM_JOB_DIR/runningJobs" -o ! -d "$FOAM_JOB_DIR/finishedJobs" ]; then - $ECHO "$PROGNAME : The license directory according to FOAM_JOB_DIR is not valid." - $ECHO "FOAM_JOB_DIR: $FOAM_JOB_DIR" - exit 1 -fi - - -if [ $# -eq 1 ]; then - STATEFILE=$1 -elif [ $# -eq 0 ]; then +if [ $# -eq 1 ] +then + if [ "$1" = "-h" -o "$1" = "-help" ] + then + usage + fi + STATEFILE="$1" +elif [ $# -eq 0 ] +then STATEFILE=${STATEFILE:-$DEFSTATEFILE} else - printUsage + usage +fi + + +#- Check a few things + +if [ ! "$FOAM_JOB_DIR" ] +then + echo "$Script : FOAM_JOB_DIR environment variable not set." + echo exit 1 fi +if [ ! -d "$FOAM_JOB_DIR" ] +then + echo "$Script : directory does not exist." + echo " FOAM_JOB_DIR=$FOAM_JOB_DIR" + echo + exit 1 +fi +if [ ! -d "$FOAM_JOB_DIR/runningJobs" -o ! -d "$FOAM_JOB_DIR/finishedJobs" ] +then + echo "$Script : invalid directory." + echo " FOAM_JOB_DIR=$FOAM_JOB_DIR" + echo + exit 1 +fi + + + #- obtain rsh method RSH='ssh' echo "Using remote shell type : $RSH" - echo "" echo "Collecting information on jobs in" echo " $FOAM_JOB_DIR" @@ -226,13 +242,14 @@ do pid=`echo $machinePid | sed -e 's/.*\.\([0-9][0-9]*\)$/\1/'` fgrep "$machine" $TMPFILE >/dev/null 2>&1 - if [ $? -ne 0 ]; then - $ECHO "$machine" >> $TMPFILE + if [ $? -ne 0 ] + then + echo "$machine" >> $TMPFILE fi done -$ECHO "Found machines:" +echo "Found machines:" cat $TMPFILE -$ECHO "" +echo "" @@ -243,31 +260,34 @@ cnt=1 while true do machine=`sed -n -e "${cnt}p" $TMPFILE` - if [ ! "$machine" ]; then + if [ ! "$machine" ] + then break fi machFile=$MACHDIR/$machine rm -f $machFile - $ECHO "Contacting $machine to collect process information:" - if [ $machine = `hostname` ]; then - $ECHO " foamProcessInfo $machFile" + echo "Contacting $machine to collect process information:" + if [ $machine = `hostname` ] + then + echo " foamProcessInfo $machFile" foamProcessInfo $machFile >/dev/null 2>&1 else - $ECHO " $RSH $machine foamProcessInfo $machFile" + echo " $RSH $machine foamProcessInfo $machFile" $RSH $machine foamProcessInfo $machFile >/dev/null 2>&1 fi - if [ $? -ne 0 -o ! -s $machFile ]; then - $ECHO "** Failed collecting process information on $machine." - $ECHO "Check $machFile and run foamProcessInfo by hand" + if [ $? -ne 0 -o ! -s $machFile ] + then + echo "** Failed collecting process information on $machine." + echo "Check $machFile and run foamProcessInfo by hand" rm -f $machFile else - $ECHO "Succesfully collected information in $machFile ..." + echo "Succesfully collected information in $machFile ..." fi cnt=`expr $cnt + 1` done -$ECHO "" +echo "" #- Construct state for runningJobs; move non runnning jobs to finishedJobs @@ -281,27 +301,32 @@ do pid=`echo $machinePid | sed -e 's/.*\.\([0-9][0-9]*\)$/\1/'` machFile=$MACHDIR/$machine - if [ -r $machFile ]; then + if [ -r $machFile ] + then entry=`grep "^$pid " $machFile 2>/dev/null` - if [ $? -ne 0 -o ! "$entry" ]; then - if [ "$releaseAll" ]; then + if [ $? -ne 0 -o ! "$entry" ] + then + if [ "$releaseAll" ] + then releaseLock $machinePid $f else - $ECHO "Job $machinePid seems to be no longer running. Release lock? (y/a)\c" + echo "Job $machinePid seems to be no longer running. Release lock? (y/a)\c" read answ - if [ "${answ:-y}" = 'y' ]; then + if [ "${answ:-y}" = 'y' ] + then releaseLock $machinePid $f - elif [ "${answ:-y}" = 'a' ]; then + elif [ "${answ:-y}" = 'a' ] + then releaseAll='yes' releaseLock $machinePid $f else state='OTHR' - $ECHO "$machinePid $state" >> $STATEFILE + echo "$machinePid $state" >> $STATEFILE fi fi else state=`echo "$entry" | awk '{print $2}'` - $ECHO "$machinePid $state" >> $STATEFILE + echo "$machinePid $state" >> $STATEFILE fi fi done @@ -314,29 +339,33 @@ OLDFILES=`find $FOAM_JOB_DIR/finishedJobs -mtime +$NDAYSLIMIT -print` #- Construct state for finishedJobs and check on date of files. -if notEmpty $FOAM_JOB_DIR/finishedJobs; then +if notEmpty $FOAM_JOB_DIR/finishedJobs +then dateNow=`date '+%b %d %Y'` for f in $FOAM_JOB_DIR/finishedJobs/* do sz=`ls -s $f | awk '{print $1}'` - if [ "$sz" -gt 0 ]; then + if [ "$sz" -gt 0 ] + then machinePid=`basename $f` machine=`echo $machinePid | sed -e 's/\.[0-9][0-9]*$//'` pid=`echo $machinePid | sed -e 's/.*\.\([0-9][0-9]*\)$/\1/'` end=`getEntry $f endDate` - if [ ! "$end" ]; then + if [ ! "$end" ] + then state='ABRT' else nDaysOld=`dayDiff "$dateNow" "$end"` - if [ "$nDaysOld" -gt $NDAYSLIMIT ]; then + if [ "$nDaysOld" -gt $NDAYSLIMIT ] + then OLDFILES="$OLDFILES $f" fi state='FINI' fi - $ECHO "$machinePid $state" >> $STATEFILE + echo "$machinePid $state" >> $STATEFILE fi done fi @@ -345,11 +374,13 @@ fi #- Remove old locks nOldFiles=`echo "$OLDFILES" | wc -w` -if [ "$nOldFiles" -gt 0 ]; then - $ECHO "You seem to have $nOldFiles locks older than $NDAYSLIMIT days in finishedJobs/" +if [ "$nOldFiles" -gt 0 ] +then + echo "You seem to have $nOldFiles locks older than $NDAYSLIMIT days in finishedJobs/" $ECHO "Do you want to remove these? (y)\c" read answ - if [ "${answ:-y}" = 'y' ]; then + if [ "${answ:-y}" = 'y' ] + then rm -f $OLDFILES fi fi @@ -358,9 +389,9 @@ fi rm -f $TMPFILE rm -r $MACHDIR -$ECHO "" -$ECHO "Updated stateFile:" -$ECHO " $STATEFILE" -$ECHO "" +echo "" +echo "Updated stateFile:" +echo " $STATEFILE" +echo "" #------------------------------------------------------------------------------ diff --git a/bin/foamCleanPath b/bin/foamCleanPath index dca96f490e..225aa0e943 100755 --- a/bin/foamCleanPath +++ b/bin/foamCleanPath @@ -32,35 +32,48 @@ # Prints its argument (which should be a ':' separated path) # without all # - duplicate elements -# - (if '-strip') non-accessible directories # - elements whose start matches a wildcard +# - inaccessible directories (with the -strip option) # # Note: # - this routine will fail when directories have embedded spaces # - false matches possible if a wildcard contains '.' (sed regex) #------------------------------------------------------------------------------ -if [ "$#" -lt 1 -o "$1" = "-h" -o "$1" = "-help" ] -then - cat <&2 -Usage: ${0##*/} [-strip] path [wildcard] .. [wildcard] +usage() { + cat <&2 +usage: ${0##*/} [-strip] path [wildcard] .. [wildcard] + + Prints its argument (which should be a ':' separated list) cleansed from + - duplicate elements + - elements whose start matches one of the wildcard(s) + - inaccessible directories (with the -strip option) - Prints its argument (which should be a ':' separated list) cleansed from - - duplicate elements - - elements whose start matches one of the wildcard(s) - - (if '-strip') non-accessible directories USAGE - exit 1 -fi + exit 1 +} -strip='' -if [ "$1" = "-strip" ] -then - strip=true - shift -fi +unset strip +# parse options +while [ "$#" -gt 0 ] +do + case "$1" in + -h | -help) + usage + ;; + -strip) + strip=true + shift + ;; + *) + break + ;; + esac +done +[ "$#" -ge 1 ] || usage + dirList="$1" shift @@ -79,7 +92,7 @@ do wildcard=$1 shift ##DEBUG echo "remove>$wildcard<" 1>&2 - dirList=`echo "$dirList" | sed -e "s@${wildcard}[^:]*:@@g"` + dirList=$(echo "$dirList" | sed -e "s@${wildcard}[^:]*:@@g") done # split on ':' (and on space as well to avoid any surprises) @@ -97,13 +110,13 @@ do if [ -e "$dir" ] then #- no duplicate dirs - duplicate=`echo " $dirList " | sed -ne "s@ $dir @DUP@p"` + duplicate=$(echo " $dirList " | sed -ne "s@ $dir @DUP@p") if [ ! "$duplicate" ] then dirList="$dirList $dir" fi - elif [ "$strip" != "true" ] + elif [ "$strip" != true ] then # Print non-existing directories if not in 'strip' mode. dirList="$dirList $dir" diff --git a/bin/foamGraphExecTime b/bin/foamGraphExecTime index 2b1be274b0..3dc2fa2c70 100755 --- a/bin/foamGraphExecTime +++ b/bin/foamGraphExecTime @@ -29,6 +29,10 @@ # Description # #------------------------------------------------------------------------------ +if (! -f "$1" ) then + echo "No file: '$1'" + exit 1 +endif set tmpTime = newTime$$.dat cat $1 | grep "ExecutionTime = " | awk 'BEGIN { NENTRIES = 0 ; TPREV = 0.0 }{NENTRIES++; printf("%f %e\n", NENTRIES, $3 - TPREV); TPREV = $3}' - > $tmpTime diff --git a/bin/foamGraphResKE b/bin/foamGraphResKE index ae9d713ef2..d00798f507 100755 --- a/bin/foamGraphResKE +++ b/bin/foamGraphResKE @@ -29,6 +29,10 @@ # Description # #------------------------------------------------------------------------------ +if (! -f "$1" ) then + echo "No file: '$1'" + exit 1 +endif set tmpK = newK$$.dat cat $1 | grep "Solving for k" | grep -v "solution singularity" | sed s/,//g | awk 'BEGIN { NENTRIES = 0 }{NENTRIES++; printf("%f %e\n", NENTRIES, $8)}' - > $tmpK diff --git a/bin/foamGraphResUVWP b/bin/foamGraphResUVWP index 036cf47b5a..1b34258fcf 100755 --- a/bin/foamGraphResUVWP +++ b/bin/foamGraphResUVWP @@ -29,6 +29,10 @@ # Description # #------------------------------------------------------------------------------ +if (! -f "$1" ) then + echo "No file: '$1'" + exit 1 +endif set tmpU = newU$$.dat cat $1 | grep "Solving for Ux" | grep -v "solution singularity" | sed s/,//g | awk 'BEGIN { NENTRIES = 0 }{NENTRIES++; printf("%d %e\n", NENTRIES, $8)}' - > $tmpU diff --git a/bin/foamLog b/bin/foamLog index a82410da4d..7490978c6e 100755 --- a/bin/foamLog +++ b/bin/foamLog @@ -35,17 +35,11 @@ PROGDIR=`dirname $0` PROGNAME=`basename $0` - -if [ -r $HOME/.${PROGNAME}.db ]; then - DBFILE=$HOME/.${PROGNAME}.db -else - DBFILE=$PROGDIR/$PROGNAME.db -fi - +DBFILE=${PROGNAME}.db printUsage() { -cat < extracts xy files from log @@ -54,39 +48,46 @@ Usage: $PROGNAME [-n][-s] $PROGNAME -h for a help message -LABUSAGE +USAGE } printHelp() { printUsage cat <_, for every specified, for every -occurrence inside a time step. +The program will generate and run an awk script which writes a set of files, +logs/_, for every specified, for every occurrence inside +a time step. -For variables that are 'Solved for' the initial residual name will -be , the final residual will get name FinalRes, +For variables that are 'Solved for', the initial residual name will be +, the final residual receive the name FinalRes, The files are a simple xy format with the first column Time (default) and the second the extracted values. Option -n creates single column files with the extracted data only. -The query database is a simple text format with three entries per line, -separated with '/'. Column 1 is the name of the variable (cannot contain -spaces), column 2 is the extended regular expression (egrep) to select -the line and column 3 is the string (fgrep) to select the column inside the -line. The value taken will be the first (non-space)word after this -column. The database will either be \$HOME/.${PROGNAME}.db or if not -found $PROGDIR/${PROGNAME}.db. +The query database is a simple text format with three entries per line, +separated with '/' : + Column 1 is the name of the variable (cannot contain spaces). + Column 2 is the extended regular expression (egrep) to select the line. + Column 3 is the string (fgrep) to select the column inside the line. +The value taken will be the first (non-space)word after this column. +The database ($PROGNAME.db) will taken from these locations: + + $HOME/.OpenFOAM/$WM_PROJECT_VERSION + $HOME/.OpenFOAM + $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION + $WM_PROJECT_INST_DIR/site + $WM_PROJECT_DIR/etc + $PROGDIR/tools Option -s suppresses the default information and only prints the extracted variables. @@ -95,9 +96,28 @@ LABHELP } +# The various places to be searched: +for i in \ + $HOME/.OpenFOAM/$WM_PROJECT_VERSION \ + $HOME/.OpenFOAM \ + $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION \ + $WM_PROJECT_INST_DIR/site \ + $WM_PROJECT_DIR/etc \ + $PROGDIR/tools \ + ; +do + if [ -r $i/$DBFILE ] + then + DBFILE="$i/$DBFILE" + break + fi +done + + myEcho() { - if [ "$VERBOSE" ]; then + if [ "$VERBOSE" ] + then echo "$*" fi } @@ -112,7 +132,8 @@ getSolvedVars() { # getQueries dbFile queryName # Gets regular expressions for a certain queryName from the database getQueries() { - if [ ! -f "$1" ]; then + if [ ! -f "$1" ] + then echo "Cannot find dbFile $1" exit 1 fi @@ -123,7 +144,8 @@ getQueries() { NUMQ=`grep -v '^#' $1 | awk -F '/' "/$queryName/ {if (\"$queryName\" "'!= $1) next; print $3}'` #echo "For $queryName found line selection /$LINEQ/ , column selection /$NUMQ/" 1>&2 - #if [ ! "$LINEQ" -o ! "$NUMQ" ]; then + #if [ ! "$LINEQ" -o ! "$NUMQ" ] + #then # echo "Did not find query for $2 in database $1" 1>&2 #fi } @@ -164,9 +186,11 @@ getAllQueries() { do getQueries $1 "$var" line=`egrep "$LINEQ" $2` - if [ "$line" ]; then + if [ "$line" ] + then column=`echo "$line" | fgrep "$NUMQ"` - if [ "$column" ]; then + if [ "$column" ] + then queries="$queries $var" fi fi @@ -190,18 +214,23 @@ LISTONLY='' while getopts nslh flags do case $flags in - n) TIMENAME="" - ;; - h) printHelp - exit 0 - ;; - s) VERBOSE="" - ;; - l) LISTONLY='yes' - ;; - \?) printUsage - exit 1 - ;; + n) + TIMENAME="" + ;; + h) + printHelp + exit 0 + ;; + s) + VERBOSE="" + ;; + l) + LISTONLY='yes' + ;; + \?) + printUsage + exit 1 + ;; esac done @@ -209,18 +238,22 @@ done # Shift options shift `expr $OPTIND - 1` -if [ ! -f $DBFILE ]; then +if [ ! -f $DBFILE ] +then echo "$PROGNAME: Cannot read database $DBFILE" exit 1 fi -if [ "$LISTONLY" ]; then - if [ $# -ne 1 ]; then +if [ "$LISTONLY" ] +then + if [ $# -ne 1 ] + then printUsage exit 1 fi LOG=$1; - if [ ! -r $LOG ]; then + if [ ! -r $LOG ] + then echo "$PROGNAME: Cannot read log $LOG" exit 1 fi @@ -228,14 +261,16 @@ if [ "$LISTONLY" ]; then exit 0 fi -if [ $# -ne 1 ]; then +if [ $# -ne 1 ] +then printUsage exit 1 fi CASEDIR=. LOG=$1 -if [ ! -r $LOG ]; then +if [ ! -r $LOG ] +then echo "$PROGNAME: Cannot read log $LOG" exit 1 fi @@ -243,17 +278,20 @@ fi QUERYNAMES=`getAllQueries $DBFILE $LOG` -if [ ! "$CASEDIR" ]; then +if [ ! "$CASEDIR" ] +then printUsage exit 1 fi -if [ ! -d "$CASEDIR" ]; then +if [ ! -d "$CASEDIR" ] +then echo "$PROGNAME: Cannot read $CASEDIR" exit 1 fi -if [ ! -f "$LOG" ]; then +if [ ! -f "$LOG" ] +then echo "$PROGNAME: Cannot read log file $LOG" exit 1 fi @@ -361,19 +399,19 @@ cat <> $AWKFILE varName=varNameVal[1] file=varName "_" subIter[varName]++ - file="$CASEDIR/logs/" file + file="$CASEDIR/logs/" file extract(\$0, "Initial residual = ", val) print $TIMENAME "\t" val[1] > file varName=varNameVal[1] "FinalRes" file=varName "_" subIter[varName]++ - file="$CASEDIR/logs/" file + file="$CASEDIR/logs/" file extract(\$0, "Final residual = ", val) print $TIMENAME "\t" val[1] > file varName=varNameVal[1] "Iters" file=varName "_" subIter[varName]++ - file="$CASEDIR/logs/" file + file="$CASEDIR/logs/" file extract(\$0, "No Iterations ", val) print $TIMENAME "\t" val[1] > file } @@ -384,7 +422,8 @@ LABSOLVE for queryName in $QUERYNAMES do getQueries $DBFILE $queryName - if [ "$LINEQ" -a "$NUMQ" ]; then + if [ "$LINEQ" -a "$NUMQ" ] + then counter=${queryName}Cnt echo "#-- Extraction of $queryName" >> $AWKFILE diff --git a/bin/foamNew b/bin/foamNew index 6ef67f7387..d1b31693b9 100755 --- a/bin/foamNew +++ b/bin/foamNew @@ -33,7 +33,6 @@ usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< {args} * create a new standard OpenFOAM source or template file @@ -44,22 +43,18 @@ USAGE exit 1 } -if [ "$#" -lt 2 ] -then - usage "wrong number of arguments, expected 2 (or more)" -fi + +# this implicitly covers a lone -help, but let other scripts handle the rest +[ "$#" -gt 1 ] || usage case "$1" in --h | -help) - usage - ;; source) shift - $WM_PROJECT_DIR/bin/foamTemplates/source/newSource $* + $WM_PROJECT_DIR/bin/templates/source/foamNewSource $* ;; template) shift - $WM_PROJECT_DIR/bin/foamTemplates/sourceTemplate/newSourceTemplate $* + $WM_PROJECT_DIR/bin/templates/sourceTemplate/foamNewTemplate $* ;; *) usage "unknown type" diff --git a/bin/foamNewSource b/bin/foamNewSource new file mode 120000 index 0000000000..1195efa3f3 --- /dev/null +++ b/bin/foamNewSource @@ -0,0 +1 @@ +templates/source/foamNewSource \ No newline at end of file diff --git a/bin/foamNewTemplate b/bin/foamNewTemplate new file mode 120000 index 0000000000..daefeb4929 --- /dev/null +++ b/bin/foamNewTemplate @@ -0,0 +1 @@ +templates/sourceTemplate/foamNewTemplate \ No newline at end of file diff --git a/bin/foamPrintJobs b/bin/foamPrintJobs index 2b2ca15938..a2851f2902 100755 --- a/bin/foamPrintJobs +++ b/bin/foamPrintJobs @@ -30,10 +30,8 @@ # Uses finishedJobs/ and runningJobs/ and stateFile to print job info # #------------------------------------------------------------------------------ +Script=${0##*/} -PROGNAME=`basename $0` -TMPFILE=/tmp/${PROGNAME}$$.tmp -TMPFILE2=/tmp/${PROGNAME}$$.tmp2 JOBSTRING='%4s %8s %20s %10s %8s %4s %12s %12s %20s\n' DEFSTATEFILE=$HOME/.OpenFOAM/foamCheckJobs.out @@ -44,18 +42,19 @@ DEFSTATEFILE=$HOME/.OpenFOAM/foamCheckJobs.out # #------------------------------------------------------------------------------- -printUsage() { -cat << LABEL -Usage: $PROGNAME [stateFile] +usage() { + cat< Foam::className::New() +Foam::autoPtr Foam::CLASSNAME::New() { - return autoPtr(new className); + return autoPtr(new CLASSNAME); } // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::className::~className() +Foam::CLASSNAME::~CLASSNAME() {} @@ -82,12 +82,12 @@ Foam::className::~className() // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // -void Foam::className::operator=(const className& rhs) +void Foam::CLASSNAME::operator=(const CLASSNAME& rhs) { // Check for assignment to self if (this == &rhs) { - FatalErrorIn("Foam::className::operator=(const Foam::className&)") + FatalErrorIn("Foam::CLASSNAME::operator=(const Foam::CLASSNAME&)") << "Attempted assignment to self" << abort(FatalError); } diff --git a/bin/foamTemplates/source/foamTemplate.H b/bin/templates/source/_Template.H similarity index 79% rename from bin/foamTemplates/source/foamTemplate.H rename to bin/templates/source/_Template.H index e0b6cf2157..b86edcbde9 100644 --- a/bin/foamTemplates/source/foamTemplate.H +++ b/bin/templates/source/_Template.H @@ -23,19 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::className + Foam::CLASSNAME Description SourceFiles - classNameI.H - className.C - classNameIO.C + CLASSNAMEI.H + CLASSNAME.C + CLASSNAMEIO.C \*---------------------------------------------------------------------------*/ -#ifndef className_H -#define className_H +#ifndef CLASSNAME_H +#define CLASSNAME_H #include ".H" @@ -49,16 +49,16 @@ class Istream; class Ostream; // Forward declaration of friend functions and operators -class className; -Istream& operator>>(Istream&, className&); -Ostream& operator<<(Ostream&, const className&); +class CLASSNAME; +Istream& operator>>(Istream&, CLASSNAME&); +Ostream& operator<<(Ostream&, const CLASSNAME&); /*---------------------------------------------------------------------------*\ - Class className Declaration + Class CLASSNAME Declaration \*---------------------------------------------------------------------------*/ -class className +class CLASSNAME : public baseClassName { @@ -71,10 +71,10 @@ class className // Private Member Functions //- Disallow default bitwise copy construct - className(const className&); + CLASSNAME(const CLASSNAME&); //- Disallow default bitwise assignment - void operator=(const className&); + void operator=(const CLASSNAME&); public: @@ -88,26 +88,26 @@ public: // Constructors //- Construct null - className(); + CLASSNAME(); //- Construct from components - className(const dataType& data); + CLASSNAME(const dataType& data); //- Construct from Istream - className(Istream&); + CLASSNAME(Istream&); //- Construct as copy - className(const className&); + CLASSNAME(const CLASSNAME&); // Selectors //- Select null constructed - static autoPtr New(); + static autoPtr New(); //- Destructor - ~className(); + ~CLASSNAME(); // Member Functions @@ -123,7 +123,7 @@ public: // Member Operators - void operator=(const className&); + void operator=(const CLASSNAME&); // Friend Functions @@ -132,8 +132,8 @@ public: // IOstream Operators - friend Istream& operator>>(Istream&, className&); - friend Ostream& operator<<(Ostream&, const className&); + friend Istream& operator>>(Istream&, CLASSNAME&); + friend Ostream& operator<<(Ostream&, const CLASSNAME&); }; @@ -143,7 +143,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "classNameI.H" +#include "CLASSNAMEI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/bin/foamTemplates/source/foamAppTemplate.C b/bin/templates/source/_TemplateApp.C similarity index 99% rename from bin/foamTemplates/source/foamAppTemplate.C rename to bin/templates/source/_TemplateApp.C index 46c089c1a8..7ce97539e6 100644 --- a/bin/foamTemplates/source/foamAppTemplate.C +++ b/bin/templates/source/_TemplateApp.C @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - className + CLASSNAME Description diff --git a/bin/foamTemplates/source/foamTemplateI.H b/bin/templates/source/_TemplateI.H similarity index 100% rename from bin/foamTemplates/source/foamTemplateI.H rename to bin/templates/source/_TemplateI.H diff --git a/bin/foamTemplates/source/foamTemplateIO.C b/bin/templates/source/_TemplateIO.C similarity index 83% rename from bin/foamTemplates/source/foamTemplateIO.C rename to bin/templates/source/_TemplateIO.C index d9119ed354..c6d595100a 100644 --- a/bin/foamTemplates/source/foamTemplateIO.C +++ b/bin/templates/source/_TemplateIO.C @@ -24,12 +24,12 @@ License \*---------------------------------------------------------------------------*/ -#include "className.H" +#include "CLASSNAME.H" #include "IOstreams.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::className::className(Istream& is) +Foam::CLASSNAME::CLASSNAME(Istream& is) : base1(is), base2(is), @@ -37,31 +37,31 @@ Foam::className::className(Istream& is) member2(is) { // Check state of Istream - is.check("Foam::className::className(Foam::Istream&)"); + is.check("Foam::CLASSNAME::CLASSNAME(Foam::Istream&)"); } // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -Foam::Istream& Foam::operator>>(Istream& is, className&) +Foam::Istream& Foam::operator>>(Istream& is, CLASSNAME&) { // Check state of Istream is.check ( - "Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::className&)" + "Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::CLASSNAME&)" ); return is; } -Foam::Ostream& Foam::operator<<(Ostream& os, const className&) +Foam::Ostream& Foam::operator<<(Ostream& os, const CLASSNAME&) { // Check state of Ostream os.check ( "Foam::Ostream& Foam::operator<<(Foam::Ostream&, " - "const Foam::className&)" + "const Foam::CLASSNAME&)" ); return os; diff --git a/bin/foamTemplates/source/newSource b/bin/templates/source/foamNewSource similarity index 69% rename from bin/foamTemplates/source/newSource rename to bin/templates/source/foamNewSource index 927ad36b31..ec1ad7b2e1 100755 --- a/bin/foamTemplates/source/newSource +++ b/bin/templates/source/foamNewSource @@ -24,18 +24,18 @@ # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # Script -# foamNew +# foamNewSource # # Description # Create a new standard OpenFOAM source file # #------------------------------------------------------------------------------ Script=${0##*/} +Template="$WM_PROJECT_DIR/bin/templates/source/_Template" usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< * create a new standard OpenFOAM source file @@ -46,49 +46,56 @@ USAGE exit 1 } -if [ "$#" -ne 2 ]; then - usage "wrong number of arguments, expected 2" -fi -unset suffix fileType +# this implicitly covers a lone -help +[ "$#" -gt 1 ] || usage + +className="$2" +unset subType Type + case "$1" in +-h | -help) + usage + ;; C|H) - template=foamTemplate - fileType=$1 - ;; + Type=".$1" + ;; I) - suffix=$1 - template=foamTemplateI - fileType=H - ;; + Type="$1.H" + ;; IO) - suffix=$1 - template=foamTemplateIO - fileType=C - ;; + Type="$1.C" + ;; app|App) - template=foamAppTemplate - fileType=C - if [ ! -d Make ]; then - echo "foamNew: Creating Make/files and Make/options" - wmakeFilesAndOptions - fi - ;; + subType=App + Type=".C" + ;; *) - usage "unknown type" - ;; + usage "unknown type" + ;; esac +[ "$#" -eq 2 ] || usage "wrong number of arguments" +shift 2 -fileName=$2$suffix.$fileType +fileName="$className$Type" -if [ -e "$fileName" ]; then - echo "Cannot make $fileName, file exists" - exit 1 + +echo "$Script: Creating new interface file $fileName" +if [ -e "$fileName" ] +then + echo " Error: file exists" + exit 1 fi -echo $Script: Creating new interface file $fileName -sed s/className/$2/g \ - $WM_PROJECT_DIR/bin/foamTemplates/source/$template.$fileType > $fileName + +# process class name +sed "s/CLASSNAME/$className/g" $Template$subType$Type > $fileName + + +if [ "$subType" = App -a ! -d Make ] +then + wmakeFilesAndOptions +fi #------------------------------------------------------------------------------ diff --git a/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.C b/bin/templates/sourceTemplate/_TemplateTemplate.C similarity index 78% rename from bin/foamTemplates/sourceTemplate/foamTemplateTemplate.C rename to bin/templates/sourceTemplate/_TemplateTemplate.C index 5acafb25e7..c73d5043a1 100644 --- a/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.C +++ b/bin/templates/sourceTemplate/_TemplateTemplate.C @@ -24,12 +24,12 @@ License \*---------------------------------------------------------------------------*/ -#include "ClassName.H" +#include "CLASSNAME.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // template -const dataType Foam::ClassName::staticData(); +const dataType Foam::CLASSNAME::staticData(); // * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * // @@ -38,7 +38,7 @@ const dataType Foam::ClassName::staticData(); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::ClassName::ClassName() +Foam::CLASSNAME::CLASSNAME() : baseClassName(), data_() @@ -46,7 +46,7 @@ Foam::ClassName::ClassName() template -Foam::ClassName::ClassName(const dataType& data) +Foam::CLASSNAME::CLASSNAME(const dataType& data) : baseClassName(), data_(data) @@ -54,12 +54,12 @@ Foam::ClassName::ClassName(const dataType& data) template -Foam::ClassName::ClassName +Foam::CLASSNAME::CLASSNAME ( - const ClassName& + const CLASSNAME& ) : - baseClassName(), + baseCLASSNAME(), data_() {} @@ -67,12 +67,12 @@ Foam::ClassName::ClassName // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // template -Foam::autoPtr > -Foam::ClassName::New() +Foam::autoPtr > +Foam::CLASSNAME::New() { - return autoPtr > + return autoPtr > ( - new ClassName + new CLASSNAME ); } @@ -80,7 +80,7 @@ Foam::ClassName::New() // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template -Foam::ClassName::~ClassName() +Foam::CLASSNAME::~CLASSNAME() {} @@ -96,9 +96,9 @@ Foam::ClassName::~ClassName() // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // template -void Foam::ClassName::operator= +void Foam::CLASSNAME::operator= ( - const ClassName& rhs + const CLASSNAME& rhs ) { // Check for assignment to self @@ -106,8 +106,8 @@ void Foam::ClassName::operator= { FatalErrorIn ( - "Foam::ClassName::operator=" - "(const Foam::ClassName&)" + "Foam::CLASSNAME::operator=" + "(const Foam::CLASSNAME&)" ) << "Attempted assignment to self" << abort(FatalError); } diff --git a/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.H b/bin/templates/sourceTemplate/_TemplateTemplate.H similarity index 77% rename from bin/foamTemplates/sourceTemplate/foamTemplateTemplate.H rename to bin/templates/sourceTemplate/_TemplateTemplate.H index 76bdd55860..6e24ddda2a 100644 --- a/bin/foamTemplates/sourceTemplate/foamTemplateTemplate.H +++ b/bin/templates/sourceTemplate/_TemplateTemplate.H @@ -23,19 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::ClassName + Foam::CLASSNAME Description SourceFiles - ClassNameI.H - ClassName.C - ClassNameIO.C + CLASSNAMEI.H + CLASSNAME.C + CLASSNAMEIO.C \*---------------------------------------------------------------------------*/ -#ifndef ClassName_H -#define ClassName_H +#ifndef CLASSNAME_H +#define CLASSNAME_H #include ".H" @@ -51,21 +51,21 @@ class someClass; // Forward declaration of friend functions and operators template -class ClassName; +class CLASSNAME; template -Istream& operator>>(Istream&, ClassName&); +Istream& operator>>(Istream&, CLASSNAME&); template -Ostream& operator<<(Ostream&, const ClassName&); +Ostream& operator<<(Ostream&, const CLASSNAME&); /*---------------------------------------------------------------------------*\ - Class ClassName Declaration + Class CLASSNAME Declaration \*---------------------------------------------------------------------------*/ template -class ClassName +class CLASSNAME : public baseClassName { @@ -77,10 +77,10 @@ class ClassName // Private Member Functions //- Disallow default bitwise copy construct - ClassName(const ClassName&); + CLASSNAME(const CLASSNAME&); //- Disallow default bitwise assignment - void operator=(const ClassName&); + void operator=(const CLASSNAME&); public: @@ -94,33 +94,33 @@ public: // Constructors //- Construct null - ClassName(); + CLASSNAME(); //- Construct from components - ClassName(const dataType& data); + CLASSNAME(const dataType& data); //- Construct from Istream - ClassName(Istream&); + CLASSNAME(Istream&); //- Construct as copy - ClassName(const ClassName&); + CLASSNAME(const CLASSNAME&); // Selectors //- Select null constructed - static autoPtr > New(); + static autoPtr > New(); //- Destructor - ~ClassName(); + ~CLASSNAME(); // Member Functions // Member Operators - void operator=(const ClassName&); + void operator=(const CLASSNAME&); // Friend Functions @@ -130,10 +130,10 @@ public: // IOstream Operators friend Istream& operator>> - (Istream&, ClassName&); + (Istream&, CLASSNAME&); friend Ostream& operator<< - (Ostream&, const ClassName&); + (Ostream&, const CLASSNAME&); }; @@ -143,12 +143,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "ClassNameI.H" +#include "CLASSNAMEI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "ClassName.C" +# include "CLASSNAME.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/bin/foamTemplates/sourceTemplate/foamTemplateTemplateI.H b/bin/templates/sourceTemplate/_TemplateTemplateI.H similarity index 100% rename from bin/foamTemplates/sourceTemplate/foamTemplateTemplateI.H rename to bin/templates/sourceTemplate/_TemplateTemplateI.H diff --git a/bin/foamTemplates/sourceTemplate/foamTemplateTemplateIO.C b/bin/templates/sourceTemplate/_TemplateTemplateIO.C similarity index 85% rename from bin/foamTemplates/sourceTemplate/foamTemplateTemplateIO.C rename to bin/templates/sourceTemplate/_TemplateTemplateIO.C index 1c805f6f6a..9453630b68 100644 --- a/bin/foamTemplates/sourceTemplate/foamTemplateTemplateIO.C +++ b/bin/templates/sourceTemplate/_TemplateTemplateIO.C @@ -24,13 +24,13 @@ License \*---------------------------------------------------------------------------*/ -#include "ClassName.H" +#include "CLASSNAME.H" #include "IOstreams.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::ClassName::ClassName(Istream& is) +Foam::CLASSNAME::CLASSNAME(Istream& is) : base1(is), base2(is), @@ -38,7 +38,7 @@ Foam::ClassName::ClassName(Istream& is) member2(is) { // Check state of Istream - is.check("Foam::ClassName::ClassName(Foam::Istream&)"); + is.check("Foam::CLASSNAME::CLASSNAME(Foam::Istream&)"); } @@ -48,14 +48,14 @@ template Foam::Istream& Foam::operator>> ( Istream& is, - ClassName& + CLASSNAME& ) { // Check state of Istream is.check ( "Foam::Istream& Foam::operator>>" - "(Foam::Istream&, Foam::ClassName&)" + "(Foam::Istream&, Foam::CLASSNAME&)" ); return is; @@ -66,14 +66,14 @@ template Foam::Ostream& Foam::operator<< ( Ostream& os, - const ClassName& + const CLASSNAME& ) { // Check state of Ostream os.check ( "Foam::Ostream& Foam::operator<<" - "(Ostream&, const ClassName&)" + "(Ostream&, const CLASSNAME&)" ); return os; diff --git a/bin/foamTemplates/sourceTemplate/newSourceTemplate b/bin/templates/sourceTemplate/foamNewTemplate similarity index 74% rename from bin/foamTemplates/sourceTemplate/newSourceTemplate rename to bin/templates/sourceTemplate/foamNewTemplate index b62a7f4c0e..edf4fd3bce 100755 --- a/bin/foamTemplates/sourceTemplate/newSourceTemplate +++ b/bin/templates/sourceTemplate/foamNewTemplate @@ -24,13 +24,14 @@ # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # Script -# newSourceTemplate +# foamNewTemplate # # Description # Create a new standard OpenFOAM templated source file # #------------------------------------------------------------------------------ Script=${0##*/} +Template="$WM_PROJECT_DIR/bin/templates/sourceTemplate/_TemplateTemplate" usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done @@ -46,51 +47,50 @@ USAGE exit 1 } -if [ "$#" -le 2 ]; then - usage "wrong number of arguments, expected 3 (or more)" -fi +# this implicitly covers a lone -help +[ "$#" -gt 1 ] || usage + + +className="$2" +unset Type -unset suffix fileType case "$1" in +-h | -help) + usage + ;; C|H) - Template=Template - fileType=$1 - className=$2 - ;; + Type=".$1" + ;; I) - suffix=$1 - Template=TemplateI - fileType=H - className=$2 - ;; + Type="$1.H" + ;; IO) - suffix=$1 - Template=TemplateIO - fileType=C - className=$2 - ;; + Type="$1.C" + ;; *) - usage "unknown type" - ;; + usage "unknown type" + ;; esac +[ "$#" -ge 3 ] || usage "wrong number of arguments" +shift 2 + +fileName="$className$Type" -fileName=$className$suffix.$fileType - -if [ -e "$fileName" ]; then - echo "Cannot make $fileName, file exists" - exit 1 +echo "$Script: Creating new template interface file $fileName" +if [ -e "$fileName" ] +then + echo " Error: file exists" + exit 1 fi -shift 2 -echo "$Script: Creating new interface file $fileName" # process class name -sed -e "s/ClassName/$className/g" \ - $WM_PROJECT_DIR/bin/foamTemplates/sourceTemplate/foamTemplate$Template.$fileType > $fileName.1 +sed -e "s/CLASSNAME/$className/g" $Template$Type > $fileName.1 + # process template arguments -for tArg in $* +for tArg do sed -e "s/TemplateClassArgument/class $tArg, TemplateClassArgument/g" \ -e "s/TemplateArgument/$tArg, TemplateArgument/g" \ @@ -99,7 +99,8 @@ do mv $fileName.2 $fileName.1 done -# remove remaining ", Template argument" + +# remove remaining ", Template .." sed -e "s/, TemplateClassArgument//g" \ -e "s/, TemplateArgument//g" \ $fileName.1 > $fileName diff --git a/bin/foamLog.db b/bin/tools/foamLog.db similarity index 100% rename from bin/foamLog.db rename to bin/tools/foamLog.db diff --git a/etc/controlDict b/etc/controlDict index a76ef3c335..c1d7416515 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -366,7 +366,6 @@ DebugSwitches directMappedVelocityFlux 0; directionMixed 0; directional 0; - disallowDefaultFvsPatchField 0; disallowGenericFvPatchField 0; disallowGenericPointPatchField 0; disallowGenericPolyPatch 0; diff --git a/etc/settings.csh b/etc/settings.csh index 4370744be4..ad327c5e57 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -89,6 +89,11 @@ case OpenFOAM: _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib breaksw + case Gcc44: + setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH + _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib + _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib + breaksw case Gcc43: setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib diff --git a/etc/settings.sh b/etc/settings.sh index 9d39e1eb86..074a21bb17 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -105,6 +105,11 @@ OpenFOAM) _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib ;; + Gcc44) + export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH + _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib + _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib + ;; Gcc43) export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib diff --git a/src/Allwmake b/src/Allwmake index f2b2adf037..1fcbb76d33 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -1,5 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory + +if [ "$PWD" != "$WM_PROJECT_DIR/src" ] +then + echo "Error: Current directory is not \$WM_PROJECT_DIR/src" + echo " The environment variables are inconsistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +fi + set -x # update OpenFOAM version strings if required @@ -23,6 +32,7 @@ decompositionMethods/Allwmake wmake libso meshTools wmake libso finiteVolume +wmake libso genericPatchFields wmake libso sampling diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index 8e2f04c359..e608e4695b 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -478,7 +478,6 @@ $(pointPatchFields)/pointPatchField/pointPatchFields.C basicPointPatchFields = $(pointPatchFields)/basic $(basicPointPatchFields)/calculated/calculatedPointPatchFields.C -$(basicPointPatchFields)/generic/genericPointPatchFields.C $(basicPointPatchFields)/coupled/coupledPointPatchFields.C $(basicPointPatchFields)/value/valuePointPatchFields.C $(basicPointPatchFields)/fixedValue/fixedValuePointPatchFields.C diff --git a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C index e386a30f20..b116494157 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C @@ -81,7 +81,8 @@ bool Foam::functionEntry::execute ( "functionEntry::execute" "(const word& functionName, dictionary& parentDict, Istream&)" - ) << "Unknown functionEntry " << functionName + ) << "Unknown functionEntry '" << functionName + << "' in " << is.name() << " near line " << is.lineNumber() << endl << endl << "Valid functionEntries are :" << endl << executedictionaryIstreamMemberFunctionTablePtr_->toc() @@ -126,7 +127,8 @@ bool Foam::functionEntry::execute ( "functionEntry::execute" "(const word&, const dictionary&, primitiveEntry&, Istream&)" - ) << "Unknown functionEntry " << functionName + ) << "Unknown functionEntry '" << functionName + << "' in " << is.name() << " near line " << is.lineNumber() << endl << endl << "Valid functionEntries are :" << endl << executeprimitiveEntryIstreamMemberFunctionTablePtr_->toc() diff --git a/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C index 32f6660465..223b251c43 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C @@ -26,6 +26,7 @@ License #include "removeEntry.H" #include "dictionary.H" +#include "stringListOps.H" #include "IStringStream.H" #include "OStringStream.H" #include "addToMemberFunctionSelectionTable.H" @@ -64,22 +65,12 @@ bool Foam::functionEntries::removeEntry::execute Istream& is ) { - token currToken(is); - is.putBack(currToken); + wordList dictKeys = parentDict.toc(); + labelList indices = findStrings(readList(is), dictKeys); - if (currToken == token::BEGIN_LIST) + forAll(indices, indexI) { - wordList keys(is); - - forAll(keys, keyI) - { - parentDict.remove(keys[keyI]); - } - } - else - { - word key(is); - parentDict.remove(key); + parentDict.remove(dictKeys[indices[indexI]]); } return true; diff --git a/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H index b98da86e67..148f8e260e 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H +++ b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H @@ -28,13 +28,16 @@ Class Description Remove a dictionary entry. - The @c \#remove directive takes a word or a list of words. For example, + The @c \#remove directive takes a list or a single wordRe. + For example, @verbatim #remove entry0 - #remove ( entry1 entry2 entry3 ) + #remove ( entry1 entry2 entry3 otherEntry ) + #remove "entry[1-3]" + #remove ( "entry[1-3]" otherEntry ) @endverbatim - The removable only occurs in the current context. + The removal only occurs in the current context. Removing sub-entries or parent entries is not supported. SourceFiles diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 6be4b7f3f4..7ecbf878a6 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -86,7 +86,6 @@ $(basicFvPatchFields)/coupled/coupledFvPatchFields.C $(basicFvPatchFields)/directionMixed/directionMixedFvPatchFields.C $(basicFvPatchFields)/fixedGradient/fixedGradientFvPatchFields.C $(basicFvPatchFields)/fixedValue/fixedValueFvPatchFields.C -$(basicFvPatchFields)/generic/genericFvPatchFields.C $(basicFvPatchFields)/mixed/mixedFvPatchFields.C $(basicFvPatchFields)/sliced/slicedFvPatchFields.C $(basicFvPatchFields)/transform/transformFvPatchFields.C diff --git a/src/finiteVolume/fields/fvPatchFields/derived/buoyantPressure/buoyantPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/buoyantPressure/buoyantPressureFvPatchScalarField.C index 12544a105f..a6ae6f1ee6 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/buoyantPressure/buoyantPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/buoyantPressure/buoyantPressureFvPatchScalarField.C @@ -136,7 +136,7 @@ void buoyantPressureFvPatchScalarField::updateCoeffs() void buoyantPressureFvPatchScalarField::write(Ostream& os) const { fixedGradientFvPatchScalarField::write(os); - os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl; + writeEntryIfDifferent(os, "rho", "rho", rhoName_); writeEntry("value", os); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C index 5cc373e78d..2da4d21c66 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C @@ -159,14 +159,8 @@ void Foam::flowRateInletVelocityFvPatchVectorField::write(Ostream& os) const { fvPatchField::write(os); os.writeKeyword("flowRate") << flowRate_ << token::END_STATEMENT << nl; - if (phiName_ != "phi") - { - os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl; - } - if (rhoName_ != "rho") - { - os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl; - } + writeEntryIfDifferent(os, "phi", "phi", phiName_); + writeEntryIfDifferent(os, "rho", "rho", rhoName_); writeEntry("value", os); } diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H index a98785aedc..d0a664ddd4 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H @@ -96,8 +96,8 @@ public: //- Runtime type information TypeName("fvsPatchField"); - //- Debug switch to disallow the use of - static int disallowDefaultFvsPatchField; + //- Debug switch to disallow the use of genericFvsPatchField + static int disallowGenericFvsPatchField; // Declare run-time constructor selection tables diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFields.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFields.C index 88ebe16059..12091f6699 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFields.C +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFields.C @@ -37,9 +37,9 @@ namespace Foam \ defineNamedTemplateTypeNameAndDebug(fvsPatchTypeField, 0); \ template<> \ -int fvsPatchTypeField::disallowDefaultFvsPatchField \ +int fvsPatchTypeField::disallowGenericFvsPatchField \ ( \ - debug::debugSwitch("disallowDefaultFvsPatchField", 0) \ + debug::debugSwitch("disallowGenericFvsPatchField", 0) \ ); \ defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patch); \ defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patchMapper); \ diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/newFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/newFvsPatchField.C index f74f3ed87a..38abb38d8c 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/newFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/newFvsPatchField.C @@ -100,9 +100,9 @@ tmp > fvsPatchField::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - if (!disallowDefaultFvsPatchField) + if (!disallowGenericFvsPatchField) { - cstrIter = dictionaryConstructorTablePtr_->find("default"); + cstrIter = dictionaryConstructorTablePtr_->find("generic"); } if (cstrIter == dictionaryConstructorTablePtr_->end()) @@ -120,7 +120,7 @@ tmp > fvsPatchField::New } } - if + if ( !dict.found("patchType") || word(dict.lookup("patchType")) != p.type() diff --git a/src/finiteVolume/finiteVolume/fvm/fvmAdjDiv.H b/src/finiteVolume/finiteVolume/fvm/fvmAdjDiv.H deleted file mode 100644 index 3b6de68237..0000000000 --- a/src/finiteVolume/finiteVolume/fvm/fvmAdjDiv.H +++ /dev/null @@ -1,102 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 - -InNamespace - Foam::fvm - -Description - Calculate the matrix for the adjDivergence of the given field and flux. - -SourceFiles - fvmAdjDiv.C - -\*---------------------------------------------------------------------------*/ - -#ifndef fvmAdjDiv_H -#define fvmAdjDiv_H - -#include "volFieldsFwd.H" -#include "surfaceFieldsFwd.H" -#include "surfaceInterpolationScheme.H" -#include "fvMatrix.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Namespace fvm functions Declaration -\*---------------------------------------------------------------------------*/ - -namespace fvm -{ - template - tmp > adjDiv - ( - const surfaceScalarField&, - GeometricField&, - const word& name - ); - - template - tmp > adjDiv - ( - const tmp&, - GeometricField&, - const word& name - ); - - - template - tmp > adjDiv - ( - const surfaceScalarField&, - GeometricField& - ); - - template - tmp > adjDiv - ( - const tmp&, - GeometricField& - ); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "fvmAdjDiv.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/genericPatchFields/Make/files b/src/genericPatchFields/Make/files new file mode 100644 index 0000000000..333d154a6d --- /dev/null +++ b/src/genericPatchFields/Make/files @@ -0,0 +1,4 @@ +genericFvPatchField/genericFvPatchFields.C +genericPointPatchField/genericPointPatchFields.C + +LIB = $(FOAM_LIBBIN)/libgenericPatchFields diff --git a/src/genericPatchFields/Make/options b/src/genericPatchFields/Make/options new file mode 100644 index 0000000000..71b7873964 --- /dev/null +++ b/src/genericPatchFields/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +LIB_LIBS = \ + -lfiniteVolume diff --git a/src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchField.C b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C similarity index 100% rename from src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchField.C rename to src/genericPatchFields/genericFvPatchField/genericFvPatchField.C diff --git a/src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchField.H b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H similarity index 98% rename from src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchField.H rename to src/genericPatchFields/genericFvPatchField/genericFvPatchField.H index 1144b11010..694bc92b52 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchField.H +++ b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H @@ -26,7 +26,8 @@ Class Foam::genericFvPatchField Description - Foam::genericFvPatchField + A generic version of calculatedFvPatchField, useful as a fallback for + handling unknown patch types. SourceFiles genericFvPatchField.C diff --git a/src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchFields.C b/src/genericPatchFields/genericFvPatchField/genericFvPatchFields.C similarity index 100% rename from src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchFields.C rename to src/genericPatchFields/genericFvPatchField/genericFvPatchFields.C diff --git a/src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchFields.H b/src/genericPatchFields/genericFvPatchField/genericFvPatchFields.H similarity index 100% rename from src/finiteVolume/fields/fvPatchFields/basic/generic/genericFvPatchFields.H rename to src/genericPatchFields/genericFvPatchField/genericFvPatchFields.H diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/generic/genericPointPatchField.C b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C similarity index 100% rename from src/OpenFOAM/fields/pointPatchFields/basic/generic/genericPointPatchField.C rename to src/genericPatchFields/genericPointPatchField/genericPointPatchField.C diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/generic/genericPointPatchField.H b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H similarity index 97% rename from src/OpenFOAM/fields/pointPatchFields/basic/generic/genericPointPatchField.H rename to src/genericPatchFields/genericPointPatchField/genericPointPatchField.H index bedd11b4ec..8ce85fded1 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/generic/genericPointPatchField.H +++ b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H @@ -26,7 +26,8 @@ Class Foam::genericPointPatchField Description - Foam::genericPointPatchField + A generic version of calculatedPointPatchField, useful as a fallback for + handling unknown patch types. SourceFiles genericPointPatchField.C diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/generic/genericPointPatchFields.C b/src/genericPatchFields/genericPointPatchField/genericPointPatchFields.C similarity index 100% rename from src/OpenFOAM/fields/pointPatchFields/basic/generic/genericPointPatchFields.C rename to src/genericPatchFields/genericPointPatchField/genericPointPatchFields.C diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/generic/genericPointPatchFields.H b/src/genericPatchFields/genericPointPatchField/genericPointPatchFields.H similarity index 100% rename from src/OpenFOAM/fields/pointPatchFields/basic/generic/genericPointPatchFields.H rename to src/genericPatchFields/genericPointPatchField/genericPointPatchFields.H diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index 5602e44d7f..dd166f2693 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -84,6 +84,10 @@ LESModel::LESModel delta_(LESdelta::New("delta", U.mesh(), *this)) { readIfPresent("k0", k0_); + + // Force the construction of the mesh deltaCoeffs which may be needed + // for the construction of the derived models and BCs + mesh_.deltaCoeffs(); } diff --git a/src/turbulenceModels/compressible/LES/Make/files b/src/turbulenceModels/compressible/LES/Make/files index 331f60eb87..27beea2967 100644 --- a/src/turbulenceModels/compressible/LES/Make/files +++ b/src/turbulenceModels/compressible/LES/Make/files @@ -15,7 +15,7 @@ vanDriestDelta/vanDriestDelta.C wallFunctions=derivedFvPatchFields/wallFunctions muSgsWallFunctions=$(wallFunctions)/muSgsWallFunctions -$(muSgsWallFunctions)/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C +$(muSgsWallFunctions)/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.C alphaSgsWallFunctions=$(wallFunctions)/alphaSgsWallFunctions $(alphaSgsWallFunctions)/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.C similarity index 86% rename from src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.C index c31ac8815c..18c25ca90a 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "muSgsWallFunctionFvPatchScalarField.H" +#include "muSgsUSpaldingWallFunctionFvPatchScalarField.H" #include "LESModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -41,7 +41,8 @@ namespace LESModels // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField +muSgsUSpaldingWallFunctionFvPatchScalarField:: +muSgsUSpaldingWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -56,9 +57,10 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField {} -muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField +muSgsUSpaldingWallFunctionFvPatchScalarField:: +muSgsUSpaldingWallFunctionFvPatchScalarField ( - const muSgsWallFunctionFvPatchScalarField& ptf, + const muSgsUSpaldingWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -73,7 +75,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField {} -muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField +muSgsUSpaldingWallFunctionFvPatchScalarField:: +muSgsUSpaldingWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -89,9 +92,10 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField {} -muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField +muSgsUSpaldingWallFunctionFvPatchScalarField:: +muSgsUSpaldingWallFunctionFvPatchScalarField ( - const muSgsWallFunctionFvPatchScalarField& mwfpsf + const muSgsUSpaldingWallFunctionFvPatchScalarField& mwfpsf ) : fixedValueFvPatchScalarField(mwfpsf), @@ -103,9 +107,10 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField {} -muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField +muSgsUSpaldingWallFunctionFvPatchScalarField:: +muSgsUSpaldingWallFunctionFvPatchScalarField ( - const muSgsWallFunctionFvPatchScalarField& mwfpsf, + const muSgsUSpaldingWallFunctionFvPatchScalarField& mwfpsf, const DimensionedField& iF ) : @@ -120,7 +125,7 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void muSgsWallFunctionFvPatchScalarField::evaluate +void muSgsUSpaldingWallFunctionFvPatchScalarField::evaluate ( const Pstream::commsTypes ) @@ -190,7 +195,7 @@ void muSgsWallFunctionFvPatchScalarField::evaluate } -void muSgsWallFunctionFvPatchScalarField::write(Ostream& os) const +void muSgsUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeEntryIfDifferent(os, "U", "U", UName_); @@ -207,7 +212,7 @@ void muSgsWallFunctionFvPatchScalarField::write(Ostream& os) const makePatchTypeField ( fvPatchScalarField, - muSgsWallFunctionFvPatchScalarField + muSgsUSpaldingWallFunctionFvPatchScalarField ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.H similarity index 76% rename from src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.H index 38f20535d3..9dbe8f0443 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsUSpaldingWallFunction/muSgsUSpaldingWallFunctionFvPatchScalarField.H @@ -24,18 +24,19 @@ License Class Foam::compressible::LESModels:: - muSgsWallFunctionFvPatchScalarField + muSgsUSpaldingWallFunctionFvPatchScalarField Description - Spalart Allmaas wall function boundary condition for compressible flows + Wall function boundary condition for walls, based on velocity, using + Spaldings law to give a continuous muSgs profile to the wall (y+ = 0). SourceFiles - muSgsWallFunctionFvPatchScalarField.C + muSgsUSpaldingWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef muSgsWallFunctionFvPatchScalarField_H -#define muSgsWallFunctionFvPatchScalarField_H +#ifndef muSgsUSpaldingWallFunctionFvPatchScalarField_H +#define muSgsUSpaldingWallFunctionFvPatchScalarField_H #include "fixedValueFvPatchFields.H" @@ -49,10 +50,10 @@ namespace LESModels { /*---------------------------------------------------------------------------*\ - Class muSgsWallFunctionFvPatchScalarField Declaration + Class muSgsUSpaldingWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class muSgsWallFunctionFvPatchScalarField +class muSgsUSpaldingWallFunctionFvPatchScalarField : public fixedValueFvPatchScalarField { @@ -77,20 +78,20 @@ class muSgsWallFunctionFvPatchScalarField public: //- Runtime type information - TypeName("muSgsWallFunction"); + TypeName("muSgsUSpaldingWallFunction"); // Constructors //- Construct from patch and internal field - muSgsWallFunctionFvPatchScalarField + muSgsUSpaldingWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - muSgsWallFunctionFvPatchScalarField + muSgsUSpaldingWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -98,20 +99,20 @@ public: ); //- Construct by mapping given - // muSgsWallFunctionFvPatchScalarField + // muSgsUSpaldingWallFunctionFvPatchScalarField // onto a new patch - muSgsWallFunctionFvPatchScalarField + muSgsUSpaldingWallFunctionFvPatchScalarField ( - const muSgsWallFunctionFvPatchScalarField&, + const muSgsUSpaldingWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - muSgsWallFunctionFvPatchScalarField + muSgsUSpaldingWallFunctionFvPatchScalarField ( - const muSgsWallFunctionFvPatchScalarField& + const muSgsUSpaldingWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -119,14 +120,14 @@ public: { return tmp ( - new muSgsWallFunctionFvPatchScalarField(*this) + new muSgsUSpaldingWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - muSgsWallFunctionFvPatchScalarField + muSgsUSpaldingWallFunctionFvPatchScalarField ( - const muSgsWallFunctionFvPatchScalarField&, + const muSgsUSpaldingWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -138,11 +139,7 @@ public: { return tmp ( - new muSgsWallFunctionFvPatchScalarField - ( - *this, - iF - ) + new muSgsUSpaldingWallFunctionFvPatchScalarField(*this, iF) ); } diff --git a/src/turbulenceModels/compressible/RAS/Make/files b/src/turbulenceModels/compressible/RAS/Make/files index da455db87f..1329745581 100644 --- a/src/turbulenceModels/compressible/RAS/Make/files +++ b/src/turbulenceModels/compressible/RAS/Make/files @@ -17,11 +17,11 @@ alphatWallFunctions = $(wallFunctions)/alphatWallFunctions $(alphatWallFunctions)/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C mutWallFunctions = $(wallFunctions)/mutWallFunctions -$(mutWallFunctions)/mutWallFunction/mutWallFunctionFvPatchScalarField.C -$(mutWallFunctions)/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C -$(mutWallFunctions)/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C -$(mutWallFunctions)/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C -$(mutWallFunctions)/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C +$(mutWallFunctions)/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C +$(mutWallFunctions)/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C +$(mutWallFunctions)/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C +$(mutWallFunctions)/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C +$(mutWallFunctions)/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C epsilonWallFunctions = $(wallFunctions)/epsilonWallFunctions $(epsilonWallFunctions)/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index 8d18cec8c5..b390bca5e5 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -88,7 +88,11 @@ RASModel::RASModel omegaSmall_("omegaSmall", omega0_.dimensions(), SMALL), y_(mesh_) -{} +{ + // Force the construction of the mesh deltaCoeffs which may be needed + // for the construction of the derived models and BCs + mesh_.deltaCoeffs(); +} // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C index 603ed83962..af32894d27 100644 --- a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -249,6 +249,54 @@ SpalartAllmaras::SpalartAllmaras // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +tmp SpalartAllmaras::k() const +{ + WarningIn("tmp SpalartAllmaras::k() const") + << "Turbulence kinetic energy not defined for Spalart-Allmaras model. " + << "Returning zero field" + << endl; + + return tmp + ( + new volScalarField + ( + IOobject + ( + "k", + runTime_.timeName(), + mesh_ + ), + mesh_, + dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0) + ) + ); +} + + +tmp SpalartAllmaras::epsilon() const +{ + WarningIn("tmp SpalartAllmaras::epsilon() const") + << "Turbulence kinetic energy dissipation rate not defined for " + << "Spalart-Allmaras model. Returning zero field" + << endl; + + return tmp + ( + new volScalarField + ( + IOobject + ( + "epslion", + runTime_.timeName(), + mesh_ + ), + mesh_, + dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0) + ) + ); +} + + tmp SpalartAllmaras::R() const { return tmp diff --git a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H index 39e70c4922..94e736b9f8 100644 --- a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H @@ -188,42 +188,10 @@ public: } //- Return the turbulence kinetic energy - virtual tmp k() const - { - return tmp - ( - new volScalarField - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_ - ), - mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0) - ) - ); - } + virtual tmp k() const; //- Return the turbulence kinetic energy dissipation rate - virtual tmp epsilon() const - { - return tmp - ( - new volScalarField - ( - IOobject - ( - "epslion", - runTime_.timeName(), - mesh_ - ), - mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0) - ) - ); - } + virtual tmp epsilon() const; //- Return the Reynolds stress tensor virtual tmp R() const; diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C index 7096314fe3..700cfed818 100644 --- a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C +++ b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C @@ -28,7 +28,7 @@ License #include "calculatedFvPatchField.H" #include "alphatWallFunctionFvPatchScalarField.H" -#include "mutWallFunctionFvPatchScalarField.H" +#include "mutkWallFunctionFvPatchScalarField.H" #include "epsilonWallFunctionFvPatchScalarField.H" #include "kqRWallFunctionFvPatchField.H" #include "omegaWallFunctionFvPatchScalarField.H" @@ -146,7 +146,7 @@ tmp autoCreateMut if (isType(bm[patchI])) { mutBoundaryTypes[patchI] = - RASModels::mutWallFunctionFvPatchScalarField::typeName; + RASModels::mutkWallFunctionFvPatchScalarField::typeName; } else { diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C index ad2115cdb1..dbc93fc8cb 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C @@ -111,10 +111,17 @@ alphatWallFunctionFvPatchScalarField void alphatWallFunctionFvPatchScalarField::updateCoeffs() { + if (updated()) + { + return; + } + const scalarField& mutw = patch().lookupPatchField(mutName_); operator==(mutw/Prt_); + + fixedValueFvPatchScalarField::updateCoeffs(); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index dc6f2a3644..4a2b5b6d31 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -169,6 +169,11 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField void epsilonWallFunctionFvPatchScalarField::updateCoeffs() { + if (updated()) + { + return; + } + const RASModel& rasModel = db().lookupObject("RASProperties"); const scalar Cmu25 = pow(Cmu_, 0.25); @@ -224,6 +229,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs() } } + fixedInternalValueFvPatchField::updateCoeffs(); + // TODO: perform averaging for cells sharing more than one boundary face } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C similarity index 80% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C index 3a1d0b7ab0..7bc772eead 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H" +#include "mutURoughWallFunctionFvPatchScalarField.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "RASModel.H" @@ -41,8 +41,7 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -tmp -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus +tmp mutURoughWallFunctionFvPatchScalarField::calcYPlus ( const scalarField& magUp ) const @@ -90,7 +89,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus } // Additional tuning parameter (fudge factor) - nominally = 1 - dKsPlusdYPlus *= roughnessFudgeFactor_; + dKsPlusdYPlus *= roughnessFactor_; do { @@ -172,8 +171,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus } -tmp -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcMut() const +tmp mutURoughWallFunctionFvPatchScalarField::calcMut() const { const label patchI = patch().index(); @@ -206,82 +204,76 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcMut() const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField:: -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF ) : - mutWallFunctionFvPatchScalarField(p, iF), + mutkWallFunctionFvPatchScalarField(p, iF), roughnessHeight_(pTraits::zero), roughnessConstant_(pTraits::zero), - roughnessFudgeFactor_(pTraits::zero) + roughnessFactor_(pTraits::zero) {} -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField:: -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& ptf, + const mutURoughWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper), + mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), roughnessHeight_(ptf.roughnessHeight_), roughnessConstant_(ptf.roughnessConstant_), - roughnessFudgeFactor_(ptf.roughnessFudgeFactor_) + roughnessFactor_(ptf.roughnessFactor_) {} -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField:: -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : - mutWallFunctionFvPatchScalarField(p, iF, dict), + mutkWallFunctionFvPatchScalarField(p, iF, dict), roughnessHeight_(readScalar(dict.lookup("roughnessHeight"))), roughnessConstant_(readScalar(dict.lookup("roughnessConstant"))), - roughnessFudgeFactor_(readScalar(dict.lookup("roughnessFudgeFactor"))) + roughnessFactor_(readScalar(dict.lookup("roughnessFactor"))) {} -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField:: -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& rwfpsf + const mutURoughWallFunctionFvPatchScalarField& rwfpsf ) : - mutWallFunctionFvPatchScalarField(rwfpsf), + mutkWallFunctionFvPatchScalarField(rwfpsf), roughnessHeight_(rwfpsf.roughnessHeight_), roughnessConstant_(rwfpsf.roughnessConstant_), - roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_) + roughnessFactor_(rwfpsf.roughnessFactor_) {} -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField:: -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +mutURoughWallFunctionFvPatchScalarField::mutURoughWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& rwfpsf, + const mutURoughWallFunctionFvPatchScalarField& rwfpsf, const DimensionedField& iF ) : - mutWallFunctionFvPatchScalarField(rwfpsf, iF), + mutkWallFunctionFvPatchScalarField(rwfpsf, iF), roughnessHeight_(rwfpsf.roughnessHeight_), roughnessConstant_(rwfpsf.roughnessConstant_), - roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_) + roughnessFactor_(rwfpsf.roughnessFactor_) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp -mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const +tmp mutURoughWallFunctionFvPatchScalarField::yPlus() const { const label patchI = patch().index(); @@ -293,10 +285,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const } -void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write -( - Ostream& os -) const +void mutURoughWallFunctionFvPatchScalarField::write(Ostream& os) const { fixedValueFvPatchScalarField::write(os); writeLocalEntries(os); @@ -304,8 +293,8 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write << roughnessHeight_ << token::END_STATEMENT << nl; os.writeKeyword("roughnessConstant") << roughnessConstant_ << token::END_STATEMENT << nl; - os.writeKeyword("roughnessFudgeFactor") - << roughnessFudgeFactor_ << token::END_STATEMENT << nl; + os.writeKeyword("roughnessFactor") + << roughnessFactor_ << token::END_STATEMENT << nl; } @@ -314,7 +303,7 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write makePatchTypeField ( fvPatchScalarField, - mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + mutURoughWallFunctionFvPatchScalarField ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H similarity index 72% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H index ff321bf622..67279322ee 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H @@ -23,21 +23,20 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::RASModels:: - mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + Foam::compressible::RASModels::mutURoughWallFunctionFvPatchScalarField Description - Wall function boundary condition for rough walls + Wall function boundary condition for rough walls, based on velocity. SourceFiles mutSpalartAllamarasStandardWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H -#define compressibleMutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H +#ifndef compressibleMutURoughWallFunctionFvPatchScalarField_H +#define compressibleMutURoughWallFunctionFvPatchScalarField_H -#include "mutWallFunctionFvPatchScalarField.H" +#include "mutkWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,12 +48,12 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ -Class mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField Declaration + Class mutURoughWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +class mutURoughWallFunctionFvPatchScalarField : - public mutWallFunctionFvPatchScalarField + public mutkWallFunctionFvPatchScalarField { protected: @@ -69,7 +68,7 @@ protected: scalar roughnessConstant_; //- Scale factor - scalar roughnessFudgeFactor_; + scalar roughnessFactor_; // Protected member functions @@ -84,20 +83,20 @@ protected: public: //- Runtime type information - TypeName("mutSpalartAllmarasStandardRoughWallFunction"); + TypeName("mutURoughWallFunction"); // Constructors //- Construct from patch and internal field - mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + mutURoughWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + mutURoughWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -105,20 +104,20 @@ public: ); //- Construct by mapping given - // mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + // mutURoughWallFunctionFvPatchScalarField // onto a new patch - mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + mutURoughWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&, + const mutURoughWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + mutURoughWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& + const mutURoughWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -126,17 +125,14 @@ public: { return tmp ( - new mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField - ( - *this - ) + new mutURoughWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + mutURoughWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&, + const mutURoughWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -148,11 +144,7 @@ public: { return tmp ( - new mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField - ( - *this, - iF - ) + new mutURoughWallFunctionFvPatchScalarField(*this, iF) ); } @@ -186,16 +178,16 @@ public: } //- Return the roughness scale factor - const scalar& roughnessFudgeFactor() const + const scalar& roughnessFactor() const { - return roughnessFudgeFactor_; + return roughnessFactor_; } //- Return reference to the roughness scale factor to allow // adjustment - scalar& roughnessFudgeFactor() + scalar& roughnessFactor() { - return roughnessFudgeFactor_; + return roughnessFactor_; } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C similarity index 78% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C index dfe1e88cab..0fcfe72c4c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "mutSpalartAllmarasWallFunctionFvPatchScalarField.H" +#include "mutUSpaldingWallFunctionFvPatchScalarField.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "RASModel.H" @@ -41,7 +41,7 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -tmp mutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau +tmp mutUSpaldingWallFunctionFvPatchScalarField::calcUTau ( const scalarField& magGradU ) const @@ -105,8 +105,7 @@ tmp mutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau } -tmp -mutSpalartAllmarasWallFunctionFvPatchScalarField::calcMut() const +tmp mutUSpaldingWallFunctionFvPatchScalarField::calcMut() const { const label patchI = patch().index(); @@ -122,67 +121,66 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField::calcMut() const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -mutSpalartAllmarasWallFunctionFvPatchScalarField:: -mutSpalartAllmarasWallFunctionFvPatchScalarField +mutUSpaldingWallFunctionFvPatchScalarField:: +mutUSpaldingWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF ) : - mutWallFunctionFvPatchScalarField(p, iF) + mutkWallFunctionFvPatchScalarField(p, iF) {} -mutSpalartAllmarasWallFunctionFvPatchScalarField:: -mutSpalartAllmarasWallFunctionFvPatchScalarField +mutUSpaldingWallFunctionFvPatchScalarField:: +mutUSpaldingWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasWallFunctionFvPatchScalarField& ptf, + const mutUSpaldingWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) + mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper) {} -mutSpalartAllmarasWallFunctionFvPatchScalarField:: -mutSpalartAllmarasWallFunctionFvPatchScalarField +mutUSpaldingWallFunctionFvPatchScalarField:: +mutUSpaldingWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : - mutWallFunctionFvPatchScalarField(p, iF, dict) + mutkWallFunctionFvPatchScalarField(p, iF, dict) {} -mutSpalartAllmarasWallFunctionFvPatchScalarField:: -mutSpalartAllmarasWallFunctionFvPatchScalarField +mutUSpaldingWallFunctionFvPatchScalarField:: +mutUSpaldingWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf + const mutUSpaldingWallFunctionFvPatchScalarField& wfpsf ) : - mutWallFunctionFvPatchScalarField(wfpsf) + mutkWallFunctionFvPatchScalarField(wfpsf) {} -mutSpalartAllmarasWallFunctionFvPatchScalarField:: -mutSpalartAllmarasWallFunctionFvPatchScalarField +mutUSpaldingWallFunctionFvPatchScalarField:: +mutUSpaldingWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf, + const mutUSpaldingWallFunctionFvPatchScalarField& wfpsf, const DimensionedField& iF ) : - mutWallFunctionFvPatchScalarField(wfpsf, iF) + mutkWallFunctionFvPatchScalarField(wfpsf, iF) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp -mutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const +tmp mutUSpaldingWallFunctionFvPatchScalarField::yPlus() const { const label patchI = patch().index(); @@ -196,10 +194,7 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const } -void mutSpalartAllmarasWallFunctionFvPatchScalarField::write -( - Ostream& os -) const +void mutUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeLocalEntries(os); @@ -209,7 +204,11 @@ void mutSpalartAllmarasWallFunctionFvPatchScalarField::write // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField(fvPatchScalarField, mutSpalartAllmarasWallFunctionFvPatchScalarField); +makePatchTypeField +( + fvPatchScalarField, + mutUSpaldingWallFunctionFvPatchScalarField +); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H similarity index 75% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H index fc37af6d82..c1ac830de6 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUSpaldingWallFunction/mutUSpaldingWallFunctionFvPatchScalarField.H @@ -23,21 +23,20 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::RASModels:: - mutSpalartAllmarasWallFunctionFvPatchScalarField + Foam::compressible::RASModels::mutUSpaldingWallFunctionFvPatchScalarField Description Wall function boundary condition for walls SourceFiles - mutSpalartAllmarasWallFunctionFvPatchScalarField.C + mutUSpaldingWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H -#define compressibleMutSpalartAllmarasWallFunctionFvPatchScalarField_H +#ifndef compressibleMutUSpaldingWallFunctionFvPatchScalarField_H +#define compressibleMutUSpaldingWallFunctionFvPatchScalarField_H -#include "mutWallFunctionFvPatchScalarField.H" +#include "mutkWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,12 +48,12 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class mutSpalartAllmarasWallFunctionFvPatchScalarField Declaration + Class mutUSpaldingWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class mutSpalartAllmarasWallFunctionFvPatchScalarField +class mutUSpaldingWallFunctionFvPatchScalarField : - public mutWallFunctionFvPatchScalarField + public mutkWallFunctionFvPatchScalarField { protected: @@ -70,20 +69,20 @@ protected: public: //- Runtime type information - TypeName("mutSpalartAllmarasWallFunction"); + TypeName("mutUSpaldingWallFunction"); // Constructors //- Construct from patch and internal field - mutSpalartAllmarasWallFunctionFvPatchScalarField + mutUSpaldingWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - mutSpalartAllmarasWallFunctionFvPatchScalarField + mutUSpaldingWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -91,20 +90,20 @@ public: ); //- Construct by mapping given - // mutSpalartAllmarasWallFunctionFvPatchScalarField + // mutUSpaldingWallFunctionFvPatchScalarField // onto a new patch - mutSpalartAllmarasWallFunctionFvPatchScalarField + mutUSpaldingWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasWallFunctionFvPatchScalarField&, + const mutUSpaldingWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - mutSpalartAllmarasWallFunctionFvPatchScalarField + mutUSpaldingWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasWallFunctionFvPatchScalarField& + const mutUSpaldingWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -112,14 +111,14 @@ public: { return tmp ( - new mutSpalartAllmarasWallFunctionFvPatchScalarField(*this) + new mutUSpaldingWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - mutSpalartAllmarasWallFunctionFvPatchScalarField + mutUSpaldingWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasWallFunctionFvPatchScalarField&, + const mutUSpaldingWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -131,7 +130,7 @@ public: { return tmp ( - new mutSpalartAllmarasWallFunctionFvPatchScalarField(*this, iF) + new mutUSpaldingWallFunctionFvPatchScalarField(*this, iF) ); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C similarity index 74% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C index c2a49ac751..62c8386bbb 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H" +#include "mutUWallFunctionFvPatchScalarField.H" #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -41,8 +41,7 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -tmp -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus +tmp mutUWallFunctionFvPatchScalarField::calcYPlus ( const scalarField& magUp ) const @@ -81,8 +80,7 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus } -tmp -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcMut() const +tmp mutUWallFunctionFvPatchScalarField::calcMut() const { const label patchI = patch().index(); @@ -112,67 +110,61 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcMut() const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField +mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF ) : - mutWallFunctionFvPatchScalarField(p, iF) + mutkWallFunctionFvPatchScalarField(p, iF) {} -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField +mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField& ptf, + const mutUWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) + mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper) {} -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField +mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : - mutWallFunctionFvPatchScalarField(p, iF, dict) + mutkWallFunctionFvPatchScalarField(p, iF, dict) {} -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField +mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf + const mutUWallFunctionFvPatchScalarField& sawfpsf ) : - mutWallFunctionFvPatchScalarField(sawfpsf) + mutkWallFunctionFvPatchScalarField(sawfpsf) {} -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField +mutUWallFunctionFvPatchScalarField::mutUWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf, + const mutUWallFunctionFvPatchScalarField& sawfpsf, const DimensionedField& iF ) : - mutWallFunctionFvPatchScalarField(sawfpsf, iF) + mutkWallFunctionFvPatchScalarField(sawfpsf, iF) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp -mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const +tmp mutUWallFunctionFvPatchScalarField::yPlus() const { const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject("RASProperties"); @@ -183,10 +175,7 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const } -void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write -( - Ostream& os -) const +void mutUWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeLocalEntries(os); @@ -199,7 +188,7 @@ void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write makePatchTypeField ( fvPatchScalarField, - mutSpalartAllmarasStandardWallFunctionFvPatchScalarField + mutUWallFunctionFvPatchScalarField ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H similarity index 70% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H index 409bc0b9eb..5c70b81c44 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutUWallFunction/mutUWallFunctionFvPatchScalarField.H @@ -23,21 +23,20 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::RASModels:: - mutSpalartAllmarasStandardWallFunctionFvPatchScalarField + Foam::compressible::RASModels::mutUWallFunctionFvPatchScalarField Description - Wall function boundary condition for walls + Wall function boundary condition for walls, based on velocity. SourceFiles - mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C + mutUWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef compressibleMutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H -#define compressibleMutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H +#ifndef compressibleMutUWallFunctionFvPatchScalarField_H +#define compressibleMutUWallFunctionFvPatchScalarField_H -#include "mutWallFunctionFvPatchScalarField.H" +#include "mutkWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,12 +48,12 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class mutSpalartAllmarasStandardWallFunctionFvPatchScalarField Declaration + Class mutUWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class mutSpalartAllmarasStandardWallFunctionFvPatchScalarField +class mutUWallFunctionFvPatchScalarField : - public mutWallFunctionFvPatchScalarField + public mutkWallFunctionFvPatchScalarField { protected: @@ -70,20 +69,20 @@ protected: public: //- Runtime type information - TypeName("mutSpalartAllmarasStandardWallFunction"); + TypeName("mutUWallFunction"); // Constructors //- Construct from patch and internal field - mutSpalartAllmarasStandardWallFunctionFvPatchScalarField + mutUWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - mutSpalartAllmarasStandardWallFunctionFvPatchScalarField + mutUWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -91,20 +90,20 @@ public: ); //- Construct by mapping given - // mutSpalartAllmarasStandardWallFunctionFvPatchScalarField + // mutUWallFunctionFvPatchScalarField // onto a new patch - mutSpalartAllmarasStandardWallFunctionFvPatchScalarField + mutUWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField&, + const mutUWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - mutSpalartAllmarasStandardWallFunctionFvPatchScalarField + mutUWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField& + const mutUWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -112,17 +111,14 @@ public: { return tmp ( - new mutSpalartAllmarasStandardWallFunctionFvPatchScalarField - ( - *this - ) + new mutUWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - mutSpalartAllmarasStandardWallFunctionFvPatchScalarField + mutUWallFunctionFvPatchScalarField ( - const mutSpalartAllmarasStandardWallFunctionFvPatchScalarField&, + const mutUWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -134,11 +130,7 @@ public: { return tmp ( - new mutSpalartAllmarasStandardWallFunctionFvPatchScalarField - ( - *this, - iF - ) + new mutUWallFunctionFvPatchScalarField(*this, iF) ); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C similarity index 76% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C index 0eaf6d0e00..6af9687f7b 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "mutRoughWallFunctionFvPatchScalarField.H" +#include "mutkRoughWallFunctionFvPatchScalarField.H" #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -39,10 +39,9 @@ namespace compressible namespace RASModels { - // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -scalar mutRoughWallFunctionFvPatchScalarField::fnRough +scalar mutkRoughWallFunctionFvPatchScalarField::fnRough ( const scalar KsPlus, const scalar Cs @@ -65,7 +64,7 @@ scalar mutRoughWallFunctionFvPatchScalarField::fnRough } -tmp mutRoughWallFunctionFvPatchScalarField::calcMut() const +tmp mutkRoughWallFunctionFvPatchScalarField::calcMut() const { const label patchI = patch().index(); @@ -121,63 +120,63 @@ tmp mutRoughWallFunctionFvPatchScalarField::calcMut() const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField +mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF ) : - mutWallFunctionFvPatchScalarField(p, iF), + mutkWallFunctionFvPatchScalarField(p, iF), Ks_(p.size(), 0.0), Cs_(p.size(), 0.0) {} -mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField +mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField ( - const mutRoughWallFunctionFvPatchScalarField& ptf, + const mutkRoughWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - mutWallFunctionFvPatchScalarField(ptf, p, iF, mapper), + mutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), Ks_(ptf.Ks_, mapper), Cs_(ptf.Cs_, mapper) {} -mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField +mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : - mutWallFunctionFvPatchScalarField(p, iF, dict), + mutkWallFunctionFvPatchScalarField(p, iF, dict), Ks_("Ks", dict, p.size()), Cs_("Cs", dict, p.size()) {} -mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField +mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField ( - const mutRoughWallFunctionFvPatchScalarField& rwfpsf + const mutkRoughWallFunctionFvPatchScalarField& rwfpsf ) : - mutWallFunctionFvPatchScalarField(rwfpsf), + mutkWallFunctionFvPatchScalarField(rwfpsf), Ks_(rwfpsf.Ks_), Cs_(rwfpsf.Cs_) {} -mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField +mutkRoughWallFunctionFvPatchScalarField::mutkRoughWallFunctionFvPatchScalarField ( - const mutRoughWallFunctionFvPatchScalarField& rwfpsf, + const mutkRoughWallFunctionFvPatchScalarField& rwfpsf, const DimensionedField& iF ) : - mutWallFunctionFvPatchScalarField(rwfpsf, iF), + mutkWallFunctionFvPatchScalarField(rwfpsf, iF), Ks_(rwfpsf.Ks_), Cs_(rwfpsf.Cs_) {} @@ -185,34 +184,34 @@ mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void mutRoughWallFunctionFvPatchScalarField::autoMap +void mutkRoughWallFunctionFvPatchScalarField::autoMap ( const fvPatchFieldMapper& m ) { - mutWallFunctionFvPatchScalarField::autoMap(m); + mutkWallFunctionFvPatchScalarField::autoMap(m); Ks_.autoMap(m); Cs_.autoMap(m); } -void mutRoughWallFunctionFvPatchScalarField::rmap +void mutkRoughWallFunctionFvPatchScalarField::rmap ( const fvPatchScalarField& ptf, const labelList& addr ) { - mutWallFunctionFvPatchScalarField::rmap(ptf, addr); + mutkWallFunctionFvPatchScalarField::rmap(ptf, addr); - const mutRoughWallFunctionFvPatchScalarField& nrwfpsf = - refCast(ptf); + const mutkRoughWallFunctionFvPatchScalarField& nrwfpsf = + refCast(ptf); Cs_.rmap(nrwfpsf.Cs_, addr); Ks_.rmap(nrwfpsf.Ks_, addr); } -void mutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const +void mutkRoughWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeLocalEntries(os); @@ -224,7 +223,11 @@ void mutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField(fvPatchScalarField, mutRoughWallFunctionFvPatchScalarField); +makePatchTypeField +( + fvPatchScalarField, + mutkRoughWallFunctionFvPatchScalarField +); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H similarity index 79% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H index 935ab29582..479fd7b9ab 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkRoughWallFunction/mutkRoughWallFunctionFvPatchScalarField.H @@ -27,7 +27,7 @@ Class Description Boundary condition for turbulent (kinematic) viscosity when using wall - functions for rough walls. + functions for rough walls, based on turbulence kinetic energy. Manipulates the E parameter to account for roughness effects, based on KsPlus. @@ -36,14 +36,14 @@ Description - roughness constant = 0.5-1.0 (0.5 default) SourceFiles - mutRoughWallFunctionFvPatchScalarField.C + mutkRoughWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef compressibleMutRoughWallFunctionFvPatchScalarField_H -#define compressibleMutRoughWallFunctionFvPatchScalarField_H +#ifndef compressibleMutkRoughWallFunctionFvPatchScalarField_H +#define compressibleMutkRoughWallFunctionFvPatchScalarField_H -#include "mutWallFunctionFvPatchScalarField.H" +#include "mutkWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,12 +55,12 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class mutRoughWallFunctionFvPatchScalarField Declaration + Class mutkRoughWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class mutRoughWallFunctionFvPatchScalarField +class mutkRoughWallFunctionFvPatchScalarField : - public mutWallFunctionFvPatchScalarField + public mutkWallFunctionFvPatchScalarField { protected: @@ -85,20 +85,20 @@ protected: public: //- Runtime type information - TypeName("mutRoughWallFunction"); + TypeName("mutkRoughWallFunction"); // Constructors //- Construct from patch and internal field - mutRoughWallFunctionFvPatchScalarField + mutkRoughWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - mutRoughWallFunctionFvPatchScalarField + mutkRoughWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -106,20 +106,20 @@ public: ); //- Construct by mapping given - // mutRoughWallFunctionFvPatchScalarField + // mutkRoughWallFunctionFvPatchScalarField // onto a new patch - mutRoughWallFunctionFvPatchScalarField + mutkRoughWallFunctionFvPatchScalarField ( - const mutRoughWallFunctionFvPatchScalarField&, + const mutkRoughWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - mutRoughWallFunctionFvPatchScalarField + mutkRoughWallFunctionFvPatchScalarField ( - const mutRoughWallFunctionFvPatchScalarField& + const mutkRoughWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -127,14 +127,14 @@ public: { return tmp ( - new mutRoughWallFunctionFvPatchScalarField(*this) + new mutkRoughWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - mutRoughWallFunctionFvPatchScalarField + mutkRoughWallFunctionFvPatchScalarField ( - const mutRoughWallFunctionFvPatchScalarField&, + const mutkRoughWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -146,7 +146,7 @@ public: { return tmp ( - new mutRoughWallFunctionFvPatchScalarField(*this, iF) + new mutkRoughWallFunctionFvPatchScalarField(*this, iF) ); } @@ -156,10 +156,7 @@ public: // Mapping functions //- Map (and resize as needed) from self given a mapping object - virtual void autoMap - ( - const fvPatchFieldMapper& - ); + virtual void autoMap(const fvPatchFieldMapper&); //- Reverse map the given fvPatchField onto this fvPatchField virtual void rmap diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C similarity index 82% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C index 18ea20963c..5ab8324cda 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "mutWallFunctionFvPatchScalarField.H" +#include "mutkWallFunctionFvPatchScalarField.H" #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -42,11 +42,11 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -void mutWallFunctionFvPatchScalarField::checkType() +void mutkWallFunctionFvPatchScalarField::checkType() { if (!isA(patch())) { - FatalErrorIn("mutWallFunctionFvPatchScalarField::checkType()") + FatalErrorIn("mutkWallFunctionFvPatchScalarField::checkType()") << "Invalid wall function specification" << nl << " Patch type for patch " << patch().name() << " must be wall" << nl @@ -56,7 +56,7 @@ void mutWallFunctionFvPatchScalarField::checkType() } -scalar mutWallFunctionFvPatchScalarField::calcYPlusLam +scalar mutkWallFunctionFvPatchScalarField::calcYPlusLam ( const scalar kappa, const scalar E @@ -73,7 +73,7 @@ scalar mutWallFunctionFvPatchScalarField::calcYPlusLam } -tmp mutWallFunctionFvPatchScalarField::calcMut() const +tmp mutkWallFunctionFvPatchScalarField::calcMut() const { const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject("RASProperties"); @@ -105,7 +105,7 @@ tmp mutWallFunctionFvPatchScalarField::calcMut() const } -void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const +void mutkWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; @@ -115,7 +115,7 @@ void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField +mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -129,9 +129,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField {} -mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField +mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField ( - const mutWallFunctionFvPatchScalarField& ptf, + const mutkWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -145,7 +145,7 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField {} -mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField +mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -160,9 +160,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField {} -mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField +mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField ( - const mutWallFunctionFvPatchScalarField& wfpsf + const mutkWallFunctionFvPatchScalarField& wfpsf ) : fixedValueFvPatchScalarField(wfpsf), @@ -173,9 +173,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField {} -mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField +mutkWallFunctionFvPatchScalarField::mutkWallFunctionFvPatchScalarField ( - const mutWallFunctionFvPatchScalarField& wfpsf, + const mutkWallFunctionFvPatchScalarField& wfpsf, const DimensionedField& iF ) : @@ -189,15 +189,20 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void mutWallFunctionFvPatchScalarField::updateCoeffs() +void mutkWallFunctionFvPatchScalarField::updateCoeffs() { + if (updated()) + { + return; + } + operator==(calcMut()); fixedValueFvPatchScalarField::updateCoeffs(); } -tmp mutWallFunctionFvPatchScalarField::yPlus() const +tmp mutkWallFunctionFvPatchScalarField::yPlus() const { const label patchI = patch().index(); @@ -214,7 +219,7 @@ tmp mutWallFunctionFvPatchScalarField::yPlus() const } -void mutWallFunctionFvPatchScalarField::write(Ostream& os) const +void mutkWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeLocalEntries(os); @@ -224,7 +229,7 @@ void mutWallFunctionFvPatchScalarField::write(Ostream& os) const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField(fvPatchScalarField, mutWallFunctionFvPatchScalarField); +makePatchTypeField(fvPatchScalarField, mutkWallFunctionFvPatchScalarField); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H similarity index 84% rename from src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H index d90bf01e6e..91b930a344 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.H @@ -23,15 +23,15 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::compressible::RASModels::mutWallFunctionFvPatchScalarField + Foam::compressible::RASModels::mutkWallFunctionFvPatchScalarField Description Boundary condition for turbulent (kinematic) viscosity when using wall - functions + functions, based on turbulence kinetic energy. - replicates OpenFOAM v1.5 (and earlier) behaviour SourceFiles - mutWallFunctionFvPatchScalarField.C + mutkWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ @@ -50,10 +50,10 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class mutWallFunctionFvPatchScalarField Declaration + Class mutkWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class mutWallFunctionFvPatchScalarField +class mutkWallFunctionFvPatchScalarField : public fixedValueFvPatchScalarField { @@ -92,20 +92,20 @@ protected: public: //- Runtime type information - TypeName("mutWallFunction"); + TypeName("mutkWallFunction"); // Constructors //- Construct from patch and internal field - mutWallFunctionFvPatchScalarField + mutkWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - mutWallFunctionFvPatchScalarField + mutkWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -113,20 +113,20 @@ public: ); //- Construct by mapping given - // mutWallFunctionFvPatchScalarField + // mutkWallFunctionFvPatchScalarField // onto a new patch - mutWallFunctionFvPatchScalarField + mutkWallFunctionFvPatchScalarField ( - const mutWallFunctionFvPatchScalarField&, + const mutkWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - mutWallFunctionFvPatchScalarField + mutkWallFunctionFvPatchScalarField ( - const mutWallFunctionFvPatchScalarField& + const mutkWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -134,14 +134,14 @@ public: { return tmp ( - new mutWallFunctionFvPatchScalarField(*this) + new mutkWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - mutWallFunctionFvPatchScalarField + mutkWallFunctionFvPatchScalarField ( - const mutWallFunctionFvPatchScalarField&, + const mutkWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -153,7 +153,7 @@ public: { return tmp ( - new mutWallFunctionFvPatchScalarField(*this, iF) + new mutkWallFunctionFvPatchScalarField(*this, iF) ); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index f377694b21..84ac6ba060 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -169,6 +169,11 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField void omegaWallFunctionFvPatchScalarField::updateCoeffs() { + if (updated()) + { + return; + } + const RASModel& rasModel = db().lookupObject("RASProperties"); const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); const scalarField& y = rasModel.y()[patch().index()]; @@ -222,6 +227,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs() } } + fixedInternalValueFvPatchField::updateCoeffs(); + // TODO: perform averaging for cells sharing more than one boundary face } diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C index 3e3c952ffc..3458e03c6b 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -82,6 +82,10 @@ LESModel::LESModel delta_(LESdelta::New("delta", U.mesh(), *this)) { readIfPresent("k0", k0_); + + // Force the construction of the mesh deltaCoeffs which may be needed + // for the construction of the derived models and BCs + mesh_.deltaCoeffs(); } diff --git a/src/turbulenceModels/incompressible/LES/Make/files b/src/turbulenceModels/incompressible/LES/Make/files index 186324fde3..dae51c090a 100644 --- a/src/turbulenceModels/incompressible/LES/Make/files +++ b/src/turbulenceModels/incompressible/LES/Make/files @@ -32,7 +32,7 @@ kOmegaSSTSAS/kOmegaSSTSAS.C wallFunctions=derivedFvPatchFields/wallFunctions nuSgsWallFunctions=$(wallFunctions)/nuSgsWallFunctions -$(nuSgsWallFunctions)/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C +$(nuSgsWallFunctions)/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C LIB = $(FOAM_LIBBIN)/libincompressibleLESModels diff --git a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C similarity index 84% rename from src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C index 5555fd3086..cde42da5f3 100644 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "nuSgsWallFunctionFvPatchScalarField.H" +#include "nuSgsUSpaldingWallFunctionFvPatchScalarField.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -40,8 +40,8 @@ namespace LESModels // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -nuSgsWallFunctionFvPatchScalarField:: -nuSgsWallFunctionFvPatchScalarField +nuSgsUSpaldingWallFunctionFvPatchScalarField:: +nuSgsUSpaldingWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -55,10 +55,10 @@ nuSgsWallFunctionFvPatchScalarField {} -nuSgsWallFunctionFvPatchScalarField:: -nuSgsWallFunctionFvPatchScalarField +nuSgsUSpaldingWallFunctionFvPatchScalarField:: +nuSgsUSpaldingWallFunctionFvPatchScalarField ( - const nuSgsWallFunctionFvPatchScalarField& ptf, + const nuSgsUSpaldingWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -72,8 +72,8 @@ nuSgsWallFunctionFvPatchScalarField {} -nuSgsWallFunctionFvPatchScalarField:: -nuSgsWallFunctionFvPatchScalarField +nuSgsUSpaldingWallFunctionFvPatchScalarField:: +nuSgsUSpaldingWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -88,10 +88,10 @@ nuSgsWallFunctionFvPatchScalarField {} -nuSgsWallFunctionFvPatchScalarField:: -nuSgsWallFunctionFvPatchScalarField +nuSgsUSpaldingWallFunctionFvPatchScalarField:: +nuSgsUSpaldingWallFunctionFvPatchScalarField ( - const nuSgsWallFunctionFvPatchScalarField& nwfpsf + const nuSgsUSpaldingWallFunctionFvPatchScalarField& nwfpsf ) : fixedValueFvPatchScalarField(nwfpsf), @@ -102,10 +102,10 @@ nuSgsWallFunctionFvPatchScalarField {} -nuSgsWallFunctionFvPatchScalarField:: -nuSgsWallFunctionFvPatchScalarField +nuSgsUSpaldingWallFunctionFvPatchScalarField:: +nuSgsUSpaldingWallFunctionFvPatchScalarField ( - const nuSgsWallFunctionFvPatchScalarField& nwfpsf, + const nuSgsUSpaldingWallFunctionFvPatchScalarField& nwfpsf, const DimensionedField& iF ) : @@ -119,7 +119,7 @@ nuSgsWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void nuSgsWallFunctionFvPatchScalarField::evaluate +void nuSgsUSpaldingWallFunctionFvPatchScalarField::evaluate ( const Pstream::commsTypes ) @@ -133,8 +133,8 @@ void nuSgsWallFunctionFvPatchScalarField::evaluate const scalarField& nuw = patch().lookupPatchField(nuName_); - scalarField& nuSgsw = *this; + scalarField& nuSgsw = *this; scalarField magFaceGradU = mag(U.snGrad()); @@ -178,10 +178,12 @@ void nuSgsWallFunctionFvPatchScalarField::evaluate nuSgsw[facei] = 0; } } + + fixedValueFvPatchScalarField::evaluate(); } -void nuSgsWallFunctionFvPatchScalarField::write(Ostream& os) const +void nuSgsUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeEntryIfDifferent(os, "U", "U", UName_); @@ -197,7 +199,7 @@ void nuSgsWallFunctionFvPatchScalarField::write(Ostream& os) const makePatchTypeField ( fvPatchScalarField, - nuSgsWallFunctionFvPatchScalarField + nuSgsUSpaldingWallFunctionFvPatchScalarField ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.H similarity index 76% rename from src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.H index d1dbeb5fc9..2d122bacac 100644 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsUSpaldingWallFunction/nuSgsUSpaldingWallFunctionFvPatchScalarField.H @@ -24,18 +24,19 @@ License Class Foam::incompressible::LESModels:: - nuSgsWallFunctionFvPatchScalarField + nuSgsUSpaldingWallFunctionFvPatchScalarField Description - Spalart Allmaras wall function boundary condition for incompressible flows + Wall function boundary condition for walls, based on velocity, using + Spaldings law to give a continuous nuSgs profile to the wall (y+ = 0) SourceFiles - nuSgsWallFunctionFvPatchScalarField.C + nuSgsUSpaldingWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef nuSgsWallFunctionFvPatchScalarField_H -#define nuSgsWallFunctionFvPatchScalarField_H +#ifndef nuSgsUSpaldingWallFunctionFvPatchScalarField_H +#define nuSgsUSpaldingWallFunctionFvPatchScalarField_H #include "fixedValueFvPatchFields.H" @@ -49,10 +50,10 @@ namespace LESModels { /*---------------------------------------------------------------------------*\ - Class nuSgsWallFunctionFvPatchScalarField Declaration + Class nuSgsUSpaldingWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class nuSgsWallFunctionFvPatchScalarField +class nuSgsUSpaldingWallFunctionFvPatchScalarField : public fixedValueFvPatchScalarField { @@ -74,20 +75,20 @@ class nuSgsWallFunctionFvPatchScalarField public: //- Runtime type information - TypeName("nuSgsWallFunction"); + TypeName("nuSgsUSpaldingWallFunction"); // Constructors //- Construct from patch and internal field - nuSgsWallFunctionFvPatchScalarField + nuSgsUSpaldingWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - nuSgsWallFunctionFvPatchScalarField + nuSgsUSpaldingWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -95,20 +96,20 @@ public: ); //- Construct by mapping given - // nuSgsWallFunctionFvPatchScalarField + // nuSgsUSpaldingWallFunctionFvPatchScalarField // onto a new patch - nuSgsWallFunctionFvPatchScalarField + nuSgsUSpaldingWallFunctionFvPatchScalarField ( - const nuSgsWallFunctionFvPatchScalarField&, + const nuSgsUSpaldingWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - nuSgsWallFunctionFvPatchScalarField + nuSgsUSpaldingWallFunctionFvPatchScalarField ( - const nuSgsWallFunctionFvPatchScalarField& + const nuSgsUSpaldingWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -116,14 +117,14 @@ public: { return tmp ( - new nuSgsWallFunctionFvPatchScalarField(*this) + new nuSgsUSpaldingWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - nuSgsWallFunctionFvPatchScalarField + nuSgsUSpaldingWallFunctionFvPatchScalarField ( - const nuSgsWallFunctionFvPatchScalarField&, + const nuSgsUSpaldingWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -135,11 +136,7 @@ public: { return tmp ( - new nuSgsWallFunctionFvPatchScalarField - ( - *this, - iF - ) + new nuSgsUSpaldingWallFunctionFvPatchScalarField(*this, iF) ); } diff --git a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 7230b20dc9..33cdeec360 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -293,6 +293,7 @@ bool LaunderGibsonRSTM::read() if (RASModel::read()) { Cmu_.readIfPresent(coeffDict()); + kappa_.readIfPresent(coeffDict()); Clg1_.readIfPresent(coeffDict()); Clg2_.readIfPresent(coeffDict()); C1_.readIfPresent(coeffDict()); diff --git a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C index 50a9aecf89..7e9a54bfd8 100644 --- a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C +++ b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowRe.C @@ -241,6 +241,7 @@ bool LienLeschzinerLowRe::read() sigmak_.readIfPresent(coeffDict()); sigmaEps_.readIfPresent(coeffDict()); Cmu_.readIfPresent(coeffDict()); + kappa_.readIfPresent(coeffDict()); Am_.readIfPresent(coeffDict()); Aepsilon_.readIfPresent(coeffDict()); Amu_.readIfPresent(coeffDict()); diff --git a/src/turbulenceModels/incompressible/RAS/Make/files b/src/turbulenceModels/incompressible/RAS/Make/files index e7ac20e59e..d81b1735b8 100644 --- a/src/turbulenceModels/incompressible/RAS/Make/files +++ b/src/turbulenceModels/incompressible/RAS/Make/files @@ -21,11 +21,11 @@ LamBremhorstKE/LamBremhorstKE.C wallFunctions = derivedFvPatchFields/wallFunctions nutWallFunctions = $(wallFunctions)/nutWallFunctions -$(nutWallFunctions)/nutWallFunction/nutWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C -$(nutWallFunctions)/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C +$(nutWallFunctions)/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C +$(nutWallFunctions)/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C +$(nutWallFunctions)/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C +$(nutWallFunctions)/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C +$(nutWallFunctions)/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C epsilonWallFunctions = $(wallFunctions)/epsilonWallFunctions $(epsilonWallFunctions)/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index 6b300390c9..d3366d8206 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -87,7 +87,11 @@ RASModel::RASModel omegaSmall_("omegaSmall", omega0_.dimensions(), SMALL), y_(mesh_) -{} +{ + // Force the construction of the mesh deltaCoeffs which may be needed + // for the construction of the derived models and BCs + mesh_.deltaCoeffs(); +} // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C index ed37eca064..1cc7867625 100644 --- a/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/turbulenceModels/incompressible/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -233,6 +233,10 @@ tmp SpalartAllmaras::DnuTildaEff() const tmp SpalartAllmaras::k() const { + WarningIn("tmp SpalartAllmaras::k() const") + << "Turbulence kinetic energy not defined for Spalart-Allmaras model. " + << "Returning zero field" << endl; + return tmp ( new volScalarField @@ -252,6 +256,11 @@ tmp SpalartAllmaras::k() const tmp SpalartAllmaras::epsilon() const { + WarningIn("tmp SpalartAllmaras::epsilon() const") + << "Turbulence kinetic energy dissipation rate not defined for " + << "Spalart-Allmaras model. Returning zero field" + << endl; + return tmp ( new volScalarField @@ -326,6 +335,7 @@ bool SpalartAllmaras::read() if (RASModel::read()) { sigmaNut_.readIfPresent(coeffDict()); + kappa_.readIfPresent(coeffDict()); Cb1_.readIfPresent(coeffDict()); Cb2_.readIfPresent(coeffDict()); diff --git a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C index bfa6bb78a1..f71feb939d 100644 --- a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C +++ b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C @@ -27,7 +27,7 @@ License #include "backwardsCompatibilityWallFunctions.H" #include "calculatedFvPatchField.H" -#include "nutWallFunctionFvPatchScalarField.H" +#include "nutkWallFunctionFvPatchScalarField.H" #include "epsilonWallFunctionFvPatchScalarField.H" #include "kqRWallFunctionFvPatchField.H" #include "omegaWallFunctionFvPatchScalarField.H" @@ -75,7 +75,7 @@ tmp autoCreateNut if (isType(bm[patchI])) { nutBoundaryTypes[patchI] = - RASModels::nutWallFunctionFvPatchScalarField::typeName; + RASModels::nutkWallFunctionFvPatchScalarField::typeName; } else { diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 93cad8188c..96815c3931 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -164,6 +164,11 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField void epsilonWallFunctionFvPatchScalarField::updateCoeffs() { + if (updated()) + { + return; + } + const RASModel& rasModel = db().lookupObject("RASProperties"); const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); const scalarField& y = rasModel.y()[patch().index()]; @@ -213,6 +218,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs() } } + fixedInternalValueFvPatchField::updateCoeffs(); + // TODO: perform averaging for cells sharing more than one boundary face } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C similarity index 79% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C index 760559f679..a85c647467 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H" +#include "nutURoughWallFunctionFvPatchScalarField.H" #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -41,8 +41,7 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -tmp -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcNut() const +tmp nutURoughWallFunctionFvPatchScalarField::calcNut() const { const label patchI = patch().index(); @@ -73,8 +72,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcNut() const } -tmp -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus +tmp nutURoughWallFunctionFvPatchScalarField::calcYPlus ( const scalarField& magUp ) const @@ -120,8 +118,8 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus dKsPlusdYPlus = 1; } - // Additional tuning parameter (fudge factor) - nominally = 1 - dKsPlusdYPlus *= roughnessFudgeFactor_; + // Additional tuning parameter - nominally = 1 + dKsPlusdYPlus *= roughnessFactor_; do { @@ -200,82 +198,76 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField:: -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF ) : - nutWallFunctionFvPatchScalarField(p, iF), + nutkWallFunctionFvPatchScalarField(p, iF), roughnessHeight_(pTraits::zero), roughnessConstant_(pTraits::zero), - roughnessFudgeFactor_(pTraits::zero) + roughnessFactor_(pTraits::zero) {} -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField:: -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& ptf, + const nutURoughWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper), + nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), roughnessHeight_(ptf.roughnessHeight_), roughnessConstant_(ptf.roughnessConstant_), - roughnessFudgeFactor_(ptf.roughnessFudgeFactor_) + roughnessFactor_(ptf.roughnessFactor_) {} -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField:: -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : - nutWallFunctionFvPatchScalarField(p, iF, dict), + nutkWallFunctionFvPatchScalarField(p, iF, dict), roughnessHeight_(readScalar(dict.lookup("roughnessHeight"))), roughnessConstant_(readScalar(dict.lookup("roughnessConstant"))), - roughnessFudgeFactor_(readScalar(dict.lookup("roughnessFudgeFactor"))) + roughnessFactor_(readScalar(dict.lookup("roughnessFactor"))) {} -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField:: -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& rwfpsf + const nutURoughWallFunctionFvPatchScalarField& rwfpsf ) : - nutWallFunctionFvPatchScalarField(rwfpsf), + nutkWallFunctionFvPatchScalarField(rwfpsf), roughnessHeight_(rwfpsf.roughnessHeight_), roughnessConstant_(rwfpsf.roughnessConstant_), - roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_) + roughnessFactor_(rwfpsf.roughnessFactor_) {} -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField:: -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +nutURoughWallFunctionFvPatchScalarField::nutURoughWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& rwfpsf, + const nutURoughWallFunctionFvPatchScalarField& rwfpsf, const DimensionedField& iF ) : - nutWallFunctionFvPatchScalarField(rwfpsf, iF), + nutkWallFunctionFvPatchScalarField(rwfpsf, iF), roughnessHeight_(rwfpsf.roughnessHeight_), roughnessConstant_(rwfpsf.roughnessConstant_), - roughnessFudgeFactor_(rwfpsf.roughnessFudgeFactor_) + roughnessFactor_(rwfpsf.roughnessFactor_) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp -nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const +tmp nutURoughWallFunctionFvPatchScalarField::yPlus() const { const label patchI = patch().index(); @@ -287,10 +279,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const } -void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write -( - Ostream& os -) const +void nutURoughWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeLocalEntries(os); @@ -298,8 +287,8 @@ void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write << roughnessHeight_ << token::END_STATEMENT << nl; os.writeKeyword("roughnessConstant") << roughnessConstant_ << token::END_STATEMENT << nl; - os.writeKeyword("roughnessFudgeFactor") - << roughnessFudgeFactor_ << token::END_STATEMENT << nl; + os.writeKeyword("roughnessFactor") + << roughnessFactor_ << token::END_STATEMENT << nl; writeEntry("value", os); } @@ -309,7 +298,7 @@ void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write makePatchTypeField ( fvPatchScalarField, - nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + nutURoughWallFunctionFvPatchScalarField ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H similarity index 73% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H index 8d72e5ad13..1fbb24f9c5 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.H @@ -23,21 +23,20 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::incompressible::RASModels:: - nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + Foam::incompressible::RASModels::nutURoughWallFunctionFvPatchScalarField Description - Wall function boundary condition for rough walls + Wall function boundary condition for rough walls, based on velocity. SourceFiles nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H -#define nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField_H +#ifndef nutURoughWallFunctionFvPatchScalarField_H +#define nutURoughWallFunctionFvPatchScalarField_H -#include "nutWallFunctionFvPatchScalarField.H" +#include "nutkWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,12 +48,12 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ -Class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField Declaration + Class nutURoughWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField +class nutURoughWallFunctionFvPatchScalarField : - public nutWallFunctionFvPatchScalarField + public nutkWallFunctionFvPatchScalarField { // Private data @@ -67,7 +66,7 @@ class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField scalar roughnessConstant_; //- Scale factor - scalar roughnessFudgeFactor_; + scalar roughnessFactor_; // Protected member functions @@ -82,20 +81,20 @@ class nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField public: //- Runtime type information - TypeName("nutSpalartAllmarasStandardRoughWallFunction"); + TypeName("nutURoughWallFunction"); // Constructors //- Construct from patch and internal field - nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + nutURoughWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + nutURoughWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -103,20 +102,20 @@ public: ); //- Construct by mapping given - // nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + // nutURoughWallFunctionFvPatchScalarField // onto a new patch - nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + nutURoughWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&, + const nutURoughWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + nutURoughWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField& + const nutURoughWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -124,17 +123,14 @@ public: { return tmp ( - new nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField - ( - *this - ) + new nutURoughWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField + nutURoughWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField&, + const nutURoughWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -146,11 +142,7 @@ public: { return tmp ( - new nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField - ( - *this, - iF - ) + new nutURoughWallFunctionFvPatchScalarField(*this, iF) ); } @@ -185,16 +177,16 @@ public: } //- Return the roughness scale factor - const scalar& roughnessFudgeFactor() const + const scalar& roughnessFactor() const { - return roughnessFudgeFactor_; + return roughnessFactor_; } //- Return reference to the roughness scale factor to allow // adjustment - scalar& roughnessFudgeFactor() + scalar& roughnessFactor() { - return roughnessFudgeFactor_; + return roughnessFactor_; } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C similarity index 77% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C index 8b968a4fa2..f24001bc6e 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "nutSpalartAllmarasWallFunctionFvPatchScalarField.H" +#include "nutUSpaldingWallFunctionFvPatchScalarField.H" #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -41,8 +41,7 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -tmp -nutSpalartAllmarasWallFunctionFvPatchScalarField::calcNut() const +tmp nutUSpaldingWallFunctionFvPatchScalarField::calcNut() const { const label patchI = patch().index(); @@ -55,7 +54,7 @@ nutSpalartAllmarasWallFunctionFvPatchScalarField::calcNut() const } -tmp nutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau +tmp nutUSpaldingWallFunctionFvPatchScalarField::calcUTau ( const scalarField& magGradU ) const @@ -114,67 +113,66 @@ tmp nutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -nutSpalartAllmarasWallFunctionFvPatchScalarField:: -nutSpalartAllmarasWallFunctionFvPatchScalarField +nutUSpaldingWallFunctionFvPatchScalarField:: +nutUSpaldingWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF ) : - nutWallFunctionFvPatchScalarField(p, iF) + nutkWallFunctionFvPatchScalarField(p, iF) {} -nutSpalartAllmarasWallFunctionFvPatchScalarField:: -nutSpalartAllmarasWallFunctionFvPatchScalarField +nutUSpaldingWallFunctionFvPatchScalarField:: +nutUSpaldingWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasWallFunctionFvPatchScalarField& ptf, + const nutUSpaldingWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) + nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper) {} -nutSpalartAllmarasWallFunctionFvPatchScalarField:: -nutSpalartAllmarasWallFunctionFvPatchScalarField +nutUSpaldingWallFunctionFvPatchScalarField:: +nutUSpaldingWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : - nutWallFunctionFvPatchScalarField(p, iF, dict) + nutkWallFunctionFvPatchScalarField(p, iF, dict) {} -nutSpalartAllmarasWallFunctionFvPatchScalarField:: -nutSpalartAllmarasWallFunctionFvPatchScalarField +nutUSpaldingWallFunctionFvPatchScalarField:: +nutUSpaldingWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf + const nutUSpaldingWallFunctionFvPatchScalarField& wfpsf ) : - nutWallFunctionFvPatchScalarField(wfpsf) + nutkWallFunctionFvPatchScalarField(wfpsf) {} -nutSpalartAllmarasWallFunctionFvPatchScalarField:: -nutSpalartAllmarasWallFunctionFvPatchScalarField +nutUSpaldingWallFunctionFvPatchScalarField:: +nutUSpaldingWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasWallFunctionFvPatchScalarField& wfpsf, + const nutUSpaldingWallFunctionFvPatchScalarField& wfpsf, const DimensionedField& iF ) : - nutWallFunctionFvPatchScalarField(wfpsf, iF) + nutkWallFunctionFvPatchScalarField(wfpsf, iF) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp -nutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const +tmp nutUSpaldingWallFunctionFvPatchScalarField::yPlus() const { const label patchI = patch().index(); @@ -187,10 +185,7 @@ nutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const } -void nutSpalartAllmarasWallFunctionFvPatchScalarField::write -( - Ostream& os -) const +void nutUSpaldingWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeLocalEntries(os); @@ -203,7 +198,7 @@ void nutSpalartAllmarasWallFunctionFvPatchScalarField::write makePatchTypeField ( fvPatchScalarField, - nutSpalartAllmarasWallFunctionFvPatchScalarField + nutUSpaldingWallFunctionFvPatchScalarField ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H similarity index 74% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H index 36f2aadb15..de663d32a9 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.H @@ -23,21 +23,21 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::incompressible::RASModels:: - nutSpalartAllmarasWallFunctionFvPatchScalarField + Foam::incompressible::RASModels::nutUSpaldingWallFunctionFvPatchScalarField Description - Wall function boundary condition for walls + Wall function boundary condition for walls, based on velocity, using + Spaldings law to give a continuous nut profile to the wall (y+ = 0) SourceFiles - nutSpalartAllmarasWallFunctionFvPatchScalarField.C + nutUSpaldingWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef nutSpalartAllmarasWallFunctionFvPatchScalarField_H -#define nutSpalartAllmarasWallFunctionFvPatchScalarField_H +#ifndef nutUSpaldingWallFunctionFvPatchScalarField_H +#define nutUSpaldingWallFunctionFvPatchScalarField_H -#include "nutWallFunctionFvPatchScalarField.H" +#include "nutkWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,12 +49,12 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class nutSpalartAllmarasWallFunctionFvPatch Declaration + Class nutUSpaldingWallFunctionFvPatch Declaration \*---------------------------------------------------------------------------*/ -class nutSpalartAllmarasWallFunctionFvPatchScalarField +class nutUSpaldingWallFunctionFvPatchScalarField : - public nutWallFunctionFvPatchScalarField + public nutkWallFunctionFvPatchScalarField { protected: @@ -70,20 +70,20 @@ protected: public: //- Runtime type information - TypeName("nutSpalartAllmarasWallFunction"); + TypeName("nutUSpaldingWallFunction"); // Constructors //- Construct from patch and internal field - nutSpalartAllmarasWallFunctionFvPatchScalarField + nutUSpaldingWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - nutSpalartAllmarasWallFunctionFvPatchScalarField + nutUSpaldingWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -91,20 +91,20 @@ public: ); //- Construct by mapping given - // nutSpalartAllmarasWallFunctionFvPatchScalarField + // nutUSpaldingWallFunctionFvPatchScalarField // onto a new patch - nutSpalartAllmarasWallFunctionFvPatchScalarField + nutUSpaldingWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasWallFunctionFvPatchScalarField&, + const nutUSpaldingWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - nutSpalartAllmarasWallFunctionFvPatchScalarField + nutUSpaldingWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasWallFunctionFvPatchScalarField& + const nutUSpaldingWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -112,14 +112,14 @@ public: { return tmp ( - new nutSpalartAllmarasWallFunctionFvPatchScalarField(*this) + new nutUSpaldingWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - nutSpalartAllmarasWallFunctionFvPatchScalarField + nutUSpaldingWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasWallFunctionFvPatchScalarField&, + const nutUSpaldingWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -131,7 +131,7 @@ public: { return tmp ( - new nutSpalartAllmarasWallFunctionFvPatchScalarField(*this, iF) + new nutUSpaldingWallFunctionFvPatchScalarField(*this, iF) ); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C similarity index 74% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C index e3c3e55671..bccc07672f 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H" +#include "nutUWallFunctionFvPatchScalarField.H" #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -41,8 +41,7 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -tmp -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcNut() const +tmp nutUWallFunctionFvPatchScalarField::calcNut() const { const label patchI = patch().index(); @@ -70,8 +69,7 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcNut() const } -tmp -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus +tmp nutUWallFunctionFvPatchScalarField::calcYPlus ( const scalarField& magUp ) const @@ -111,67 +109,61 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField +nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF ) : - nutWallFunctionFvPatchScalarField(p, iF) + nutkWallFunctionFvPatchScalarField(p, iF) {} -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField +nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField& ptf, + const nutUWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper) + nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper) {} -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField +nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : - nutWallFunctionFvPatchScalarField(p, iF, dict) + nutkWallFunctionFvPatchScalarField(p, iF, dict) {} -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField +nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf + const nutUWallFunctionFvPatchScalarField& sawfpsf ) : - nutWallFunctionFvPatchScalarField(sawfpsf) + nutkWallFunctionFvPatchScalarField(sawfpsf) {} -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField:: -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField +nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField& sawfpsf, + const nutUWallFunctionFvPatchScalarField& sawfpsf, const DimensionedField& iF ) : - nutWallFunctionFvPatchScalarField(sawfpsf, iF) + nutkWallFunctionFvPatchScalarField(sawfpsf, iF) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp -nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const +tmp nutUWallFunctionFvPatchScalarField::yPlus() const { const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject("RASProperties"); @@ -182,10 +174,7 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const } -void nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write -( - Ostream& os -) const +void nutUWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeLocalEntries(os); @@ -198,7 +187,7 @@ void nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write makePatchTypeField ( fvPatchScalarField, - nutSpalartAllmarasStandardWallFunctionFvPatchScalarField + nutUWallFunctionFvPatchScalarField ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H similarity index 70% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H index f54bb57c8a..32bd0aad51 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.H @@ -23,21 +23,20 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::incompressible::RASModels:: - nutSpalartAllmarasStandardWallFunctionFvPatchScalarField + Foam::incompressible::RASModels::nutUWallFunctionFvPatchScalarField Description - Wall function boundary condition for walls + Wall function boundary condition for walls, based on velocity. SourceFiles - nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C + nutUWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef nutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H -#define nutSpalartAllmarasStandardWallFunctionFvPatchScalarField_H +#ifndef nutUWallFunctionFvPatchScalarField_H +#define nutUWallFunctionFvPatchScalarField_H -#include "nutWallFunctionFvPatchScalarField.H" +#include "nutkWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,12 +48,12 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class nutSpalartAllmarasStandardWallFunctionFvPatchScalarField Declaration + Class nutUWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class nutSpalartAllmarasStandardWallFunctionFvPatchScalarField +class nutUWallFunctionFvPatchScalarField : - public nutWallFunctionFvPatchScalarField + public nutkWallFunctionFvPatchScalarField { protected: @@ -70,20 +69,20 @@ protected: public: //- Runtime type information - TypeName("nutSpalartAllmarasStandardWallFunction"); + TypeName("nutUWallFunction"); // Constructors //- Construct from patch and internal field - nutSpalartAllmarasStandardWallFunctionFvPatchScalarField + nutUWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - nutSpalartAllmarasStandardWallFunctionFvPatchScalarField + nutUWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -91,20 +90,20 @@ public: ); //- Construct by mapping given - // nutSpalartAllmarasStandardWallFunctionFvPatchScalarField + // nutUWallFunctionFvPatchScalarField // onto a new patch - nutSpalartAllmarasStandardWallFunctionFvPatchScalarField + nutUWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField&, + const nutUWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - nutSpalartAllmarasStandardWallFunctionFvPatchScalarField + nutUWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField& + const nutUWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -112,17 +111,14 @@ public: { return tmp ( - new nutSpalartAllmarasStandardWallFunctionFvPatchScalarField - ( - *this - ) + new nutUWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - nutSpalartAllmarasStandardWallFunctionFvPatchScalarField + nutUWallFunctionFvPatchScalarField ( - const nutSpalartAllmarasStandardWallFunctionFvPatchScalarField&, + const nutUWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -134,11 +130,7 @@ public: { return tmp ( - new nutSpalartAllmarasStandardWallFunctionFvPatchScalarField - ( - *this, - iF - ) + new nutUWallFunctionFvPatchScalarField(*this, iF) ); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C similarity index 76% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C index 48d9ba1dde..f81cb76c5c 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "nutRoughWallFunctionFvPatchScalarField.H" +#include "nutkRoughWallFunctionFvPatchScalarField.H" #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -41,7 +41,7 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -scalar nutRoughWallFunctionFvPatchScalarField::fnRough +scalar nutkRoughWallFunctionFvPatchScalarField::fnRough ( const scalar KsPlus, const scalar Cs @@ -64,7 +64,7 @@ scalar nutRoughWallFunctionFvPatchScalarField::fnRough } -tmp nutRoughWallFunctionFvPatchScalarField::calcNut() const +tmp nutkRoughWallFunctionFvPatchScalarField::calcNut() const { const label patchI = patch().index(); @@ -128,63 +128,63 @@ tmp nutRoughWallFunctionFvPatchScalarField::calcNut() const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField +nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF ) : - nutWallFunctionFvPatchScalarField(p, iF), + nutkWallFunctionFvPatchScalarField(p, iF), Ks_(p.size(), 0.0), Cs_(p.size(), 0.0) {} -nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField +nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField ( - const nutRoughWallFunctionFvPatchScalarField& ptf, + const nutkRoughWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper ) : - nutWallFunctionFvPatchScalarField(ptf, p, iF, mapper), + nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), Ks_(ptf.Ks_, mapper), Cs_(ptf.Cs_, mapper) {} -nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField +nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, const dictionary& dict ) : - nutWallFunctionFvPatchScalarField(p, iF, dict), + nutkWallFunctionFvPatchScalarField(p, iF, dict), Ks_("Ks", dict, p.size()), Cs_("Cs", dict, p.size()) {} -nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField +nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField ( - const nutRoughWallFunctionFvPatchScalarField& rwfpsf + const nutkRoughWallFunctionFvPatchScalarField& rwfpsf ) : - nutWallFunctionFvPatchScalarField(rwfpsf), + nutkWallFunctionFvPatchScalarField(rwfpsf), Ks_(rwfpsf.Ks_), Cs_(rwfpsf.Cs_) {} -nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField +nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField ( - const nutRoughWallFunctionFvPatchScalarField& rwfpsf, + const nutkRoughWallFunctionFvPatchScalarField& rwfpsf, const DimensionedField& iF ) : - nutWallFunctionFvPatchScalarField(rwfpsf, iF), + nutkWallFunctionFvPatchScalarField(rwfpsf, iF), Ks_(rwfpsf.Ks_), Cs_(rwfpsf.Cs_) {} @@ -192,34 +192,34 @@ nutRoughWallFunctionFvPatchScalarField::nutRoughWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void nutRoughWallFunctionFvPatchScalarField::autoMap +void nutkRoughWallFunctionFvPatchScalarField::autoMap ( const fvPatchFieldMapper& m ) { - nutWallFunctionFvPatchScalarField::autoMap(m); + nutkWallFunctionFvPatchScalarField::autoMap(m); Ks_.autoMap(m); Cs_.autoMap(m); } -void nutRoughWallFunctionFvPatchScalarField::rmap +void nutkRoughWallFunctionFvPatchScalarField::rmap ( const fvPatchScalarField& ptf, const labelList& addr ) { - nutWallFunctionFvPatchScalarField::rmap(ptf, addr); + nutkWallFunctionFvPatchScalarField::rmap(ptf, addr); - const nutRoughWallFunctionFvPatchScalarField& nrwfpsf = - refCast(ptf); + const nutkRoughWallFunctionFvPatchScalarField& nrwfpsf = + refCast(ptf); Ks_.rmap(nrwfpsf.Ks_, addr); Cs_.rmap(nrwfpsf.Cs_, addr); } -void nutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const +void nutkRoughWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeLocalEntries(os); @@ -231,7 +231,11 @@ void nutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField(fvPatchScalarField, nutRoughWallFunctionFvPatchScalarField); +makePatchTypeField +( + fvPatchScalarField, + nutkRoughWallFunctionFvPatchScalarField +); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H similarity index 79% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H index 488bf39145..c45bedc516 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.H @@ -23,11 +23,11 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::incompressible::RASModels::nutRoughWallFunctionFvPatchScalarField + Foam::incompressible::RASModels::nutkRoughWallFunctionFvPatchScalarField Description Boundary condition for turbulent (kinematic) viscosity when using wall - functions for rough walls. + functions for rough walls, based on turbulence kinetic energy. Manipulates the E parameter to account for roughness effects, based on KsPlus. @@ -36,14 +36,14 @@ Description - roughness constant = 0.5-1.0 (0.5 default) SourceFiles - nutRoughWallFunctionFvPatchScalarField.C + nutkRoughWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef nutRoughWallFunctionFvPatchScalarField_H -#define nutRoughWallFunctionFvPatchScalarField_H +#ifndef nutkRoughWallFunctionFvPatchScalarField_H +#define nutkRoughWallFunctionFvPatchScalarField_H -#include "nutWallFunctionFvPatchScalarField.H" +#include "nutkWallFunctionFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -55,12 +55,12 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class nutRoughWallFunctionFvPatchScalarField Declaration + Class nutkRoughWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class nutRoughWallFunctionFvPatchScalarField +class nutkRoughWallFunctionFvPatchScalarField : - public nutWallFunctionFvPatchScalarField + public nutkWallFunctionFvPatchScalarField { protected: @@ -85,20 +85,20 @@ protected: public: //- Runtime type information - TypeName("nutRoughWallFunction"); + TypeName("nutkRoughWallFunction"); // Constructors //- Construct from patch and internal field - nutRoughWallFunctionFvPatchScalarField + nutkRoughWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - nutRoughWallFunctionFvPatchScalarField + nutkRoughWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -106,20 +106,20 @@ public: ); //- Construct by mapping given - // nutRoughWallFunctionFvPatchScalarField + // nutkRoughWallFunctionFvPatchScalarField // onto a new patch - nutRoughWallFunctionFvPatchScalarField + nutkRoughWallFunctionFvPatchScalarField ( - const nutRoughWallFunctionFvPatchScalarField&, + const nutkRoughWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - nutRoughWallFunctionFvPatchScalarField + nutkRoughWallFunctionFvPatchScalarField ( - const nutRoughWallFunctionFvPatchScalarField& + const nutkRoughWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -127,14 +127,14 @@ public: { return tmp ( - new nutRoughWallFunctionFvPatchScalarField(*this) + new nutkRoughWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - nutRoughWallFunctionFvPatchScalarField + nutkRoughWallFunctionFvPatchScalarField ( - const nutRoughWallFunctionFvPatchScalarField&, + const nutkRoughWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -146,7 +146,7 @@ public: { return tmp ( - new nutRoughWallFunctionFvPatchScalarField(*this, iF) + new nutkRoughWallFunctionFvPatchScalarField(*this, iF) ); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C similarity index 82% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C index aef4df68b3..dbb07712d8 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ -#include "nutWallFunctionFvPatchScalarField.H" +#include "nutkWallFunctionFvPatchScalarField.H" #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -42,11 +42,11 @@ namespace RASModels // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -void nutWallFunctionFvPatchScalarField::checkType() +void nutkWallFunctionFvPatchScalarField::checkType() { if (!isA(patch())) { - FatalErrorIn("nutWallFunctionFvPatchScalarField::checkType()") + FatalErrorIn("nutkWallFunctionFvPatchScalarField::checkType()") << "Invalid wall function specification" << nl << " Patch type for patch " << patch().name() << " must be wall" << nl @@ -56,7 +56,7 @@ void nutWallFunctionFvPatchScalarField::checkType() } -scalar nutWallFunctionFvPatchScalarField::calcYPlusLam +scalar nutkWallFunctionFvPatchScalarField::calcYPlusLam ( const scalar kappa, const scalar E @@ -73,7 +73,7 @@ scalar nutWallFunctionFvPatchScalarField::calcYPlusLam } -tmp nutWallFunctionFvPatchScalarField::calcNut() const +tmp nutkWallFunctionFvPatchScalarField::calcNut() const { const label patchI = patch().index(); @@ -104,7 +104,7 @@ tmp nutWallFunctionFvPatchScalarField::calcNut() const } -void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const +void nutkWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; @@ -114,7 +114,7 @@ void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField +nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -130,9 +130,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField } -nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField +nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField ( - const nutWallFunctionFvPatchScalarField& ptf, + const nutkWallFunctionFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -148,7 +148,7 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField } -nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField +nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -165,9 +165,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField } -nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField +nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField ( - const nutWallFunctionFvPatchScalarField& wfpsf + const nutkWallFunctionFvPatchScalarField& wfpsf ) : fixedValueFvPatchScalarField(wfpsf), @@ -180,9 +180,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField } -nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField +nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField ( - const nutWallFunctionFvPatchScalarField& wfpsf, + const nutkWallFunctionFvPatchScalarField& wfpsf, const DimensionedField& iF ) : @@ -198,15 +198,20 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void nutWallFunctionFvPatchScalarField::updateCoeffs() +void nutkWallFunctionFvPatchScalarField::updateCoeffs() { + if (updated()) + { + return; + } + operator==(calcNut()); fixedValueFvPatchScalarField::updateCoeffs(); } -tmp nutWallFunctionFvPatchScalarField::yPlus() const +tmp nutkWallFunctionFvPatchScalarField::yPlus() const { const label patchI = patch().index(); @@ -222,7 +227,7 @@ tmp nutWallFunctionFvPatchScalarField::yPlus() const } -void nutWallFunctionFvPatchScalarField::write(Ostream& os) const +void nutkWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeLocalEntries(os); @@ -232,7 +237,7 @@ void nutWallFunctionFvPatchScalarField::write(Ostream& os) const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makePatchTypeField(fvPatchScalarField, nutWallFunctionFvPatchScalarField); +makePatchTypeField(fvPatchScalarField, nutkWallFunctionFvPatchScalarField); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H similarity index 82% rename from src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H rename to src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H index 369d718b0a..5b781a934a 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.H @@ -23,20 +23,20 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::incompressible::RASModels::nutWallFunctionFvPatchScalarField + Foam::incompressible::RASModels::nutkWallFunctionFvPatchScalarField Description Boundary condition for turbulent (kinematic) viscosity when using wall - functions + functions, based on turbulence kinetic energy. - replicates OpenFOAM v1.5 (and earlier) behaviour SourceFiles - nutWallFunctionFvPatchScalarField.C + nutkWallFunctionFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef nutWallFunctionFvPatchScalarField_H -#define nutWallFunctionFvPatchScalarField_H +#ifndef nutkWallFunctionFvPatchScalarField_H +#define nutkWallFunctionFvPatchScalarField_H #include "fixedValueFvPatchFields.H" @@ -50,10 +50,10 @@ namespace RASModels { /*---------------------------------------------------------------------------*\ - Class nutWallFunctionFvPatchScalarField Declaration + Class nutkWallFunctionFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class nutWallFunctionFvPatchScalarField +class nutkWallFunctionFvPatchScalarField : public fixedValueFvPatchScalarField { @@ -92,20 +92,20 @@ protected: public: //- Runtime type information - TypeName("nutWallFunction"); + TypeName("nutkWallFunction"); // Constructors //- Construct from patch and internal field - nutWallFunctionFvPatchScalarField + nutkWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - nutWallFunctionFvPatchScalarField + nutkWallFunctionFvPatchScalarField ( const fvPatch&, const DimensionedField&, @@ -113,20 +113,20 @@ public: ); //- Construct by mapping given - // nutWallFunctionFvPatchScalarField + // nutkWallFunctionFvPatchScalarField // onto a new patch - nutWallFunctionFvPatchScalarField + nutkWallFunctionFvPatchScalarField ( - const nutWallFunctionFvPatchScalarField&, + const nutkWallFunctionFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - nutWallFunctionFvPatchScalarField + nutkWallFunctionFvPatchScalarField ( - const nutWallFunctionFvPatchScalarField& + const nutkWallFunctionFvPatchScalarField& ); //- Construct and return a clone @@ -134,14 +134,14 @@ public: { return tmp ( - new nutWallFunctionFvPatchScalarField(*this) + new nutkWallFunctionFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - nutWallFunctionFvPatchScalarField + nutkWallFunctionFvPatchScalarField ( - const nutWallFunctionFvPatchScalarField&, + const nutkWallFunctionFvPatchScalarField&, const DimensionedField& ); @@ -153,7 +153,7 @@ public: { return tmp ( - new nutWallFunctionFvPatchScalarField(*this, iF) + new nutkWallFunctionFvPatchScalarField(*this, iF) ); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 300b0aaf4f..105ee1de71 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -164,6 +164,11 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField void omegaWallFunctionFvPatchScalarField::updateCoeffs() { + if (updated()) + { + return; + } + const RASModel& rasModel = db().lookupObject("RASProperties"); const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_); const scalarField& y = rasModel.y()[patch().index()]; @@ -212,6 +217,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs() } } + fixedInternalValueFvPatchField::updateCoeffs(); + // TODO: perform averaging for cells sharing more than one boundary face } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution index 6213437696..d07fcd05f0 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution +++ b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PCG; @@ -41,79 +25,13 @@ solvers relTol 0; } - ft + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; - relTol 0; } - fu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - b - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Xi - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Su - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - hu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon + "(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution index 6213437696..faeb96b22f 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PCG; @@ -41,79 +25,14 @@ solvers relTol 0; } - ft + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } - fu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - b - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Xi - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Su - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - hu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon + "(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution index d7814dd904..1ccfb0e86e 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PCG; @@ -41,79 +25,14 @@ solvers relTol 0; } - ft + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } - fu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - b - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Xi - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Su - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - hu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon + "(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/dieselFoam/aachenBomb/0/mut b/tutorials/combustion/dieselFoam/aachenBomb/0/mut index a26a484df3..747fa2e1f1 100644 --- a/tutorials/combustion/dieselFoam/aachenBomb/0/mut +++ b/tutorials/combustion/dieselFoam/aachenBomb/0/mut @@ -23,7 +23,7 @@ boundaryField { walls { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } } diff --git a/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution b/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution index 0d7e29c2b5..a1ebddd2ca 100644 --- a/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution +++ b/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution @@ -8,7 +8,7 @@ FoamFile { version 2.0; - format binary; + format ascii; class dictionary; location "system"; object fvSolution; @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - p { solver PCG; @@ -41,31 +25,13 @@ solvers relTol 0; } - Yi + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-06; - relTol 0; } - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - epsilon + "(U|Yi|h|k|epsilon)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/engineFoam/kivaTest/-180/mut b/tutorials/combustion/engineFoam/kivaTest/-180/mut index 4aa8e4942b..741abaf73f 100644 --- a/tutorials/combustion/engineFoam/kivaTest/-180/mut +++ b/tutorials/combustion/engineFoam/kivaTest/-180/mut @@ -23,7 +23,7 @@ boundaryField { piston { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -31,7 +31,7 @@ boundaryField } liner { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -39,7 +39,7 @@ boundaryField } cylinderHead { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/combustion/engineFoam/kivaTest/system/fvSolution b/tutorials/combustion/engineFoam/kivaTest/system/fvSolution index 1891fe83bf..9c14f182e1 100644 --- a/tutorials/combustion/engineFoam/kivaTest/system/fvSolution +++ b/tutorials/combustion/engineFoam/kivaTest/system/fvSolution @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PCG; @@ -41,79 +25,14 @@ solvers relTol 0; } - ft + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } - fu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - b - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Xi - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Su - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - hu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon + "(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution index 09395b92a3..8beaac4383 100644 --- a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,9 @@ solvers e { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-10 relTol 0; + $U; + tolerance 1e-10; + relTol 0; } } diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution index 1b0e6d8a3e..8e6dae039c 100644 --- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,8 @@ solvers e { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-09 relTol 0.1; + $U; + relTol 0.1; } } diff --git a/tutorials/compressible/rhoCentralFoam/forwardStep/system/fvSolution b/tutorials/compressible/rhoCentralFoam/forwardStep/system/fvSolution index 48811594f1..7a6b9b148a 100644 --- a/tutorials/compressible/rhoCentralFoam/forwardStep/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/forwardStep/system/fvSolution @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,9 @@ solvers h { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-10 relTol 0; + $U; + tolerance 1e-10; + relTol 0; } } diff --git a/tutorials/compressible/rhoCentralFoam/obliqueShock/system/fvSolution b/tutorials/compressible/rhoCentralFoam/obliqueShock/system/fvSolution index 48811594f1..7a6b9b148a 100644 --- a/tutorials/compressible/rhoCentralFoam/obliqueShock/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/obliqueShock/system/fvSolution @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,9 @@ solvers h { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-10 relTol 0; + $U; + tolerance 1e-10; + relTol 0; } } diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSolution b/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSolution index 48811594f1..7a6b9b148a 100644 --- a/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSolution @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,9 @@ solvers h { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-10 relTol 0; + $U; + tolerance 1e-10; + relTol 0; } } diff --git a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/system/fvSolution b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/system/fvSolution index 48811594f1..7a6b9b148a 100644 --- a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/system/fvSolution @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,9 @@ solvers h { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-10 relTol 0; + $U; + tolerance 1e-10; + relTol 0; } } diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/mut b/tutorials/compressible/rhoPimpleFoam/angledDuct/0/mut index 3caf2a763d..46709ca669 100644 --- a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/mut +++ b/tutorials/compressible/rhoPimpleFoam/angledDuct/0/mut @@ -23,22 +23,22 @@ boundaryField { front { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } back { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } wall { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } porosityWall { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } inlet diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution index 583c3637aa..bb9efe6559 100644 --- a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution @@ -17,10 +17,24 @@ FoamFile solvers { - rho + p { solver PCG; preconditioner DIC; + tolerance 1e-06; + relTol 0.01; + } + + pFinal + { + $p; + tolerance 1e-06; + relTol 0; + } + + rho + { + $p; tolerance 1e-05; relTol 0; } @@ -33,77 +47,15 @@ solvers relTol 0.1; } - UFinal + h { $U; } + + "(UFinal|hFinal|R|k|epsilon|omega)" { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-05; relTol 0; } - p - { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0.01; - } - - pFinal - { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - hFinal - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - omega - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PIMPLE @@ -117,12 +69,11 @@ PIMPLE relaxationFactors { - U 0.7; p 0.3; rho 0.05; + U 0.7; h 0.7; - k 0.7; - omega 0.7; + "(k|epsilon|omega)" 0.7; } diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution b/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution index a945332784..b016735ea1 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution +++ b/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - rho + "(p|rho)" { solver PCG; preconditioner DIC; @@ -33,42 +33,9 @@ solvers relTol 0; } - p + "(U|k|B|nuTilda)" { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - nuTilda - { - solver PBiCG; - preconditioner DILU; + $h; tolerance 1e-05; relTol 0; } diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/mut b/tutorials/compressible/rhoPisoFoam/ras/cavity/0/mut index eac0c1e9aa..40518123e7 100644 --- a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/mut +++ b/tutorials/compressible/rhoPisoFoam/ras/cavity/0/mut @@ -23,7 +23,7 @@ boundaryField { movingWall { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -31,7 +31,7 @@ boundaryField } fixedWalls { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution b/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution index 72b829ca39..863d53ae7f 100644 --- a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution +++ b/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PCG; @@ -41,39 +25,14 @@ solvers relTol 0; } - h + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - omega + "(U|h|R|k|epsilon|omega)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution index 844c55c57c..bca8aa6720 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution @@ -46,20 +46,9 @@ solvers relTol 0.1; } - k + "(k|epsilon)" { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-07; - relTol 0.1; - } - - epsilon - { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; + $U; tolerance 1e-07; relTol 0.1; } @@ -76,8 +65,7 @@ relaxationFactors p 0.3; rho 0.05; U 0.7; - k 0.7; - epsilon 0.7; + "(k|epsilon)" 0.7; h 0.5; } diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/mut b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/mut index a557d62335..ed42bb0c0e 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/mut +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/0/mut @@ -23,25 +23,25 @@ boundaryField { front { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } back { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } wall { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } porosityWall { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution index 334b1287bd..5785a9798e 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution @@ -8,7 +8,7 @@ FoamFile { version 2.0; - format binary; + format ascii; class dictionary; location "system"; object fvSolution; @@ -37,16 +37,7 @@ solvers relTol 0.1; } - k - { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-07; - relTol 0.1; - } - - epsilon + "(k|epsilon)" { solver smoothSolver; smoother GaussSeidel; @@ -68,8 +59,7 @@ relaxationFactors p 0.3; rho 1; U 0.7; - k 0.9; - epsilon 0.9; + "(k|epsilon)" 0.9; h 0.9; } diff --git a/tutorials/compressible/rhoSonicFoam/forwardStep/system/fvSolution b/tutorials/compressible/rhoSonicFoam/forwardStep/system/fvSolution index 9a29517e84..5a5c63eb6c 100644 --- a/tutorials/compressible/rhoSonicFoam/forwardStep/system/fvSolution +++ b/tutorials/compressible/rhoSonicFoam/forwardStep/system/fvSolution @@ -17,31 +17,7 @@ FoamFile solvers { - p - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoU - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoE + "(p|rho|rhoU|rhoE)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/rhoSonicFoam/shockTube/system/fvSolution b/tutorials/compressible/rhoSonicFoam/shockTube/system/fvSolution index 9a29517e84..5a5c63eb6c 100644 --- a/tutorials/compressible/rhoSonicFoam/shockTube/system/fvSolution +++ b/tutorials/compressible/rhoSonicFoam/shockTube/system/fvSolution @@ -17,31 +17,7 @@ FoamFile solvers { - p - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoU - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoE + "(p|rho|rhoU|rhoE)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/rhopSonicFoam/shockTube/system/fvSolution b/tutorials/compressible/rhopSonicFoam/shockTube/system/fvSolution index 202961f804..1f5b9bbf66 100644 --- a/tutorials/compressible/rhopSonicFoam/shockTube/system/fvSolution +++ b/tutorials/compressible/rhopSonicFoam/shockTube/system/fvSolution @@ -25,31 +25,7 @@ solvers relTol 0; } - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoU - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoE - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoH + "(rho|rhoU|rhoE|rhoH)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/rhopSonicFoam/wedge15Ma5/system/fvSolution b/tutorials/compressible/rhopSonicFoam/wedge15Ma5/system/fvSolution index 296ffb3319..11d75c60c3 100644 --- a/tutorials/compressible/rhopSonicFoam/wedge15Ma5/system/fvSolution +++ b/tutorials/compressible/rhopSonicFoam/wedge15Ma5/system/fvSolution @@ -25,31 +25,7 @@ solvers relTol 0; } - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoU - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoE - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoH + "(rho|rhoU|rhoE|rhoH)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution b/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution index 93b01a8285..bf44ab8ab2 100644 --- a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution +++ b/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution @@ -25,10 +25,9 @@ solvers relTol 0; } - U + "(U|e)" { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } @@ -40,14 +39,6 @@ solvers tolerance 1e-05; relTol 0; } - - e - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution b/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution index 58c5fb5202..948330cc5b 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution +++ b/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution @@ -17,15 +17,7 @@ FoamFile solvers { - p - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - U + "(p|U|e)" { solver PBiCG; preconditioner DILU; @@ -40,14 +32,6 @@ solvers tolerance 1e-15; relTol 0; } - - e - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } } PISO diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution index b7e967eeb2..d85a6d5e98 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution @@ -33,42 +33,9 @@ solvers relTol 0; } - U + "(U|e|k|epsilon|R)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - e - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-08; relTol 0; } diff --git a/tutorials/compressible/sonicFoam/ras/prism/0/mut b/tutorials/compressible/sonicFoam/ras/prism/0/mut index 2278015c7b..604af39b10 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/0/mut +++ b/tutorials/compressible/sonicFoam/ras/prism/0/mut @@ -43,7 +43,7 @@ boundaryField } prismWall { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } defaultFaces diff --git a/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution b/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution index 20afd845a0..5f22468321 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution +++ b/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution @@ -33,45 +33,20 @@ solvers relTol 0; } - U + "(U|e|R)" { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } - e + "(k|epsilon)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-08; relTol 0; } - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution b/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution index 0b8bc2b1c3..f5364dd73a 100644 --- a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution +++ b/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution @@ -27,8 +27,7 @@ solvers U { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } diff --git a/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution b/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution index 177af26b52..737956951d 100644 --- a/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution +++ b/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution @@ -25,26 +25,17 @@ solvers relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - pB { - solver PCG; - preconditioner DIC; + $p; + tolerance 1e-05; + relTol 0; + } + + "(U|B)" + { + solver PBiCG; + preconditioner DILU; tolerance 1e-05; relTol 0; } diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut index 3b427915fc..57b8cfbcdd 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut @@ -23,17 +23,17 @@ boundaryField { floor { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } ceiling { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } fixedWalls { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution index 39cc9a45f4..2526e8b4b1 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution @@ -27,45 +27,12 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-07; relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - T - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R + "(U|T|k|epsilon|R)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/nut b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/nut index 3b427915fc..57b8cfbcdd 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/nut +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/nut @@ -23,17 +23,17 @@ boundaryField { floor { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } ceiling { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } fixedWalls { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution index 8524660a6a..e27eae3fe5 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution @@ -25,39 +25,7 @@ solvers relTol 0.01; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - T - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - R + "(U|T|k|epsilon|R)" { solver PBiCG; preconditioner DILU; @@ -79,9 +47,7 @@ relaxationFactors p 0.7; U 0.2; T 0.7; - k 0.7; - epsilon 0.7; - R 0.7; + "(k|epsilon|R)" 0.7; } diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/0/nut b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/0/nut index 26e59c7cd3..87027f2cc2 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/0/nut +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/0/nut @@ -23,25 +23,25 @@ boundaryField { ground { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } igloo_region0 { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } twoFridgeFreezers_seal_0 { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } twoFridgeFreezers_herring_1 { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSolution b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSolution index f24144294e..b04fdc8e05 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSolution +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSolution @@ -25,39 +25,7 @@ solvers relTol 0.01; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - T - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - R + "(U|T|k|epsilon|R)" { solver PBiCG; preconditioner DILU; @@ -79,9 +47,7 @@ relaxationFactors p 0.3; U 0.7; T 0.7; - k 0.7; - epsilon 0.7; - R 0.7; + "(k|epsilon|R)" 0.7; } diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut index 675eb6014b..32e5dfbb20 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut +++ b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut @@ -23,17 +23,17 @@ boundaryField { floor { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } ceiling { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } fixedWalls { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution index 2d5e8be034..c1e26f6e57 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution @@ -35,45 +35,12 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-06; relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R + "(U|h|k|epsilon|R)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/mut b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/mut index 06a40eb020..ab109864e0 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/mut +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/0/mut @@ -23,7 +23,7 @@ boundaryField { floor { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -31,7 +31,7 @@ boundaryField } ceiling { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -39,7 +39,7 @@ boundaryField } fixedWalls { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution index 8d67100cf8..db8f4e2294 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution @@ -25,39 +25,7 @@ solvers relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R + "(U|h|k|epsilon|R)" { solver PBiCG; preconditioner DILU; @@ -70,7 +38,7 @@ SIMPLE { nNonOrthogonalCorrectors 0; pRefCell 0; - pRefValue 1e5; + pRefValue 100000; } relaxationFactors @@ -79,9 +47,7 @@ relaxationFactors p 0.7; U 0.2; h 0.7; - k 0.7; - epsilon 0.7; - R 0.7; + "(k|epsilon|R)" 0.7; } diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/0/mut b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/0/mut index df9665bbef..0c91ea84e9 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/0/mut +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/0/mut @@ -23,22 +23,22 @@ boundaryField { box { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } floor { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } ceiling { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } fixedWalls { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSolution index b450f1eb75..a6d32c8a9c 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSolution @@ -25,31 +25,7 @@ solvers relTol 0.01; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - epsilon + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -59,8 +35,7 @@ solvers G { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-05; relTol 0.1; } @@ -69,8 +44,8 @@ solvers SIMPLE { nNonOrthogonalCorrectors 0; - pRefCell 0; - pRefValue 0; + pRefCell 0; + pRefValue 0; } relaxationFactors @@ -79,8 +54,7 @@ relaxationFactors p 0.3; U 0.7; h 0.7; - k 0.7; - epsilon 0.7; + "(k|epsilon)" 0.7; G 0.7; } diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/mut b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/mut index 3baf1d358a..a7ba9f9007 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/mut +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/0/mut @@ -23,7 +23,7 @@ boundaryField { box { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -31,7 +31,7 @@ boundaryField } floor { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -39,7 +39,7 @@ boundaryField } ceiling { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; @@ -47,7 +47,7 @@ boundaryField } fixedWalls { - type mutWallFunction; + type mutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSolution index 14ade54123..4afcc3aafa 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSolution +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSolution @@ -29,39 +29,7 @@ solvers mergeLevels 1; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - Ii + "(U|h|k|epsilon|Ii)" { solver PBiCG; preconditioner DILU; @@ -73,18 +41,17 @@ solvers SIMPLE { nNonOrthogonalCorrectors 0; - pRefCell 0; - pRefValue 0; + pRefCell 0; + pRefValue 0; } relaxationFactors { - rho 1.0; + rho 1; p 0.3; U 0.7; h 0.7; - k 0.7; - epsilon 0.7; + "(k|epsilon)" 0.7; "ILambda.*" 0.7; } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution index 3248e05562..16947842af 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution @@ -22,7 +22,8 @@ solvers preconditioner DIC; tolerance 1e-8; relTol 0; - }; + } + p { solver GAMG; @@ -31,68 +32,38 @@ solvers smoother GaussSeidel; - cacheAgglomeration true; + cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; - }; + } + pFinal { - solver GAMG; + $p; tolerance 1e-8; relTol 0; + } - smoother GaussSeidel; - - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; U { solver PBiCG; preconditioner DILU; tolerance 1e-08; relTol 0; - }; + } h { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-08; relTol 0.1; - }; - hFinal - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + } - k + "(hFinal|k|epsilon|R)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + $U; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution index 3248e05562..27f5cfb1dd 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution @@ -22,7 +22,8 @@ solvers preconditioner DIC; tolerance 1e-8; relTol 0; - }; + } + p { solver GAMG; @@ -35,64 +36,34 @@ solvers nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; - }; + } + pFinal { - solver GAMG; + $p; tolerance 1e-8; relTol 0; + } - smoother GaussSeidel; - - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; U { solver PBiCG; preconditioner DILU; tolerance 1e-08; relTol 0; - }; + } h { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-08; relTol 0.1; - }; - hFinal - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + } - k + "(hFinal|k|epsilon|R)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + $U; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSolution index 3248e05562..a2f76a21ca 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSolution @@ -22,7 +22,8 @@ solvers preconditioner DIC; tolerance 1e-8; relTol 0; - }; + } + p { solver GAMG; @@ -35,64 +36,35 @@ solvers nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; - }; + } + pFinal { - solver GAMG; + $p; tolerance 1e-8; relTol 0; + } - smoother GaussSeidel; - - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; U { solver PBiCG; preconditioner DILU; tolerance 1e-08; relTol 0; - }; + } h { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-08; relTol 0.1; - }; - hFinal - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + } - k + + "(hFinal|k|epsilon|R)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + $U; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSolution index 3248e05562..27f5cfb1dd 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSolution @@ -22,7 +22,8 @@ solvers preconditioner DIC; tolerance 1e-8; relTol 0; - }; + } + p { solver GAMG; @@ -35,64 +36,34 @@ solvers nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; - }; + } + pFinal { - solver GAMG; + $p; tolerance 1e-8; relTol 0; + } - smoother GaussSeidel; - - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; U { solver PBiCG; preconditioner DILU; tolerance 1e-08; relTol 0; - }; + } h { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-08; relTol 0.1; - }; - hFinal - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + } - k + "(hFinal|k|epsilon|R)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + $U; + } } PISO diff --git a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/0/nut b/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/0/nut index 765db2eefe..a8bd969de2 100644 --- a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/0/nut +++ b/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/0/nut @@ -23,13 +23,13 @@ boundaryField { rotor { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } stator { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/0/nut b/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/0/nut index 3a8408227f..5bcd4c4a1d 100644 --- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/0/nut +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/0/nut @@ -23,12 +23,12 @@ boundaryField { lowerWall { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } upperWall { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } frontBack diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/nut b/tutorials/incompressible/pimpleFoam/t-junction/0/nut index e2834c67e4..b4a42336aa 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/nut +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/nut @@ -41,7 +41,7 @@ boundaryField defaultFaces { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } } diff --git a/tutorials/incompressible/pisoFoam/ras/cavity/0/nut b/tutorials/incompressible/pisoFoam/ras/cavity/0/nut index 0f4ab2e87b..a6fe8c0fe7 100644 --- a/tutorials/incompressible/pisoFoam/ras/cavity/0/nut +++ b/tutorials/incompressible/pisoFoam/ras/cavity/0/nut @@ -23,12 +23,12 @@ boundaryField { movingWall { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } fixedWalls { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } frontAndBack diff --git a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution index 8bc3472e95..18870c0af0 100644 --- a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution +++ b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1e-6; relTol 0.01; - }; + } hFinal { @@ -30,7 +30,7 @@ solvers preconditioner DIC; tolerance 1e-8; relTol 0; - }; + } hU { diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/0/nut b/tutorials/incompressible/simpleFoam/airFoil2D/0/nut index e9e99c91ff..96e4a43d3c 100644 --- a/tutorials/incompressible/simpleFoam/airFoil2D/0/nut +++ b/tutorials/incompressible/simpleFoam/airFoil2D/0/nut @@ -34,7 +34,7 @@ boundaryField wall { - type nutSpalartAllmarasWallFunction; + type nutUSpaldingWallFunction; value uniform 0; } diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/k b/tutorials/incompressible/simpleFoam/motorBike/0/k index 257b472da8..457efefed2 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0/k +++ b/tutorials/incompressible/simpleFoam/motorBike/0/k @@ -20,6 +20,29 @@ dimensions [0 2 -2 0 0 0 0]; internalField uniform $turbulentKE; -#include "turbulentBoundaryField" +boundaryField +{ + #include "fixedInlet" + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + lowerWall + { + type kqRWallFunction; + } + + "motorBike_.*" + { + type kqRWallFunction; + } + + #include "frontBackUpperPatches" +} + // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/nut b/tutorials/incompressible/simpleFoam/motorBike/0/nut index b4358c7589..fa90ca590f 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0/nut +++ b/tutorials/incompressible/simpleFoam/motorBike/0/nut @@ -41,7 +41,7 @@ boundaryField lowerWall { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } @@ -53,7 +53,7 @@ boundaryField "motorBike_.*" { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } } diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/omega b/tutorials/incompressible/simpleFoam/motorBike/0/omega index 94cbf590c2..16424f9bb3 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0/omega +++ b/tutorials/incompressible/simpleFoam/motorBike/0/omega @@ -20,6 +20,29 @@ dimensions [0 0 -1 0 0 0 0]; internalField uniform $turbulentOmega; -#include "turbulentBoundaryField" +boundaryField +{ + #include "fixedInlet" + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + lowerWall + { + type omegaWallFunction; + } + + "motorBike_.*" + { + type omegaWallFunction; + } + + #include "frontBackUpperPatches" +} + // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/turbulentBoundaryField b/tutorials/incompressible/simpleFoam/motorBike/0/turbulentBoundaryField deleted file mode 100644 index aa4e5eded9..0000000000 --- a/tutorials/incompressible/simpleFoam/motorBike/0/turbulentBoundaryField +++ /dev/null @@ -1,33 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ - -boundaryField -{ - #include "fixedInlet" - - outlet - { - type inletOutlet; - inletValue $internalField; - value $internalField; - } - - lowerWall - { - type kqRWallFunction; - } - - "motorBike_.*" - { - type kqRWallFunction; - } - - #include "frontBackUpperPatches" -} - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution b/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution index 2dcaef0c14..3b0a3e35b6 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution +++ b/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution @@ -28,7 +28,7 @@ solvers agglomerator faceAreaPair; nCellsInCoarsestLevel 10; mergeLevels 1; - }; + } U { @@ -37,7 +37,7 @@ solvers tolerance 1e-8; relTol 0.1; nSweeps 1; - }; + } k { @@ -46,7 +46,7 @@ solvers tolerance 1e-8; relTol 0.1; nSweeps 1; - }; + } omega { @@ -55,7 +55,7 @@ solvers tolerance 1e-8; relTol 0.1; nSweeps 1; - }; + } } SIMPLE diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/0/nut b/tutorials/incompressible/simpleFoam/pitzDaily/0/nut index e07c5bc529..9a66ad0c26 100644 --- a/tutorials/incompressible/simpleFoam/pitzDaily/0/nut +++ b/tutorials/incompressible/simpleFoam/pitzDaily/0/nut @@ -33,12 +33,12 @@ boundaryField } upperWall { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } lowerWall { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } frontAndBack diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/0/nut b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/0/nut index e07c5bc529..9a66ad0c26 100644 --- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/0/nut +++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/0/nut @@ -33,12 +33,12 @@ boundaryField } upperWall { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } lowerWall { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } frontAndBack diff --git a/tutorials/incompressible/simpleSRFFoam/mixer/0/nut b/tutorials/incompressible/simpleSRFFoam/mixer/0/nut index d60fe7a176..82d057a58b 100644 --- a/tutorials/incompressible/simpleSRFFoam/mixer/0/nut +++ b/tutorials/incompressible/simpleSRFFoam/mixer/0/nut @@ -33,13 +33,13 @@ boundaryField } innerWall { - type nutWallFunction; + type nutkWallFunction; U Urel; value uniform 0; } outerWall { - type nutWallFunction; + type nutkWallFunction; U Urel; value uniform 0; } diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/mut b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/mut index 3b8469c894..fa451536fc 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/mut +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/0/mut @@ -23,17 +23,17 @@ boundaryField { top { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } bottom { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } walls { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } symmetry diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution index 5e1041dd83..d875b9f976 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution @@ -17,118 +17,37 @@ FoamFile solvers { - rho + "(rho|G)" { solver PCG; preconditioner DIC; tolerance 1e-05; relTol 0; - }; - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; + } + p { solver PBiCG; preconditioner DILU; tolerance 1e-06; relTol 0; - }; - G - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - }; - Yi - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - CO2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - O2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - N2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - CH4 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - H2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - H2O - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - CO - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - h + } + + "(U|h|R|k|epsilon)" { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0; - }; - R + } + + "(Yi|CO2|O2|N2|CH4|H2|H2O|CO)" { solver PBiCG; preconditioner DILU; - tolerance 1e-05; + tolerance 1e-06; relTol 0; - }; - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; + } } PISO diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0.org/mut b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0.org/mut index c9695f501a..9a7573f3f1 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0.org/mut +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0.org/mut @@ -23,7 +23,7 @@ boundaryField { walls { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } inlet diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0/mut b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0/mut index c9695f501a..9a7573f3f1 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0/mut +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/0/mut @@ -23,7 +23,7 @@ boundaryField { walls { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } inlet diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution index cdefcfb103..8083f38051 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution @@ -17,108 +17,50 @@ FoamFile solvers { - rho + "(rho|G)" { solver PCG; preconditioner DIC; tolerance 1e-05; relTol 0; - }; - U + } + + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0; - }; + } + p { - solver GAMG; - tolerance 0; - relTol 0.1; - - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - + solver GAMG; + tolerance 0; + relTol 0.1; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; + agglomerator faceAreaPair; + mergeLevels 1; + } + pFinal { - solver GAMG; - tolerance 1e-6; - relTol 0; + $p; + tolerance 1e-06; + relTol 0; + } - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - - cacheAgglomeration true; - - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; - G - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - }; - Yi + "(Yi|O2|N2|H2O)" { solver PBiCG; preconditioner DILU; tolerance 1e-06; relTol 0; - }; - O2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - N2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - H2O - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; + } } PISO @@ -128,7 +70,6 @@ PISO nCorrectors 2; nNonOrthogonalCorrectors 0; momentumPredictor yes; -// nUCorrectors 2; } additional @@ -140,14 +81,7 @@ additional relaxationFactors { -/* - U 1; - k 1; - kepsilon 1; - h 1; - rho 1; - p 1; -*/ } + // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution index f0ef609117..736a2e3e70 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution @@ -17,20 +17,22 @@ FoamFile solvers { - rho + "(rho|G)" { solver PCG; preconditioner DIC; tolerance 1e-05; relTol 0; } - U + + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0; } + p { solver PCG; @@ -38,62 +40,14 @@ solvers tolerance 1e-06; relTol 0; } - G - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - Yi + + "(Yi|O2|N2|H2O)" { solver PBiCG; preconditioner DILU; tolerance 1e-06; relTol 0; } - O2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - N2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - H2O - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/mut b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/mut index 3b8469c894..fa451536fc 100644 --- a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/mut +++ b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/0/mut @@ -23,17 +23,17 @@ boundaryField { top { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } bottom { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } walls { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } symmetry diff --git a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution index 9b1a12fa2b..0cdd3e30cf 100644 --- a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution +++ b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - rho + "(rho|G)" { solver PCG; preconditioner DIC; @@ -25,14 +25,6 @@ solvers relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PBiCG; @@ -41,108 +33,16 @@ solvers relTol 0; } - G + "(U|h|R|k|epsilon)" { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-05; relTol 0; } - Yi + "(Yi|CO2|O2|N2|CH4|H2|H2O|CO)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - CO2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - O2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - N2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - CH4 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - H2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - H2O - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - CO - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; + $p; } } diff --git a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution index eab8882126..1d754fee8a 100644 --- a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution +++ b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution @@ -19,44 +19,38 @@ solvers { p { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0; - }; + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } U { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + cellDisplacement { solver GAMG; - tolerance 1e-8; + tolerance 1e-08; relTol 0; smoother GaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; - }; - cellMotionU + } + + "(cellMotionU|cellMotionUz)" { - solver PCG; - preconditioner DIC; - tolerance 1e-08; - relTol 0; - }; - cellMotionUz - { - solver PCG; - preconditioner DIC; - tolerance 1e-08; - relTol 0; - }; + $p; + tolerance 1e-08; + relTol 0; + } } diff --git a/tutorials/multiphase/bubbleFoam/bubbleColumn/system/fvSolution b/tutorials/multiphase/bubbleFoam/bubbleColumn/system/fvSolution index d59f49c6ca..efb3bcdede 100644 --- a/tutorials/multiphase/bubbleFoam/bubbleColumn/system/fvSolution +++ b/tutorials/multiphase/bubbleFoam/bubbleColumn/system/fvSolution @@ -25,7 +25,7 @@ solvers relTol 0; } - Ua + "(Ua|Ub|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -33,45 +33,13 @@ solvers relTol 0; } - Ub - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - alpha + "(alpha|beta)" { solver PBiCG; preconditioner DILU; tolerance 1e-10; relTol 0; } - - beta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-10; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSolution b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSolution index ae28961258..e74558359b 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSolution +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSolution @@ -8,7 +8,7 @@ FoamFile { version 2.0; - format binary; + format ascii; class dictionary; location "system"; object fvSolution; @@ -17,31 +17,7 @@ FoamFile solvers { - omega - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - U + "(rho|U|k|omega)" { solver PBiCG; preconditioner DILU; @@ -65,16 +41,9 @@ solvers pFinal { - solver GAMG; + $p; tolerance 1e-08; relTol 0; - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; } } diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSolution b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSolution index ae28961258..e74558359b 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSolution +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSolution @@ -8,7 +8,7 @@ FoamFile { version 2.0; - format binary; + format ascii; class dictionary; location "system"; object fvSolution; @@ -17,31 +17,7 @@ FoamFile solvers { - omega - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - U + "(rho|U|k|omega)" { solver PBiCG; preconditioner DILU; @@ -65,16 +41,9 @@ solvers pFinal { - solver GAMG; + $p; tolerance 1e-08; relTol 0; - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; } } diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/0/nut b/tutorials/multiphase/cavitatingFoam/ras/throttle/0/nut index 793a490863..ba78652d58 100644 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/0/nut +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/0/nut @@ -33,7 +33,7 @@ boundaryField } walls { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } frontBack diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSolution b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSolution index 188e593e19..c1f55e94e3 100644 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSolution +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSolution @@ -17,31 +17,7 @@ FoamFile solvers { - omega - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - U + "(rho|U|k|omega)" { solver PBiCG; preconditioner DILU; @@ -65,16 +41,9 @@ solvers pFinal { - solver GAMG; + $p; tolerance 1e-08; relTol 0; - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; } } diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution index 872b88e305..3a08b2c430 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-05; relTol 0; maxIter 100; @@ -78,7 +77,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-07; relTol 0; maxIter 20; @@ -93,23 +91,7 @@ solvers nSweeps 1; } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - nuTilda + "(k|B|nuTilda)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSolution index 872b88e305..3a08b2c430 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSolution +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSolution @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-05; relTol 0; maxIter 100; @@ -78,7 +77,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-07; relTol 0; maxIter 20; @@ -93,23 +91,7 @@ solvers nSweeps 1; } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - nuTilda + "(k|B|nuTilda)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution index 577db9c0f6..f22eaa81b5 100644 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution +++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 0.0001; relTol 0; maxIter 100; @@ -73,7 +72,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-08; relTol 0; maxIter 20; @@ -88,23 +86,7 @@ solvers nSweeps 1; } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - nuTilda + "(k|B|nuTilda)" { solver PBiCG; preconditioner DILU; @@ -121,9 +103,8 @@ PISO nAlphaCorr 1; nAlphaSubCycles 3; cAlpha 1; - - pRefPoint (0.51 0.51 0.51); - pRefValue 0; + pRefPoint ( 0.51 0.51 0.51 ); + pRefValue 0; } diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSolution b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSolution index b9b4490f4c..53033e72f4 100644 --- a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSolution +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSolution @@ -35,8 +35,7 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-07; relTol 0; } diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution b/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution index fe91ceb9b0..a4167c7f07 100644 --- a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution +++ b/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution @@ -35,8 +35,7 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-07; relTol 0; } diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSolution b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSolution index 296fc3df64..0c7e65f659 100644 --- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSolution +++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSolution @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-05; relTol 0; maxIter 100; @@ -73,7 +72,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-07; relTol 0; maxIter 20; @@ -88,23 +86,7 @@ solvers nSweeps 1; } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - nuTilda + "(k|B|nuTilda)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/interFoam/ras/damBreak/0/mut b/tutorials/multiphase/interFoam/ras/damBreak/0/mut index 8a09c067b2..41747664d5 100644 --- a/tutorials/multiphase/interFoam/ras/damBreak/0/mut +++ b/tutorials/multiphase/interFoam/ras/damBreak/0/mut @@ -23,19 +23,19 @@ boundaryField { leftWall { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } rightWall { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } lowerWall { - type mutWallFunction; + type mutkWallFunction; value uniform 0; } diff --git a/tutorials/multiphase/interFoam/ras/damBreak/0/nut b/tutorials/multiphase/interFoam/ras/damBreak/0/nut index 1ee1e7242e..7924a8da87 100644 --- a/tutorials/multiphase/interFoam/ras/damBreak/0/nut +++ b/tutorials/multiphase/interFoam/ras/damBreak/0/nut @@ -23,17 +23,17 @@ boundaryField { leftWall { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } rightWall { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } lowerWall { - type nutWallFunction; + type nutkWallFunction; value uniform 0; } atmosphere diff --git a/tutorials/multiphase/interFoam/ras/damBreak/system/fvSolution b/tutorials/multiphase/interFoam/ras/damBreak/system/fvSolution index 921889c586..e30eb5d36e 100644 --- a/tutorials/multiphase/interFoam/ras/damBreak/system/fvSolution +++ b/tutorials/multiphase/interFoam/ras/damBreak/system/fvSolution @@ -35,8 +35,7 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-07; relTol 0; } @@ -49,34 +48,9 @@ solvers relTol 0; } - k + "(k|epsilon|R|nuTilda)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - nuTilda - { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-08; relTol 0; } diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSolution b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSolution index 9f6930eccf..8b11d7fe20 100644 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSolution +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSolution @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 2; } - tolerance 1e-05; relTol 0; maxIter 100; @@ -73,22 +72,12 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-07; relTol 0; maxIter 20; } - U - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-08; - relTol 0; - nSweeps 1; - } - - alpha + "(U|alpha)" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSolution b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSolution index 9f6930eccf..8b11d7fe20 100644 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSolution +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSolution @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 2; } - tolerance 1e-05; relTol 0; maxIter 100; @@ -73,22 +72,12 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-07; relTol 0; maxIter 20; } - U - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-08; - relTol 0; - nSweeps 1; - } - - alpha + "(U|alpha)" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSolution b/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSolution index 148cdcddc5..631ac4e0c5 100644 --- a/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSolution +++ b/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - p + "(p|rho)" { solver PCG; preconditioner DIC; @@ -25,39 +25,7 @@ solvers relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-07; - relTol 0; - } - - Alpha + "(U|k|epsilon|Alpha)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSolution b/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSolution index 148cdcddc5..631ac4e0c5 100644 --- a/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSolution +++ b/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - p + "(p|rho)" { solver PCG; preconditioner DIC; @@ -25,39 +25,7 @@ solvers relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-07; - relTol 0; - } - - Alpha + "(U|k|epsilon|Alpha)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution b/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution index 0589345336..5c86c7303d 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution +++ b/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution @@ -8,7 +8,7 @@ FoamFile { version 2.0; - format binary; + format ascii; class dictionary; location "system"; object fvSolution; @@ -32,7 +32,7 @@ solvers mergeLevels 1; } - Ua + "(Ua|Ub|Theta|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,53 +40,13 @@ solvers relTol 0; } - Ub - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - alpha + "(alpha|beta)" { solver PBiCG; preconditioner DILU; tolerance 1e-10; relTol 0; } - - beta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-10; - relTol 0; - } - - Theta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/multiphase/twoPhaseEulerFoam/bed2/system/fvSolution b/tutorials/multiphase/twoPhaseEulerFoam/bed2/system/fvSolution index 733ad77e71..442a4c551f 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/bed2/system/fvSolution +++ b/tutorials/multiphase/twoPhaseEulerFoam/bed2/system/fvSolution @@ -32,7 +32,7 @@ solvers mergeLevels 1; } - Ua + "(Ua|Ub|Theta|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,53 +40,13 @@ solvers relTol 0; } - Ub - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - alpha + "(alpha|beta)" { solver PBiCG; preconditioner DILU; tolerance 1e-10; relTol 0; } - - beta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-10; - relTol 0; - } - - Theta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO @@ -106,8 +66,7 @@ relaxationFactors alpha 1; beta 1; Theta 1; - k 1; - epsilon 1; + "(k|epsilon)" 1; } diff --git a/tutorials/multiphase/twoPhaseEulerFoam/bubbleColumn/system/fvSolution b/tutorials/multiphase/twoPhaseEulerFoam/bubbleColumn/system/fvSolution index efb0cb6b6a..6f373c13fd 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/bubbleColumn/system/fvSolution +++ b/tutorials/multiphase/twoPhaseEulerFoam/bubbleColumn/system/fvSolution @@ -32,7 +32,7 @@ solvers mergeLevels 1; } - Ua + "(Ua|Ub|Theta|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,53 +40,13 @@ solvers relTol 0; } - Ub - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - alpha + "(alpha|beta)" { solver PBiCG; preconditioner DILU; tolerance 1e-10; relTol 0; } - - beta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-10; - relTol 0; - } - - Theta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/system/fvSolution b/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/system/fvSolution index e921d9233a..143f9e36a7 100644 --- a/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/system/fvSolution +++ b/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/system/fvSolution @@ -17,19 +17,7 @@ FoamFile solvers { - D - { - solver GAMG; - tolerance 1e-06; - relTol 0.9; - smoother GaussSeidel; - cacheAgglomeration true; - nCellsInCoarsestLevel 20; - agglomerator faceAreaPair; - mergeLevels 1; - } - - T + "(D|T)" { solver GAMG; tolerance 1e-06; diff --git a/tutorials/stressAnalysis/solidEquilibriumDisplacementFoam/beamEndLoad/system/fvSolution b/tutorials/stressAnalysis/solidEquilibriumDisplacementFoam/beamEndLoad/system/fvSolution index fd610d55c5..68a7119006 100644 --- a/tutorials/stressAnalysis/solidEquilibriumDisplacementFoam/beamEndLoad/system/fvSolution +++ b/tutorials/stressAnalysis/solidEquilibriumDisplacementFoam/beamEndLoad/system/fvSolution @@ -17,25 +17,13 @@ FoamFile solvers { - D + "(D|Dcorr)" { solver GAMG; tolerance 1e-06; relTol 0.99; smoother GaussSeidel; - cacheAgglomeration true; - nCellsInCoarsestLevel 6; - agglomerator faceAreaPair; - mergeLevels 1; - } - - Dcorr - { - solver GAMG; - tolerance 1e-06; - relTol 0.99; - smoother GaussSeidel; - cacheAgglomeration true; + cacheAgglomeration true; nCellsInCoarsestLevel 6; agglomerator faceAreaPair; mergeLevels 1; diff --git a/wmake/Makefile b/wmake/Makefile index 28b7015b71..6b4fd0abe6 100644 --- a/wmake/Makefile +++ b/wmake/Makefile @@ -22,11 +22,11 @@ # along with OpenFOAM; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# Script +# File # Makefile # # Description -# Generic Makefile used by wmake +# A generic Makefile, used by wmake # #------------------------------------------------------------------------------ diff --git a/wmake/MakefileApps b/wmake/MakefileApps index 56c089c853..55efa80ff8 100644 --- a/wmake/MakefileApps +++ b/wmake/MakefileApps @@ -22,11 +22,11 @@ # along with OpenFOAM; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# Script +# File # MakefileApps # # Description -# Makefile used by +# Makefile used by # wmake all # to make the applications in the subdirectories of the current directory # diff --git a/wmake/MakefileFiles b/wmake/MakefileFiles index 4c2ef52826..d927682d9b 100644 --- a/wmake/MakefileFiles +++ b/wmake/MakefileFiles @@ -22,11 +22,11 @@ # along with OpenFOAM; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# Script +# File # MakefileFiles # # Description -# General, easy to use make system for multi-platform development. +# A Makefile for the 'files', used by wmake # #------------------------------------------------------------------------------ @@ -40,7 +40,7 @@ include $(RULES)/general include $(OBJECTS_DIR)/options #------------------------------------------------------------------------------ -# declare names of make system control files derived from file files +# declare names of make system control files derived from file 'files' #------------------------------------------------------------------------------ FILES = $(WM_OPTIONS)/files @@ -51,7 +51,7 @@ DFILES = $(WM_OPTIONS)/dependencyFiles IFILES = $(WM_OPTIONS)/includeDeps #------------------------------------------------------------------------------ -# Declare dependecy of all make system files on FILE +# Declare dependecy of all make system files on FILES # Causes all derived files to be remade if any are changed or missing #------------------------------------------------------------------------------ diff --git a/wmake/MakefileOptions b/wmake/MakefileOptions index 92834a9a65..3e7779ff52 100644 --- a/wmake/MakefileOptions +++ b/wmake/MakefileOptions @@ -22,11 +22,11 @@ # along with OpenFOAM; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# Script +# File # MakefileOptions # # Description -# General, easy to use make system for multi-platform development. +# A Makefile for the 'options', used by wmake # #------------------------------------------------------------------------------ @@ -37,13 +37,13 @@ include $(GENERAL_RULES)/general include $(RULES)/general #------------------------------------------------------------------------------ -# declare names of make system control files derived from file files +# declare names of make system control files derived from file 'options' #------------------------------------------------------------------------------ OPTIONS = $(WM_OPTIONS)/options #------------------------------------------------------------------------------ -# Declare dependency of all make system files on FILE +# Declare dependency of all make system files on OPTIONS # Causes all derived files to be remade if any are changed or missing #------------------------------------------------------------------------------ diff --git a/wmake/rules/linux64Gcc/cOpt b/wmake/rules/linux64Gcc/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linux64Gcc/cOpt +++ b/wmake/rules/linux64Gcc/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linux64Gcc/mplib b/wmake/rules/linux64Gcc/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linux64Gcc/mplib +++ b/wmake/rules/linux64Gcc/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linux64Gcc/mplibGAMMA b/wmake/rules/linux64Gcc/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linux64Gcc/mplibGAMMA +++ b/wmake/rules/linux64Gcc/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linux64Gcc/mplibMPICH b/wmake/rules/linux64Gcc/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linux64Gcc/mplibMPICH +++ b/wmake/rules/linux64Gcc/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linux64Gcc42/c++Opt b/wmake/rules/linux64Gcc42/c++Opt index 8ac07d2124..3446f7f58c 100644 --- a/wmake/rules/linux64Gcc42/c++Opt +++ b/wmake/rules/linux64Gcc42/c++Opt @@ -1,4 +1,4 @@ -c++DBUG = +c++DBUG = c++OPT = -O3 #c++OPT = -march=nocona -O3 # -ftree-vectorize -ftree-vectorizer-verbose=3 diff --git a/wmake/rules/linux64Gcc42/cOpt b/wmake/rules/linux64Gcc42/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linux64Gcc42/cOpt +++ b/wmake/rules/linux64Gcc42/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linux64Gcc42/mplib b/wmake/rules/linux64Gcc42/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linux64Gcc42/mplib +++ b/wmake/rules/linux64Gcc42/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linux64Gcc42/mplibGAMMA b/wmake/rules/linux64Gcc42/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linux64Gcc42/mplibGAMMA +++ b/wmake/rules/linux64Gcc42/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linux64Gcc42/mplibMPICH b/wmake/rules/linux64Gcc42/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linux64Gcc42/mplibMPICH +++ b/wmake/rules/linux64Gcc42/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linux64Gcc43/c++Opt b/wmake/rules/linux64Gcc43/c++Opt index 8ac07d2124..3446f7f58c 100644 --- a/wmake/rules/linux64Gcc43/c++Opt +++ b/wmake/rules/linux64Gcc43/c++Opt @@ -1,4 +1,4 @@ -c++DBUG = +c++DBUG = c++OPT = -O3 #c++OPT = -march=nocona -O3 # -ftree-vectorize -ftree-vectorizer-verbose=3 diff --git a/wmake/rules/linux64Gcc43/cOpt b/wmake/rules/linux64Gcc43/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linux64Gcc43/cOpt +++ b/wmake/rules/linux64Gcc43/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linux64Gcc43/mplib b/wmake/rules/linux64Gcc43/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linux64Gcc43/mplib +++ b/wmake/rules/linux64Gcc43/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linux64Gcc43/mplibGAMMA b/wmake/rules/linux64Gcc43/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linux64Gcc43/mplibGAMMA +++ b/wmake/rules/linux64Gcc43/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linux64Gcc43/mplibMPICH b/wmake/rules/linux64Gcc43/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linux64Gcc43/mplibMPICH +++ b/wmake/rules/linux64Gcc43/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linux64Gcc44/X b/wmake/rules/linux64Gcc44/X new file mode 100644 index 0000000000..5d1f9c5cc5 --- /dev/null +++ b/wmake/rules/linux64Gcc44/X @@ -0,0 +1,3 @@ +XFLAGS = +XINC = $(XFLAGS) -I/usr/X11R6/include +XLIBS = -L/usr/X11R6/lib64 -lXext -lX11 diff --git a/wmake/rules/linux64Gcc44/c b/wmake/rules/linux64Gcc44/c new file mode 100644 index 0000000000..80bb80f32f --- /dev/null +++ b/wmake/rules/linux64Gcc44/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = gcc -m64 + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linux64Gcc44/c++ b/wmake/rules/linux64Gcc44/c++ new file mode 100644 index 0000000000..36b5c29b20 --- /dev/null +++ b/wmake/rules/linux64Gcc44/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = g++ -m64 + +include $(RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-40 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared +LINKEXE = $(CC) $(c++FLAGS) diff --git a/wmake/rules/linux64Gcc44/c++Debug b/wmake/rules/linux64Gcc44/c++Debug new file mode 100644 index 0000000000..19bdb9c334 --- /dev/null +++ b/wmake/rules/linux64Gcc44/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linux64Gcc44/c++Opt b/wmake/rules/linux64Gcc44/c++Opt new file mode 100644 index 0000000000..3446f7f58c --- /dev/null +++ b/wmake/rules/linux64Gcc44/c++Opt @@ -0,0 +1,4 @@ +c++DBUG = +c++OPT = -O3 +#c++OPT = -march=nocona -O3 +# -ftree-vectorize -ftree-vectorizer-verbose=3 diff --git a/wmake/rules/linux64Gcc44/c++Prof b/wmake/rules/linux64Gcc44/c++Prof new file mode 100644 index 0000000000..3bda4dad55 --- /dev/null +++ b/wmake/rules/linux64Gcc44/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linux64Gcc44/cDebug b/wmake/rules/linux64Gcc44/cDebug new file mode 100644 index 0000000000..72b638f458 --- /dev/null +++ b/wmake/rules/linux64Gcc44/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linux64Gcc44/cOpt b/wmake/rules/linux64Gcc44/cOpt new file mode 100644 index 0000000000..17318709f1 --- /dev/null +++ b/wmake/rules/linux64Gcc44/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linux64Gcc44/cProf b/wmake/rules/linux64Gcc44/cProf new file mode 100644 index 0000000000..ca3ac9bf5f --- /dev/null +++ b/wmake/rules/linux64Gcc44/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linux64Gcc44/general b/wmake/rules/linux64Gcc44/general new file mode 100644 index 0000000000..10237bd1b6 --- /dev/null +++ b/wmake/rules/linux64Gcc44/general @@ -0,0 +1,10 @@ +CPP = /lib/cpp $(GFLAGS) +LD = ld + +PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/X +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linux64Gcc44/mplib b/wmake/rules/linux64Gcc44/mplib new file mode 100644 index 0000000000..294bd86150 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplib @@ -0,0 +1,3 @@ +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linux64Gcc44/mplibGAMMA b/wmake/rules/linux64Gcc44/mplibGAMMA new file mode 100644 index 0000000000..11606f2984 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibGAMMA @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linux64Gcc44/mplibHPMPI b/wmake/rules/linux64Gcc44/mplibHPMPI new file mode 100644 index 0000000000..574492a236 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi diff --git a/wmake/rules/linux64Gcc44/mplibMPICH b/wmake/rules/linux64Gcc44/mplibMPICH new file mode 100644 index 0000000000..cb628e1117 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibMPICH @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linux64Gcc44/mplibMPICH-GM b/wmake/rules/linux64Gcc44/mplibMPICH-GM new file mode 100644 index 0000000000..88493ebc70 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibMPICH-GM @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm diff --git a/wmake/rules/linux64Gcc44/mplibOPENMPI b/wmake/rules/linux64Gcc44/mplibOPENMPI new file mode 100644 index 0000000000..834d2d3e22 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibOPENMPI @@ -0,0 +1,3 @@ +PFLAGS = -DOMPI_SKIP_MPICXX +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi diff --git a/wmake/rules/linux64Gcc44/mplibQSMPI b/wmake/rules/linux64Gcc44/mplibQSMPI new file mode 100644 index 0000000000..95ea327379 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibQSMPI @@ -0,0 +1,4 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi + diff --git a/wmake/rules/linuxGcc/c++Opt b/wmake/rules/linuxGcc/c++Opt index 4cb95b5b3a..2aedabd628 100644 --- a/wmake/rules/linuxGcc/c++Opt +++ b/wmake/rules/linuxGcc/c++Opt @@ -1,2 +1,2 @@ -c++DBUG = +c++DBUG = c++OPT = -O3 diff --git a/wmake/rules/linuxGcc/cOpt b/wmake/rules/linuxGcc/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linuxGcc/cOpt +++ b/wmake/rules/linuxGcc/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linuxGcc/mplib b/wmake/rules/linuxGcc/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linuxGcc/mplib +++ b/wmake/rules/linuxGcc/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linuxGcc/mplibGAMMA b/wmake/rules/linuxGcc/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linuxGcc/mplibGAMMA +++ b/wmake/rules/linuxGcc/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linuxGcc/mplibMPICH b/wmake/rules/linuxGcc/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linuxGcc/mplibMPICH +++ b/wmake/rules/linuxGcc/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linuxGcc42/c++Opt b/wmake/rules/linuxGcc42/c++Opt index 4cb95b5b3a..2aedabd628 100644 --- a/wmake/rules/linuxGcc42/c++Opt +++ b/wmake/rules/linuxGcc42/c++Opt @@ -1,2 +1,2 @@ -c++DBUG = +c++DBUG = c++OPT = -O3 diff --git a/wmake/rules/linuxGcc42/cOpt b/wmake/rules/linuxGcc42/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linuxGcc42/cOpt +++ b/wmake/rules/linuxGcc42/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linuxGcc42/mplib b/wmake/rules/linuxGcc42/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linuxGcc42/mplib +++ b/wmake/rules/linuxGcc42/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linuxGcc42/mplibGAMMA b/wmake/rules/linuxGcc42/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linuxGcc42/mplibGAMMA +++ b/wmake/rules/linuxGcc42/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linuxGcc42/mplibMPICH b/wmake/rules/linuxGcc42/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linuxGcc42/mplibMPICH +++ b/wmake/rules/linuxGcc42/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linuxGcc43/c++Opt b/wmake/rules/linuxGcc43/c++Opt index 4cb95b5b3a..2aedabd628 100644 --- a/wmake/rules/linuxGcc43/c++Opt +++ b/wmake/rules/linuxGcc43/c++Opt @@ -1,2 +1,2 @@ -c++DBUG = +c++DBUG = c++OPT = -O3 diff --git a/wmake/rules/linuxGcc43/cOpt b/wmake/rules/linuxGcc43/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linuxGcc43/cOpt +++ b/wmake/rules/linuxGcc43/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linuxGcc43/mplib b/wmake/rules/linuxGcc43/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linuxGcc43/mplib +++ b/wmake/rules/linuxGcc43/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linuxGcc43/mplibGAMMA b/wmake/rules/linuxGcc43/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linuxGcc43/mplibGAMMA +++ b/wmake/rules/linuxGcc43/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linuxGcc43/mplibMPICH b/wmake/rules/linuxGcc43/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linuxGcc43/mplibMPICH +++ b/wmake/rules/linuxGcc43/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linuxGcc44/X b/wmake/rules/linuxGcc44/X new file mode 100644 index 0000000000..bed8bfeddf --- /dev/null +++ b/wmake/rules/linuxGcc44/X @@ -0,0 +1,3 @@ +XFLAGS = +XINC = $(XFLAGS) -I/usr/X11R6/include +XLIBS = -L/usr/X11R6/lib -lXext -lX11 diff --git a/wmake/rules/linuxGcc44/c b/wmake/rules/linuxGcc44/c new file mode 100644 index 0000000000..8db5da1047 --- /dev/null +++ b/wmake/rules/linuxGcc44/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = gcc -m32 + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linuxGcc44/c++ b/wmake/rules/linuxGcc44/c++ new file mode 100644 index 0000000000..64d6797573 --- /dev/null +++ b/wmake/rules/linuxGcc44/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = g++ -m32 + +include $(RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-40 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared +LINKEXE = $(CC) $(c++FLAGS) diff --git a/wmake/rules/linuxGcc44/c++Debug b/wmake/rules/linuxGcc44/c++Debug new file mode 100644 index 0000000000..19bdb9c334 --- /dev/null +++ b/wmake/rules/linuxGcc44/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linuxGcc44/c++Opt b/wmake/rules/linuxGcc44/c++Opt new file mode 100644 index 0000000000..2aedabd628 --- /dev/null +++ b/wmake/rules/linuxGcc44/c++Opt @@ -0,0 +1,2 @@ +c++DBUG = +c++OPT = -O3 diff --git a/wmake/rules/linuxGcc44/c++Prof b/wmake/rules/linuxGcc44/c++Prof new file mode 100644 index 0000000000..3bda4dad55 --- /dev/null +++ b/wmake/rules/linuxGcc44/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linuxGcc44/cDebug b/wmake/rules/linuxGcc44/cDebug new file mode 100644 index 0000000000..72b638f458 --- /dev/null +++ b/wmake/rules/linuxGcc44/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linuxGcc44/cOpt b/wmake/rules/linuxGcc44/cOpt new file mode 100644 index 0000000000..17318709f1 --- /dev/null +++ b/wmake/rules/linuxGcc44/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linuxGcc44/cProf b/wmake/rules/linuxGcc44/cProf new file mode 100644 index 0000000000..ca3ac9bf5f --- /dev/null +++ b/wmake/rules/linuxGcc44/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linuxGcc44/general b/wmake/rules/linuxGcc44/general new file mode 100644 index 0000000000..02ad6973ff --- /dev/null +++ b/wmake/rules/linuxGcc44/general @@ -0,0 +1,10 @@ +CPP = /lib/cpp $(GFLAGS) +LD = ld -melf_i386 + +PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/X +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linuxGcc44/mplib b/wmake/rules/linuxGcc44/mplib new file mode 100644 index 0000000000..294bd86150 --- /dev/null +++ b/wmake/rules/linuxGcc44/mplib @@ -0,0 +1,3 @@ +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linuxGcc44/mplibGAMMA b/wmake/rules/linuxGcc44/mplibGAMMA new file mode 100644 index 0000000000..11606f2984 --- /dev/null +++ b/wmake/rules/linuxGcc44/mplibGAMMA @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linuxGcc44/mplibHPMPI b/wmake/rules/linuxGcc44/mplibHPMPI new file mode 100644 index 0000000000..8aff40632b --- /dev/null +++ b/wmake/rules/linuxGcc44/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi diff --git a/wmake/rules/linuxGcc44/mplibMPICH b/wmake/rules/linuxGcc44/mplibMPICH new file mode 100644 index 0000000000..cb628e1117 --- /dev/null +++ b/wmake/rules/linuxGcc44/mplibMPICH @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linuxGcc44/mplibMPICH-GM b/wmake/rules/linuxGcc44/mplibMPICH-GM new file mode 100644 index 0000000000..88493ebc70 --- /dev/null +++ b/wmake/rules/linuxGcc44/mplibMPICH-GM @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm diff --git a/wmake/rules/linuxGcc44/mplibOPENMPI b/wmake/rules/linuxGcc44/mplibOPENMPI new file mode 100644 index 0000000000..834d2d3e22 --- /dev/null +++ b/wmake/rules/linuxGcc44/mplibOPENMPI @@ -0,0 +1,3 @@ +PFLAGS = -DOMPI_SKIP_MPICXX +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi diff --git a/wmake/wmakeFilesAndOptions b/wmake/wmakeFilesAndOptions index 4cf7fcbde8..d9fdca1854 100755 --- a/wmake/wmakeFilesAndOptions +++ b/wmake/wmakeFilesAndOptions @@ -55,12 +55,12 @@ else fi [ -e Make/files ] || { - echo "$Script: Creating files" + echo "$Script: Creating Make/files" $WM_DIR/scripts/makeFiles } [ -e Make/options ] || { - echo "$Script: Creating options" + echo "$Script: Creating Make/options" $WM_DIR/scripts/makeOptions } diff --git a/wmake/wmakePrintBuild b/wmake/wmakePrintBuild index d82c9ef92d..da3c8d4086 100755 --- a/wmake/wmakePrintBuild +++ b/wmake/wmakePrintBuild @@ -27,15 +27,13 @@ # wmakePrintBuild # # Description -# Print the version used when building the project. +# Print the version used when building the project # #------------------------------------------------------------------------------ -Script=${0##*/} - usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat</dev/null | head -1) + version=$( + cd $WM_PROJECT_DIR 2>/dev/null && \ + git show-ref --hash=12 --head HEAD 2>/dev/null | head -1 + ) if [ -n "$version" ] then