diff --git a/.gitignore b/.gitignore index 296f8d0367..8de178a605 100644 --- a/.gitignore +++ b/.gitignore @@ -50,8 +50,8 @@ doc/[Dd]oxygen/html doc/[Dd]oxygen/latex doc/[Dd]oxygen/man -# Other HTML files e.g. ReleaseNotes-?.?.html -*.html +# generated files in the main directory (e.g. ReleaseNotes-?.?.html) +/*.html # source packages - anywhere *.tar.bz2 diff --git a/Allwmake b/Allwmake index ee6f075a0e..36d7658f19 100755 --- a/Allwmake +++ b/Allwmake @@ -1,13 +1,12 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory -if [ "$PWD" != "$WM_PROJECT_DIR" ] -then - echo "Error: Current directory in not \$WM_PROJECT_DIR" - echo " The environment variable are not consistent with the installation." +wmakeCheckPwd "$WM_PROJECT_DIR" || { + 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 82a2ec0df4..48e66941d3 100755 --- a/applications/Allwmake +++ b/applications/Allwmake @@ -1,13 +1,12 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory -if [ "$PWD" != "$WM_PROJECT_DIR/applications" ] -then - echo "Error: Current directory in not \$WM_PROJECT_DIR/applications" - echo " The environment variable are not consistent with the installation." +wmakeCheckPwd "$WM_PROJECT_DIR/applications" || { + 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 diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/newPDRDragModel.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/newPDRDragModel.C index 29a92e19f8..d8fd2dd5e3 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/newPDRDragModel.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/newPDRDragModel.C @@ -52,7 +52,7 @@ Foam::autoPtr Foam::PDRDragModel::New ) << "Unknown PDRDragModel type " << PDRDragModelTypeName << endl << endl << "Valid PDRDragModels are : " << endl - << dictionaryConstructorTablePtr_->toc() + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/newXiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/newXiEqModel.C index 43515c6bae..f0bc471c91 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/newXiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/newXiEqModel.C @@ -56,7 +56,7 @@ Foam::autoPtr Foam::XiEqModel::New ) << "Unknown XiEqModel type " << XiEqModelTypeName << endl << endl << "Valid XiEqModels are : " << endl - << dictionaryConstructorTablePtr_->toc() + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/newXiGModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/newXiGModel.C index 780bc8418d..81f5cca253 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/newXiGModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/newXiGModel.C @@ -56,7 +56,7 @@ Foam::autoPtr Foam::XiGModel::New ) << "Unknown XiGModel type " << XiGModelTypeName << endl << endl << "Valid XiGModels are : " << endl - << dictionaryConstructorTablePtr_->toc() + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/newXiModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/newXiModel.C index fd1e25de9b..2dc8dac138 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/newXiModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/newXiModel.C @@ -54,7 +54,7 @@ Foam::autoPtr Foam::XiModel::New ) << "Unknown XiModel type " << XiModelTypeName << endl << endl << "Valid XiModels are : " << endl - << dictionaryConstructorTablePtr_->toc() + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C index 5bec567310..a2940ef12b 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C @@ -208,6 +208,9 @@ void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::updateCoeffs() patch().patch() ); const polyMesh& nbrMesh = mpp.sampleMesh(); + // Force recalculation of mapping and schedule + const mapDistribute& distMap = mpp.map(); + (void)distMap.schedule(); tmp intFld = patchInternalField(); @@ -217,7 +220,6 @@ void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::updateCoeffs() // to be updated the first time round the iteration (i.e. when // switching regions) but unfortunately we don't have this information. - const mapDistribute& distMap = mpp.map(); const fvPatch& nbrPatch = refCast ( nbrMesh 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..8844f21e6e --- /dev/null +++ b/applications/solvers/incompressible/boundaryFoam/evaluateNearWall.H @@ -0,0 +1,34 @@ +{ + // 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 magUp = mag(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 = magUp/(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 = magUp*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/incompressible/pimpleDyMFoam/Make/options b/applications/solvers/incompressible/pimpleDyMFoam/Make/options index e14eec2585..40023adad7 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/Make/options +++ b/applications/solvers/incompressible/pimpleDyMFoam/Make/options @@ -9,6 +9,7 @@ EXE_INC = \ EXE_LIBS = \ -ldynamicFvMesh \ + -ltopoChangerFvMesh \ -ldynamicMesh \ -lmeshTools \ -lincompressibleTransportModels \ diff --git a/applications/solvers/incompressible/simpleFoam/UEqn.H b/applications/solvers/incompressible/simpleFoam/UEqn.H index 9f9d9f6dd4..eb40b7665b 100644 --- a/applications/solvers/incompressible/simpleFoam/UEqn.H +++ b/applications/solvers/incompressible/simpleFoam/UEqn.H @@ -14,4 +14,3 @@ ).initialResidual(); maxResidual = max(eqnResidual, maxResidual); - 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/compressibleInterDyMFoam/Make/options b/applications/solvers/multiphase/compressibleInterDyMFoam/Make/options index af146aaa38..75094c8b16 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/Make/options @@ -16,5 +16,6 @@ EXE_LIBS = \ -lfiniteVolume \ -ldynamicMesh \ -lmeshTools \ - -ldynamicFvMesh + -ldynamicFvMesh \ + -ltopoChangerFvMesh diff --git a/applications/solvers/multiphase/interDyMFoam/Make/options b/applications/solvers/multiphase/interDyMFoam/Make/options index b9aa770576..6bbea18fd6 100644 --- a/applications/solvers/multiphase/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interDyMFoam/Make/options @@ -17,4 +17,5 @@ EXE_LIBS = \ -lfiniteVolume \ -ldynamicMesh \ -lmeshTools \ - -ldynamicFvMesh + -ldynamicFvMesh \ + -ltopoChangerFvMesh diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C index 3def1c64fc..227f76c4c7 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C @@ -70,7 +70,7 @@ Foam::phaseChangeTwoPhaseMixture::New ) << "Unknown phaseChangeTwoPhaseMixture type " << phaseChangeTwoPhaseMixtureTypeName << endl << endl << "Valid phaseChangeTwoPhaseMixtures are : " << endl - << componentsConstructorTablePtr_->toc() + << componentsConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/settlingFoam/createFields.H b/applications/solvers/multiphase/settlingFoam/createFields.H index 9f0ca00596..a085aebb37 100644 --- a/applications/solvers/multiphase/settlingFoam/createFields.H +++ b/applications/solvers/multiphase/settlingFoam/createFields.H @@ -56,20 +56,11 @@ ); - dimensionedScalar rhoc - ( - transportProperties.lookup("rhoc") - ); + dimensionedScalar rhoc(transportProperties.lookup("rhoc")); - dimensionedScalar rhod - ( - transportProperties.lookup("rhod") - ); + dimensionedScalar rhod(transportProperties.lookup("rhod")); - dimensionedScalar muc - ( - transportProperties.lookup("muc") - ); + dimensionedScalar muc(transportProperties.lookup("muc")); dimensionedScalar plasticViscosityCoeff ( @@ -96,10 +87,7 @@ transportProperties.lookup("yieldStressOffset") ); - Switch BinghamPlastic - ( - transportProperties.lookup("BinghamPlastic") - ); + Switch BinghamPlastic(transportProperties.lookup("BinghamPlastic")); volScalarField rho ( @@ -147,8 +135,8 @@ IOobject::NO_READ, IOobject::AUTO_WRITE ), - muc + - plasticViscosity + muc + + plasticViscosity ( plasticViscosityCoeff, plasticViscosityExponent, @@ -176,10 +164,7 @@ Info<< "Selecting Drift-Flux model " << endl; - word VdjModel - ( - transportProperties.lookup("VdjModel") - ); + word VdjModel(transportProperties.lookup("VdjModel")); Info<< tab << VdjModel << " selected\n" << endl; @@ -188,26 +173,13 @@ transportProperties.subDict(VdjModel + "Coeffs") ); - dimensionedVector V0 - ( - VdjModelCoeffs.lookup("V0") - ); + dimensionedVector V0(VdjModelCoeffs.lookup("V0")); - dimensionedScalar a - ( - VdjModelCoeffs.lookup("a") - ); + dimensionedScalar a(VdjModelCoeffs.lookup("a")); - dimensionedScalar a1 - ( - VdjModelCoeffs.lookup("a1") - ); - - dimensionedScalar alphaMin - ( - VdjModelCoeffs.lookup("alphaMin") - ); + dimensionedScalar a1(VdjModelCoeffs.lookup("a1")); + dimensionedScalar alphaMin(VdjModelCoeffs.lookup("alphaMin")); IOdictionary RASProperties @@ -223,15 +195,9 @@ ); - Switch turbulence - ( - RASProperties.lookup("turbulence") - ); + Switch turbulence(RASProperties.lookup("turbulence")); - dictionary kEpsilonDict - ( - RASProperties.subDictPtr("kEpsilonCoeffs") - ); + dictionary kEpsilonDict(RASProperties.subDictPtr("kEpsilonCoeffs")); dimensionedScalar Cmu ( @@ -273,30 +239,27 @@ ) ); - dimensionedScalar alphak + dimensionedScalar sigmak ( dimensionedScalar::lookupOrAddToDict ( - "alphaEps", + "sigmak", kEpsilonDict, 1.0 ) ); - dimensionedScalar alphaEps + dimensionedScalar sigmaEps ( dimensionedScalar::lookupOrAddToDict ( - "alphaEps", + "sigmaEps", kEpsilonDict, - 0.76923 + 1.3 ) ); - dictionary wallFunctionDict - ( - RASProperties.subDictPtr("wallFunctionCoeffs") - ); + dictionary wallFunctionDict(RASProperties.subDictPtr("wallFunctionCoeffs")); dimensionedScalar kappa ( @@ -304,7 +267,7 @@ ( "kappa", wallFunctionDict, - 0.4187 + 0.41 ) ); @@ -314,7 +277,7 @@ ( "E", wallFunctionDict, - 9.0 + 9.8 ) ); diff --git a/applications/solvers/multiphase/settlingFoam/kEpsilon.H b/applications/solvers/multiphase/settlingFoam/kEpsilon.H index 742fcde708..522a9afac7 100644 --- a/applications/solvers/multiphase/settlingFoam/kEpsilon.H +++ b/applications/solvers/multiphase/settlingFoam/kEpsilon.H @@ -1,4 +1,4 @@ -if(turbulence) +if (turbulence) { if (mesh.changing()) { @@ -15,9 +15,9 @@ if(turbulence) tgradU.clear(); volScalarField Gcoef = - alphak*Cmu*k*(g & fvc::grad(rho))/(epsilon + epsilon0); + Cmu*k/sigmak*(g & fvc::grad(rho))/(epsilon + epsilon0); -# include "wallFunctions.H" + #include "wallFunctions.H" // Dissipation equation fvScalarMatrix epsEqn @@ -26,7 +26,7 @@ if(turbulence) + fvm::div(phi, epsilon) - fvm::laplacian ( - alphaEps*mut + mul, epsilon, + mut/sigmaEps + mul, epsilon, "laplacian(DepsilonEff,epsilon)" ) == @@ -35,7 +35,7 @@ if(turbulence) - fvm::Sp(C2*rho*epsilon/k, epsilon) ); -# include "wallDissipation.H" + #include "wallDissipation.H" epsEqn.relax(); epsEqn.solve(); @@ -51,7 +51,7 @@ if(turbulence) + fvm::div(phi, k) - fvm::laplacian ( - alphak*mut + mul, k, + mut/sigmak + mul, k, "laplacian(DkEff,k)" ) == @@ -66,7 +66,7 @@ if(turbulence) //- Re-calculate viscosity mut = rho*Cmu*sqr(k)/(epsilon + epsilon0); -# include "wallViscosity.H" + #include "wallViscosity.H" } mu = mut + mul; diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H index 18b915b16b..c0daa0e7ca 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H @@ -12,6 +12,7 @@ - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + //- fvc::div(rho*turbulence->nuEff()*dev(fvc::grad(U)().T())) ); if (oCorr == nOuterCorr-1) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C index 68bb43a385..582fa4cdd3 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C @@ -57,7 +57,7 @@ Foam::autoPtr Foam::dragModel::New << dragModelType << ", constructor not in hash table" << endl << endl << " Valid dragModel types are : " << endl; - Info << dictionaryConstructorTablePtr_->toc() << abort(FatalError); + Info << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } return cstrIter()(interfaceDict, alpha, phasea, phaseb); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C index 0ea5d053b9..e5d27350b3 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C @@ -49,7 +49,7 @@ Foam::autoPtr Foam::conductivityModel::New << conductivityModelType << ", constructor not in hash table" << endl << endl << " Valid conductivityModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError); + Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C index 96315e8c20..fed001e0c0 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C @@ -49,7 +49,7 @@ Foam::autoPtr Foam::frictionalStressModel::New << frictionalStressModelType << ", constructor not in hash table" << endl << endl << " Valid frictionalStressModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError); + Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C index 0df3d38613..cda9814b46 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C @@ -49,7 +49,7 @@ Foam::autoPtr Foam::granularPressureModel::New << granularPressureModelType << ", constructor not in hash table" << endl << endl << " Valid granularPressureModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError); + Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/newRadialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/newRadialModel.C index 9e107809bf..fc6b2ed5d9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/newRadialModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/newRadialModel.C @@ -49,7 +49,7 @@ Foam::autoPtr Foam::radialModel::New << radialModelType << ", constructor not in hash table" << endl << endl << " Valid radialModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError); + Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C index 508673a5d3..5de17ec189 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C @@ -50,7 +50,7 @@ Foam::kineticTheoryModels::viscosityModel::New << viscosityModelType << ", constructor not in hash table" << endl << endl << " Valid viscosityModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->toc() << abort(FatalError); + Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } return autoPtr(cstrIter()(dict)); 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/HashTable/hashTableTest.C b/applications/test/HashTable/hashTableTest.C index 25338a2bb7..7e03a36f7d 100644 --- a/applications/test/HashTable/hashTableTest.C +++ b/applications/test/HashTable/hashTableTest.C @@ -56,6 +56,7 @@ int main() table1.erase("abs"); Info<< "\ntable1 toc: " << table1.toc() << endl; + Info<< "\ntable1 sortedToc: " << table1.sortedToc() << endl; table1.printInfo(Info) << "table1 [" << table1.size() << "] " << endl; forAllIter(HASHTABLE_CLASS, table1, iter) diff --git a/applications/test/IndirectList/IndirectListTest.C b/applications/test/IndirectList/IndirectListTest.C index 242ff7dbce..365c58a383 100644 --- a/applications/test/IndirectList/IndirectListTest.C +++ b/applications/test/IndirectList/IndirectListTest.C @@ -43,6 +43,10 @@ int main(int argc, char *argv[]) completeList[i] = 0.1*i; } + Info<< "raw : " << completeList << nl + << endl; + + List