diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H index 4162235798..a74fa5c154 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H @@ -128,9 +128,8 @@ public: ); - // Destructor - - virtual ~basicSubGrid(); + //- Destructor + virtual ~basicSubGrid(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H index 5761805d8f..a068130df6 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H @@ -107,9 +107,8 @@ public: ); - // Destructor - - virtual ~basicSubGrid(); + //- Destructor + virtual ~basicSubGrid(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H index 5935ac889e..5a680e4479 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H @@ -137,9 +137,8 @@ public: ); - // Destructor - - virtual ~PDRDragModel(); + //- Destructor + virtual ~PDRDragModel(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H index be29419738..37a99488b9 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H @@ -135,9 +135,8 @@ public: ); - // Destructor - - virtual ~basic(); + //- Destructor + virtual ~basic(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H index 3c3dad96a5..358408fd1d 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H @@ -86,9 +86,8 @@ public: ); - // Destructor - - virtual ~Gulder(); + //- Destructor + virtual ~Gulder(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H index 66a903c2ba..94dd8f8f9f 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H @@ -91,9 +91,8 @@ public: ); - // Destructor - - virtual ~SCOPEBlend(); + //- Destructor + virtual ~SCOPEBlend(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H index 4c16d0e3df..11828420d5 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H @@ -96,9 +96,8 @@ public: ); - // Destructor - - virtual ~SCOPEXiEq(); + //- Destructor + virtual ~SCOPEXiEq(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H index b29ee73741..20aa33ca4d 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H @@ -132,9 +132,8 @@ public: ); - // Destructor - - virtual ~XiEqModel(); + //- Destructor + virtual ~XiEqModel(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H index a746ceb89f..d703b30308 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H @@ -90,9 +90,8 @@ public: ); - // Destructor - - virtual ~instability(); + //- Destructor + virtual ~instability(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H index 1573897777..82b801df0d 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H @@ -85,9 +85,8 @@ public: ); - // Destructor - - virtual ~KTS(); + //- Destructor + virtual ~KTS(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H index 8080ea8f76..d9fd7eafc6 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H @@ -129,9 +129,8 @@ public: ); - // Destructor - - virtual ~XiGModel(); + //- Destructor + virtual ~XiGModel(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H index 75337b40d0..bf8ad5af85 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H @@ -94,9 +94,8 @@ public: ); - // Destructor - - virtual ~instabilityG(); + //- Destructor + virtual ~instabilityG(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H index 9fb27b3df0..bfa0b30523 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H @@ -200,9 +200,8 @@ public: ); - // Destructor - - virtual ~XiModel(); + //- Destructor + virtual ~XiModel(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H index 78366ccb24..9093c0dd45 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H @@ -95,9 +95,8 @@ public: ); - // Destructor - - virtual ~algebraic(); + //- Destructor + virtual ~algebraic(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H index 79399d66b8..50252b94d2 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H @@ -83,9 +83,8 @@ public: ); - // Destructor - - virtual ~fixed(); + //- Destructor + virtual ~fixed(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H index f39f3b34ec..b6b000cc78 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H @@ -95,9 +95,8 @@ public: ); - // Destructor - - virtual ~transport(); + //- Destructor + virtual ~transport(); // Member Functions diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H index 30703dbdf4..29c43803b5 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H @@ -194,7 +194,7 @@ public: ); - // Destructor + //- Destructor ~SCOPE(); diff --git a/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H b/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H index a6e6ed9a8c..ad8b8837e3 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H +++ b/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H @@ -88,9 +88,8 @@ public: ); - // Destructor - - virtual ~infinitelyFastChemistry(); + //- Destructor + virtual ~infinitelyFastChemistry(); // Member Functions diff --git a/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H b/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H index a183313ab1..1ff9a95d77 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H +++ b/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H @@ -83,9 +83,8 @@ public: ); - // Destructor - - virtual ~noCombustion(); + //- Destructor + virtual ~noCombustion(); // Member Functions diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/regionProperties/regionProperties.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/regionProperties/regionProperties.H index 599ef1070c..5c23d3d421 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/regionProperties/regionProperties.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/regionProperties/regionProperties.H @@ -77,9 +77,8 @@ public: regionProperties(const Time& runTime); - // Destructor - - ~regionProperties(); + //- Destructor + ~regionProperties(); // Member Functions diff --git a/applications/solvers/incompressible/ajointShapeOptimizationFoam/Make/files b/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/files similarity index 100% rename from applications/solvers/incompressible/ajointShapeOptimizationFoam/Make/files rename to applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/files diff --git a/applications/solvers/incompressible/ajointShapeOptimizationFoam/Make/options b/applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options similarity index 100% rename from applications/solvers/incompressible/ajointShapeOptimizationFoam/Make/options rename to applications/solvers/incompressible/adjointShapeOptimizationFoam/Make/options diff --git a/applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointContinuityErrs.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointContinuityErrs.H similarity index 100% rename from applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointContinuityErrs.H rename to applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointContinuityErrs.H diff --git a/applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C similarity index 100% rename from applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C rename to applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C diff --git a/applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H similarity index 100% rename from applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H rename to applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletPressure/adjointOutletPressureFvPatchScalarField.H diff --git a/applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C similarity index 100% rename from applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C rename to applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C diff --git a/applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H similarity index 100% rename from applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H rename to applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.H diff --git a/applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointShapeOptimizationFoam.C b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C similarity index 100% rename from applications/solvers/incompressible/ajointShapeOptimizationFoam/adjointShapeOptimizationFoam.C rename to applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C diff --git a/applications/solvers/incompressible/ajointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H similarity index 100% rename from applications/solvers/incompressible/ajointShapeOptimizationFoam/createFields.H rename to applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H diff --git a/applications/solvers/incompressible/ajointShapeOptimizationFoam/createPhia.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createPhia.H similarity index 100% rename from applications/solvers/incompressible/ajointShapeOptimizationFoam/createPhia.H rename to applications/solvers/incompressible/adjointShapeOptimizationFoam/createPhia.H diff --git a/applications/solvers/lagrangian/coalChemistryFoam/Make/options b/applications/solvers/lagrangian/coalChemistryFoam/Make/options index b7abd77a17..22f2dd7fe2 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/Make/options +++ b/applications/solvers/lagrangian/coalChemistryFoam/Make/options @@ -16,6 +16,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ + -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude EXE_LIBS = \ @@ -36,4 +37,5 @@ EXE_LIBS = \ -lreactionThermophysicalModels \ -lchemistryModel \ -lradiation \ + -lsurfaceFilmModels \ -lODE diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options index 76bc8b084f..c2ffc71a78 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options @@ -16,7 +16,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/ODE/lnInclude + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/surfaceFilmModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ @@ -35,4 +36,5 @@ EXE_LIBS = \ -lreactionThermophysicalModels \ -lchemistryModel \ -lradiation \ - -lODE + -lODE \ + -lsurfaceFilmModels diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/files b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/files new file mode 100644 index 0000000000..a76d2acc65 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/files @@ -0,0 +1,3 @@ +reactingParcelFilmFoam.C + +EXE = $(FOAM_APPBIN)/reactingParcelFilmFoam diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options new file mode 100644 index 0000000000..8b15c3e9ae --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options @@ -0,0 +1,38 @@ +DEV_PATH=./../.. + +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I${LIB_SRC}/meshTools/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/thermophysicalModels/pdfs/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ + -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ + -I$(LIB_SRC)/ODE/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -lspecie \ + -lbasicThermophysicalModels \ + -lsolids \ + -lsolidMixture \ + -lthermophysicalFunctions \ + -lreactionThermophysicalModels \ + -lchemistryModel \ + -lradiation \ + -lsurfaceFilmModels \ + -llagrangianIntermediate \ + -lODE diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/UEqn.H new file mode 100644 index 0000000000..3c4a927091 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/UEqn.H @@ -0,0 +1,16 @@ + fvVectorMatrix UEqn + ( + fvm::ddt(rho, U) + + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) + == + rho.dimensionedInternalField()*g + + parcels.SU() + ); + + UEqn.relax(); + + if (momentumPredictor) + { + solve(UEqn == -fvc::grad(p)); + } diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H new file mode 100644 index 0000000000..5cf44cb09f --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H @@ -0,0 +1,44 @@ +tmp > mvConvection +( + fv::convectionScheme::New + ( + mesh, + fields, + phi, + mesh.divScheme("div(phi,Yi_h)") + ) +); + + +{ + label inertIndex = -1; + volScalarField Yt = 0.0*Y[0]; + + for (label i=0; ifvmDiv(phi, Yi) + - fvm::laplacian(turbulence->muEff(), Yi) + == + parcels.Srho(i) + + kappa*chemistry.RR(i)().dimensionedInternalField(), + mesh.solver("Yi") + ); + + Yi.max(0.0); + Yt += Yi; + } + else + { + inertIndex = i; + } + } + + Y[inertIndex] = scalar(1) - Yt; + Y[inertIndex].max(0.0); +} diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/chemistry.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/chemistry.H new file mode 100644 index 0000000000..12ed815d1d --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/chemistry.H @@ -0,0 +1,27 @@ +{ + Info << "Solving chemistry" << endl; + + chemistry.solve + ( + runTime.value() - runTime.deltaTValue(), + runTime.deltaTValue() + ); + + // turbulent time scale + if (turbulentReaction) + { + DimensionedField tk = + Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()); + DimensionedField tc = + chemistry.tc()().dimensionedInternalField(); + + // Chalmers PaSR model + kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); + } + else + { + kappa = 1.0; + } + + chemistrySh = kappa*chemistry.Sh()(); +} diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createClouds.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createClouds.H new file mode 100644 index 0000000000..f3e043143c --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createClouds.H @@ -0,0 +1,9 @@ +Info<< "\nConstructing reacting cloud" << endl; +thermoReactingCloud parcels +( + "reactingCloud1", + rho, + U, + g, + thermo +); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H new file mode 100644 index 0000000000..9c196e2905 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -0,0 +1,122 @@ + Info<< "Reading thermophysical properties\n" << endl; + + autoPtr pChemistry + ( + psiChemistryModel::New(mesh) + ); + psiChemistryModel& chemistry = pChemistry(); + + hsCombustionThermo& thermo = chemistry.thermo(); + + basicMultiComponentMixture& composition = thermo.composition(); + PtrList& Y = composition.Y(); + + word inertSpecie(thermo.lookup("inertSpecie")); + + volScalarField& p = thermo.p(); + volScalarField& hs = thermo.hs(); + const volScalarField& T = thermo.T(); + const volScalarField& psi = thermo.psi(); + + Info<< "Creating field rho\n" << endl; + volScalarField rho + ( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + thermo.rho() + ); + + Info<< "\nReading field U\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + #include "compressibleCreatePhi.H" + + Info<< "Creating field kappa\n" << endl; + DimensionedField kappa + ( + IOobject + ( + "kappa", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("zero", dimless, 0.0) + ); + + Info<< "Creating turbulence model\n" << endl; + autoPtr turbulence + ( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) + ); + + Info<< "Creating field DpDt\n" << endl; + volScalarField DpDt + ( + "DpDt", + fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p) + ); + + multivariateSurfaceInterpolationScheme::fieldTable fields; + + forAll(Y, i) + { + fields.add(Y[i]); + } + fields.add(hs); + + IOdictionary additionalControlsDict + ( + IOobject + ( + "additionalControls", + runTime.constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + Switch solvePrimaryRegion + ( + additionalControlsDict.lookup("solvePrimaryRegion") + ); + + DimensionedField chemistrySh + ( + IOobject + ( + "chemistry::Sh", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0) + ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createSurfaceFilmModel.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createSurfaceFilmModel.H new file mode 100644 index 0000000000..15046e3d49 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createSurfaceFilmModel.H @@ -0,0 +1,6 @@ +Info<< "\nConstructing surface film model" << endl; + +autoPtr + tsurfaceFilm(surfaceFilmModels::surfaceFilmModel::New(mesh, g)); +surfaceFilmModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm(); + diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H new file mode 100644 index 0000000000..156d5505ab --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H @@ -0,0 +1,21 @@ +{ + fvScalarMatrix hsEqn + ( + fvm::ddt(rho, hs) + + mvConvection->fvmDiv(phi, hs) + - fvm::laplacian(turbulence->alphaEff(), hs) + == + DpDt + + parcels.Sh() + + radiation->Shs(thermo) + + chemistrySh + ); + + hsEqn.relax(); + + hsEqn.solve(); + + thermo.correct(); + + radiation->correct(); +} diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H new file mode 100644 index 0000000000..d27afcce8a --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H @@ -0,0 +1,72 @@ +rho = thermo.rho(); + +volScalarField rUA = 1.0/UEqn.A(); +U = rUA*UEqn.H(); + +if (transonic) +{ + surfaceScalarField phid + ( + "phid", + fvc::interpolate(psi) + *( + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi) + ) + ); + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvm::div(phid, p) + - fvm::laplacian(rho*rUA, p) + == + parcels.Srho() + ); + + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + phi == pEqn.flux(); + } + } +} +else +{ + phi = + fvc::interpolate(rho) + *( + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi) + ); + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psi, p) + + fvc::div(phi) + - fvm::laplacian(rho*rUA, p) + == + parcels.Srho() + ); + + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + phi += pEqn.flux(); + } + } +} + +#include "rhoEqn.H" +#include "compressibleContinuityErrs.H" + +U -= rUA*fvc::grad(p); +U.correctBoundaryConditions(); + +DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C new file mode 100644 index 0000000000..f39d8f070a --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C @@ -0,0 +1,127 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Application + reactingParcelFilmFoam + +Description + Transient PISO solver for compressible, laminar or turbulent flow with + reacting Lagrangian parcels, and surface film modelling. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "hCombustionThermo.H" +#include "turbulenceModel.H" +#include "BasicReactingCloud.H" +#include "surfaceFilmModel.H" +#include "psiChemistryModel.H" +#include "chemistrySolver.H" +#include "radiationModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + #include "createTime.H" + #include "createMesh.H" + #include "readChemistryProperties.H" + #include "readGravitationalAcceleration.H" + #include "createFields.H" + #include "createClouds.H" + #include "createRadiationModel.H" + #include "createSurfaceFilmModel.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" + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + parcels.evolve(); + + surfaceFilm.evolve(); + + if (solvePrimaryRegion) + { + #include "chemistry.H" + #include "rhoEqn.H" + + // --- PIMPLE loop + for (int ocorr=1; ocorr<=nOuterCorr; ocorr++) + { + #include "UEqn.H" + #include "YEqn.H" + + // --- PISO loop + for (int corr=1; corr<=nCorr; corr++) + { + #include "hsEqn.H" + #include "pEqn.H" + } + + Info<< "T gas min/max = " << min(T).value() << ", " + << max(T).value() << endl; + } + + turbulence->correct(); + + rho = thermo.rho(); + + if (runTime.write()) + { + chemistry.dQ()().write(); + } + } + else + { + runTime.write(); + } + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End" << endl; + + return(0); +} + + +// ************************************************************************* // diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/readChemistryProperties.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/readChemistryProperties.H new file mode 100644 index 0000000000..ab51afe283 --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/readChemistryProperties.H @@ -0,0 +1,23 @@ +Info<< "Reading chemistry properties\n" << endl; + +IOdictionary chemistryProperties +( + IOobject + ( + "chemistryProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) +); + +Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); + +dimensionedScalar Cmix("Cmix", dimless, 1.0); + +if (turbulentReaction) +{ + chemistryProperties.lookup("Cmix") >> Cmix; +} diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/rhoEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/rhoEqn.H new file mode 100644 index 0000000000..b9b2d6a13f --- /dev/null +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/rhoEqn.H @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Global + rhoEqn + +Description + Solve the continuity for density. + +\*---------------------------------------------------------------------------*/ + +{ + solve + ( + fvm::ddt(rho) + + fvc::div(phi) + == + parcels.Srho() + ); +} + +// ************************************************************************* // diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/Make/options index d10253a8fa..b007da1d1b 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/Make/options @@ -15,7 +15,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ - -I$(LIB_SRC)/ODE/lnInclude + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/surfaceFilmModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ @@ -34,4 +35,5 @@ EXE_LIBS = \ -lreactionThermophysicalModels \ -lchemistryModel \ -lradiation \ - -lODE + -lODE \ + -lsurfaceFilmModels diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options index 83ef9251c5..34d4d29c1f 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options @@ -8,6 +8,7 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/surfaceFilmModels/lnInclude EXE_LIBS = \ -llagrangian \ @@ -19,4 +20,5 @@ EXE_LIBS = \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lfiniteVolume \ - -lmeshTools + -lmeshTools \ + -lsurfaceFilmModels diff --git a/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H b/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H index c2bbf31d12..4ac6a84b41 100644 --- a/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H +++ b/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H @@ -94,10 +94,9 @@ public: ); - // Destructor - - ~threePhaseMixture() - {} + //- Destructor + ~threePhaseMixture() + {} // Member Functions diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H index 0145b596af..46999b972a 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.H @@ -96,10 +96,9 @@ public: ); - // Destructor - - virtual ~Kunz() - {} + //- Destructor + virtual ~Kunz() + {} // Member Functions diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H index a9fdb8ac9c..b173a55601 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.H @@ -90,10 +90,9 @@ public: ); - // Destructor - - virtual ~Merkle() - {} + //- Destructor + virtual ~Merkle() + {} // Member Functions diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H index ea84887b88..0d67ef1b62 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.H @@ -103,10 +103,9 @@ public: ); - // Destructor - - virtual ~SchnerrSauer() - {} + //- Destructor + virtual ~SchnerrSauer() + {} // Member Functions diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H index 0749c3ae1f..0aa466b06e 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H @@ -121,10 +121,9 @@ public: ); - // Destructor - - virtual ~phaseChangeTwoPhaseMixture() - {} + //- Destructor + virtual ~phaseChangeTwoPhaseMixture() + {} // Member Functions diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H index 3249bfd3bd..1d94d47e91 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H @@ -209,10 +209,9 @@ public: ); - // Destructor - - ~multiphaseMixture() - {} + //- Destructor + ~multiphaseMixture() + {} // Member Functions diff --git a/applications/test/DLList/DLListTest.C b/applications/test/DLList/DLListTest.C index 92db3b6651..4000dc90a1 100644 --- a/applications/test/DLList/DLListTest.C +++ b/applications/test/DLList/DLListTest.C @@ -51,12 +51,7 @@ int main(int argc, char *argv[]) Info<< nl << "And again using STL iterator: " << nl << endl; - for - ( - DLList::iterator iter = myList.begin(); - iter != myList.end(); - ++iter - ) + forAllIter(DLList, myList, iter) { Info<< "element:" << *iter << endl; } @@ -64,12 +59,7 @@ int main(int argc, char *argv[]) Info<< nl << "And again using the same STL iterator: " << nl << endl; - for - ( - DLList::iterator iter = myList.begin(); - iter != myList.end(); - ++iter - ) + forAllIter(DLList, myList, iter) { Info<< "Removing " << myList.remove(iter) << endl; } @@ -82,12 +72,7 @@ int main(int argc, char *argv[]) const DLList& const_myList = myList; - for - ( - DLList::const_iterator iter = const_myList.begin(); - iter != const_myList.end(); - ++iter - ) + forAllConstIter(DLList, const_myList, iter) { Info<< "element:" << *iter << endl; } @@ -95,12 +80,7 @@ int main(int argc, char *argv[]) myList.swapUp(myList.DLListBase::first()); myList.swapUp(myList.DLListBase::last()); - for - ( - DLList::const_iterator iter = const_myList.begin(); - iter != const_myList.end(); - ++iter - ) + forAllConstIter(DLList, const_myList, iter) { Info<< "element:" << *iter << endl; } @@ -108,19 +88,14 @@ int main(int argc, char *argv[]) myList.swapDown(myList.DLListBase::first()); myList.swapDown(myList.DLListBase::last()); - for - ( - DLList::const_iterator iter = const_myList.begin(); - iter != const_myList.end(); - ++iter - ) + forAllConstIter(DLList, const_myList, iter) { Info<< "element:" << *iter << endl; } - Info<< nl << "Testing transfer: " << nl << endl; - Info<< "original: " << myList << endl; + Info<< nl << "Testing transfer: " << nl << nl + << "original: " << myList << endl; DLList newList; newList.transfer(myList); diff --git a/applications/test/Dictionary/DictionaryTest.C b/applications/test/Dictionary/DictionaryTest.C index 138c185f4a..2844489f72 100644 --- a/applications/test/Dictionary/DictionaryTest.C +++ b/applications/test/Dictionary/DictionaryTest.C @@ -114,12 +114,7 @@ int main(int argc, char *argv[]) dict.swapDown(dict.first()); - for - ( - Dictionary::const_iterator iter = dict.begin(); - iter != dict.end(); - ++iter - ) + forAllConstIter(Dictionary, dict, iter) { Info<< "element : " << *iter; } @@ -159,12 +154,7 @@ int main(int argc, char *argv[]) } Info<< nl << "scalarDict1: " << endl; - for - ( - PtrDictionary::const_iterator iter = scalarDict.begin(); - iter != scalarDict.end(); - ++iter - ) + forAllConstIter(PtrDictionary, scalarDict, iter) { Info<< " = " << iter() << endl; } @@ -176,12 +166,7 @@ int main(int argc, char *argv[]) scalarDict2.insert(key, new Scalar(1.3*i)); } Info<< nl << "scalarDict2: " << endl; - for - ( - PtrDictionary::const_iterator iter = scalarDict2.begin(); - iter != scalarDict2.end(); - ++iter - ) + forAllConstIter(PtrDictionary, scalarDict2, iter) { Info<< "elem = " << *iter << endl; } diff --git a/applications/test/ISLList/ISLListTest.C b/applications/test/ISLList/ISLListTest.C index bd390f38d3..1991aa4f24 100644 --- a/applications/test/ISLList/ISLListTest.C +++ b/applications/test/ISLList/ISLListTest.C @@ -78,12 +78,7 @@ int main(int argc, char *argv[]) Info<< nl << "And again using STL iterator: " << nl << endl; - for - ( - SLList::iterator iter = myList.begin(); - iter != myList.end(); - ++iter - ) + forAllIter(SLList, myList, iter) { Info<< "element:" << *iter << endl; } @@ -92,14 +87,9 @@ int main(int argc, char *argv[]) const ISLList& const_myList = myList; - for - ( - SLList::const_iterator iter2 = const_myList.begin(); - iter2 != const_myList.end(); - ++iter2 - ) + forAllConstIter(SLList, const_myList, iter) { - Info<< "element:" << *iter2 << endl; + Info<< "element:" << *iter << endl; } diff --git a/applications/test/PackedList2/PackedListTest2.C b/applications/test/PackedList2/PackedListTest2.C index 5a04ece832..362e5cd8d0 100644 --- a/applications/test/PackedList2/PackedListTest2.C +++ b/applications/test/PackedList2/PackedListTest2.C @@ -188,12 +188,7 @@ int main(int argc, char *argv[]) sum = 0; for (label iter = 0; iter < nIters; ++iter) { - for - ( - PackedBoolList::iterator it = packed.begin(); - it != packed.end(); - ++it - ) + forAllIter(PackedBoolList, packed, it) { sum += it; } @@ -207,12 +202,7 @@ int main(int argc, char *argv[]) sum = 0; for (label iter = 0; iter < nIters; ++iter) { - for - ( - PackedBoolList::const_iterator cit = packed.cbegin(); - cit != packed.cend(); - ++cit - ) + forAllConstIter(PackedBoolList, packed, cit) { sum += cit(); } @@ -333,12 +323,7 @@ int main(int argc, char *argv[]) // Write packed for (label iter = 0; iter < nIters; ++iter) { - for - ( - PackedBoolList::iterator it = packed.begin(); - it != packed.end(); - ++it - ) + forAllIter(PackedBoolList, packed, it) { it() = 1; } diff --git a/applications/test/SLList/SLListTest.C b/applications/test/SLList/SLListTest.C index 3d40182df3..9a9e81c21f 100644 --- a/applications/test/SLList/SLListTest.C +++ b/applications/test/SLList/SLListTest.C @@ -51,12 +51,7 @@ int main(int argc, char *argv[]) Info<< nl << "And again using STL iterator: " << nl << endl; - for - ( - SLList::iterator iter = myList.begin(); - iter != myList.end(); - ++iter - ) + forAllIter(SLList, myList, iter) { Info<< "element:" << *iter << endl; } @@ -65,39 +60,23 @@ int main(int argc, char *argv[]) const SLList& const_myList = myList; - for - ( - SLList::const_iterator iter2 = const_myList.begin(); - iter2 != const_myList.end(); - ++iter2 - ) + forAllConstIter(SLList, const_myList, iter) { - Info<< "element:" << *iter2 << endl; + Info<< "element:" << *iter << endl; } - for - ( - SLList::iterator iter = myList.begin(); - iter != myList.end(); - ++iter - ) + forAllIter(SLList, myList, iter) { Info<< "Removing element:" << *iter << endl; myList.remove(iter); } - for - ( - SLList::const_iterator iter2 = const_myList.begin(); - iter2 != const_myList.end(); - ++iter2 - ) + forAllConstIter(SLList, const_myList, iter) { - Info<< "element:" << *iter2 << endl; + Info<< "element:" << *iter << endl; } - for (int i = 0; i<10; i++) { myList.append(1.3*i); diff --git a/applications/test/UDictionary/UDictionaryTest.C b/applications/test/UDictionary/UDictionaryTest.C index 13571ffab4..57fc55c0b3 100644 --- a/applications/test/UDictionary/UDictionaryTest.C +++ b/applications/test/UDictionary/UDictionaryTest.C @@ -81,12 +81,7 @@ int main(int argc, char *argv[]) dict.swapDown(dict.first()); - for - ( - UDictionary::const_iterator iter = dict.begin(); - iter != dict.end(); - ++iter - ) + forAllConstIter(UDictionary, dict, iter) { Info<< "element : " << *iter; } diff --git a/applications/test/ensightFoamReader/udr_checker-82.c b/applications/test/ensightFoamReader/udr_checker-90.c similarity index 100% rename from applications/test/ensightFoamReader/udr_checker-82.c rename to applications/test/ensightFoamReader/udr_checker-90.c diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C index 01c428016e..c2f3640f2d 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C +++ b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C @@ -292,20 +292,14 @@ void addCutNeighbours labelHashSet addCutFaces(cutCells.size()); - for - ( - labelHashSet::const_iterator iter = cutCells.begin(); - iter != cutCells.end(); - ++iter - ) + forAllConstIter(labelHashSet, cutCells, iter) { - label cellI = iter.key(); - + const label cellI = iter.key(); const labelList& cFaces = mesh.cells()[cellI]; forAll(cFaces, i) { - label faceI = cFaces[i]; + const label faceI = cFaces[i]; if (mesh.isInternalFace(faceI)) { @@ -331,12 +325,7 @@ void addCutNeighbours Info<< " Selected an additional " << addCutFaces.size() << " neighbours of cutCells to refine" << endl; - for - ( - labelHashSet::const_iterator iter = addCutFaces.begin(); - iter != addCutFaces.end(); - ++iter - ) + forAllConstIter(labelHashSet, addCutFaces, iter) { cutCells.insert(iter.key()); } @@ -386,21 +375,15 @@ bool limitRefinementLevel labelHashSet addCutCells(cutCells.size()); - for - ( - labelHashSet::const_iterator iter = cutCells.begin(); - iter != cutCells.end(); - ++iter - ) + forAllConstIter(labelHashSet, cutCells, iter) { // cellI will be refined. - label cellI = iter.key(); - + const label cellI = iter.key(); const labelList& cCells = mesh.cellCells()[cellI]; forAll(cCells, i) { - label nbr = cCells[i]; + const label nbr = cCells[i]; if (!excludeCells.found(nbr) && !cutCells.found(nbr)) { @@ -419,12 +402,8 @@ bool limitRefinementLevel Info<< "Added an additional " << addCutCells.size() << " cells" << " to satisfy 1:" << limitDiff << " refinement level" << endl; - for - ( - labelHashSet::const_iterator iter = addCutCells.begin(); - iter != addCutCells.end(); - ++iter - ) + + forAllConstIter(labelHashSet, addCutCells, iter) { cutCells.insert(iter.key()); } diff --git a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.H b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.H index 89fb95f9a9..4b6347aac0 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.H +++ b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.H @@ -108,9 +108,8 @@ public: cellSplitter(const polyMesh& mesh); - // Destructor - - ~cellSplitter(); + //- Destructor + ~cellSplitter(); // Member Functions diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index fb7b97a32d..5e0ce9248f 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -112,12 +112,7 @@ int main(int argc, char *argv[]) << cells.instance()/cells.local()/cells.name() << nl << endl; - for - ( - cellSet::const_iterator iter = cells.begin(); - iter != cells.end(); - ++iter - ) + forAllConstIter(cellSet, cells, iter) { cutCells.erase(iter.key()); } @@ -131,7 +126,7 @@ int main(int argc, char *argv[]) forAll(meshPoints, pointI) { - label meshPointI = meshPoints[pointI]; + const label meshPointI = meshPoints[pointI]; vertOnPatch[meshPointI] = true; } @@ -151,8 +146,7 @@ int main(int argc, char *argv[]) forAll(pEdges, pEdgeI) { - label edgeI = pEdges[pEdgeI]; - + const label edgeI = pEdges[pEdgeI]; const edge& e = mesh.edges()[edgeI]; label otherPointI = e.otherVertex(meshPointI); diff --git a/applications/utilities/mesh/advanced/splitCells/splitCells.C b/applications/utilities/mesh/advanced/splitCells/splitCells.C index 1a55fd52f1..19828287bc 100644 --- a/applications/utilities/mesh/advanced/splitCells/splitCells.C +++ b/applications/utilities/mesh/advanced/splitCells/splitCells.C @@ -392,15 +392,9 @@ void collectCuts boolList edgeIsCut(mesh.nEdges(), false); scalarField edgeWeight(mesh.nEdges(), -GREAT); - for - ( - cellSet::const_iterator iter = cellsToCut.begin(); - iter != cellsToCut.end(); - ++iter - ) + forAllConstIter(cellSet, cellsToCut, iter) { - label cellI = iter.key(); - + const label cellI = iter.key(); const labelList& cEdges = cellEdges[cellI]; forAll(cEdges, i) diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 52a29eb03f..2fb1c77043 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -268,13 +268,8 @@ int main(int argc, char *argv[]) pointField points(slPoints.size()); - label i=0; - for - ( - SLList::iterator pointIter = slPoints.begin(); - pointIter != slPoints.end(); - ++pointIter - ) + label i = 0; + forAllConstIter(SLList, slPoints, pointIter) { // Scale points for the given scale factor points[i++] = scaleFactor * pointIter(); @@ -283,13 +278,8 @@ int main(int argc, char *argv[]) labelList pointMap(maxNodei+1); - i=0; - for - ( - SLList