diff --git a/applications/solvers/DNS/dnsFoam/dnsFoam.C b/applications/solvers/DNS/dnsFoam/dnsFoam.C index ca4e0dcb58..891befab21 100644 --- a/applications/solvers/DNS/dnsFoam/dnsFoam.C +++ b/applications/solvers/DNS/dnsFoam/dnsFoam.C @@ -41,17 +41,16 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" + #include "createTime.H" + #include "createMeshNoClear.H" + #include "readTransportProperties.H" + #include "createFields.H" + #include "readTurbulenceProperties.H" + #include "initContinuityErrs.H" -# include "createTime.H" -# include "createMeshNoClear.H" -# include "readTransportProperties.H" -# include "createFields.H" -# include "readTurbulenceProperties.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< nl << "Starting time loop" << endl; @@ -59,7 +58,7 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readPISOControls.H" + #include "readPISOControls.H" force.internalField() = ReImSum ( @@ -69,12 +68,12 @@ int main(int argc, char *argv[]) ) ); -# include "globalProperties.H" + #include "globalProperties.H" fvVectorMatrix UEqn ( - fvm::ddt(U) - + fvm::div(phi, U) + fvm::ddt(U) + + fvm::div(phi, U) - fvm::laplacian(nu, U) == force @@ -90,7 +89,7 @@ int main(int argc, char *argv[]) volScalarField rUA = 1.0/UEqn.A(); U = rUA*UEqn.H(); - phi = (fvc::interpolate(U) & mesh.Sf()) + phi = (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, U, phi); fvScalarMatrix pEqn @@ -102,7 +101,7 @@ int main(int argc, char *argv[]) phi -= pEqn.flux(); -# include "continuityErrs.H" + #include "continuityErrs.H" U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); diff --git a/applications/solvers/combustion/PDRFoam/PDRFoam.C b/applications/solvers/combustion/PDRFoam/PDRFoam.C index daeed4ebf0..58bea3ed99 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoam.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoam.C @@ -77,7 +77,6 @@ int main(int argc, char *argv[]) #include "readCombustionProperties.H" #include "readEnvironmentalProperties.H" #include "createFields.H" - #include "readPISOControls.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "CourantNo.H" diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index cb7f7d2f95..13a464a755 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -61,50 +61,49 @@ Description int main(int argc, char *argv[]) { -# include "setRootCase.H" + #include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readCombustionProperties.H" -# include "readEnvironmentalProperties.H" -# include "createFields.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" -# include "readTimeControls.H" -# include "compressibleCourantNo.H" -# include "setInitialDeltaT.H" + #include "createTime.H" + #include "createMesh.H" + #include "readCombustionProperties.H" + #include "readEnvironmentalProperties.H" + #include "createFields.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "compressibleCourantNo.H" + #include "setInitialDeltaT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { -# include "readTimeControls.H" -# include "readPISOControls.H" -# include "compressibleCourantNo.H" -# include "setDeltaT.H" + #include "readTimeControls.H" + #include "readPISOControls.H" + #include "compressibleCourantNo.H" + #include "setDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; -# include "rhoEqn.H" -# include "UEqn.H" + #include "rhoEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=1; corr<=nCorr; corr++) { -# include "ftEqn.H" -# include "bEqn.H" -# include "huEqn.H" -# include "hEqn.H" + #include "ftEqn.H" + #include "bEqn.H" + #include "huEqn.H" + #include "hEqn.H" if (!ign.ignited()) { hu == h; } -# include "pEqn.H" + #include "pEqn.H" } turbulence->correct(); diff --git a/applications/solvers/combustion/engineFoam/engineFoam.C b/applications/solvers/combustion/engineFoam/engineFoam.C index 33a8ea6f5d..9adf73cc67 100644 --- a/applications/solvers/combustion/engineFoam/engineFoam.C +++ b/applications/solvers/combustion/engineFoam/engineFoam.C @@ -67,7 +67,6 @@ int main(int argc, char *argv[]) #include "createEngineTime.H" #include "createEngineMesh.H" - #include "readPISOControls.H" #include "readCombustionProperties.H" #include "createFields.H" #include "initContinuityErrs.H" diff --git a/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C b/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C index 2d9cccd29e..cd462c28ab 100644 --- a/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C +++ b/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C @@ -43,14 +43,13 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" - #include "readPISOControls.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" #include "setInitialDeltaT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C b/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C index fbc27d8846..10bfeb61db 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C @@ -40,14 +40,13 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" + #include "initContinuityErrs.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -55,17 +54,17 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readSIMPLEControls.H" -# include "initConvergenceCheck.H" + #include "readSIMPLEControls.H" + #include "initConvergenceCheck.H" p.storePrevIter(); rho.storePrevIter(); // Pressure-velocity SIMPLE corrector { -# include "UEqn.H" -# include "hEqn.H" -# include "pEqn.H" + #include "UEqn.H" + #include "hEqn.H" + #include "pEqn.H" } turbulence->correct(); @@ -75,7 +74,7 @@ int main(int argc, char *argv[]) << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; -# include "convergenceCheck.H" + #include "convergenceCheck.H" } Info<< "End\n" << endl; diff --git a/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C b/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C index 7cd692b71d..3d71de6324 100644 --- a/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C +++ b/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C @@ -42,14 +42,13 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readThermodynamicProperties.H" + #include "createFields.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readThermodynamicProperties.H" -# include "createFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -57,10 +56,10 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.value() << nl << endl; -# include "readPISOControls.H" + #include "readPISOControls.H" scalar HbyAblend = readScalar(piso.lookup("HbyAblend")); -# include "readTimeControls.H" + #include "readTimeControls.H" scalar CoNum = max ( @@ -70,7 +69,7 @@ int main(int argc, char *argv[]) Info<< "Max Courant Number = " << CoNum << endl; -# include "setDeltaT.H" + #include "setDeltaT.H" for (int outerCorr=0; outerCorrcorrect(); @@ -72,7 +71,7 @@ int main(int argc, char *argv[]) << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; -# include "convergenceCheck.H" + #include "convergenceCheck.H" } Info<< "End\n" << endl; diff --git a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C index 9abc94a829..0791c2e358 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C +++ b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C @@ -55,7 +55,6 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "createClouds.H" #include "createRadiationModel.H" - #include "readPISOControls.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C index 3db0d3827d..c7e4fee7b6 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C @@ -61,7 +61,6 @@ int main(int argc, char *argv[]) #include "createClouds.H" #include "createMulticomponentPointSources.H" #include "createPorousZones.H" - #include "readPISOControls.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C index f60de4a369..8c26cb6528 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C @@ -53,7 +53,6 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "createClouds.H" #include "createRadiationModel.H" - #include "readPISOControls.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "compressibleCourantNo.H" diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C b/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C index 4574ef7f1c..e7f432d29d 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/solidDisplacementFoam.C @@ -43,17 +43,16 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" -# include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readMechanicalProperties.H" + #include "readThermalProperties.H" + #include "readSolidDisplacementFoamControls.H" + #include "createFields.H" -# include "createTime.H" -# include "createMesh.H" -# include "readMechanicalProperties.H" -# include "readThermalProperties.H" -# include "readSolidDisplacementFoamControls.H" -# include "createFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nCalculating displacement field\n" << endl; @@ -61,7 +60,7 @@ int main(int argc, char *argv[]) { Info<< "Iteration: " << runTime.value() << nl << endl; -# include "readSolidDisplacementFoamControls.H" + #include "readSolidDisplacementFoamControls.H" int iCorr = 0; scalar initialResidual = 0; @@ -91,7 +90,7 @@ int main(int argc, char *argv[]) const volScalarField& T = Tptr(); DEqn += fvc::grad(threeKalpha*T); } - + //DEqn.setComponentReference(1, 0, vector::X, 0); //DEqn.setComponentReference(1, 0, vector::Z, 0); @@ -123,7 +122,7 @@ int main(int argc, char *argv[]) } while (initialResidual > convergenceTolerance && ++iCorr < nCorr); -# include "calculateStress.H" + #include "calculateStress.H" Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C index 55c10a0abf..cf4dc68acb 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C @@ -150,13 +150,13 @@ const Foam::vector Foam::KinematicParcel::calcVelocity const polyMesh& mesh = this->cloud().pMesh(); // Momentum transfer coefficient - const scalar ptc = - td.cloud().drag().ptc(U - Uc_, d, rhoc_, muc_) + ROOTVSMALL; + const scalar utc = + td.cloud().drag().utc(U - Uc_, d, rhoc_, muc_) + ROOTVSMALL; // Momentum source due to particle forces - const vector PFCoupled = + const vector FCoupled = mass*td.cloud().forces().calcCoupled(cellI, dt, rhoc_, rho, Uc_, U); - const vector PFNonCoupled = + const vector FNonCoupled = mass*td.cloud().forces().calcNonCoupled(cellI, dt, rhoc_, rho, Uc_, U); @@ -165,15 +165,15 @@ const Foam::vector Foam::KinematicParcel::calcVelocity // Update velocity - treat as 3-D const scalar As = this->areaS(d); - const vector ap = Uc_ + (PFCoupled + PFNonCoupled + Su)/(ptc*As); - const scalar bp = 6.0*ptc/(rho*d); + const vector ap = Uc_ + (FCoupled + FNonCoupled + Su)/(utc*As); + const scalar bp = 6.0*utc/(rho*d); IntegrationScheme::integrationResult Ures = td.cloud().UIntegrator().integrate(U, dt, ap, bp); vector Unew = Ures.value(); - dUTrans += dt*(ptc*As*(Ures.average() - Uc_) - PFCoupled); + dUTrans += dt*(utc*As*(Ures.average() - Uc_) - FCoupled); // Apply correction to velocity and dUTrans for reduced-D cases meshTools::constrainDirection(mesh, mesh.solutionD(), Unew); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C index 1eb7f86b48..ae4e2a2062 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C @@ -64,7 +64,7 @@ const Foam::dictionary& Foam::DragModel::dict() const template -Foam::scalar Foam::DragModel::ptc +Foam::scalar Foam::DragModel::utc ( const vector& Ur, const scalar d, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H index 69130b168c..4b4d6c4dd8 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H @@ -121,8 +121,8 @@ public: virtual scalar Cd(const scalar Re) const = 0; //- Return momentum transfer coefficient - // Drag force per unit particle surface area = ptc(U - Up) - scalar ptc + // Drag force per unit particle surface area = utc(U - Up) + scalar utc ( const vector& Ur, const scalar d, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H index 4e43f9b374..5e6498e3d4 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H @@ -181,7 +181,7 @@ public: //- Flag to identify whether model fully describes the parcel virtual bool fullyDescribed() const; - //- Return flag to identify whether or not injection in cellI is + //- Return flag to identify whether or not injection of parcelI is // permitted virtual bool validInjection(const label parcelI); }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C index 17af3bb870..8d1b57f231 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.C @@ -280,7 +280,7 @@ bool Foam::ConeInjectionMP::fullyDescribed() const template -bool Foam::ConeInjectionMP::validInjection(const label parcelI) +bool Foam::ConeInjectionMP::validInjection(const label) { return true; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H index cb10e93cec..238d0463ef 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjectionMP/ConeInjectionMP.H @@ -191,7 +191,7 @@ public: //- Flag to identify whether model fully describes the parcel virtual bool fullyDescribed() const; - //- Return flag to identify whether or not injection in cellI is + //- Return flag to identify whether or not injection of parcelI is // permitted virtual bool validInjection(const label parcelI); }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H index aa7c6e16f6..c2f1e3cef4 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H @@ -181,7 +181,7 @@ public: //- Flag to identify whether model fully describes the parcel virtual bool fullyDescribed() const; - //- Return flag to identify whether or not injection in cellI is + //- Return flag to identify whether or not injection of parcelI is // permitted virtual bool validInjection(const label parcelI); }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H index d90624ebcd..ad42a27030 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H @@ -161,7 +161,7 @@ protected: const scalar time1 ) const = 0; - //- Additional flag to identify whether or not injection in cellI is + //- Additional flag to identify whether or not injection of parcelI is // permitted virtual bool validInjection(const label parcelI) = 0; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H index b3dd74099c..e076f0ea58 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H @@ -170,7 +170,7 @@ public: //- Flag to identify whether model fully describes the parcel virtual bool fullyDescribed() const; - //- Return flag to identify whether or not injection in cellI is + //- Return flag to identify whether or not injection of parcelI is // permitted virtual bool validInjection(const label parcelI); }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C index afcd15f303..3177b78c31 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C @@ -105,8 +105,7 @@ Foam::ManualInjection::ManualInjection } // Determine volume of particles to inject - this->volumeTotal_ = sum(pow(diameters_, 3)) - *mathematicalConstant::pi/6.0; + this->volumeTotal_ = sum(pow3(diameters_))*mathematicalConstant::pi/6.0; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H index e3ab4853c5..b04fee48b5 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H @@ -153,7 +153,7 @@ public: //- Flag to identify whether model fully describes the parcel virtual bool fullyDescribed() const; - //- Return flag to identify whether or not injection in cellI is + //- Return flag to identify whether or not injection of parcelI is // permitted virtual bool validInjection(const label parcelI); }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H index 6f2950b17c..935dca80e1 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H @@ -123,9 +123,9 @@ public: //- Flag to identify whether model fully describes the parcel virtual bool fullyDescribed() const; - //- Return flag to identify whether or not injection in cellI is + //- Return flag to identify whether or not injection of parcelI is // permitted - virtual bool validInjection(const label cellI); + virtual bool validInjection(const label parcelI); }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.C index 8bd67c31da..a1e56a0fe0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.C @@ -27,6 +27,26 @@ License #include "PatchPostProcessing.H" #include "IOPtrList.H" +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template +Foam::label Foam::PatchPostProcessing::applyToPatch +( + const label globalPatchI +) const +{ + forAll(patchIds_, patchI) + { + if (patchIds_[patchI] == globalPatchI) + { + return patchI; + } + } + + return -1; +} + + // * * * * * * * * * * * * * protected Member Functions * * * * * * * * * * // template @@ -80,9 +100,8 @@ Foam::PatchPostProcessing::PatchPostProcessing mesh_(owner.mesh()), patchNames_(this->coeffDict().lookup("patches")), patchData_(patchNames_.size()), - globalToLocalPatchIds_(patchNames_.size()) + patchIds_(patchNames_.size()) { - labelList localToGlobal(patchNames_.size()); forAll(patchNames_, patchI) { label id = mesh_.boundaryMesh().findPatchID(patchNames_[patchI]); @@ -99,12 +118,7 @@ Foam::PatchPostProcessing::PatchPostProcessing << "Available patches are: " << mesh_.boundaryMesh().names() << nl << exit(FatalError); } - localToGlobal[patchI] = id; - } - - forAll(localToGlobal, patchI) - { - globalToLocalPatchIds_[localToGlobal[patchI]] = patchI; + patchIds_[patchI] = id; } } @@ -132,8 +146,8 @@ void Foam::PatchPostProcessing::postPatch const label patchI ) { - label localPatchI = globalToLocalPatchIds_[patchI]; - if (patchData_[localPatchI].size() < maxStoredParcels_) + label localPatchI = applyToPatch(patchI); + if (localPatchI >= 0 && patchData_[localPatchI].size() < maxStoredParcels_) { patchData_[localPatchI].append(p.clone()); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.H b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.H index 78c5e20508..2df16c1324 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.H @@ -44,7 +44,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class PatchPostProcessing Declaration + Class PatchPostProcessing Declaration \*---------------------------------------------------------------------------*/ template @@ -59,7 +59,7 @@ class PatchPostProcessing //- Reference to the mesh const polyMesh& mesh_; - //- Maximum number of parcels to store per patch + //- Maximum number of parcels to store label maxStoredParcels_; //- List of patch names @@ -68,8 +68,14 @@ class PatchPostProcessing //- List of parcel data per patch List > > patchData_; - //- Mapping from global to local patch ids - labelList globalToLocalPatchIds_; + //- Mapping from local to global patch ids + labelList patchIds_; + + + // Private member functions + + //- Returns local patchI if patch is in patchIds_ list + label applyToPatch(const label globalPatchI) const; protected: @@ -109,8 +115,8 @@ public: //- Return const access to the list of patch names inline const wordList& patchNames() const; - //- Return const mapping from global to local patch ids - inline const labelList& globalToLocalPatchIds() const; + //- Return const mapping from local to global patch ids + inline const labelList& patchIds() const; // Evaluation diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessingI.H b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessingI.H index 3ecdf058e8..f060eabc4b 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessingI.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessingI.H @@ -47,9 +47,9 @@ const Foam::wordList& Foam::PatchPostProcessing::patchNames() const template const Foam::labelList& -Foam::PatchPostProcessing::globalToLocalPatchIds() const +Foam::PatchPostProcessing::patchIds() const { - return globalToLocalPatchIds_; + return patchIds_; } diff --git a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H index 3ca571ee1e..f8b6546d5b 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H +++ b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H @@ -181,7 +181,7 @@ public: //- Flag to identify whether model fully describes the parcel virtual bool fullyDescribed() const; - //- Return flag to identify whether or not injection in cellI is + //- Return flag to identify whether or not injection of parcelI is // permitted virtual bool validInjection(const label parcelI); }; diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H index 9a5fd2c6a3..5c53b0337e 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H @@ -181,7 +181,7 @@ public: return true; } - //- Return flag to identify whether or not injection in cellI is + //- Return flag to identify whether or not injection of parcelI is // permitted virtual bool validInjection(const label parcelI); }; diff --git a/src/thermophysicalModels/liquids/liquid/liquid.H b/src/thermophysicalModels/liquids/liquid/liquid.H index 27bbff55bf..4c4769026f 100644 --- a/src/thermophysicalModels/liquids/liquid/liquid.H +++ b/src/thermophysicalModels/liquids/liquid/liquid.H @@ -266,7 +266,7 @@ public: virtual scalar mug(scalar p, scalar T) const = 0; //- Liquid thermal conductivity [W/(m K)] - virtual scalar K(scalar p, scalar T) const =0; + virtual scalar K(scalar p, scalar T) const = 0; //- Vapour thermal conductivity [W/(m K)] virtual scalar Kg(scalar p, scalar T) const = 0; diff --git a/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C b/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C index 2f9645138c..8bb511e9cc 100644 --- a/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C +++ b/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C @@ -34,7 +34,7 @@ Foam::solidMixture::solidMixture const dictionary& thermophysicalProperties ) : - components_(thermophysicalProperties.lookup("solidFuelComponents")), + components_(thermophysicalProperties.lookup("solidComponents")), properties_(components_.size()) { diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H index 2508f23c85..c116c16203 100644 --- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H +++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H @@ -122,7 +122,7 @@ public: //- Construct and return a clone inline autoPtr clone() const; - // Selector from Istream + //- Selector from Istream inline static autoPtr New(Istream& is); diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution index e11f41a5e1..429a10a7fd 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution @@ -22,7 +22,7 @@ solvers solver PCG; preconditioner DIC; tolerance 1e-08; - relTol 0; + relTol 0.01; } U @@ -30,7 +30,7 @@ solvers solver PBiCG; preconditioner DILU; tolerance 1e-05; - relTol 0; + relTol 0.1; } T @@ -38,7 +38,7 @@ solvers solver PBiCG; preconditioner DILU; tolerance 1e-05; - relTol 0; + relTol 0.1; } k @@ -46,7 +46,7 @@ solvers solver PBiCG; preconditioner DILU; tolerance 1e-05; - relTol 0; + relTol 0.1; } epsilon @@ -54,7 +54,7 @@ solvers solver PBiCG; preconditioner DILU; tolerance 1e-05; - relTol 0; + relTol 0.1; } R @@ -62,7 +62,7 @@ solvers solver PBiCG; preconditioner DILU; tolerance 1e-05; - relTol 0; + relTol 0.1; } } diff --git a/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped/constant/polyMesh/boundary b/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped/constant/polyMesh/boundary index 4530c7b820..0b56bb9f5e 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped/constant/polyMesh/boundary +++ b/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped/constant/polyMesh/boundary @@ -20,7 +20,7 @@ FoamFile ( inlet { - type directMapped; + type directMappedPatch; nFaces 30; startFace 27238; sampleMode nearestCell; diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/T b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/T new file mode 100644 index 0000000000..2f930360fd --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/T @@ -0,0 +1,48 @@ +/*--------------------------------*- 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 volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 265; + +boundaryField +{ + ground + { + type fixedValue; + value uniform 265; + } + + igloo_region0 + { + type fixedValue; + value uniform 265; + } + + twoFridgeFreezers_seal_0 + { + type fixedValue; + value uniform 303; + } + + twoFridgeFreezers_herring_1 + { + type fixedValue; + value uniform 303; + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/U b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/U new file mode 100644 index 0000000000..5d70f2a9c0 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/U @@ -0,0 +1,48 @@ +/*--------------------------------*- 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 volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + ground + { + type fixedValue; + value uniform (0 0 0); + } + + igloo_region0 + { + type fixedValue; + value uniform (0 0 0); + } + + twoFridgeFreezers_seal_0 + { + type fixedValue; + value uniform (0 0 0); + } + + twoFridgeFreezers_herring_1 + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/alphat b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/alphat new file mode 100644 index 0000000000..acdcda178a --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/alphat @@ -0,0 +1,50 @@ +/*--------------------------------*- 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 volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + ground + { + type alphatWallFunction; + value uniform 0; + } + + igloo_region0 + { + type alphatWallFunction; + value uniform 0; + } + + twoFridgeFreezers_seal_0 + { + type alphatWallFunction; + value uniform 0; + } + + twoFridgeFreezers_herring_1 + { + type alphatWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/epsilon b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/epsilon new file mode 100644 index 0000000000..0fa9bf60f2 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/epsilon @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 0.01; + +boundaryField +{ + ground + { + type epsilonWallFunction; + value uniform 0.01; + } + + igloo_region0 + { + type epsilonWallFunction; + value uniform 0.01; + } + + twoFridgeFreezers_seal_0 + { + type epsilonWallFunction; + value uniform 0.01; + } + + twoFridgeFreezers_herring_1 + { + type epsilonWallFunction; + value uniform 0.01; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/k b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/k new file mode 100644 index 0000000000..bd0cf46f0d --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/k @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + ground + { + type kQRWallFunction; + value uniform 0.1; + } + + igloo_region0 + { + type kQRWallFunction; + value uniform 0.1; + } + + twoFridgeFreezers_seal_0 + { + type kQRWallFunction; + value uniform 0.1; + } + + twoFridgeFreezers_herring_1 + { + type kQRWallFunction; + value uniform 0.1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/nut b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/nut new file mode 100644 index 0000000000..e9e5f16e55 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/nut @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + ground + { + type nutWallFunction; + value uniform 0; + } + + igloo_region0 + { + type nutWallFunction; + value uniform 0; + } + + twoFridgeFreezers_seal_0 + { + type nutWallFunction; + value uniform 0; + } + + twoFridgeFreezers_herring_1 + { + type nutWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/p b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/p new file mode 100644 index 0000000000..2b90b18e74 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/p @@ -0,0 +1,52 @@ +/*--------------------------------*- 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 volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + ground + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } + + igloo_region0 + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } + + twoFridgeFreezers_seal_0 + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } + + twoFridgeFreezers_herring_1 + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/Allrun b/tutorials/mesh/snappyHexMesh/iglooWithFridges/Allrun new file mode 100755 index 0000000000..79dc3f4b95 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/Allrun @@ -0,0 +1,9 @@ +#!/bin/sh +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication snappyHexMesh -overwrite +runApplication setFields +runApplication buoyantBoussinesqSimpleFoam + diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/RASProperties b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/RASProperties new file mode 100644 index 0000000000..35b5a409f2 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/RASProperties @@ -0,0 +1,100 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + +laminarCoeffs +{ +} + +kEpsilonCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0.85; + alphah 1; + alphak 1; + alphaEps 0.76923; +} + +RNGkEpsilonCoeffs +{ + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; +} + +LaunderSharmaKECoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; +} + +LRRCoeffs +{ + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; +} + +LaunderGibsonRSTMCoeffs +{ + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; +} + +wallFunctionCoeffs +{ + kappa 0.4187; + E 9; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/environmentalProperties b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/environmentalProperties new file mode 100644 index 0000000000..8ecb2a4402 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/environmentalProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object environmentalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +g g [0 1 -2 0 0 0 0] (0 0 -9.81); + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/polyMesh/blockMeshDict b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/polyMesh/blockMeshDict index d97dbb8e26..39d94d804f 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/polyMesh/blockMeshDict +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/polyMesh/blockMeshDict @@ -40,27 +40,32 @@ edges patches ( - patch maxY + empty maxY ( (3 7 6 2) ) - patch minX + + empty minX ( (0 4 7 3) ) - patch maxX + + empty maxX ( (2 6 5 1) ) - patch minY + + empty minY ( (1 5 4 0) ) - patch minZ + + wall ground ( (0 3 2 1) ) - patch maxZ + + empty maxZ ( (4 5 6 7) ) diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/transportProperties b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/transportProperties new file mode 100644 index 0000000000..f48fda19cc --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/transportProperties @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + + root ""; + case ""; + instance ""; + local ""; + + class dictionary; + object transportProperties; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +// Laminar viscosity +nu nu [0 2 -1 0 0 0 0] 1e-05; + +// Thermal expansion coefficient +beta beta [0 0 0 -1 0 0 0] 3e-03; + +// Reference temperature +TRef TRef [0 0 0 1 0 0 0] 300; + +// Laminar Prandtl number +Pr Pr [0 0 0 0 0 0 0] 0.9; + +// Turbulent Prandtl number +Prt Prt [0 0 0 0 0 0 0] 0.7; + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/controlDict b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/controlDict index ef80311ee1..46e7cd00c3 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/controlDict +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/controlDict @@ -15,25 +15,25 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -startFrom latestTime; +startFrom startTime; startTime 0; stopAt endTime; -endTime 100; +endTime 1000; deltaT 1; writeControl timeStep; -writeInterval 1; +writeInterval 100; purgeWrite 0; writeFormat ascii; -writePrecision 7; +writePrecision 6; writeCompression uncompressed; diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSchemes b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSchemes index 2fa85964b7..b54bb86316 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSchemes +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSchemes @@ -17,33 +17,40 @@ FoamFile ddtSchemes { - default Euler; + default steadyState; } gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes { default none; - div(phi,U) Gauss linear; + div(phi,U) Gauss upwind; + div(phi,T) Gauss upwind; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,R) Gauss upwind; + div(R) Gauss linear; + div((nuEff*dev(grad(U).T()))) Gauss linear; } laplacianSchemes { default none; - laplacian(nu,U) Gauss linear corrected; - laplacian(1|A(U),p) Gauss linear corrected; - laplacian(diffusivity,cellMotionU) Gauss linear uncorrected; + laplacian(nuEff,U) Gauss linear corrected; + laplacian((1|A(U)),p) Gauss linear corrected; + laplacian(kappaEff,T) Gauss linear corrected; + laplacian(DkEff,k) Gauss linear corrected; + laplacian(DepsilonEff,epsilon) Gauss linear corrected; + laplacian(DREff,R) Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(HbyA) linear; } snGradSchemes diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSolution b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSolution index 876c8c233f..c2053ee47d 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSolution +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSolution @@ -16,15 +16,73 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers -{} - -PISO { - nCorrectors 2; + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0.01; + } + + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + T + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + k + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + epsilon + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + R + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } +} + +SIMPLE +{ nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } +relaxationFactors +{ + rho 1; + p 0.3; + U 0.7; + T 0.7; + k 0.7; + epsilon 0.7; + R 0.7; +} + // ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict index 3b6df239ee..d31010ace7 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict @@ -42,57 +42,47 @@ geometry min (0 0 0); max (1 1 1); } - //fridgeFreezer - //{ - // type searchableSurfaceCollection; - // - // mergeSubRegions true; - // - // // Note: the two parts of fridgeFreezer abut. This can give problems - // // in snapping if the nearest point on the surface is the - // // internal face. - // freezer - // { - // surface box1; - // scale (1 1 1); - // transform - // { - // type cartesian; - // origin (0 0 0); - // e1 (1 0 0); - // e3 (0 0 1); - // } - // } - // fridge - // { - // surface box1; - // scale (1 1 1.1); - // transform - // { - // type cartesian; - // origin (0 0 1); - // e1 (1 0 0); - // e3 (0 0 1); - // } - // } - //} + + fridgeFreezer + { + type searchableSurfaceCollection; + + mergeSubRegions true; + + freezer + { + surface box1; + scale (1 1 1); + transform + { + type cartesian; + origin (0 0 0); + e1 (1 0 0); + e3 (0 0 1); + } + } + fridge + { + surface box1; + scale (1 1 1.1); + transform + { + type cartesian; + origin (0 0 1); + e1 (1 0 0); + e3 (0 0 1); + } + } + } + twoFridgeFreezers { type searchableSurfaceCollection; - + mergeSubRegions true; - + seal { - //surface fridgeFreezer; - //scale (1.0 1.0 1.0); - //transform - //{ - // type cartesian; - // origin (2 2 0); - // e1 (1 0 0); - // e3 (0 0 1); - //} surface box1; scale (1.0 1.0 2.1); transform @@ -105,15 +95,6 @@ geometry } herring { - //surface fridgeFreezer; - //scale (1.0 1.0 1.0); - //transform - //{ - // type cartesian; - // origin (3.5 3 0); - // e1 (1 0 0); - // e3 (0 0 1); - //} surface box1; scale (1.0 1.0 2.1); transform diff --git a/tutorials/multiphase/interFoam/ras/Allclean b/tutorials/multiphase/interFoam/ras/Allclean index 6227578471..6ad97e1a0b 100755 --- a/tutorials/multiphase/interFoam/ras/Allclean +++ b/tutorials/multiphase/interFoam/ras/Allclean @@ -12,7 +12,7 @@ do if [ "$case" = "damBreak" ] then - cp $case/0/gamma.org $case/0/gamma + cp $case/0/alpha1.org $case/0/alpha1 fi done