diff --git a/applications/solvers/combustion/PDRFoam/StCourantNo.H b/applications/solvers/combustion/PDRFoam/StCourantNo.H index f755bb217bec204bc1f955680844fbd38447e611..8fac05d81c00be7dfa7d4ded60c1a2e1ffe84a3c 100644 --- a/applications/solvers/combustion/PDRFoam/StCourantNo.H +++ b/applications/solvers/combustion/PDRFoam/StCourantNo.H @@ -34,17 +34,14 @@ Description if (mesh.nInternalFaces()) { - surfaceScalarField SfUfbyDelta = - mesh.surfaceInterpolation::deltaCoeffs() - *mag(phiSt/fvc::interpolate(rho)); + scalarField sumPhi = + fvc::surfaceSum(mag(phiSt))().internalField() + /rho.internalField(); - StCoNum = - max(SfUfbyDelta/mesh.magSf()).value() - *runTime.deltaTValue(); + StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); meanStCoNum = - (sum(SfUfbyDelta)/sum(mesh.magSf())).value() - *runTime.deltaTValue(); + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); } Info<< "St courant Number mean: " << meanStCoNum diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointContinuityErrs.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointContinuityErrs.H index 1023a26c702b0fb519a3f63af2796fc91e07261e..d4d72cf6eff544b27275e0ac3622ec7615296d24 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointContinuityErrs.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointContinuityErrs.H @@ -30,10 +30,10 @@ Description \*---------------------------------------------------------------------------*/ { - scalar sumLocalContErr = runTime.deltaT().value()* + scalar sumLocalContErr = runTime.deltaTValue()* mag(fvc::div(phia))().weightedAverage(mesh.V()).value(); - scalar globalContErr = runTime.deltaT().value()* + scalar globalContErr = runTime.deltaTValue()* fvc::div(phia)().weightedAverage(mesh.V()).value(); cumulativeContErr += globalContErr; diff --git a/applications/solvers/incompressible/shallowWaterFoam/CourantNo.H b/applications/solvers/incompressible/shallowWaterFoam/CourantNo.H index 65cd8e02cce4219fbcfe3eb7ed4d0d6ae40e6fc5..0dfa24316f288c59ce421092e857991b6e9140f2 100644 --- a/applications/solvers/incompressible/shallowWaterFoam/CourantNo.H +++ b/applications/solvers/incompressible/shallowWaterFoam/CourantNo.H @@ -36,23 +36,23 @@ scalar waveCoNum = 0.0; if (mesh.nInternalFaces()) { - surfaceScalarField SfUfbyDelta = - mesh.surfaceInterpolation::deltaCoeffs() - *mag(phi)/fvc::interpolate(h); + scalarField sumPhi = + fvc::surfaceSum(mag(phi))().internalField() + /h.internalField(); - CoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaTValue(); + CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); - meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaTValue(); + meanCoNum = + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); // Gravity wave Courant number - waveCoNum = - 0.5*max + waveCoNum = 0.25*gMax + ( + fvc::surfaceSum ( - mesh.surfaceInterpolation::deltaCoeffs() - *sqrt(fvc::interpolate(h)) - ).value()*sqrt(magg).value()*runTime.deltaTValue(); + fvc::interpolate(sqrt(h))*mesh.magSf() + )().internalField()/mesh.V().field() + )*sqrt(magg).value()*runTime.deltaTValue(); } Info<< "Courant number mean: " << meanCoNum diff --git a/applications/solvers/multiphase/cavitatingFoam/CourantNo.H b/applications/solvers/multiphase/cavitatingFoam/CourantNo.H index d5c5c53cc69b9ba3e35eabb21177f8deebbdf8a2..8b26ba033e9f5f1352a6640cb625f863a6e622f2 100644 --- a/applications/solvers/multiphase/cavitatingFoam/CourantNo.H +++ b/applications/solvers/multiphase/cavitatingFoam/CourantNo.H @@ -35,19 +35,21 @@ scalar acousticCoNum = 0.0; if (mesh.nInternalFaces()) { - surfaceScalarField SfUfbyDelta = - mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv); + scalarField sumPhi = + fvc::surfaceSum(mag(phiv))().internalField(); - CoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaTValue(); + CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); - meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaTValue(); + meanCoNum = + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); - acousticCoNum = max + acousticCoNum = 0.5*gMax ( - mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi)) - ).value()*runTime.deltaTValue(); + fvc::surfaceSum + ( + fvc::interpolate(scalar(1)/sqrt(psi))*mesh.magSf() + )().internalField()/mesh.V().field() + )*runTime.deltaTValue(); } Info<< "phiv Courant Number mean: " << meanCoNum diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C index 42543b3c3718d862ba53661633a27c4501049b13..38ea48ea25050c1d0eecb3ba9f0ba01ef08cb1aa 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C @@ -86,7 +86,7 @@ int main(int argc, char *argv[]) << nl << endl; } - Info<< "\n end \n"; + Info<< "End\n" << endl; return 0; } diff --git a/applications/solvers/multiphase/interFoam/alphaCourantNo.H b/applications/solvers/multiphase/interFoam/alphaCourantNo.H index 12d1b933d40774c0f44e4d4d43e521ed8e0b6e9f..e5edfc76ca1dc79093fd108f2f09252f69f22531 100644 --- a/applications/solvers/multiphase/interFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/interFoam/alphaCourantNo.H @@ -43,10 +43,10 @@ if (mesh.nInternalFaces()) pos(alpha1 - 0.01)*pos(0.99 - alpha1) *fvc::surfaceSum(mag(phi))().internalField(); - alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaT().value(); + alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); meanAlphaCoNum = - 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaT().value(); + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); } Info<< "Interface Courant Number mean: " << meanAlphaCoNum diff --git a/applications/solvers/multiphase/interFoam/setDeltaT.H b/applications/solvers/multiphase/interFoam/setDeltaT.H index b315dcd1a0695205339b26ae101423a2b0441242..b619ed90f9d44744a6dd0f31fccc23505d94f0a8 100644 --- a/applications/solvers/multiphase/interFoam/setDeltaT.H +++ b/applications/solvers/multiphase/interFoam/setDeltaT.H @@ -42,12 +42,12 @@ if (adjustTimeStep) ( min ( - deltaTFact*runTime.deltaT().value(), + deltaTFact*runTime.deltaTValue(), maxDeltaT ) ); - Info<< "deltaT = " << runTime.deltaT().value() << endl; + Info<< "deltaT = " << runTime.deltaTValue() << endl; } // ************************************************************************* // diff --git a/applications/solvers/multiphase/interMixingFoam/alphaCourantNo.H b/applications/solvers/multiphase/interMixingFoam/alphaCourantNo.H index a560a60d270ffcc3594b6aa9a53cb042c4cb551a..105149f87eaeb5c1d8463c778e322392b01eb7da 100644 --- a/applications/solvers/multiphase/interMixingFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/interMixingFoam/alphaCourantNo.H @@ -39,20 +39,16 @@ scalar meanAlphaCoNum = 0.0; if (mesh.nInternalFaces()) { - surfaceScalarField alpha1f = fvc::interpolate(alpha1); - surfaceScalarField alpha2f = fvc::interpolate(alpha2); - - surfaceScalarField SfUfbyDelta = max + scalarField sumPhi = max ( - pos(alpha1f - 0.01)*pos(0.99 - alpha1f), - pos(alpha2f - 0.01)*pos(0.99 - alpha2f) - )*mesh.surfaceInterpolation::deltaCoeffs()*mag(phi); + pos(alpha1 - 0.01)*pos(0.99 - alpha1), + pos(alpha2 - 0.01)*pos(0.99 - alpha2) + )*fvc::surfaceSum(mag(phi))().internalField(); - alphaCoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaT().value(); + alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); - meanAlphaCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaT().value(); + meanAlphaCoNum = + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); } Info<< "Interface Courant Number mean: " << meanAlphaCoNum diff --git a/applications/solvers/multiphase/multiphaseInterFoam/alphaCourantNo.H b/applications/solvers/multiphase/multiphaseInterFoam/alphaCourantNo.H index 50e64f5f51e5773d9f26cf0aa57e869f461b728f..a63ab62103e36c36581d607fd621df9bca405b6a 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/alphaCourantNo.H @@ -39,15 +39,14 @@ scalar meanAlphaCoNum = 0.0; if (mesh.nInternalFaces()) { - surfaceScalarField SfUfbyDelta = - mixture.nearInterface() - *mesh.surfaceInterpolation::deltaCoeffs()*mag(phi); + scalarField sumPhi = + mixture.nearInterface()().internalField() + *fvc::surfaceSum(mag(phi))().internalField(); - alphaCoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaT().value(); + alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); - meanAlphaCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaT().value(); + meanAlphaCoNum = + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); } Info<< "Interface Courant Number mean: " << meanAlphaCoNum diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index c0582b5c1392ecebd87a2c614e03813fe0add90b..22c45bad7182b33d5e7920f6c5654e0abbd6debd 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -457,12 +457,12 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::K } -Foam::tmp<Foam::surfaceScalarField> +Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::nearInterface() const { - tmp<surfaceScalarField> tnearInt + tmp<volScalarField> tnearInt ( - new surfaceScalarField + new volScalarField ( IOobject ( @@ -477,8 +477,7 @@ Foam::multiphaseMixture::nearInterface() const forAllConstIter(PtrDictionary<phase>, phases_, iter) { - surfaceScalarField alphaf = fvc::interpolate(iter()); - tnearInt() = max(tnearInt(), pos(alphaf - 0.01)*pos(0.99 - alphaf)); + tnearInt() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter())); } return tnearInt; diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H index 32a7f1011801caee40772f080cac21eb975d0ea9..6a58813e54e493b4f3cb6e5dd18381a651d502b5 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H @@ -258,7 +258,7 @@ public: //- Indicator of the proximity of the interface // Field values are 1 near and 0 away for the interface. - tmp<surfaceScalarField> nearInterface() const; + tmp<volScalarField> nearInterface() const; //- Solve for the mixture phase-fractions void solve(); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H b/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H index 75dcd68c7fbde8e856b00651af8b22b3fbeb624a..ae6a13feb06fb051428dde4f1fb62fdd3c52e1ef 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H @@ -1,11 +1,10 @@ # include "CourantNo.H" { - scalar UrCoNum = max + scalar UrCoNum = 0.5*gMax ( - mesh.surfaceInterpolation::deltaCoeffs()*mag(phia - phib) - /mesh.magSf() - ).value()*runTime.deltaT().value(); + fvc::surfaceSum(mag(phia - phib))().internalField()/mesh.V().field() + )*runTime.deltaTValue(); Info<< "Max Ur Courant Number = " << UrCoNum << endl; diff --git a/src/dynamicFvMesh/include/meshCourantNo.H b/src/dynamicFvMesh/include/meshCourantNo.H index 9ac0cb482fccaa9b2d4aeb9fc0a13e2eef635b05..501611db18d2c635adf4454a5a6383eb9c42c7d6 100644 --- a/src/dynamicFvMesh/include/meshCourantNo.H +++ b/src/dynamicFvMesh/include/meshCourantNo.H @@ -34,14 +34,13 @@ scalar meanMeshCoNum = 0.0; if (mesh.nInternalFaces()) { - surfaceScalarField SfUfbyDelta = - mesh.surfaceInterpolation::deltaCoeffs()*mag(mesh.phi()); + scalarField sumPhi = + fvc::surfaceSum(mag(mesh.phi()))().internalField(); - meshCoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaTValue(); + meshCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); - meanMeshCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaTValue(); + meanMeshCoNum = + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); } Info<< "Mesh Courant Number mean: " << meanMeshCoNum diff --git a/src/finiteVolume/cfdTools/compressible/compressibleCourantNo.H b/src/finiteVolume/cfdTools/compressible/compressibleCourantNo.H index 73da862406d5e0f25850e686436a11d478f1ec7e..c96ddeb22ffa9f33765ef6e71e32d434c5096728 100644 --- a/src/finiteVolume/cfdTools/compressible/compressibleCourantNo.H +++ b/src/finiteVolume/cfdTools/compressible/compressibleCourantNo.H @@ -38,10 +38,10 @@ if (mesh.nInternalFaces()) fvc::surfaceSum(mag(phi))().internalField() /rho.internalField(); - CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaT().value(); + CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); meanCoNum = - 0.5*(gSum(sumPhi)/sum(mesh.V().field()))*runTime.deltaT().value(); + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); } Info<< "Courant Number mean: " << meanCoNum diff --git a/src/finiteVolume/cfdTools/incompressible/CourantNo.H b/src/finiteVolume/cfdTools/incompressible/CourantNo.H index caef48a39662fbf2a4d253df28085fa065a7addb..8b917e1f89fb2dc15e207c42d1a1c0b6d0320d52 100644 --- a/src/finiteVolume/cfdTools/incompressible/CourantNo.H +++ b/src/finiteVolume/cfdTools/incompressible/CourantNo.H @@ -37,10 +37,10 @@ if (mesh.nInternalFaces()) scalarField sumPhi = fvc::surfaceSum(mag(phi))().internalField(); - CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaT().value(); + CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); meanCoNum = - 0.5*(gSum(sumPhi)/sum(mesh.V().field()))*runTime.deltaT().value(); + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); } Info<< "Courant Number mean: " << meanCoNum diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/uniform/lagrangian/dsmc/particleProperties b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/uniform/lagrangian/dsmc/particleProperties deleted file mode 100644 index 5a73d67b461d09f6a8d3596ddee4921c3fba1971..0000000000000000000000000000000000000000 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/uniform/lagrangian/dsmc/particleProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "0/uniform/lagrangian/dsmc"; - object particleProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -processor0 -{ - particleCount 63978; -} - - -// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/0/uniform/lagrangian/dsmc/particleProperties b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/0/uniform/lagrangian/dsmc/particleProperties deleted file mode 100644 index 5a73d67b461d09f6a8d3596ddee4921c3fba1971..0000000000000000000000000000000000000000 --- a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/0/uniform/lagrangian/dsmc/particleProperties +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "0/uniform/lagrangian/dsmc"; - object particleProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -processor0 -{ - particleCount 63978; -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/Allclean b/tutorials/multiphase/cavitatingFoam/les/Allclean deleted file mode 100755 index 68db65d125ca2da943f0c82f7b0938c91ad68030..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/cavitatingFoam/les/Allclean +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # run from this directory - -# Source tutorial clean functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions - -( - cd throttle || exit - - rm -rf constant/polyMesh/sets > /dev/null 2>&1 - rm -rf 0/polyMesh > /dev/null 2>&1 - rm system/topoSetDict > /dev/null 2>&1 - - cleanCase -) - - -( - cd throttle3D || exit - - rm -rf constant/polyMesh/sets > /dev/null 2>&1 - rm -rf 0 > /dev/null 2>&1 - cp -r 0.org 0 - rm system/topoSetDict > /dev/null 2>&1 - rm -rf processor[0-9] > /dev/null 2>&1 - - cleanCase -) - -# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/cavitatingFoam/les/Allrun b/tutorials/multiphase/cavitatingFoam/les/Allrun index 9fe67390bd4ae381c0129a7085c5b58367efcf7c..41c1dd5368c4eb73413687e709275158231df6a2 100755 --- a/tutorials/multiphase/cavitatingFoam/les/Allrun +++ b/tutorials/multiphase/cavitatingFoam/les/Allrun @@ -1,50 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -# Set application name -application="cavitatingFoam" - -refineMeshByCellSet() -{ - while [ $# -ge 1 ] - do - echo "creating cell set for primary zone - $1" - cp system/topoSetDict.$1 system/topoSetDict - topoSet > log.topoSet.$1 2>&1 - - echo "refining primary zone - $1" - refineMesh -dict -overwrite > log.refineMesh.$1 2>&1 - shift - done -} - - ( cd throttle || exit - - runApplication blockMesh - refineMeshByCellSet 1 2 3 - runApplication $application + ./Allrun ) - ( cd throttle3D || exit - - cp -r 0.org 0 - - runApplication blockMesh - refineMeshByCellSet 1 2 3 - - echo "mapping fields from 2D throttle case" - mapFields ../throttle -sourceTime latestTime > log.mapFields 2>&1 - - runApplication decomposePar - runParallel $application 4 - runApplication reconstructPar + ./Allrun ) # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/les/throttle/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..70b255f01d9a086e4407b275bba5e46be028abc5 --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/Allclean @@ -0,0 +1,12 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +rm -rf constant/polyMesh/sets > /dev/null 2>&1 +rm -rf 0/polyMesh > /dev/null 2>&1 +rm system/topoSetDict > /dev/null 2>&1 +cleanCase + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/Allrun b/tutorials/multiphase/cavitatingFoam/les/throttle/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..7b19d67145a4a38e462c4f48160d1ff4c4baeec7 --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/Allrun @@ -0,0 +1,28 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Set application name +application="cavitatingFoam" + +refineMeshByCellSet() +{ + while [ $# -ge 1 ] + do + echo "creating cell set for primary zone - $1" + cp system/topoSetDict.$1 system/topoSetDict + topoSet > log.topoSet.$1 2>&1 + + echo "refining primary zone - $1" + refineMesh -dict -overwrite > log.refineMesh.$1 2>&1 + shift + done +} + +runApplication blockMesh +refineMeshByCellSet 1 2 3 +runApplication $application + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/constant/polyMesh/boundary b/tutorials/multiphase/cavitatingFoam/les/throttle/constant/polyMesh/boundary index 999c16bc8e26ed46ecbb925d88ba148ca59dce11..4732ca525c5cb22f250aa48fa982af069e8e8ac8 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/constant/polyMesh/boundary +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/constant/polyMesh/boundary @@ -21,25 +21,25 @@ FoamFile { type patch; nFaces 51; - startFace 15151; + startFace 35380; } outlet { type patch; nFaces 51; - startFace 15202; + startFace 35431; } walls { type wall; - nFaces 436; - startFace 15253; + nFaces 640; + startFace 35482; } frontBack { type empty; - nFaces 15420; - startFace 15689; + nFaces 35580; + startFace 36122; } ) diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allclean b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..b5c25b61f84e7b7dc0d5251d6d11203e312a2229 --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allclean @@ -0,0 +1,14 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +rm -rf constant/polyMesh/sets > /dev/null 2>&1 +rm -rf 0 > /dev/null 2>&1 +cp -r 0.org 0 +rm system/topoSetDict > /dev/null 2>&1 +rm -rf processor[0-9] > /dev/null 2>&1 +cleanCase + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..e93a0560537e6646f9a14dab16a16517f252ee22 --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun @@ -0,0 +1,36 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Set application name +application="cavitatingFoam" + +refineMeshByCellSet() +{ + while [ $# -ge 1 ] + do + echo "creating cell set for primary zone - $1" + cp system/topoSetDict.$1 system/topoSetDict + topoSet > log.topoSet.$1 2>&1 + + echo "refining primary zone - $1" + refineMesh -dict -overwrite > log.refineMesh.$1 2>&1 + shift + done +} + +cp -r 0.org 0 + +runApplication blockMesh +refineMeshByCellSet 1 2 3 + +echo "mapping fields from 2D throttle case" +mapFields ../throttle -sourceTime latestTime > log.mapFields 2>&1 + +runApplication decomposePar +runParallel $application 4 +runApplication reconstructPar + +# ----------------------------------------------------------------- end-of-file