diff --git a/applications/solvers/incompressible/pisoFoam/pisoFoam.C b/applications/solvers/incompressible/pisoFoam/pisoFoam.C index 1c8a534db274a5c29ad19dd2077f0967422ae5bf..b2722a466cc671af2986fe846c6d730a4d305d49 100644 --- a/applications/solvers/incompressible/pisoFoam/pisoFoam.C +++ b/applications/solvers/incompressible/pisoFoam/pisoFoam.C @@ -70,6 +70,8 @@ int main(int argc, char *argv[]) + turbulence->divDevReff(U) ); + UEqn.relax(); + if (momentumPredictor) { solve(UEqn == -fvc::grad(p)); diff --git a/applications/solvers/multiphase/cavitatingFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/pEqn.H index c9382dfc0fb95f3cb59f2d510cad407c4757d8c8..c22aa76479a0d503d22bc60af591a82a7733d850 100644 --- a/applications/solvers/multiphase/cavitatingFoam/pEqn.H +++ b/applications/solvers/multiphase/cavitatingFoam/pEqn.H @@ -1,7 +1,7 @@ { if (nOuterCorr == 1) { - p = + p = ( rho - (1.0 - gamma)*rhol0 @@ -37,7 +37,14 @@ - fvm::laplacian(rUAf, p) ); - pEqn.solve(); + if (corr == nCorr-1 && nonOrth == nNonOrthCorr) + { + pEqn.solve(mesh.solver(p.name() + "Final")); + } + else + { + pEqn.solve(mesh.solver(p.name())); + } if (nonOrth == nNonOrthCorr) { diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterDyMFoam/UEqn.H index 90033f9826fa037c0d626e2b7f9e4aa5b2fa0ba3..1576f6ba787b037d97c84368836912f0c7d129dd 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/UEqn.H @@ -1,13 +1,16 @@ - surfaceScalarField muf = + surfaceScalarField muEff + ( + "muEff", twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()); + + fvc::interpolate(rho*turbulence->nut()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muf, U) - - (fvc::grad(U) & fvc::grad(muf)) + - fvm::laplacian(muEff, U) + - (fvc::grad(U) & fvc::grad(muEff)) //- fvc::div(muf*(mesh.Sf() & fvc::interpolate(fvc::grad(U)().T()))) ); diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/alphaEqnsSubCycle.H b/applications/solvers/multiphase/compressibleInterDyMFoam/alphaEqnsSubCycle.H index e161a3cbe6b2ea9eb48eeca600982f0a4cc3492f..32a7163130ebe623fec24babb865c2a4f8bb9322 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/alphaEqnsSubCycle.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/alphaEqnsSubCycle.H @@ -12,7 +12,9 @@ surfaceScalarField phic = mag(phi/mesh.magSf()); phic = min(interface.cAlpha()*phic, max(phic)); + fvc::makeAbsolute(phi, U); volScalarField divU = fvc::div(phi); + fvc::makeRelative(phi, U); if (nAlphaSubCycles > 1) { diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H index b0f3378408fb76da41887cee0724a55e77afea11..7e4b37061fdede3fccc625875cc38c447657a198 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H @@ -30,7 +30,7 @@ - ghf*fvc::snGrad(rho) )*rUAf*mesh.magSf(); - for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix pdEqnIncomp ( @@ -38,15 +38,36 @@ - fvm::laplacian(rUAf, pd) ); - solve + if ( + oCorr == nOuterCorr-1 + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + { + solve ( - max(alpha1, scalar(0))*(psi1/rho1) - + max(alpha2, scalar(0))*(psi2/rho2) - ) - *pdEqnComp() - + pdEqnIncomp - ); + ( + max(alpha1, scalar(0))*(psi1/rho1) + + max(alpha2, scalar(0))*(psi2/rho2) + ) + *pdEqnComp() + + pdEqnIncomp, + mesh.solver(pd.name() + "Final") + ); + } + else + { + solve + ( + ( + max(alpha1, scalar(0))*(psi1/rho1) + + max(alpha2, scalar(0))*(psi2/rho2) + ) + *pdEqnComp() + + pdEqnIncomp + ); + } if (nonOrth == nNonOrthCorr) { @@ -62,7 +83,8 @@ p = max ( - (pd + gh*(alpha1*rho10 + alpha2*rho20))/(1.0 - gh*(alpha1*psi1 + alpha2*psi2)), + (pd + gh*(alpha1*rho10 + alpha2*rho20)) + /(1.0 - gh*(alpha1*psi1 + alpha2*psi2)), pMin ); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H index f020863077b7b9678a76af75d3249fe860280098..c59137c7b87a9be3c799e03567dc8209341798f5 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H @@ -1,15 +1,18 @@ - surfaceScalarField muf = + surfaceScalarField muEff + ( + "muEff", twoPhaseProperties->muf() - + fvc::interpolate(rho*turbulence->nut()); + + fvc::interpolate(rho*turbulence->nut()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U) - - fvm::laplacian(muf, U) - - (fvc::grad(U) & fvc::grad(muf)) - //- fvc::div(muf*(fvc::interpolate(dev2(fvc::grad(U))) & mesh.Sf())) + - fvm::laplacian(muEff, U) + - (fvc::grad(U) & fvc::grad(muEff)) + //- fvc::div(muEff*(fvc::interpolate(dev2(fvc::grad(U))) & mesh.Sf())) ); UEqn.relax(); diff --git a/src/Allwmake b/src/Allwmake index c451cff8dd569337fee1e93b2aea9af6d559547c..e0324141cd6b7ceb5ef9591e21b294a032e9dfc0 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -2,8 +2,8 @@ cd ${0%/*} || exit 1 # run from this directory set -x -# force update of Foam::FOAMversion string (git tag or $WM_PROJECT_VERSION) -/bin/rm -f OpenFOAM/Make/$WM_OPTIONS/global.? 2>/dev/null +# update Foam::FOAMversion string if required +wmakePrintBuild -check || /bin/rm -f OpenFOAM/Make/$WM_OPTIONS/global.? 2>/dev/null wmakeLnInclude -f OpenFOAM wmakeLnInclude -f OSspecific/$WM_OS diff --git a/src/OpenFOAM/global/global.Cver b/src/OpenFOAM/global/global.Cver index e67b67b22a8352e2c27cb78564f6505f461cbb83..e2f411603eef4a7fc527b7f53d56731ac0b959e3 100644 --- a/src/OpenFOAM/global/global.Cver +++ b/src/OpenFOAM/global/global.Cver @@ -23,20 +23,19 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Description - Define the globals used in the FOAM library. It is important that these - are constructed in the appropriate order to avoid the use of unconstructed - data in the global namespace. + Define the globals used in the OpenFOAM library. + It is important that these are constructed in the appropriate order to + avoid the use of unconstructed data in the global namespace. - This file has the extension .ver to force it to be parsed by the script - which converts WM_PROJECT_VERSION into the appropriate version number - string. + This file has the extension .Cver to trigger a Makefile rule that converts + WM_PROJECT_VERSION into the appropriate version string. \*---------------------------------------------------------------------------*/ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "foamVersion.H" -const char* const Foam::FOAMversion = WM_PROJECT_VERSION; +const char* const Foam::FOAMversion = "WM_PROJECT_VERSION"; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Setup an error handler for the global new operator @@ -51,7 +50,7 @@ const char* const Foam::FOAMversion = WM_PROJECT_VERSION; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "JobInfo.H" -bool Foam::JobInfo::constructed = false; +bool Foam::JobInfo::constructed(false); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Global error definitions (initialised by construction) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C index 1846ada328e389e97412dc809b36f6e7e1c691f1..ff96264cd4843bf67dc84ef0df6bd5fea0682909 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C @@ -175,9 +175,8 @@ void turbulentInletFvPatchField<Type>::updateCoeffs() ranGen_.randomise(randomField[facei]); } - // Correction-factor proposed by Yi Wang to compensate for the loss - // of RMS fluctuation due to the temporal correlation introduced by - // the alpha parameter. + // Correction-factor to compensate for the loss of RMS fluctuation + // due to the temporal correlation introduced by the alpha parameter. scalar rmsCorr = sqrt(12*(2*alpha_ - sqr(alpha_)))/alpha_; patchField = @@ -206,6 +205,7 @@ void turbulentInletFvPatchField<Type>::write(Ostream& os) const os.writeKeyword("fluctuationScale") << fluctuationScale_ << token::END_STATEMENT << nl; referenceField_.writeEntry("referenceField", os); + os.writeKeyword("alpha") << alpha_ << token::END_STATEMENT << nl; this->writeEntry("value", os); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H index 518a0f689f74509fcf74c69a2268b4f759e8a086..944c7f991d5b2aea06d1154e458a606a24133e20 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H @@ -63,7 +63,6 @@ class turbulentInletFvPatchField : public fixedValueFvPatchField<Type> { - // Private data Random ranGen_; diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index dc32224a008a363eec88c75452cdc59bf479c080..1a594764378b2d237cb8aaf0c5b93654ef62e9b5 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -35,65 +35,6 @@ License // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // -template<class ParcelType> -void Foam::KinematicCloud<ParcelType>::setInjectorCellAndPosition -( - label& pCell, - vector& pPosition -) -{ - const vector originalPosition = pPosition; - - bool foundCell = false; - - pCell = mesh_.findCell(pPosition); - - if (pCell >= 0) - { - const vector& C = mesh_.C()[pCell]; - pPosition += 1.0e-6*(C - pPosition); - - foundCell = mesh_.pointInCell - ( - pPosition, - pCell - ); - } - reduce(foundCell, orOp<bool>()); - - // Last chance - find nearest cell and try that one - // - the point is probably on an edge - if (!foundCell) - { - pCell = mesh_.findNearestCell(pPosition); - - if (pCell >= 0) - { - const vector& C = mesh_.C()[pCell]; - pPosition += 1.0e-6*(C - pPosition); - - foundCell = mesh_.pointInCell - ( - pPosition, - pCell - ); - } - reduce(foundCell, orOp<bool>()); - } - - if (!foundCell) - { - FatalErrorIn - ( - "void KinematicCloud<ParcelType>::findInjectorCell" - "(label&, vector&)" - )<< "Cannot find parcel injection cell. " - << "Parcel position = " << originalPosition << nl - << abort(FatalError); - } -} - - template<class ParcelType> Foam::scalar Foam::KinematicCloud<ParcelType>::setNumberOfParticles ( @@ -324,7 +265,7 @@ void Foam::KinematicCloud<ParcelType>::evolve() g_.value() ); - inject(td); + inject(); if (coupled_) { @@ -336,15 +277,11 @@ void Foam::KinematicCloud<ParcelType>::evolve() template<class ParcelType> -template<class TrackingData> -void Foam::KinematicCloud<ParcelType>::inject -( - TrackingData& td -) +void Foam::KinematicCloud<ParcelType>::inject() { scalar time = this->db().time().value(); - scalar pRho = td.constProps().rho0(); + scalar pRho = constProps_.rho0(); this->injection().prepareForNextTimeStep(time0_, time); @@ -419,21 +356,21 @@ void Foam::KinematicCloud<ParcelType>::inject // Determine the injection cell label pCell = -1; - setInjectorCellAndPosition(pCell, pPosition); + this->injection().findInjectorCellAndPosition(pCell, pPosition); if (pCell >= 0) { // construct the parcel that is to be injected ParcelType* pPtr = new ParcelType ( - td.cloud(), + *this, parcelTypeId_, pPosition, pCell, pDiameter, pU, pNumberOfParticles, - td.constProps() + constProps_ ); scalar dt = time - timeInj; @@ -441,7 +378,7 @@ void Foam::KinematicCloud<ParcelType>::inject pPtr->stepFraction() = (this->db().time().deltaT().value() - dt) /this->time().deltaT().value(); - this->injectParcel(td, pPtr); + this->injectParcel(pPtr); } } @@ -455,12 +392,7 @@ void Foam::KinematicCloud<ParcelType>::inject template<class ParcelType> -template<class TrackingData> -void Foam::KinematicCloud<ParcelType>::injectParcel -( - TrackingData& td, - ParcelType* p -) +void Foam::KinematicCloud<ParcelType>::injectParcel(ParcelType* p) { addParticle(p); nParcelsAdded_++; diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index ebd298c44ef8e6444a32e212b3a5ae2ea2f941c3..0d3781413cbb72236afdd2554dc640890e9fba92 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -223,13 +223,6 @@ protected: // Protected member functions - //- Set parcel position and cell into which parcel is introduced - void setInjectorCellAndPosition - ( - label& pCell, - vector& pPosition - ); - //- Set the number of particles per parcel scalar setNumberOfParticles ( @@ -241,16 +234,10 @@ protected: ); //- Inject more parcels - template<class TrackingData> - void inject(TrackingData& td); + void inject(); //- Inject parcel if it is valid - delete otherwise - template<class TrackingData> - void injectParcel - ( - TrackingData& td, - ParcelType* p - ); + void injectParcel(ParcelType* p); //- Post-injection checks void postInjectCheck(); diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index 1f358d6f6cf2c5fa4b5d1c90fb6a1b727d71f457..4bad7642727b81043196feb55ebc140a557f83bd 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -174,7 +174,7 @@ void Foam::ReactingCloud<ParcelType>::evolve() this->g().value() ); - inject(td); + inject(); if (this->coupled()) { @@ -186,15 +186,11 @@ void Foam::ReactingCloud<ParcelType>::evolve() template<class ParcelType> -template<class TrackingData> -void Foam::ReactingCloud<ParcelType>::inject -( - TrackingData& td -) +void Foam::ReactingCloud<ParcelType>::inject() { scalar time = this->db().time().value(); - scalar pRho = td.constProps().rho0(); + scalar pRho = this->constProps().rho0(); this->injection().prepareForNextTimeStep(this->time0(), time); @@ -269,14 +265,14 @@ void Foam::ReactingCloud<ParcelType>::inject // Determine the injection cell label pCell = -1; - this->setInjectorCellAndPosition(pCell, pPosition); + this->injection().findInjectorCellAndPosition(pCell, pPosition); if (pCell >= 0) { // construct the parcel that is to be injected ParcelType* pPtr = new ParcelType ( - td.cloud(), + *this, this->parcelTypeId(), pPosition, pCell, @@ -287,7 +283,7 @@ void Foam::ReactingCloud<ParcelType>::inject composition().YLiquid0(), composition().YSolid0(), composition().YMixture0(), - td.constProps() + this->constProps() ); scalar dt = time - timeInj; @@ -295,7 +291,7 @@ void Foam::ReactingCloud<ParcelType>::inject pPtr->stepFraction() = (this->db().time().deltaT().value() - dt) /this->db().time().deltaT().value(); - this->injectParcel(td, pPtr); + this->injectParcel(pPtr); } } diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H index d1c60f5a974c0c3070b7f515005eed318a94f993..9ce5c98b1aa35210762b134ebfc4510a0a611e30 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H @@ -117,8 +117,7 @@ class ReactingCloud protected: //- Inject more parcels - template<class TrackingData> - void inject(TrackingData& td); + void inject(); public: diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index d6605d6f46d0a1d527b22730a8640c0c6a1ca34a..f23dc19c0a1d9aeb8a8430bd7afb4de79920559f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -159,6 +159,57 @@ void Foam::InjectionModel<CloudType>::prepareForNextTimeStep } +template<class CloudType> +void Foam::InjectionModel<CloudType>::findInjectorCellAndPosition +( + label& cellI, + vector& position +) +{ + const vector p0 = position; + + bool foundCell = false; + + cellI = owner_.mesh().findCell(position); + + if (cellI >= 0) + { + const vector& C = owner_.mesh().C()[cellI]; + position += 1.0e-6*(C - position); + + foundCell = owner_.mesh().pointInCell(position, cellI); + } + reduce(foundCell, orOp<bool>()); + + // Last chance - find nearest cell and try that one + // - the point is probably on an edge + if (!foundCell) + { + cellI = owner_.mesh().findNearestCell(position); + + if (cellI >= 0) + { + const vector& C = owner_.mesh().C()[cellI]; + position += 1.0e-6*(C - position); + + foundCell = owner_.mesh().pointInCell(position, cellI); + } + reduce(foundCell, orOp<bool>()); + } + + if (!foundCell) + { + FatalErrorIn + ( + "InjectionModel<CloudType>::setInjectorCellAndPosition" + "(label&, vector&)" + )<< "Cannot find parcel injection cell. " + << "Parcel position = " << p0 << nl + << abort(FatalError); + } +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "NewInjectionModel.C" diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H index f19d59723fb955cf9c3e5560fbda1274f2fdee72..0b00ebeda95c90c63448921a79cdd16e12744962 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H @@ -208,6 +208,14 @@ public: // Injection geometry + //- Find the cell that contains the injector position + // Will modify position slightly towards the owner cell centroid + virtual void findInjectorCellAndPosition + ( + label& cellI, + vector& position + ); + //- Return the injection position virtual vector position ( diff --git a/src/postProcessing/Allwmake b/src/postProcessing/Allwmake index e1f7cc56d8290d962530cc3667457b174a6181ea..ab7328b651f0ec2e2094722574fcf0f3243a7d59 100755 --- a/src/postProcessing/Allwmake +++ b/src/postProcessing/Allwmake @@ -3,10 +3,8 @@ cd ${0%/*} || exit 1 # run from this directory set -x wmake libo postCalc -wmake libso forces -wmake libso fieldAverage wmake libso foamCalcFunctions -wmake libso minMaxFields -wmake libso systemCall + +(cd functionObjects && ./Allwmake) # ----------------------------------------------------------------- end-of-file diff --git a/src/postProcessing/functionObjects/Allwmake b/src/postProcessing/functionObjects/Allwmake new file mode 100755 index 0000000000000000000000000000000000000000..48e5f4d856bfb35b1ddb8cd1ae466776b91fde1b --- /dev/null +++ b/src/postProcessing/functionObjects/Allwmake @@ -0,0 +1,10 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +wmake libso fieldAverage +wmake libso forces +wmake libso minMaxFields +wmake libso systemCall + +# ----------------------------------------------------------------- end-of-file diff --git a/src/postProcessing/fieldAverage/Make/files b/src/postProcessing/functionObjects/fieldAverage/Make/files similarity index 100% rename from src/postProcessing/fieldAverage/Make/files rename to src/postProcessing/functionObjects/fieldAverage/Make/files diff --git a/src/postProcessing/fieldAverage/Make/options b/src/postProcessing/functionObjects/fieldAverage/Make/options similarity index 100% rename from src/postProcessing/fieldAverage/Make/options rename to src/postProcessing/functionObjects/fieldAverage/Make/options diff --git a/src/postProcessing/fieldAverage/controlDict b/src/postProcessing/functionObjects/fieldAverage/controlDict similarity index 100% rename from src/postProcessing/fieldAverage/controlDict rename to src/postProcessing/functionObjects/fieldAverage/controlDict diff --git a/src/postProcessing/fieldAverage/fieldAverage/IOFieldAverage.H b/src/postProcessing/functionObjects/fieldAverage/fieldAverage/IOFieldAverage.H similarity index 100% rename from src/postProcessing/fieldAverage/fieldAverage/IOFieldAverage.H rename to src/postProcessing/functionObjects/fieldAverage/fieldAverage/IOFieldAverage.H diff --git a/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.C b/src/postProcessing/functionObjects/fieldAverage/fieldAverage/fieldAverage.C similarity index 100% rename from src/postProcessing/fieldAverage/fieldAverage/fieldAverage.C rename to src/postProcessing/functionObjects/fieldAverage/fieldAverage/fieldAverage.C diff --git a/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H b/src/postProcessing/functionObjects/fieldAverage/fieldAverage/fieldAverage.H similarity index 100% rename from src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H rename to src/postProcessing/functionObjects/fieldAverage/fieldAverage/fieldAverage.H diff --git a/src/postProcessing/fieldAverage/fieldAverage/fieldAverageTemplates.C b/src/postProcessing/functionObjects/fieldAverage/fieldAverage/fieldAverageTemplates.C similarity index 100% rename from src/postProcessing/fieldAverage/fieldAverage/fieldAverageTemplates.C rename to src/postProcessing/functionObjects/fieldAverage/fieldAverage/fieldAverageTemplates.C diff --git a/src/postProcessing/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.C b/src/postProcessing/functionObjects/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.C similarity index 100% rename from src/postProcessing/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.C rename to src/postProcessing/functionObjects/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.C diff --git a/src/postProcessing/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.H b/src/postProcessing/functionObjects/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.H similarity index 100% rename from src/postProcessing/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.H rename to src/postProcessing/functionObjects/fieldAverage/fieldAverageFunctionObject/fieldAverageFunctionObject.H diff --git a/src/postProcessing/fieldAverage/fieldAverageItem/fieldAverageItem.C b/src/postProcessing/functionObjects/fieldAverage/fieldAverageItem/fieldAverageItem.C similarity index 100% rename from src/postProcessing/fieldAverage/fieldAverageItem/fieldAverageItem.C rename to src/postProcessing/functionObjects/fieldAverage/fieldAverageItem/fieldAverageItem.C diff --git a/src/postProcessing/fieldAverage/fieldAverageItem/fieldAverageItem.H b/src/postProcessing/functionObjects/fieldAverage/fieldAverageItem/fieldAverageItem.H similarity index 100% rename from src/postProcessing/fieldAverage/fieldAverageItem/fieldAverageItem.H rename to src/postProcessing/functionObjects/fieldAverage/fieldAverageItem/fieldAverageItem.H diff --git a/src/postProcessing/fieldAverage/fieldAverageItem/fieldAverageItemIO.C b/src/postProcessing/functionObjects/fieldAverage/fieldAverageItem/fieldAverageItemIO.C similarity index 100% rename from src/postProcessing/fieldAverage/fieldAverageItem/fieldAverageItemIO.C rename to src/postProcessing/functionObjects/fieldAverage/fieldAverageItem/fieldAverageItemIO.C diff --git a/src/postProcessing/forces/Make/files b/src/postProcessing/functionObjects/forces/Make/files similarity index 100% rename from src/postProcessing/forces/Make/files rename to src/postProcessing/functionObjects/forces/Make/files diff --git a/src/postProcessing/forces/Make/options b/src/postProcessing/functionObjects/forces/Make/options similarity index 100% rename from src/postProcessing/forces/Make/options rename to src/postProcessing/functionObjects/forces/Make/options diff --git a/src/postProcessing/forces/forceCoeffs/IOforceCoeffs.H b/src/postProcessing/functionObjects/forces/forceCoeffs/IOforceCoeffs.H similarity index 100% rename from src/postProcessing/forces/forceCoeffs/IOforceCoeffs.H rename to src/postProcessing/functionObjects/forces/forceCoeffs/IOforceCoeffs.H diff --git a/src/postProcessing/forces/forceCoeffs/forceCoeffs.C b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C similarity index 100% rename from src/postProcessing/forces/forceCoeffs/forceCoeffs.C rename to src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C diff --git a/src/postProcessing/forces/forceCoeffs/forceCoeffs.H b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H similarity index 100% rename from src/postProcessing/forces/forceCoeffs/forceCoeffs.H rename to src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H diff --git a/src/postProcessing/forces/forceCoeffs/forceCoeffsFunctionObject.C b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffsFunctionObject.C similarity index 100% rename from src/postProcessing/forces/forceCoeffs/forceCoeffsFunctionObject.C rename to src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffsFunctionObject.C diff --git a/src/postProcessing/forces/forceCoeffs/forceCoeffsFunctionObject.H b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffsFunctionObject.H similarity index 100% rename from src/postProcessing/forces/forceCoeffs/forceCoeffsFunctionObject.H rename to src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffsFunctionObject.H diff --git a/src/postProcessing/forces/forces/IOforces.H b/src/postProcessing/functionObjects/forces/forces/IOforces.H similarity index 100% rename from src/postProcessing/forces/forces/IOforces.H rename to src/postProcessing/functionObjects/forces/forces/IOforces.H diff --git a/src/postProcessing/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C similarity index 100% rename from src/postProcessing/forces/forces/forces.C rename to src/postProcessing/functionObjects/forces/forces/forces.C diff --git a/src/postProcessing/forces/forces/forces.H b/src/postProcessing/functionObjects/forces/forces/forces.H similarity index 100% rename from src/postProcessing/forces/forces/forces.H rename to src/postProcessing/functionObjects/forces/forces/forces.H diff --git a/src/postProcessing/forces/forces/forcesFunctionObject.C b/src/postProcessing/functionObjects/forces/forces/forcesFunctionObject.C similarity index 100% rename from src/postProcessing/forces/forces/forcesFunctionObject.C rename to src/postProcessing/functionObjects/forces/forces/forcesFunctionObject.C diff --git a/src/postProcessing/forces/forces/forcesFunctionObject.H b/src/postProcessing/functionObjects/forces/forces/forcesFunctionObject.H similarity index 100% rename from src/postProcessing/forces/forces/forcesFunctionObject.H rename to src/postProcessing/functionObjects/forces/forces/forcesFunctionObject.H diff --git a/src/postProcessing/minMaxFields/IOminMaxFields.H b/src/postProcessing/functionObjects/minMaxFields/IOminMaxFields.H similarity index 100% rename from src/postProcessing/minMaxFields/IOminMaxFields.H rename to src/postProcessing/functionObjects/minMaxFields/IOminMaxFields.H diff --git a/src/postProcessing/minMaxFields/Make/files b/src/postProcessing/functionObjects/minMaxFields/Make/files similarity index 100% rename from src/postProcessing/minMaxFields/Make/files rename to src/postProcessing/functionObjects/minMaxFields/Make/files diff --git a/src/postProcessing/minMaxFields/Make/options b/src/postProcessing/functionObjects/minMaxFields/Make/options similarity index 100% rename from src/postProcessing/minMaxFields/Make/options rename to src/postProcessing/functionObjects/minMaxFields/Make/options diff --git a/src/postProcessing/minMaxFields/minMaxFields.C b/src/postProcessing/functionObjects/minMaxFields/minMaxFields.C similarity index 100% rename from src/postProcessing/minMaxFields/minMaxFields.C rename to src/postProcessing/functionObjects/minMaxFields/minMaxFields.C diff --git a/src/postProcessing/minMaxFields/minMaxFields.H b/src/postProcessing/functionObjects/minMaxFields/minMaxFields.H similarity index 100% rename from src/postProcessing/minMaxFields/minMaxFields.H rename to src/postProcessing/functionObjects/minMaxFields/minMaxFields.H diff --git a/src/postProcessing/minMaxFields/minMaxFieldsFunctionObject.C b/src/postProcessing/functionObjects/minMaxFields/minMaxFieldsFunctionObject.C similarity index 100% rename from src/postProcessing/minMaxFields/minMaxFieldsFunctionObject.C rename to src/postProcessing/functionObjects/minMaxFields/minMaxFieldsFunctionObject.C diff --git a/src/postProcessing/minMaxFields/minMaxFieldsFunctionObject.H b/src/postProcessing/functionObjects/minMaxFields/minMaxFieldsFunctionObject.H similarity index 100% rename from src/postProcessing/minMaxFields/minMaxFieldsFunctionObject.H rename to src/postProcessing/functionObjects/minMaxFields/minMaxFieldsFunctionObject.H diff --git a/src/postProcessing/minMaxFields/minMaxFieldsTemplates.C b/src/postProcessing/functionObjects/minMaxFields/minMaxFieldsTemplates.C similarity index 100% rename from src/postProcessing/minMaxFields/minMaxFieldsTemplates.C rename to src/postProcessing/functionObjects/minMaxFields/minMaxFieldsTemplates.C diff --git a/src/postProcessing/systemCall/IOsystemCall.H b/src/postProcessing/functionObjects/systemCall/IOsystemCall.H similarity index 100% rename from src/postProcessing/systemCall/IOsystemCall.H rename to src/postProcessing/functionObjects/systemCall/IOsystemCall.H diff --git a/src/postProcessing/systemCall/Make/files b/src/postProcessing/functionObjects/systemCall/Make/files similarity index 100% rename from src/postProcessing/systemCall/Make/files rename to src/postProcessing/functionObjects/systemCall/Make/files diff --git a/src/postProcessing/systemCall/Make/options b/src/postProcessing/functionObjects/systemCall/Make/options similarity index 100% rename from src/postProcessing/systemCall/Make/options rename to src/postProcessing/functionObjects/systemCall/Make/options diff --git a/src/postProcessing/systemCall/systemCall.C b/src/postProcessing/functionObjects/systemCall/systemCall.C similarity index 100% rename from src/postProcessing/systemCall/systemCall.C rename to src/postProcessing/functionObjects/systemCall/systemCall.C diff --git a/src/postProcessing/systemCall/systemCall.H b/src/postProcessing/functionObjects/systemCall/systemCall.H similarity index 100% rename from src/postProcessing/systemCall/systemCall.H rename to src/postProcessing/functionObjects/systemCall/systemCall.H diff --git a/src/postProcessing/systemCall/systemCallFunctionObject.C b/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.C similarity index 100% rename from src/postProcessing/systemCall/systemCallFunctionObject.C rename to src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.C diff --git a/src/postProcessing/systemCall/systemCallFunctionObject.H b/src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.H similarity index 100% rename from src/postProcessing/systemCall/systemCallFunctionObject.H rename to src/postProcessing/functionObjects/systemCall/systemCallFunctionObject.H diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C index 6c9b91a407e86f283caa7a291110c873d243222c..d10505e6b21c7edbffd71189763aaf4e2f31f7bd 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -88,7 +88,7 @@ autoPtr<turbulenceModel> turbulenceModel::New ) ); - turbulencePropertiesDict.lookup("turbulenceModel") + turbulencePropertiesDict.lookup("simulationType") >> turbulenceModelTypeName; } diff --git a/tutorials/buoyantFoam/hotRoom/constant/turbulenceProperties b/tutorials/buoyantFoam/hotRoom/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..321c08496ae7cbe64b73cb2b6f5b2b172bcc9eaf --- /dev/null +++ b/tutorials/buoyantFoam/hotRoom/constant/turbulenceProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +//simulationType laminar; +simulationType RASModel; +//simulationType LESModel; + + +// ************************************************************************* // diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/0/U b/tutorials/compressibleInterFoam/depthCharge2D/0/U similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge2D/0/U rename to tutorials/compressibleInterFoam/depthCharge2D/0/U diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/0/alpha1.org b/tutorials/compressibleInterFoam/depthCharge2D/0/alpha1.org similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge2D/0/alpha1.org rename to tutorials/compressibleInterFoam/depthCharge2D/0/alpha1.org diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/0/pd.org b/tutorials/compressibleInterFoam/depthCharge2D/0/pd.org similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge2D/0/pd.org rename to tutorials/compressibleInterFoam/depthCharge2D/0/pd.org diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/Allrun b/tutorials/compressibleInterFoam/depthCharge2D/Allrun similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge2D/Allrun rename to tutorials/compressibleInterFoam/depthCharge2D/Allrun diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/constant/LESProperties b/tutorials/compressibleInterFoam/depthCharge2D/constant/LESProperties similarity index 98% rename from tutorials/compressibleLesInterFoam/depthCharge2D/constant/LESProperties rename to tutorials/compressibleInterFoam/depthCharge2D/constant/LESProperties index 130d0947d9c4402eba4cf9ee019bdd81b319ad1b..bb84772ba51036c08aa1082c7e6720dfe9d65037 100644 --- a/tutorials/compressibleLesInterFoam/depthCharge2D/constant/LESProperties +++ b/tutorials/compressibleInterFoam/depthCharge2D/constant/LESProperties @@ -16,7 +16,9 @@ FoamFile LESModel laminar; -delta smooth; +turbulence off; + +delta cubeRootVol; laminarCoeffs { diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/constant/environmentalProperties b/tutorials/compressibleInterFoam/depthCharge2D/constant/environmentalProperties similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge2D/constant/environmentalProperties rename to tutorials/compressibleInterFoam/depthCharge2D/constant/environmentalProperties diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/constant/polyMesh/blockMeshDict b/tutorials/compressibleInterFoam/depthCharge2D/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge2D/constant/polyMesh/blockMeshDict rename to tutorials/compressibleInterFoam/depthCharge2D/constant/polyMesh/blockMeshDict diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/constant/polyMesh/boundary b/tutorials/compressibleInterFoam/depthCharge2D/constant/polyMesh/boundary similarity index 78% rename from tutorials/compressibleLesInterFoam/depthCharge2D/constant/polyMesh/boundary rename to tutorials/compressibleInterFoam/depthCharge2D/constant/polyMesh/boundary index e1e2119e32dbd8fc336ad4c3ce9de73c190ff41f..a6a3281fd72f7a13b8fb5bd5a0d44edc0abc0059 100644 --- a/tutorials/compressibleLesInterFoam/depthCharge2D/constant/polyMesh/boundary +++ b/tutorials/compressibleInterFoam/depthCharge2D/constant/polyMesh/boundary @@ -1,15 +1,16 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: http://www.OpenFOAM.org | -| \\/ M anipulation | | +| \\ / O peration | Version: dev-09ca1eb6b56f | +| \\ / A nd | | +| \\/ M anipulation | www.OpenFOAM.org | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class polyBoundaryMesh; + location "constant/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/constant/transportProperties b/tutorials/compressibleInterFoam/depthCharge2D/constant/transportProperties similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge2D/constant/transportProperties rename to tutorials/compressibleInterFoam/depthCharge2D/constant/transportProperties diff --git a/tutorials/compressibleInterFoam/depthCharge2D/constant/turbulenceProperties b/tutorials/compressibleInterFoam/depthCharge2D/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..d3f32ecb06e6235cefb9e465d2767faa80138f38 --- /dev/null +++ b/tutorials/compressibleInterFoam/depthCharge2D/constant/turbulenceProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +//simulationType laminar; +//simulationType RASModel; +simulationType LESModel; + + +// ************************************************************************* // diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/system/controlDict b/tutorials/compressibleInterFoam/depthCharge2D/system/controlDict similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge2D/system/controlDict rename to tutorials/compressibleInterFoam/depthCharge2D/system/controlDict diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/system/fvSchemes b/tutorials/compressibleInterFoam/depthCharge2D/system/fvSchemes similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge2D/system/fvSchemes rename to tutorials/compressibleInterFoam/depthCharge2D/system/fvSchemes diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/system/fvSolution b/tutorials/compressibleInterFoam/depthCharge2D/system/fvSolution similarity index 99% rename from tutorials/compressibleLesInterFoam/depthCharge3D/system/fvSolution rename to tutorials/compressibleInterFoam/depthCharge2D/system/fvSolution index f97cf54032ec4b42a7b0bb04cdd33dcd4deb1de7..868252473975e23b298727de38f9dd66fbef0b56 100644 --- a/tutorials/compressibleLesInterFoam/depthCharge3D/system/fvSolution +++ b/tutorials/compressibleInterFoam/depthCharge2D/system/fvSolution @@ -120,7 +120,7 @@ PISO nNonOrthogonalCorrectors 0; nAlphaCorr 1; nAlphaSubCycles 1; - cGamma 1; + cAlpha 1; } // ************************************************************************* // diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/system/setFieldsDict b/tutorials/compressibleInterFoam/depthCharge2D/system/setFieldsDict similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge2D/system/setFieldsDict rename to tutorials/compressibleInterFoam/depthCharge2D/system/setFieldsDict diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/0/U b/tutorials/compressibleInterFoam/depthCharge3D/0/U similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/0/U rename to tutorials/compressibleInterFoam/depthCharge3D/0/U diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/0/alpha1.org b/tutorials/compressibleInterFoam/depthCharge3D/0/alpha1.org similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/0/alpha1.org rename to tutorials/compressibleInterFoam/depthCharge3D/0/alpha1.org diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/0/pd.org b/tutorials/compressibleInterFoam/depthCharge3D/0/pd.org similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/0/pd.org rename to tutorials/compressibleInterFoam/depthCharge3D/0/pd.org diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/Allclean b/tutorials/compressibleInterFoam/depthCharge3D/Allclean similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/Allclean rename to tutorials/compressibleInterFoam/depthCharge3D/Allclean diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/Allrun b/tutorials/compressibleInterFoam/depthCharge3D/Allrun similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/Allrun rename to tutorials/compressibleInterFoam/depthCharge3D/Allrun diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/constant/LESProperties b/tutorials/compressibleInterFoam/depthCharge3D/constant/LESProperties similarity index 98% rename from tutorials/compressibleLesInterFoam/depthCharge3D/constant/LESProperties rename to tutorials/compressibleInterFoam/depthCharge3D/constant/LESProperties index 130d0947d9c4402eba4cf9ee019bdd81b319ad1b..bb84772ba51036c08aa1082c7e6720dfe9d65037 100644 --- a/tutorials/compressibleLesInterFoam/depthCharge3D/constant/LESProperties +++ b/tutorials/compressibleInterFoam/depthCharge3D/constant/LESProperties @@ -16,7 +16,9 @@ FoamFile LESModel laminar; -delta smooth; +turbulence off; + +delta cubeRootVol; laminarCoeffs { diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/constant/environmentalProperties b/tutorials/compressibleInterFoam/depthCharge3D/constant/environmentalProperties similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/constant/environmentalProperties rename to tutorials/compressibleInterFoam/depthCharge3D/constant/environmentalProperties diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/constant/polyMesh/blockMeshDict b/tutorials/compressibleInterFoam/depthCharge3D/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/constant/polyMesh/blockMeshDict rename to tutorials/compressibleInterFoam/depthCharge3D/constant/polyMesh/blockMeshDict diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/constant/polyMesh/boundary b/tutorials/compressibleInterFoam/depthCharge3D/constant/polyMesh/boundary similarity index 75% rename from tutorials/compressibleLesInterFoam/depthCharge3D/constant/polyMesh/boundary rename to tutorials/compressibleInterFoam/depthCharge3D/constant/polyMesh/boundary index 178b2ace003c711381d84ede00541b384556c3bd..3517ca55be180a00b154b971fd6945bd75fd1afc 100644 --- a/tutorials/compressibleLesInterFoam/depthCharge3D/constant/polyMesh/boundary +++ b/tutorials/compressibleInterFoam/depthCharge3D/constant/polyMesh/boundary @@ -1,15 +1,16 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: http://www.OpenFOAM.org | -| \\/ M anipulation | | +| \\ / O peration | Version: dev-09ca1eb6b56f | +| \\ / A nd | | +| \\/ M anipulation | www.OpenFOAM.org | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class polyBoundaryMesh; + location "constant/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/constant/transportProperties b/tutorials/compressibleInterFoam/depthCharge3D/constant/transportProperties similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/constant/transportProperties rename to tutorials/compressibleInterFoam/depthCharge3D/constant/transportProperties diff --git a/tutorials/compressibleInterFoam/depthCharge3D/constant/turbulenceProperties b/tutorials/compressibleInterFoam/depthCharge3D/constant/turbulenceProperties new file mode 100644 index 0000000000000000000000000000000000000000..fe67e8fecae0729e7345802955479523972bb72d --- /dev/null +++ b/tutorials/compressibleInterFoam/depthCharge3D/constant/turbulenceProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +//simulationType laminar; +//simulationType RASModel; +simulationType LESModel; + + +// ************************************************************************* // diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/system/controlDict b/tutorials/compressibleInterFoam/depthCharge3D/system/controlDict similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/system/controlDict rename to tutorials/compressibleInterFoam/depthCharge3D/system/controlDict diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/system/decomposeParDict b/tutorials/compressibleInterFoam/depthCharge3D/system/decomposeParDict similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/system/decomposeParDict rename to tutorials/compressibleInterFoam/depthCharge3D/system/decomposeParDict diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/system/fvSchemes b/tutorials/compressibleInterFoam/depthCharge3D/system/fvSchemes similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/system/fvSchemes rename to tutorials/compressibleInterFoam/depthCharge3D/system/fvSchemes diff --git a/tutorials/compressibleLesInterFoam/depthCharge2D/system/fvSolution b/tutorials/compressibleInterFoam/depthCharge3D/system/fvSolution similarity index 99% rename from tutorials/compressibleLesInterFoam/depthCharge2D/system/fvSolution rename to tutorials/compressibleInterFoam/depthCharge3D/system/fvSolution index f97cf54032ec4b42a7b0bb04cdd33dcd4deb1de7..868252473975e23b298727de38f9dd66fbef0b56 100644 --- a/tutorials/compressibleLesInterFoam/depthCharge2D/system/fvSolution +++ b/tutorials/compressibleInterFoam/depthCharge3D/system/fvSolution @@ -120,7 +120,7 @@ PISO nNonOrthogonalCorrectors 0; nAlphaCorr 1; nAlphaSubCycles 1; - cGamma 1; + cAlpha 1; } // ************************************************************************* // diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/system/machines b/tutorials/compressibleInterFoam/depthCharge3D/system/machines similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/system/machines rename to tutorials/compressibleInterFoam/depthCharge3D/system/machines diff --git a/tutorials/compressibleLesInterFoam/depthCharge3D/system/setFieldsDict b/tutorials/compressibleInterFoam/depthCharge3D/system/setFieldsDict similarity index 100% rename from tutorials/compressibleLesInterFoam/depthCharge3D/system/setFieldsDict rename to tutorials/compressibleInterFoam/depthCharge3D/system/setFieldsDict diff --git a/wmake/rules/General/version b/wmake/rules/General/version index 0d74179f8cc78c80b4c40ad0155622558d887d9e..64f272ed088a902d615f7d771bac5c432bc2c625 100644 --- a/wmake/rules/General/version +++ b/wmake/rules/General/version @@ -1,10 +1,10 @@ .SUFFIXES: .Cver # -# update version string +# update version string in C++ file and in $WM_PROJECT_DIR/.build file # Cvertoo = \ - sed s/WM_PROJECT_VERSION/\"$(shell wmakePrintBuild)\"/ $$SOURCE > $*.C; \ + sed 's/WM_PROJECT_VERSION/$(shell wmakePrintBuild -update)/' $$SOURCE > $*.C; \ $(CC) $(c++FLAGS) -c $*.C -o $@ .Cver.dep: diff --git a/wmake/wmakePrintBuild b/wmake/wmakePrintBuild index 61e9b80790f40146ccf2a67fb795134d5a58901b..1eb59cf46c4f71cacb12d5c40e961b0fcd388a9b 100755 --- a/wmake/wmakePrintBuild +++ b/wmake/wmakePrintBuild @@ -35,10 +35,15 @@ Script=${0##*/} usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<<USAGE -usage: $Script +usage: $Script [OPTION] +options: + -check check the git head commit vs. \$WM_PROJECT_DIR/.build + (exit code 0 for no changes) + -update update the \$WM_PROJECT_DIR/.build from the git information + -version VER specify an alternative version Print the version used when building the project, in this order of precedence: - * git description + * the git head commit (prefixed with \$WM_PROJECT_VERSION) * \$WM_PROJECT_DIR/.build * \$WM_PROJECT_VERSION @@ -47,11 +52,33 @@ USAGE } #------------------------------------------------------------------------------ -# provide immediate help -if [ "$1" = "-h" -o "$1" = "-help" ] -then - usage -fi +unset checkOnly update version + +# parse options +while [ "$#" -gt 0 ] +do + case "$1" in + -h | -help) + usage + ;; + -check) + checkOnly=true + shift + ;; + -update) + update=true + shift + ;; + -version) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + version=$2 + shift 2 + ;; + *) + usage "unknown option/argument: '$*'" + ;; + esac +done #------------------------------------------------------------------------------ @@ -61,35 +88,64 @@ fi build="$WM_PROJECT_DIR/.build" previous=$(tail -1 $build 2>/dev/null) -# -# building under git -# note: could also use --abbrev=32 for maximum resolution -# -version=$(git describe --always --tags 2>/dev/null) -if [ $? -eq 0 ] +if [ -n "$version" ] +then + # specified a version - no error possible + rc=0 +else + # building under git (get the head SHA1) + version=$(git show-ref --hash=12 --head refs/heads/master 2>/dev/null) + rc=$? + + # prefix with WM_PROJECT_VERSION + if [ $rc -eq 0 ] + then + version="${WM_PROJECT_VERSION}-$version" + fi +fi + + +# update persistent build tag if possible +if [ $rc -eq 0 -a -n "$update" -a "$version" != "$previous" ] then - # update persistent build tag (this could be made optional or removed) - if [ "$version" != "$previous" ] + if [ -w "$build" -a \( -w "$WM_PROJECT_DIR" -o ! -e "$build" \) ] then - if [ -w "$build" -a \( -w "$WM_PROJECT_DIR" -o ! -e "$build" \) ] + echo $version >| "$build" 2>/dev/null + fi +fi + + +# check git vs. persistent build tag - no output +if [ -n "$checkOnly" ] +then + if [ $rc -eq 0 ] + then + test "$version" = "$previous" + rc=$? + if [ $rc -eq 0 ] then - echo $version >| "$build" 2>/dev/null + echo "same version as previous build" + else + echo "version changed from previous build" fi + else + echo "no git description found" fi + exit $rc +fi - echo $version +if [ $rc -eq 0 ] +then + # output the git information or the -version version + echo $version elif [ -n "$previous" ] then - # use previous build tag echo $previous - else - - # fallback to WM_PROJECT_VERSION + # fallback to WM_PROJECT_VERSION alone echo ${WM_PROJECT_VERSION:-unknown} - fi #------------------------------------------------------------------------------