From 0368f38a7c30ef96d3b5261d898cd78da073932d Mon Sep 17 00:00:00 2001 From: graham Date: Thu, 20 May 2010 16:49:03 +0100 Subject: [PATCH 1/5] ENH. Update dsmc submodels to allow models with no coeffs dictionary. Updated dsmc and md tuts, including new cyclic handling. --- .../BinaryCollisionModel.C | 10 ++++- .../BinaryCollisionModel.H | 3 ++ .../InflowBoundaryModel/InflowBoundaryModel.C | 9 ++++ .../InflowBoundaryModel/InflowBoundaryModel.H | 3 ++ .../InflowBoundaryModel/NoInflow/NoInflow.C | 2 +- .../InflowBoundaryModel/NoInflow/NoInflow.H | 2 +- .../MaxwellianThermal/MaxwellianThermal.C | 2 +- .../SpecularReflection/SpecularReflection.C | 2 +- .../WallInteractionModel.C | 9 ++++ .../WallInteractionModel.H | 3 ++ .../dsmcFoam/freeSpacePeriodic/0/boundaryT | 28 ++++++++---- .../dsmcFoam/freeSpacePeriodic/0/boundaryU | 30 +++++++++---- .../dsmcFoam/freeSpacePeriodic/0/dsmcRhoN | 28 ++++++++---- .../dsmcFoam/freeSpacePeriodic/0/fD | 30 +++++++++---- .../dsmcFoam/freeSpacePeriodic/0/iDof | 28 ++++++++---- .../dsmcFoam/freeSpacePeriodic/0/internalE | 28 ++++++++---- .../dsmcFoam/freeSpacePeriodic/0/linearKE | 28 ++++++++---- .../dsmcFoam/freeSpacePeriodic/0/momentum | 30 +++++++++---- .../dsmcFoam/freeSpacePeriodic/0/q | 28 ++++++++---- .../dsmcFoam/freeSpacePeriodic/0/rhoM | 28 ++++++++---- .../dsmcFoam/freeSpacePeriodic/0/rhoN | 28 ++++++++---- .../freeSpacePeriodic/constant/dsmcProperties | 4 +- .../constant/polyMesh/boundary | 43 ++++++++++++++----- .../freeSpaceStream/constant/dsmcProperties | 2 - .../supersonicCorner/constant/dsmcProperties | 17 +------- .../dsmcFoam/wedge15Ma5/0/boundaryT | 4 +- .../dsmcFoam/wedge15Ma5/0/boundaryU | 4 +- .../dsmcFoam/wedge15Ma5/0/dsmcRhoN | 4 +- .../discreteMethods/dsmcFoam/wedge15Ma5/0/fD | 4 +- .../dsmcFoam/wedge15Ma5/0/iDof | 4 +- .../dsmcFoam/wedge15Ma5/0/internalE | 4 +- .../dsmcFoam/wedge15Ma5/0/linearKE | 4 +- .../dsmcFoam/wedge15Ma5/0/momentum | 4 +- .../discreteMethods/dsmcFoam/wedge15Ma5/0/q | 4 +- .../dsmcFoam/wedge15Ma5/0/rhoM | 4 +- .../dsmcFoam/wedge15Ma5/0/rhoN | 4 +- .../wedge15Ma5/constant/dsmcProperties | 4 -- .../constant/polyMesh/blockMeshDict | 30 ++++++------- .../wedge15Ma5/constant/polyMesh/boundary | 17 ++++---- .../dsmcFoam/wedge15Ma5/system/controlDict | 5 +-- .../wedge15Ma5/system/decomposeParDict | 2 +- .../mdEquilibrationFoam/periodicCubeArgon/0/U | 28 +++++++++--- .../constant/polyMesh/boundary | 41 +++++++++++++----- .../mdEquilibrationFoam/periodicCubeWater/0/U | 28 +++++++++--- .../constant/polyMesh/boundary | 43 ++++++++++++++----- 45 files changed, 450 insertions(+), 217 deletions(-) diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C index 274b9ff79c..f35eee7d98 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C @@ -27,6 +27,15 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template +Foam::BinaryCollisionModel::BinaryCollisionModel(CloudType& owner) +: + dict_(dictionary::null), + owner_(owner), + coeffDict_(dictionary::null) +{} + + template Foam::BinaryCollisionModel::BinaryCollisionModel ( @@ -87,4 +96,3 @@ Foam::BinaryCollisionModel::coeffDict() const #include "BinaryCollisionModelNew.C" // ************************************************************************* // - diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H index 8550762aaf..27f73d4992 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H @@ -85,6 +85,9 @@ public: // Constructors + //- Construct null from owner + BinaryCollisionModel(CloudType& owner); + //- Construct from components BinaryCollisionModel ( diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C index 6f5fe48f45..1f1f8c6254 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C @@ -27,6 +27,15 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template +Foam::InflowBoundaryModel::InflowBoundaryModel(CloudType& owner) +: + dict_(dictionary::null), + owner_(owner), + coeffDict_(dictionary::null) +{} + + template Foam::InflowBoundaryModel::InflowBoundaryModel ( diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H index 764cde1141..e58fb30a6d 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H @@ -86,6 +86,9 @@ public: // Constructors + //- Construct null from owner + InflowBoundaryModel(CloudType& owner); + //- Construct from dictionary InflowBoundaryModel ( diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.C index b8a9a88b15..682ca7d530 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.C @@ -34,7 +34,7 @@ Foam::NoInflow::NoInflow CloudType& cloud ) : - InflowBoundaryModel(dict, cloud, typeName) + InflowBoundaryModel(cloud) {} diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H index e969da048c..1ed042ae79 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H @@ -50,7 +50,7 @@ class NoInflow public: //- Runtime type information - TypeName("NoInflow"); + TypeName("none"); // Constructors diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C index 947eddda07..467e5fad4f 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C @@ -37,7 +37,7 @@ Foam::MaxwellianThermal::MaxwellianThermal CloudType& cloud ) : - WallInteractionModel(dict, cloud, typeName) + WallInteractionModel(cloud) {} diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.C index 979030938d..b690a0f87e 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.C @@ -36,7 +36,7 @@ Foam::SpecularReflection::SpecularReflection CloudType& cloud ) : - WallInteractionModel(dict, cloud, typeName) + WallInteractionModel(cloud) {} diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C index 8d6d983690..f9bcb86278 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C @@ -27,6 +27,15 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template +Foam::WallInteractionModel::WallInteractionModel(CloudType& owner) +: + dict_(dictionary::null), + owner_(owner), + coeffDict_(dictionary::null) +{} + + template Foam::WallInteractionModel::WallInteractionModel ( diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H index f28a6cec0f..dfed430ff7 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H @@ -85,6 +85,9 @@ public: // Constructors + //- Construct null from owner + WallInteractionModel(CloudType& owner); + //- Construct from components WallInteractionModel ( diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/boundaryT b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/boundaryT index fa809fdc24..ece1ab678b 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/boundaryT +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/boundaryT @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,30 +10,42 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object boundaryT; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 0 0 1 0 0 0]; +dimensions [ 0 0 0 1 0 0 0 ]; internalField uniform 0; boundaryField { - xPeriodic + xPeriodic_half0 { type cyclic; } - - yPeriodic + yPeriodic_half0 { type cyclic; } - - zPeriodic + zPeriodic_half0 + { + type cyclic; + } + yPeriodic_half1 + { + type cyclic; + } + zPeriodic_half1 + { + type cyclic; + } + xPeriodic_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/boundaryU b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/boundaryU index 8c8a5f2f33..c75e5506a6 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/boundaryU +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/boundaryU @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,30 +10,42 @@ FoamFile version 2.0; format ascii; class volVectorField; + location "0"; object boundaryU; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 1 -1 0 0 0 0]; +dimensions [ 0 1 -1 0 0 0 0 ]; -internalField uniform (0 0 0); +internalField uniform ( 0 0 0 ); boundaryField { - xPeriodic + xPeriodic_half0 { type cyclic; } - - yPeriodic + yPeriodic_half0 { type cyclic; } - - zPeriodic + zPeriodic_half0 + { + type cyclic; + } + yPeriodic_half1 + { + type cyclic; + } + zPeriodic_half1 + { + type cyclic; + } + xPeriodic_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/dsmcRhoN b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/dsmcRhoN index f87f04f57d..2494f1643f 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/dsmcRhoN +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/dsmcRhoN @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,30 +10,42 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object dsmcRhoN; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 -3 0 0 0 0 0]; +dimensions [ 0 -3 0 0 0 0 0 ]; internalField uniform 0; boundaryField { - xPeriodic + xPeriodic_half0 { type cyclic; } - - yPeriodic + yPeriodic_half0 { type cyclic; } - - zPeriodic + zPeriodic_half0 + { + type cyclic; + } + yPeriodic_half1 + { + type cyclic; + } + zPeriodic_half1 + { + type cyclic; + } + xPeriodic_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/fD b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/fD index 19e3bf764e..bcc188d7b5 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/fD +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/fD @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,30 +10,42 @@ FoamFile version 2.0; format ascii; class volVectorField; + location "0"; object fD; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -2 0 0 0 0]; +dimensions [ 1 -1 -2 0 0 0 0 ]; -internalField uniform (0 0 0); +internalField uniform ( 0 0 0 ); boundaryField { - xPeriodic + xPeriodic_half0 { type cyclic; } - - yPeriodic + yPeriodic_half0 { type cyclic; } - - zPeriodic + zPeriodic_half0 + { + type cyclic; + } + yPeriodic_half1 + { + type cyclic; + } + zPeriodic_half1 + { + type cyclic; + } + xPeriodic_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/iDof b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/iDof index 0e6a8bddd6..1dd93605f1 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/iDof +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/iDof @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,30 +10,42 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object iDof; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 -3 0 0 0 0 0]; +dimensions [ 0 -3 0 0 0 0 0 ]; internalField uniform 0; boundaryField { - xPeriodic + xPeriodic_half0 { type cyclic; } - - yPeriodic + yPeriodic_half0 { type cyclic; } - - zPeriodic + zPeriodic_half0 + { + type cyclic; + } + yPeriodic_half1 + { + type cyclic; + } + zPeriodic_half1 + { + type cyclic; + } + xPeriodic_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/internalE b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/internalE index d9dc59d3b1..b5e11bb738 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/internalE +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/internalE @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,30 +10,42 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object internalE; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -2 0 0 0 0]; +dimensions [ 1 -1 -2 0 0 0 0 ]; internalField uniform 0; boundaryField { - xPeriodic + xPeriodic_half0 { type cyclic; } - - yPeriodic + yPeriodic_half0 { type cyclic; } - - zPeriodic + zPeriodic_half0 + { + type cyclic; + } + yPeriodic_half1 + { + type cyclic; + } + zPeriodic_half1 + { + type cyclic; + } + xPeriodic_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/linearKE b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/linearKE index 609d964a68..4edb0c49dc 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/linearKE +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/linearKE @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,30 +10,42 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object linearKE; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -2 0 0 0 0]; +dimensions [ 1 -1 -2 0 0 0 0 ]; internalField uniform 0; boundaryField { - xPeriodic + xPeriodic_half0 { type cyclic; } - - yPeriodic + yPeriodic_half0 { type cyclic; } - - zPeriodic + zPeriodic_half0 + { + type cyclic; + } + yPeriodic_half1 + { + type cyclic; + } + zPeriodic_half1 + { + type cyclic; + } + xPeriodic_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/momentum b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/momentum index d615c80816..1b17cb300b 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/momentum +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/momentum @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,30 +10,42 @@ FoamFile version 2.0; format ascii; class volVectorField; + location "0"; object momentum; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -2 -1 0 0 0 0]; +dimensions [ 1 -2 -1 0 0 0 0 ]; -internalField uniform (0 0 0); +internalField uniform ( 0 0 0 ); boundaryField { - xPeriodic + xPeriodic_half0 { type cyclic; } - - yPeriodic + yPeriodic_half0 { type cyclic; } - - zPeriodic + zPeriodic_half0 + { + type cyclic; + } + yPeriodic_half1 + { + type cyclic; + } + zPeriodic_half1 + { + type cyclic; + } + xPeriodic_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/q b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/q index 0839663c53..e4cb992d82 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/q +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/q @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,30 +10,42 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object q; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 0 -3 0 0 0 0]; +dimensions [ 1 0 -3 0 0 0 0 ]; internalField uniform 0; boundaryField { - xPeriodic + xPeriodic_half0 { type cyclic; } - - yPeriodic + yPeriodic_half0 { type cyclic; } - - zPeriodic + zPeriodic_half0 + { + type cyclic; + } + yPeriodic_half1 + { + type cyclic; + } + zPeriodic_half1 + { + type cyclic; + } + xPeriodic_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/rhoM b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/rhoM index d8e5cdc513..2eb277f9c6 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/rhoM +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/rhoM @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,30 +10,42 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object rhoM; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -3 0 0 0 0 0]; +dimensions [ 1 -3 0 0 0 0 0 ]; internalField uniform 0; boundaryField { - xPeriodic + xPeriodic_half0 { type cyclic; } - - yPeriodic + yPeriodic_half0 { type cyclic; } - - zPeriodic + zPeriodic_half0 + { + type cyclic; + } + yPeriodic_half1 + { + type cyclic; + } + zPeriodic_half1 + { + type cyclic; + } + xPeriodic_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/rhoN b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/rhoN index 1ff11802e5..7d6a699198 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/rhoN +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/0/rhoN @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,30 +10,42 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object rhoN; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 -3 0 0 0 0 0]; +dimensions [ 0 -3 0 0 0 0 0 ]; internalField uniform 0; boundaryField { - xPeriodic + xPeriodic_half0 { type cyclic; } - - yPeriodic + yPeriodic_half0 { type cyclic; } - - zPeriodic + zPeriodic_half0 + { + type cyclic; + } + yPeriodic_half1 + { + type cyclic; + } + zPeriodic_half1 + { + type cyclic; + } + xPeriodic_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/constant/dsmcProperties b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/constant/dsmcProperties index 71f793e9de..33fa043381 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/constant/dsmcProperties +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/constant/dsmcProperties @@ -27,7 +27,6 @@ nEquivalentParticles 1e12; WallInteractionModel SpecularReflection; -SpecularReflectionCoeffs {} // Binary Collision Model // ~~~~~~~~~~~~~~~~~~~~~~ @@ -43,9 +42,8 @@ LarsenBorgnakkeVariableHardSphereCoeffs // Inflow Boundary Model // ~~~~~~~~~~~~~~~~~~~~~ -InflowBoundaryModel NoInflow; +InflowBoundaryModel none; -NoInflowCoeffs {} // Molecular species // ~~~~~~~~~~~~~~~~~ diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/constant/polyMesh/boundary b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/constant/polyMesh/boundary index 3b2f641ec2..7be12b0361 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/constant/polyMesh/boundary +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -15,28 +15,49 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -3 +6 ( - xPeriodic + xPeriodic_half0 { type cyclic; - nFaces 512; + nFaces 256; startFace 14464; - featureCos 0.9; + neighbourPatch xPeriodic_half1; } - yPeriodic + xPeriodic_half1 { type cyclic; - nFaces 640; + nFaces 256; + startFace 14720; + neighbourPatch xPeriodic_half0; + } + yPeriodic_half0 + { + type cyclic; + nFaces 320; startFace 14976; - featureCos 0.9; + neighbourPatch yPeriodic_half1; } - zPeriodic + yPeriodic_half1 { type cyclic; - nFaces 640; + nFaces 320; + startFace 15296; + neighbourPatch yPeriodic_half0; + } + zPeriodic_half0 + { + type cyclic; + nFaces 320; startFace 15616; - featureCos 0.9; + neighbourPatch zPeriodic_half1; + } + zPeriodic_half1 + { + type cyclic; + nFaces 320; + startFace 15936; + neighbourPatch zPeriodic_half0; } ) diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/constant/dsmcProperties b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/constant/dsmcProperties index 273e2b2cbe..154582ddcd 100644 --- a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/constant/dsmcProperties +++ b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/constant/dsmcProperties @@ -27,8 +27,6 @@ nEquivalentParticles 1e12; WallInteractionModel MaxwellianThermal; -MaxwellianThermalCoeffs {} - // Binary Collision Model // ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/constant/dsmcProperties b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/constant/dsmcProperties index 6fd38ae2e6..bf85f1abe7 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/constant/dsmcProperties +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/constant/dsmcProperties @@ -25,39 +25,24 @@ nEquivalentParticles 1.2e12; // Wall Interaction Model // ~~~~~~~~~~~~~~~~~~~~~~ -//WallInteractionModel SpecularReflection; WallInteractionModel MaxwellianThermal; -SpecularReflectionCoeffs {} - -MaxwellianThermalCoeffs {} - // Binary Collision Model // ~~~~~~~~~~~~~~~~~~~~~~ -//BinaryCollisionModel VariableHardSphere; -BinaryCollisionModel LarsenBorgnakkeVariableHardSphere; +BinaryCollisionModel VariableHardSphere; VariableHardSphereCoeffs { Tref 273; } -LarsenBorgnakkeVariableHardSphereCoeffs -{ - Tref 273; - relaxationCollisionNumber 5.0; -} - // Inflow Boundary Model // ~~~~~~~~~~~~~~~~~~~~~ InflowBoundaryModel FreeStream; -//InflowBoundaryModel NoInflow; - -NoInflowCoeffs {} FreeStreamCoeffs { diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryT b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryT index db6966ac23..f587cd7380 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryT +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryT @@ -32,9 +32,9 @@ boundaryField value uniform 550; } - periodic + frontAndBack { - type cyclic; + type empty; } } diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryU b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryU index 942b5145e2..415380b989 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryU +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/boundaryU @@ -32,9 +32,9 @@ boundaryField value uniform (0 0 0); } - periodic + frontAndBack { - type cyclic; + type empty; } } diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/dsmcRhoN b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/dsmcRhoN index 0690dd175c..07c6a1b456 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/dsmcRhoN +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/dsmcRhoN @@ -30,9 +30,9 @@ boundaryField type zeroGradient; } - periodic + frontAndBack { - type cyclic; + type empty; } } diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/fD b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/fD index 8fede74a75..646849b96e 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/fD +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/fD @@ -31,9 +31,9 @@ boundaryField value uniform (0 0 0); } - periodic + frontAndBack { - type cyclic; + type empty; } } diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/iDof b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/iDof index b31b782ef0..1ce7e3b052 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/iDof +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/iDof @@ -31,9 +31,9 @@ boundaryField value uniform 0; } - periodic + frontAndBack { - type cyclic; + type empty; } } diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/internalE b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/internalE index 61e30470b9..b13d432e3a 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/internalE +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/internalE @@ -31,9 +31,9 @@ boundaryField value uniform 0; } - periodic + frontAndBack { - type cyclic; + type empty; } } diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/linearKE b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/linearKE index b3f5a50d70..189311cb1d 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/linearKE +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/linearKE @@ -31,9 +31,9 @@ boundaryField value uniform 0; } - periodic + frontAndBack { - type cyclic; + type empty; } } diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/momentum b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/momentum index 424e0310cc..979ab3893a 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/momentum +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/momentum @@ -31,9 +31,9 @@ boundaryField value uniform (0 0 0); } - periodic + frontAndBack { - type cyclic; + type empty; } } diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/q b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/q index ecceff2ae5..5de7659935 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/q +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/q @@ -31,9 +31,9 @@ boundaryField value uniform 0; } - periodic + frontAndBack { - type cyclic; + type empty; } } diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/rhoM b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/rhoM index 224aae627a..3f9855fdb9 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/rhoM +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/rhoM @@ -31,9 +31,9 @@ boundaryField value uniform 0; } - periodic + frontAndBack { - type cyclic; + type empty; } } diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/rhoN b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/rhoN index 275417c995..f4305a74a9 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/rhoN +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/0/rhoN @@ -31,9 +31,9 @@ boundaryField value uniform 0; } - periodic + frontAndBack { - type cyclic; + type empty; } } diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/dsmcProperties b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/dsmcProperties index d338013dcc..032885b138 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/dsmcProperties +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/dsmcProperties @@ -27,8 +27,6 @@ nEquivalentParticles 5e12; WallInteractionModel MaxwellianThermal; -MaxwellianThermalCoeffs {} - // Binary Collision Model // ~~~~~~~~~~~~~~~~~~~~~~ @@ -47,8 +45,6 @@ LarsenBorgnakkeVariableHardSphereCoeffs InflowBoundaryModel FreeStream; -NoInflowCoeffs {} - FreeStreamCoeffs { numberDensities diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/polyMesh/blockMeshDict b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/polyMesh/blockMeshDict index 7906adbe08..5ef67b3d58 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/polyMesh/blockMeshDict +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/polyMesh/blockMeshDict @@ -18,26 +18,26 @@ convertToMeters 1; vertices ( - (-0.15242 0 -0.05) - ( 0 0 -0.05) - ( 0.3048 0.081670913853 -0.05) - (-0.15242 0.3 -0.05) - ( 0 0.3 -0.05) - ( 0.3048 0.3 -0.05) + (-0.15242 0 -0.0042) + ( 0 0 -0.0042) + ( 0.3048 0.081670913853 -0.0042) + (-0.15242 0.3 -0.0042) + ( 0 0.3 -0.0042) + ( 0.3048 0.3 -0.0042) - (-0.15242 0 0.05) - ( 0 0 0.05) - ( 0.3048 0.081670913853 0.05) - (-0.15242 0.3 0.05) - ( 0 0.3 0.05) - ( 0.3048 0.3 0.05) + (-0.15242 0 0.0042) + ( 0 0 0.0042) + ( 0.3048 0.081670913853 0.0042) + (-0.15242 0.3 0.0042) + ( 0 0.3 0.0042) + ( 0.3048 0.3 0.0042) ); blocks ( - hex (0 1 4 3 6 7 10 9 ) (20 40 12) simpleGrading (1 1 1) - hex (1 2 5 4 7 8 11 10) (40 40 12) simpleGrading (1 1 1) + hex (0 1 4 3 6 7 10 9 ) (20 40 1) simpleGrading (1 1 1) + hex (1 2 5 4 7 8 11 10) (40 40 1) simpleGrading (1 1 1) ); edges @@ -58,7 +58,7 @@ patches ( (1 2 8 7) ) - cyclic periodic + empty frontAndBack ( (0 3 4 1) (1 4 5 2) diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/polyMesh/boundary b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/polyMesh/boundary index 3c32e9b0e4..0ea523348c 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/polyMesh/boundary +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -20,21 +20,20 @@ FoamFile flow { type patch; - nFaces 1920; - startFace 82800; + nFaces 160; + startFace 4700; } obstacle { type wall; - nFaces 480; - startFace 84720; + nFaces 40; + startFace 4860; } - periodic + frontAndBack { - type cyclic; + type empty; nFaces 4800; - startFace 85200; - featureCos 0.9; + startFace 4900; } ) diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/controlDict b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/controlDict index 31f6cf1b8d..2c4749bb06 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/controlDict +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/controlDict @@ -23,14 +23,13 @@ startTime 0; stopAt endTime; -endTime 0.00125; -// endTime 0.01; +endTime 0.02; deltaT 2e-6; writeControl runTime; -writeInterval 1e-4; +writeInterval 1e-3; purgeWrite 0; diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/decomposeParDict b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/decomposeParDict index eb1bea1fce..f1482468d4 100644 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/decomposeParDict +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/system/decomposeParDict @@ -21,7 +21,7 @@ method simple; simpleCoeffs { - n ( 1 1 4 ); + n ( 2 2 1 ); delta 0.001; } diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/0/U b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/0/U index 5e3b0435c4..59bf5a53e3 100644 --- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/0/U +++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/0/U @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,28 +10,42 @@ FoamFile version 2.0; format ascii; class volVectorField; + location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 1 -1 0 0 0 0]; +dimensions [ 0 1 -1 0 0 0 0 ]; -internalField uniform (0 0 0); +internalField uniform ( 0 0 0 ); boundaryField { - periodicX + periodicX_half0 { type cyclic; } - periodicY + periodicY_half0 { type cyclic; } - periodicZ + periodicZ_half0 + { + type cyclic; + } + periodicY_half1 + { + type cyclic; + } + periodicZ_half1 + { + type cyclic; + } + periodicX_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/constant/polyMesh/boundary b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/constant/polyMesh/boundary index 850c9baa1e..27b419834d 100644 --- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/constant/polyMesh/boundary +++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/constant/polyMesh/boundary @@ -15,28 +15,49 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -3 +6 ( - periodicX + periodicX_half0 { type cyclic; - nFaces 288; + nFaces 144; startFace 4752; - featureCos 0.9; + neighbourPatch periodicX_half1; } - periodicY + periodicX_half1 { type cyclic; - nFaces 288; + nFaces 144; + startFace 4896; + neighbourPatch periodicX_half0; + } + periodicY_half0 + { + type cyclic; + nFaces 144; startFace 5040; - featureCos 0.9; + neighbourPatch periodicY_half1; } - periodicZ + periodicY_half1 { type cyclic; - nFaces 288; + nFaces 144; + startFace 5184; + neighbourPatch periodicY_half0; + } + periodicZ_half0 + { + type cyclic; + nFaces 144; startFace 5328; - featureCos 0.9; + neighbourPatch periodicZ_half1; + } + periodicZ_half1 + { + type cyclic; + nFaces 144; + startFace 5472; + neighbourPatch periodicZ_half0; } ) diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/0/U b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/0/U index 5e3b0435c4..59bf5a53e3 100644 --- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/0/U +++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/0/U @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,28 +10,42 @@ FoamFile version 2.0; format ascii; class volVectorField; + location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 1 -1 0 0 0 0]; +dimensions [ 0 1 -1 0 0 0 0 ]; -internalField uniform (0 0 0); +internalField uniform ( 0 0 0 ); boundaryField { - periodicX + periodicX_half0 { type cyclic; } - periodicY + periodicY_half0 { type cyclic; } - periodicZ + periodicZ_half0 + { + type cyclic; + } + periodicY_half1 + { + type cyclic; + } + periodicZ_half1 + { + type cyclic; + } + periodicX_half1 { type cyclic; } } + // ************************************************************************* // diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/constant/polyMesh/boundary b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/constant/polyMesh/boundary index 435792380c..d5b72fc728 100644 --- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/constant/polyMesh/boundary +++ b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -15,28 +15,49 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -3 +6 ( - periodicX + periodicX_half0 { type cyclic; - nFaces 264; + nFaces 132; startFace 4344; - featureCos 0.9; + neighbourPatch periodicX_half1; } - periodicY + periodicX_half1 { type cyclic; - nFaces 264; + nFaces 132; + startFace 4476; + neighbourPatch periodicX_half0; + } + periodicY_half0 + { + type cyclic; + nFaces 132; startFace 4608; - featureCos 0.9; + neighbourPatch periodicY_half1; } - periodicZ + periodicY_half1 { type cyclic; - nFaces 288; + nFaces 132; + startFace 4740; + neighbourPatch periodicY_half0; + } + periodicZ_half0 + { + type cyclic; + nFaces 144; startFace 4872; - featureCos 0.9; + neighbourPatch periodicZ_half1; + } + periodicZ_half1 + { + type cyclic; + nFaces 144; + startFace 5016; + neighbourPatch periodicZ_half0; } ) From 51c8c307eb693c872219d57f98659afc7cfae1af Mon Sep 17 00:00:00 2001 From: graham Date: Thu, 20 May 2010 17:34:01 +0100 Subject: [PATCH 2/5] ENH: Adding actve flag to dsmc binary collision submodels to allow collision step to be skipped for the NoBinaryCollision model. --- .../clouds/Templates/DsmcCloud/DsmcCloud.C | 8 +- .../makeDsmcParcelBinaryCollisionModels.C | 7 ++ .../BinaryCollisionModel.H | 3 + .../LarsenBorgnakkeVariableHardSphere.C | 6 + .../LarsenBorgnakkeVariableHardSphere.H | 3 + .../NoBinaryCollision/NoBinaryCollision.C | 102 ++++++++++++++++ .../NoBinaryCollision/NoBinaryCollision.H | 110 ++++++++++++++++++ .../VariableHardSphere/VariableHardSphere.C | 6 + .../VariableHardSphere/VariableHardSphere.H | 3 + .../freeSpaceStream/0/interpolaterhoN | 42 ------- 10 files changed, 247 insertions(+), 43 deletions(-) create mode 100644 src/lagrangian/dsmc/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.C create mode 100644 src/lagrangian/dsmc/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.H delete mode 100644 tutorials/discreteMethods/dsmcFoam/freeSpaceStream/0/interpolaterhoN diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C index 0d9e84533d..455ee7936d 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C @@ -291,7 +291,10 @@ void Foam::DsmcCloud::initialise template void Foam::DsmcCloud::collisions() { - buildCellOccupancy(); + if (!binaryCollision().active()) + { + return; + } // Temporary storage for subCells List > subCells(8); @@ -1057,6 +1060,9 @@ void Foam::DsmcCloud::evolve() // Move the particles ballistically with their current velocities Cloud::move(td); + // Update cell occupancy + buildCellOccupancy(); + // Calculate new velocities via stochastic collisions collisions(); diff --git a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelBinaryCollisionModels.C b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelBinaryCollisionModels.C index b07fd0cb2d..1e8356ef5f 100644 --- a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelBinaryCollisionModels.C +++ b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelBinaryCollisionModels.C @@ -25,6 +25,7 @@ License #include "dsmcParcel.H" #include "DsmcCloud.H" +#include "NoBinaryCollision.H" #include "VariableHardSphere.H" #include "LarsenBorgnakkeVariableHardSphere.H" @@ -34,6 +35,12 @@ namespace Foam // Add instances of collision model to the table makeBinaryCollisionModelType + ( + NoBinaryCollision, + DsmcCloud, + dsmcParcel + ); + makeBinaryCollisionModelType ( VariableHardSphere, DsmcCloud, diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H index 27f73d4992..0136cd5f6a 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H @@ -126,6 +126,9 @@ public: // Member Functions + //- Flag to indicate whether model activates collision model + virtual bool active() const = 0; + //- Return the collision cross section * relative velocity product virtual scalar sigmaTcR ( diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C index c7bf6a00ab..e5112d5c66 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C @@ -117,6 +117,12 @@ Foam::LarsenBorgnakkeVariableHardSphere:: // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +bool Foam::LarsenBorgnakkeVariableHardSphere::active() const +{ + return true; +} + template Foam::scalar Foam::LarsenBorgnakkeVariableHardSphere::sigmaTcR diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H index f01f625e3f..3f742a78ae 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H @@ -89,6 +89,9 @@ public: // Member Functions + //- Flag to indicate whether model activates collision model + virtual bool active() const; + //- Return the collision cross section * relative velocity product virtual scalar sigmaTcR ( diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.C new file mode 100644 index 0000000000..5ff9889638 --- /dev/null +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.C @@ -0,0 +1,102 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "NoBinaryCollision.H" +#include "constants.H" + +using namespace Foam::constant::mathematical; + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::NoBinaryCollision::NoBinaryCollision +( + const dictionary& dict, + CloudType& cloud +) +: + BinaryCollisionModel(cloud) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::NoBinaryCollision::~NoBinaryCollision() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +bool Foam::NoBinaryCollision::active() const +{ + return false; +} + + +template +Foam::scalar Foam::NoBinaryCollision::sigmaTcR +( + label typeIdP, + label typeIdQ, + const vector& UP, + const vector& UQ +) const +{ + FatalErrorIn + ( + "Foam::scalar Foam::NoBinaryCollision::sigmaTcR" + "(" + "label typeIdP," + "label typeIdQ," + "const vector& UP," + "const vector& UQ" + ") const" + ) + << "sigmaTcR called on NoBinaryCollision model, this should " + << "not happen, this is not an actual model." << nl + << "Enclose calls to sigmaTcR within a if(binaryCollision().active()) " + << " check." + << abort(FatalError); + + return 0.0; +} + + +template +void Foam::NoBinaryCollision::collide +( + label typeIdP, + label typeIdQ, + vector& UP, + vector& UQ, + scalar& EiP, + scalar& EiQ +) +{} + + +// ************************************************************************* // diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.H b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.H new file mode 100644 index 0000000000..b48cedb316 --- /dev/null +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/NoBinaryCollision/NoBinaryCollision.H @@ -0,0 +1,110 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . +Class + Foam::NoBinaryCollision + +Description + No collison BinaryCollision Model + +\*---------------------------------------------------------------------------*/ + +#ifndef NoBinaryCollision_H +#define NoBinaryCollision_H + +#include "BinaryCollisionModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +/*---------------------------------------------------------------------------*\ + Class NoBinaryCollision Declaration +\*---------------------------------------------------------------------------*/ + +template +class NoBinaryCollision +: + public BinaryCollisionModel +{ +public: + + //- Runtime type information + TypeName("none"); + + + // Constructors + + //- Construct from dictionary + NoBinaryCollision + ( + const dictionary& dict, + CloudType& cloud + ); + + + //- Destructor + virtual ~NoBinaryCollision(); + + + // Member Functions + + //- Flag to indicate whether model activates collision model + virtual bool active() const; + + //- Return the collision cross section * relative velocity product + virtual scalar sigmaTcR + ( + label typeIdP, + label typeIdQ, + const vector& UP, + const vector& UQ + ) const; + + //- Apply collision + virtual void collide + ( + label typeIdP, + label typeIdQ, + vector& UP, + vector& UQ, + scalar& EiP, + scalar& EiQ + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "NoBinaryCollision.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C index e248d01161..8f7d13dd7d 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C @@ -51,6 +51,12 @@ Foam::VariableHardSphere::~VariableHardSphere() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +bool Foam::VariableHardSphere::active() const +{ + return true; +} + template Foam::scalar Foam::VariableHardSphere::sigmaTcR diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H index 17e1684ee9..bf986189c0 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H @@ -74,6 +74,9 @@ public: // Member Functions + //- Flag to indicate whether model activates collision model + virtual bool active() const; + //- Return the collision cross section * relative velocity product virtual scalar sigmaTcR ( diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/0/interpolaterhoN b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/0/interpolaterhoN deleted file mode 100644 index 73a629252d..0000000000 --- a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/0/interpolaterhoN +++ /dev/null @@ -1,42 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class surfaceScalarField; - location "0"; - object interpolaterhoN; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 -3 0 0 0 0 0]; - -internalField uniform 0; - -boundaryField -{ - outlet - { - type calculated; - value uniform 0; - } - inlet - { - type calculated; - value uniform 0; - } - sides - { - type calculated; - value uniform 0; - } -} - - -// ************************************************************************* // From 8e7d6507dd7b7779fed82597ab7e6d92e075a16e Mon Sep 17 00:00:00 2001 From: graham Date: Fri, 21 May 2010 18:46:23 +0100 Subject: [PATCH 3/5] BUG. Forgot to initialise pointer to NULL. --- src/lagrangian/intermediate/particleForces/particleForces.C | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lagrangian/intermediate/particleForces/particleForces.C b/src/lagrangian/intermediate/particleForces/particleForces.C index 31db9460f1..6591d2b8d4 100644 --- a/src/lagrangian/intermediate/particleForces/particleForces.C +++ b/src/lagrangian/intermediate/particleForces/particleForces.C @@ -61,6 +61,7 @@ Foam::particleForces::particleForces dict_(dict.subDict("particleForces")), g_(g), gradUPtr_(NULL), + HdotGradHInterPtr_(NULL), gravity_(dict_.lookup("gravity")), virtualMass_(dict_.lookup("virtualMass")), Cvm_(0.0), @@ -88,6 +89,7 @@ Foam::particleForces::particleForces(const particleForces& f) dict_(f.dict_), g_(f.g_), gradUPtr_(f.gradUPtr_), + HdotGradHInterPtr_(f.HdotGradHInterPtr_), gravity_(f.gravity_), virtualMass_(f.virtualMass_), Cvm_(f.Cvm_), From 619784414d6eed4d8098daa9f4cdd19193ac552a Mon Sep 17 00:00:00 2001 From: graham Date: Fri, 21 May 2010 19:11:57 +0100 Subject: [PATCH 4/5] ENH. Adding collision records to wall collisions to record tangential overlap. Matching wall collision records by storing and comparing location of wall impact relative to paticle centre. --- .../CollisionRecordList/CollisionRecordList.C | 209 +++++++++++++++--- .../CollisionRecordList/CollisionRecordList.H | 94 +++++++- .../PairCollisionRecord.C} | 30 ++- .../PairCollisionRecord.H} | 58 ++--- .../PairCollisionRecordI.H} | 25 ++- .../PairCollisionRecordIO.C} | 29 ++- .../WallCollisionRecord/WallCollisionRecord.C | 102 +++++++++ .../WallCollisionRecord/WallCollisionRecord.H | 204 +++++++++++++++++ .../WallCollisionRecordI.H | 143 ++++++++++++ .../WallCollisionRecordIO.C | 86 +++++++ .../KinematicParcel/KinematicParcel.H | 7 +- .../KinematicParcel/KinematicParcelI.H | 4 +- .../PairSpringSliderDashpot.C | 6 +- .../PairSpringSliderDashpot.H | 2 +- .../WallSpringSliderDashpot.C | 9 +- 15 files changed, 895 insertions(+), 113 deletions(-) rename src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/{CollisionRecord/CollisionRecord.C => PairCollisionRecord/PairCollisionRecord.C} (77%) rename src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/{CollisionRecord/CollisionRecord.H => PairCollisionRecord/PairCollisionRecord.H} (80%) rename src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/{CollisionRecord/CollisionRecordI.H => PairCollisionRecord/PairCollisionRecordI.H} (77%) rename src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/{CollisionRecord/CollisionRecordIO.C => PairCollisionRecord/PairCollisionRecordIO.C} (72%) create mode 100644 src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.C create mode 100644 src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.H create mode 100644 src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecordI.H create mode 100644 src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecordIO.C diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecordList.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecordList.C index f0b4804cf5..4fd7453f3e 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecordList.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecordList.C @@ -28,37 +28,41 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -Foam::CollisionRecordList::CollisionRecordList() +template +Foam::CollisionRecordList::CollisionRecordList() : - DynamicList >() + pairRecords_(), + wallRecords_() {} -template -Foam::CollisionRecordList::CollisionRecordList(Istream& is) +template +Foam::CollisionRecordList::CollisionRecordList(Istream& is) : - DynamicList >(is) + pairRecords_(is), + wallRecords_(is) { // Check state of Istream is.check ( - "Foam::CollisionRecordList::CollisionRecordList(Foam::Istream&)" + "Foam::CollisionRecordList::" + "CollisionRecordList(Foam::Istream&)" ); } // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * / -template -Foam::CollisionRecordList::~CollisionRecordList() +template +Foam::CollisionRecordList::~CollisionRecordList() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -template -Foam::CollisionRecord& Foam::CollisionRecordList::matchRecord +template +Foam::PairCollisionRecord& +Foam::CollisionRecordList::matchPairRecord ( label origProcOfOther, label origIdOfOther @@ -68,15 +72,15 @@ Foam::CollisionRecord& Foam::CollisionRecordList::matchRecord // identifiers. Two records with the same identification is not // supported. - forAll(*this, i) + forAll(pairRecords_, i) { - CollisionRecord& cR = (*this)[i]; + PairCollisionRecord& pCR = pairRecords_[i]; - if (cR.match(origProcOfOther, origIdOfOther)) + if (pCR.match(origProcOfOther, origIdOfOther)) { - cR.setAccessed(); + pCR.setAccessed(); - return cR; + return pCR; } } @@ -84,28 +88,179 @@ Foam::CollisionRecord& Foam::CollisionRecordList::matchRecord // member of the list. The status of the record will be accessed // by construction. - append(CollisionRecord(origProcOfOther, origIdOfOther)); + pairRecords_.append + ( + PairCollisionRecord(origProcOfOther, origIdOfOther) + ); - return (*this)[this->size() - 1]; + return pairRecords_.last(); } -template -void Foam::CollisionRecordList::update() +template +Foam::WallCollisionRecord& +Foam::CollisionRecordList::matchWallRecord +( + const vector& pRel, + scalar radius +) { - DynamicList > updatedRecords; + // Returning the first record that matches the relative position. + // Two records with the same relative position is not supported. - forAll(*this, i) + forAll(wallRecords_, i) { - if ((*this)[i].accessed()) - { - (*this)[i].setUnaccessed(); + WallCollisionRecord& wCR = wallRecords_[i]; - updatedRecords.append((*this)[i]); + if (wCR.match(pRel, radius)) + { + wCR.setAccessed(); + + return wCR; } } - DynamicList >::operator=(updatedRecords); + // Record not found, create a new one and return it as the last + // member of the list. The status of the record will be accessed + // by construction. + + wallRecords_.append(WallCollisionRecord(pRel)); + + return wallRecords_.last(); } + + +template +void Foam::CollisionRecordList::update() +{ + { + DynamicList > updatedRecords; + + forAll(pairRecords_, i) + { + if (pairRecords_[i].accessed()) + { + pairRecords_[i].setUnaccessed(); + + updatedRecords.append(pairRecords_[i]); + } + } + + pairRecords_ = updatedRecords; + } + + { + DynamicList > updatedRecords; + + forAll(wallRecords_, i) + { + if (wallRecords_[i].accessed()) + { + wallRecords_[i].setUnaccessed(); + + updatedRecords.append(wallRecords_[i]); + } + } + + wallRecords_ = updatedRecords; + } +} + + +// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // + +template +void Foam::CollisionRecordList::operator= +( + const CollisionRecordList& rhs +) +{ + // Check for assignment to self + if (this == &rhs) + { + FatalErrorIn + ( + "Foam::CollisionRecordList::operator=" + "(const Foam::CollisionRecordList&)" + ) + << "Attempted assignment to self" + << abort(FatalError); + } + + pairRecords_ = rhs.pairRecords_; + wallRecords_ = rhs.wallRecords_; +} + + +// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * // + +template +inline bool Foam::operator== +( + const CollisionRecordList& a, + const CollisionRecordList& b +) +{ + return + ( + a.pairRecords_ == b.pairRecords_ + && a.wallRecords_ == b.wallRecords_ + ); +} + + +template +inline bool Foam::operator!= +( + const CollisionRecordList& a, + const CollisionRecordList& b +) +{ + return !(a == b); +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template +Foam::Istream& Foam::operator>> +( + Istream& is, + CollisionRecordList& cRL +) +{ + is >> cRL.pairRecords_ >> cRL.wallRecords_; + + // Check state of Istream + is.check + ( + "Foam::Istream& Foam::operator>>" + "(Foam::Istream&, Foam::CollisionRecordList&)" + ); + + return is; +} + + +template +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const CollisionRecordList& cRL +) +{ + os << cRL.pairRecords_ << cRL.wallRecords_; + + // Check state of Ostream + os.check + ( + "Foam::Ostream& Foam::operator<<(Foam::Ostream&, " + "const Foam::CollisionRecordList&)" + ); + + return os; +} + + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecordList.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecordList.H index 32c7eef6c6..2993b9df30 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecordList.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecordList.H @@ -37,22 +37,53 @@ SourceFiles #define CollisionRecordList_H #include "DynamicList.H" -#include "CollisionRecord.H" +#include "PairCollisionRecord.H" +#include "WallCollisionRecord.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +// Forward declaration of friend functions and operators +template +class CollisionRecordList; + +template +inline bool operator== +( + const CollisionRecordList&, + const CollisionRecordList& +); + +template +inline bool operator!= +( + const CollisionRecordList&, + const CollisionRecordList& +); + +template +Istream& operator>>(Istream&, CollisionRecordList&); + +template +Ostream& operator<<(Ostream&, const CollisionRecordList&); + + /*---------------------------------------------------------------------------*\ Class CollisionRecordList Declaration \*---------------------------------------------------------------------------*/ -template +template class CollisionRecordList -: - public DynamicList > { + // Private data + + //- List of active pair collisions + DynamicList > pairRecords_; + + //- List of active wall collisions + DynamicList > wallRecords_; public: @@ -72,19 +103,66 @@ public: // Member Functions //- Enquires if the proc and id pair of the other particle are - // present in the records. If so, return access to the - // collisionData and mark the CollisionRecord as accessed this - // step, if not, create the record and return access to it. - CollisionRecord& matchRecord + // present in the records. If so, return non-const access to + // the PairCollisionRecord (hence the data) and mark the + // PairCollisionRecord as accessed this step, if not, create + // the record and return access to it. + PairCollisionRecord& matchPairRecord ( label origProcOfOther, label origIdOfOther ); + //- Enquires if the position of wall impact relative to the + // particle centre is present in the records. If so, return + // access to the WallCollisionRecord (hence the data) and + // mark the WallCollisionRecord as accesses this step, if + // not, create the record and return access to it. + WallCollisionRecord& matchWallRecord + ( + const vector& pRel, + scalar radius + ); + //- Update the collision records, deleting any records not // marked as having been accessed, then mark all records as // not accessed ready for the next evaluation void update(); + + + // Member Operators + + void operator=(const CollisionRecordList&); + + + // Friend Operators + + friend bool operator== + ( + const CollisionRecordList&, + const CollisionRecordList& + ); + + friend bool operator!= + ( + const CollisionRecordList&, + const CollisionRecordList& + ); + + + // IOstream Operators + + friend Istream& operator>> + ( + Istream&, + CollisionRecordList& + ); + + friend Ostream& operator<< + ( + Ostream&, + const CollisionRecordList& + ); }; diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecord.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.C similarity index 77% rename from src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecord.C rename to src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.C index 8ccc725054..0357d15c5d 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecord.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.C @@ -23,12 +23,12 @@ License \*---------------------------------------------------------------------------*/ -#include "CollisionRecord.H" +#include "PairCollisionRecord.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::CollisionRecord::CollisionRecord() +Foam::PairCollisionRecord::PairCollisionRecord() : origProcOfOther_(-VGREAT), origIdOfOther_(-VGREAT), @@ -37,7 +37,7 @@ Foam::CollisionRecord::CollisionRecord() template -Foam::CollisionRecord::CollisionRecord +Foam::PairCollisionRecord::PairCollisionRecord ( label origProcOfOther, label origIdOfOther, @@ -51,33 +51,39 @@ Foam::CollisionRecord::CollisionRecord template -Foam::CollisionRecord::CollisionRecord(const CollisionRecord& cR) +Foam::PairCollisionRecord::PairCollisionRecord +( + const PairCollisionRecord& pCR +) : - origProcOfOther_(cR.origProcOfOther() + 1), - origIdOfOther_(cR.origIdOfOther_), - data_(cR.data_) + origProcOfOther_(pCR.origProcOfOther() + 1), + origIdOfOther_(pCR.origIdOfOther_), + data_(pCR.data_) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template -Foam::CollisionRecord::~CollisionRecord() +Foam::PairCollisionRecord::~PairCollisionRecord() {} // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // template -void Foam::CollisionRecord::operator=(const CollisionRecord& rhs) +void Foam::PairCollisionRecord::operator= +( + const PairCollisionRecord& rhs +) { // Check for assignment to self if (this == &rhs) { FatalErrorIn ( - "Foam::CollisionRecord::operator=" - "(const Foam::CollisionRecord&)" + "Foam::PairCollisionRecord::operator=" + "(const Foam::PairCollisionRecord&)" ) << "Attempted assignment to self" << abort(FatalError); @@ -91,7 +97,7 @@ void Foam::CollisionRecord::operator=(const CollisionRecord& rhs) // * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // -#include "CollisionRecordIO.C" +#include "PairCollisionRecordIO.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecord.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.H similarity index 80% rename from src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecord.H rename to src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.H index de226c88e6..a14b645fb4 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecord.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecord.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::CollisionRecord + Foam::PairCollisionRecord Description @@ -35,14 +35,14 @@ Description positive means that it has. SourceFiles - CollisionRecordI.H - CollisionRecord.C - CollisionRecordIO.C + PairCollisionRecordI.H + PairCollisionRecord.C + PairCollisionRecordIO.C \*---------------------------------------------------------------------------*/ -#ifndef CollisionRecord_H -#define CollisionRecord_H +#ifndef PairCollisionRecord_H +#define PairCollisionRecord_H #include "label.H" #include "vector.H" @@ -54,35 +54,35 @@ namespace Foam // Forward declaration of friend functions and operators template -class CollisionRecord; +class PairCollisionRecord; template inline bool operator== ( - const CollisionRecord&, - const CollisionRecord& + const PairCollisionRecord&, + const PairCollisionRecord& ); template inline bool operator!= ( - const CollisionRecord&, - const CollisionRecord& + const PairCollisionRecord&, + const PairCollisionRecord& ); template -Istream& operator>>(Istream&, CollisionRecord&); +Istream& operator>>(Istream&, PairCollisionRecord&); template -Ostream& operator<<(Ostream&, const CollisionRecord&); +Ostream& operator<<(Ostream&, const PairCollisionRecord&); /*---------------------------------------------------------------------------*\ - Class CollisionRecord Declaration + Class PairCollisionRecord Declaration \*---------------------------------------------------------------------------*/ template -class CollisionRecord +class PairCollisionRecord { // Private data @@ -103,10 +103,10 @@ public: // Constructors //- Construct null - CollisionRecord(); + PairCollisionRecord(); //- Construct from components - CollisionRecord + PairCollisionRecord ( label origProcOfOther, label origIdOfOther, @@ -114,14 +114,14 @@ public: ); //- Construct from Istream - CollisionRecord(Istream&); + PairCollisionRecord(Istream&); //- Construct as copy - CollisionRecord(const CollisionRecord&); + PairCollisionRecord(const PairCollisionRecord&); //- Destructor - ~CollisionRecord(); + ~PairCollisionRecord(); // Member Functions @@ -165,21 +165,21 @@ public: // Member Operators - void operator=(const CollisionRecord&); + void operator=(const PairCollisionRecord&); // Friend Operators friend bool operator== ( - const CollisionRecord&, - const CollisionRecord& + const PairCollisionRecord&, + const PairCollisionRecord& ); friend bool operator!= ( - const CollisionRecord&, - const CollisionRecord& + const PairCollisionRecord&, + const PairCollisionRecord& ); @@ -188,13 +188,13 @@ public: friend Istream& operator>> ( Istream&, - CollisionRecord& + PairCollisionRecord& ); friend Ostream& operator<< ( Ostream&, - const CollisionRecord& + const PairCollisionRecord& ); }; @@ -205,12 +205,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "CollisionRecordI.H" +#include "PairCollisionRecordI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "CollisionRecord.C" +# include "PairCollisionRecord.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecordI.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecordI.H similarity index 77% rename from src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecordI.H rename to src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecordI.H index 33d60305ce..4c0d3abc87 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecordI.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecordI.H @@ -26,7 +26,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -inline bool Foam::CollisionRecord::match +inline bool Foam::PairCollisionRecord::match ( label queryOrigProcOfOther, label queryOrigIdOfOther @@ -41,14 +41,14 @@ inline bool Foam::CollisionRecord::match template -inline Foam::label Foam::CollisionRecord::origProcOfOther() const +inline Foam::label Foam::PairCollisionRecord::origProcOfOther() const { return mag(origProcOfOther_) - 1; } template -inline Foam::label Foam::CollisionRecord::origIdOfOther() const +inline Foam::label Foam::PairCollisionRecord::origIdOfOther() const { return origIdOfOther_; } @@ -56,35 +56,35 @@ inline Foam::label Foam::CollisionRecord::origIdOfOther() const template inline const Type& -Foam::CollisionRecord::collisionData() const +Foam::PairCollisionRecord::collisionData() const { return data_; } template -inline Type& Foam::CollisionRecord::collisionData() +inline Type& Foam::PairCollisionRecord::collisionData() { return data_; } template -inline bool Foam::CollisionRecord::accessed() const +inline bool Foam::PairCollisionRecord::accessed() const { return pos(origProcOfOther_); } template -inline void Foam::CollisionRecord::setAccessed() +inline void Foam::PairCollisionRecord::setAccessed() { origProcOfOther_ = origProcOfOther() + 1; } template -inline void Foam::CollisionRecord::setUnaccessed() +inline void Foam::PairCollisionRecord::setUnaccessed() { origProcOfOther_ = -(origProcOfOther() + 1); } @@ -95,8 +95,8 @@ inline void Foam::CollisionRecord::setUnaccessed() template inline bool Foam::operator== ( - const CollisionRecord& a, - const CollisionRecord& b + const PairCollisionRecord& a, + const PairCollisionRecord& b ) { return @@ -107,11 +107,12 @@ inline bool Foam::operator== ); } + template inline bool Foam::operator!= ( - const CollisionRecord& a, - const CollisionRecord& b + const PairCollisionRecord& a, + const PairCollisionRecord& b ) { return !(a == b); diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecordIO.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecordIO.C similarity index 72% rename from src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecordIO.C rename to src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecordIO.C index e90611318b..4c1de522f7 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/CollisionRecord/CollisionRecordIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecordIO.C @@ -23,35 +23,38 @@ License \*---------------------------------------------------------------------------*/ -#include "CollisionRecord.H" +#include "PairCollisionRecord.H" #include "IOstreams.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::CollisionRecord::CollisionRecord(Istream& is) +Foam::PairCollisionRecord::PairCollisionRecord(Istream& is) : origProcOfOther_(readLabel(is)), origIdOfOther_(readLabel(is)), data_(is) { // Check state of Istream - is.check("Foam::CollisionRecord::CollisionRecord(Foam::Istream&)"); + is.check + ( + "Foam::PairCollisionRecord::PairCollisionRecord(Foam::Istream&)" + ); } // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // template -Foam::Istream& Foam::operator>>(Istream& is, CollisionRecord& cR) +Foam::Istream& Foam::operator>>(Istream& is, PairCollisionRecord& pCR) { - is >> cR.origProcOfOther_ >> cR.origIdOfOther_ >> cR.data_; + is >> pCR.origProcOfOther_ >> pCR.origIdOfOther_ >> pCR.data_; // Check state of Istream is.check ( "Foam::Istream&" - "Foam::operator>>(Foam::Istream&, Foam::CollisionRecord&)" + "Foam::operator>>(Foam::Istream&, Foam::PairCollisionRecord&)" ); return is; @@ -59,17 +62,21 @@ Foam::Istream& Foam::operator>>(Istream& is, CollisionRecord& cR) template -Foam::Ostream& Foam::operator<<(Ostream& os, const CollisionRecord& cR) +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const PairCollisionRecord& pCR +) { - os << cR.origProcOfOther_ - << token::SPACE << cR.origIdOfOther_ - << token::SPACE << cR.data_; + os << pCR.origProcOfOther_ + << token::SPACE << pCR.origIdOfOther_ + << token::SPACE << pCR.data_; // Check state of Ostream os.check ( "Foam::Ostream& Foam::operator<<(Foam::Ostream&, " - "const Foam::CollisionRecord&)" + "const Foam::PairCollisionRecord&)" ); return os; diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.C new file mode 100644 index 0000000000..d3141e660d --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.C @@ -0,0 +1,102 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "WallCollisionRecord.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::WallCollisionRecord::WallCollisionRecord() +: + accessed_(false), + pRel_(), + data_(pTraits::zero) +{} + + +template +Foam::WallCollisionRecord::WallCollisionRecord +( + const vector& pRel, + const Type& data +) +: + accessed_(true), + pRel_(pRel), + data_(data) +{} + + +template +Foam::WallCollisionRecord::WallCollisionRecord +( + const WallCollisionRecord& wCR +) +: + accessed_(wCR.accessed_), + pRel_(wCR.pRel_), + data_(wCR.data_) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::WallCollisionRecord::~WallCollisionRecord() +{} + + +// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // + +template +void Foam::WallCollisionRecord::operator= +( + const WallCollisionRecord& rhs +) +{ + // Check for assignment to self + if (this == &rhs) + { + FatalErrorIn + ( + "Foam::WallCollisionRecord::operator=" + "(const Foam::WallCollisionRecord&)" + ) + << "Attempted assignment to self" + << abort(FatalError); + } + + accessed_ = rhs.accessed_; + pRel_ = rhs.pRel_; + data_ = rhs.data_; +} + + +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // + +#include "WallCollisionRecordIO.C" + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.H new file mode 100644 index 0000000000..33f021fc7c --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecord.H @@ -0,0 +1,204 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Class + Foam::WallCollisionRecord + +Description + Record of a collision between the particle holding the record and + a wall face at the position relative to the centre of the particle. + +SourceFiles + WallCollisionRecordI.H + WallCollisionRecord.C + WallCollisionRecordIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef WallCollisionRecord_H +#define WallCollisionRecord_H + +#include "vector.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of friend functions and operators +template +class WallCollisionRecord; + +template +inline bool operator== +( + const WallCollisionRecord&, + const WallCollisionRecord& +); + +template +inline bool operator!= +( + const WallCollisionRecord&, + const WallCollisionRecord& +); + +template +Istream& operator>>(Istream&, WallCollisionRecord&); + +template +Ostream& operator<<(Ostream&, const WallCollisionRecord&); + + +/*---------------------------------------------------------------------------*\ + Class WallCollisionRecord Declaration +\*---------------------------------------------------------------------------*/ + +template +class WallCollisionRecord +{ + // Private data + + // //- Recording whether or not this record has been accessed + bool accessed_; + + //- The position of wall impact relative to the cell centre + vector pRel_; + + //- Collision data, stored as if the storing particle was the + // first particle (particle A) in the collision. + Type data_; + + +public: + + // Constructors + + //- Construct null + WallCollisionRecord(); + + //- Construct from components + WallCollisionRecord + ( + const vector& pRel, + const Type& data = pTraits::zero + ); + + //- Construct from Istream + WallCollisionRecord(Istream&); + + //- Construct as copy + WallCollisionRecord(const WallCollisionRecord&); + + + //- Destructor + ~WallCollisionRecord(); + + + // Member Functions + + + // Access + + //- Return the pRel data + inline const vector& pRel() const; + + //- Return access to the collision data + inline const Type& collisionData() const; + + //- Return access to the collision data + inline Type& collisionData(); + + + // Check + + inline bool match(const vector& pRel, scalar radius); + + //- Return the accessed status of the record + inline bool accessed() const; + + + // Edit + + //- Set the accessed property of the record to accessed + inline void setAccessed(); + + //- Set the accessed property of the record to unaccessed + inline void setUnaccessed(); + + + // Member Operators + + void operator=(const WallCollisionRecord&); + + + // Friend Operators + + friend bool operator== + ( + const WallCollisionRecord&, + const WallCollisionRecord& + ); + + friend bool operator!= + ( + const WallCollisionRecord&, + const WallCollisionRecord& + ); + + + // IOstream Operators + + friend Istream& operator>> + ( + Istream&, + WallCollisionRecord& + ); + + friend Ostream& operator<< + ( + Ostream&, + const WallCollisionRecord& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "WallCollisionRecordI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "WallCollisionRecord.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecordI.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecordI.H new file mode 100644 index 0000000000..1a9a9feb0b --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecordI.H @@ -0,0 +1,143 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +inline bool Foam::WallCollisionRecord::match +( + const vector& pRel, + scalar radius +) +{ + scalar magpRel_= mag(pRel_); + + scalar magpRel = mag(pRel); + + // Using the new data as the acceptance criterion + scalar cosAcceptanceAngle = magpRel/radius; + + if (cosAcceptanceAngle > 1.0) + { + Info<< "pRel_ " << pRel_ << " " << magpRel_ << nl + << "pRel " << pRel << " " << magpRel << nl + << "unit vector dot product " << (pRel & pRel_)/(magpRel_*magpRel) + << nl << "cosAcceptanceAngle " << cosAcceptanceAngle + << endl; + + FatalErrorIn + ( + "inline bool Foam::WallCollisionRecord::match" + "(" + "const vector& pRel," + "scalar radius" + ") const" + ) + << "Problem with matching WallCollisionRecord." << nl + << "The given radius, " << radius << ", is smaller than distance " + << "to the relative position of the WallInteractionSite, " + << magpRel << nl + << abort(FatalError); + } + + // Are the test and recorded pRel (relative position vectors) + // aligned to within the calculated tolerance? + bool matched = (pRel & pRel_)/(magpRel_*magpRel) > cosAcceptanceAngle; + + if (matched) + { + pRel_ = pRel; + } + + return matched; +} + + +template +inline const Type& +Foam::WallCollisionRecord::collisionData() const +{ + return data_; +} + + +template +inline Type& Foam::WallCollisionRecord::collisionData() +{ + return data_; +} + + +template +inline bool Foam::WallCollisionRecord::accessed() const +{ + return accessed_; +} + + +template +inline void Foam::WallCollisionRecord::setAccessed() +{ + accessed_ = true; +} + + +template +inline void Foam::WallCollisionRecord::setUnaccessed() +{ + accessed_ = false; +} + + +// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * // + +template +inline bool Foam::operator== +( + const WallCollisionRecord& a, + const WallCollisionRecord& b +) +{ + return + ( + a.accessed_ == b.accessed_ + && a.pRel_ == b.pRel_ + && a.data_ == b.data_ + ); +} + + +template +inline bool Foam::operator!= +( + const WallCollisionRecord& a, + const WallCollisionRecord& b +) +{ + return !(a == b); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecordIO.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecordIO.C new file mode 100644 index 0000000000..afc35b5b09 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/CollisionRecordList/WallCollisionRecord/WallCollisionRecordIO.C @@ -0,0 +1,86 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "WallCollisionRecord.H" +#include "IOstreams.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::WallCollisionRecord::WallCollisionRecord(Istream& is) +: + accessed_(is), + pRel_(is), + data_(is) +{ + // Check state of Istream + is.check + ( + "Foam::WallCollisionRecord::WallCollisionRecord(Foam::Istream&)" + ); +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template +Foam::Istream& Foam::operator>>(Istream& is, WallCollisionRecord& wCR) +{ + is >> wCR.accessed_ >> wCR.pRel_ >> wCR.data_; + + // Check state of Istream + is.check + ( + "Foam::Istream&" + "Foam::operator>>(Foam::Istream&, Foam::WallCollisionRecord&)" + ); + + return is; +} + + +template +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const WallCollisionRecord& wCR +) +{ + os << wCR.accessed_ + << token::SPACE << wCR.pRel_ + << token::SPACE << wCR.data_; + + // Check state of Ostream + os.check + ( + "Foam::Ostream& Foam::operator<<(Foam::Ostream&, " + "const Foam::WallCollisionRecord&)" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H index 84123c89f4..9b8691c534 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H @@ -268,7 +268,7 @@ protected: vector UTurb_; //- Particle collision records - CollisionRecordList collisionRecords_; + CollisionRecordList collisionRecords_; // Cell-based quantities @@ -400,7 +400,8 @@ public: inline const vector& UTurb() const; //- Return const access to the collision records - inline const CollisionRecordList& collisionRecords() const; + inline const CollisionRecordList& + collisionRecords() const; // Edit @@ -439,7 +440,7 @@ public: inline vector& UTurb(); //- Return access to collision records - inline CollisionRecordList& collisionRecords(); + inline CollisionRecordList& collisionRecords(); // Helper functions diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H index ceef9ca8b2..e551c38b9e 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H @@ -348,7 +348,7 @@ inline bool& Foam::KinematicParcel::active() template -inline const Foam::CollisionRecordList& +inline const Foam::CollisionRecordList& Foam::KinematicParcel::collisionRecords() const { return collisionRecords_; @@ -426,7 +426,7 @@ inline Foam::vector& Foam::KinematicParcel::UTurb() template -inline Foam::CollisionRecordList& +inline Foam::CollisionRecordList& Foam::KinematicParcel::collisionRecords() { return collisionRecords_; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C index 6c10eff509..54bf3ab659 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.C @@ -198,20 +198,20 @@ void Foam::PairSpringSliderDashpot::evaluatePair scalar deltaT = this->owner().mesh().time().deltaTValue(); vector& tangentialOverlap_AB = - pA.collisionRecords().matchRecord + pA.collisionRecords().matchPairRecord ( pB.origProc(), pB.origId() ).collisionData(); vector& tangentialOverlap_BA = - pB.collisionRecords().matchRecord + pB.collisionRecords().matchPairRecord ( pA.origProc(), pA.origId() ).collisionData(); - vector deltaTangentialOverlap_AB = USlip_AB * deltaT; + vector deltaTangentialOverlap_AB = USlip_AB*deltaT; tangentialOverlap_AB += deltaTangentialOverlap_AB; tangentialOverlap_BA += -deltaTangentialOverlap_AB; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.H b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.H index 18b3075337..58cd385012 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairModel/PairSpringSliderDashpot/PairSpringSliderDashpot.H @@ -33,7 +33,7 @@ Description #define PairSpringSliderDashpot_H #include "PairModel.H" -#include "CollisionRecord.H" +#include "CollisionRecordList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C index 60c4218a75..4bf524e387 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C @@ -100,11 +100,10 @@ void Foam::WallSpringSliderDashpot::evaluateWall scalar deltaT = this->owner().mesh().time().deltaTValue(); - // For remembering previous overlap - // vector deltaTangentialOverlap_PW = USlip_PW * deltaT; - // tangentialOverlap_PW += deltaTangentialOverlap_PW; + vector& tangentialOverlap_PW = + p.collisionRecords().matchWallRecord(-r_PW, pREff).collisionData(); - vector tangentialOverlap_PW = USlip_PW * deltaT; + tangentialOverlap_PW += USlip_PW*deltaT; scalar tangentialOverlapMag = mag(tangentialOverlap_PW); @@ -124,7 +123,7 @@ void Foam::WallSpringSliderDashpot::evaluateWall fT_PW = -mu_*mag(fN_PW)*USlip_PW/mag(USlip_PW); - // tangentialOverlap_PW = vector::zero; + tangentialOverlap_PW = vector::zero; } else { From 361b1533431b736ffdc529f5dcf868e4d336c14c Mon Sep 17 00:00:00 2001 From: henry Date: Tue, 25 May 2010 18:45:25 +0100 Subject: [PATCH 5/5] Final iteration information now available in mesh::data (used to be mesh::fvData) Relaxation and solution parameters for the final iteration in PIMPLE loops are now selected according to the value of the "finalIteration" entry in the mesh::data dictionary. rhoPimpleFoam significantly updates and now replaces rhoPisoFoam. --- .../solvers/combustion/fireFoam/UEqn.H | 35 ++----- .../solvers/combustion/fireFoam/fireFoam.C | 11 +++ .../solvers/combustion/fireFoam/pEqn.H | 22 +++-- .../solvers/combustion/rhoReactingFoam/pEqn.H | 44 +++++---- .../rhoReactingFoam/rhoReactingFoam.C | 13 ++- .../solvers/compressible/rhoPimpleFoam/UEqn.H | 18 +--- .../compressible/rhoPimpleFoam/createFields.H | 10 +- .../solvers/compressible/rhoPimpleFoam/hEqn.H | 12 +-- .../solvers/compressible/rhoPimpleFoam/pEqn.H | 80 +++++++--------- .../rhoPimpleFoam/rhoPimpleFoam.C | 22 ++++- .../compressible/rhoPisoFoam/Make/files | 3 - .../compressible/rhoPisoFoam/Make/options | 13 --- .../solvers/compressible/rhoPisoFoam/UEqn.H | 11 --- .../compressible/rhoPisoFoam/createFields.H | 58 ------------ .../solvers/compressible/rhoPisoFoam/hEqn.H | 12 --- .../solvers/compressible/rhoPisoFoam/pEqn.H | 68 -------------- .../compressible/rhoPisoFoam/rhoPisoFoam.C | 93 ------------------- .../rhoPorousMRFPimpleFoam/UEqn.H | 18 +--- .../rhoPorousMRFPimpleFoam/pEqn.H | 50 +++++----- .../rhoPorousMRFPimpleFoam.C | 23 +++-- .../rhoPorousSimpleFoam/createFields.H | 9 +- .../compressible/rhoPorousSimpleFoam/hEqn.H | 4 +- .../compressible/rhoPorousSimpleFoam/pEqn.H | 9 +- .../compressible/rhoSimpleFoam/createFields.H | 2 +- .../buoyantBoussinesqPimpleFoam/Make/files | 3 + .../Make/options | 0 .../TEqn.H | 1 - .../UEqn.H | 0 .../buoyantBoussinesqPimpleFoam.C} | 40 ++++++-- .../createFields.H | 6 +- .../buoyantBoussinesqPimpleFoam/pEqn.H | 52 +++++++++++ .../buoyantBoussinesqPisoFoam/Make/files | 3 - .../buoyantBoussinesqPisoFoam/pEqn.H | 41 -------- .../heatTransfer/buoyantPimpleFoam/Make/files | 3 + .../Make/options | 0 .../UEqn.H | 0 .../buoyantPimpleFoam.C} | 46 ++++++--- .../createFields.H | 0 .../hEqn.H | 0 .../pEqn.H | 47 ++++++---- .../heatTransfer/buoyantPisoFoam/Make/files | 3 - .../heatTransfer/buoyantSimpleFoam/pEqn.H | 11 +-- .../incompressible/pimpleDyMFoam/UEqn.H | 16 ---- .../incompressible/pimpleFoam/Allwmake | 8 ++ .../solvers/incompressible/pimpleFoam/UEqn.H | 18 +--- .../solvers/incompressible/pimpleFoam/pEqn.H | 32 +++---- .../{ => pimpleFoam}/pimpleDyMFoam/Make/files | 0 .../pimpleDyMFoam/Make/options | 1 + .../pimpleDyMFoam/correctPhi.H | 0 .../pimpleDyMFoam/createFields.H | 0 .../pimpleFoam/pimpleDyMFoam/pEqn.H | 55 +++++++++++ .../pimpleDyMFoam/pimpleDyMFoam.C | 67 +++---------- .../pimpleDyMFoam/readControls.H | 4 +- .../incompressible/pimpleFoam/pimpleFoam.C | 11 +++ .../multiphase/twoLiquidMixingFoam/UEqn.H | 12 +-- .../multiphase/twoLiquidMixingFoam/pEqn.H | 24 ++--- .../twoLiquidMixingFoam/twoLiquidMixingFoam.C | 11 +++ src/OpenFOAM/Make/files | 2 + .../GeometricField/GeometricField.C | 37 +++++++- .../GeometricField/GeometricField.H | 5 + .../fvData.C => OpenFOAM/meshes/data/data.C} | 12 +-- .../fvData.H => OpenFOAM/meshes/data/data.H} | 25 ++--- src/finiteVolume/Make/files | 1 - .../fvMatrices/fvMatrix/fvMatrix.C | 16 +++- .../fvMatrices/fvMatrix/fvMatrixSolve.C | 33 ++++++- src/finiteVolume/fvMesh/fvMesh.C | 6 +- src/finiteVolume/fvMesh/fvMesh.H | 4 +- .../les/pitzDaily/0/B | 0 .../les/pitzDaily/0/T | 0 .../les/pitzDaily/0/U | 10 +- .../les/pitzDaily/0/alphaSgs | 0 .../les/pitzDaily/0/k | 0 .../les/pitzDaily/0/muSgs | 0 .../les/pitzDaily/0/muTilda | 0 .../les/pitzDaily/0/p | 10 +- .../les/pitzDaily/constant/LESProperties | 0 .../pitzDaily/constant/polyMesh/blockMeshDict | 0 .../les/pitzDaily/constant/polyMesh/boundary | 2 +- .../constant/thermophysicalProperties | 0 .../pitzDaily/constant/turbulenceProperties | 0 .../les/pitzDaily/system/controlDict | 2 +- .../les/pitzDaily/system/fvSchemes | 7 +- .../les/pitzDaily/system/fvSolution | 27 ++++-- .../rhoPimpleFoam/{ => ras}/angledDuct/0/T | 0 .../rhoPimpleFoam/{ => ras}/angledDuct/0/U | 0 .../{ => ras}/angledDuct/0/alphat | 0 .../{ => ras}/angledDuct/0/epsilon | 0 .../rhoPimpleFoam/{ => ras}/angledDuct/0/k | 0 .../rhoPimpleFoam/{ => ras}/angledDuct/0/mut | 0 .../rhoPimpleFoam/{ => ras}/angledDuct/0/p | 0 .../angledDuct/constant/RASProperties | 0 .../constant/polyMesh/blockMeshDict | 0 .../constant/polyMesh/blockMeshDict.m4 | 0 .../angledDuct/constant/polyMesh/boundary | 0 .../{ => ras}/angledDuct/constant/porousZones | 0 .../constant/thermophysicalProperties | 0 .../angledDuct/constant/turbulenceProperties | 0 .../{ => ras}/angledDuct/system/controlDict | 0 .../{ => ras}/angledDuct/system/fvSchemes | 0 .../{ => ras}/angledDuct/system/fvSolution | 25 ++--- .../ras/cavity/0/R | 0 .../ras/cavity/0/T | 0 .../ras/cavity/0/U | 0 .../ras/cavity/0/alphat | 0 .../ras/cavity/0/epsilon | 0 .../ras/cavity/0/k | 0 .../ras/cavity/0/mut | 0 .../ras/cavity/0/omega | 0 .../ras/cavity/0/p | 0 .../ras/cavity/constant/RASProperties | 0 .../cavity/constant/polyMesh/blockMeshDict | 0 .../ras/cavity/constant/polyMesh/boundary | 4 +- .../cavity/constant/thermophysicalProperties | 0 .../ras/cavity/constant/turbulenceProperties | 0 .../ras/cavity/system/controlDict | 6 +- .../ras/cavity/system/fvSchemes | 0 .../ras/cavity/system/fvSolution | 19 +++- .../mdEquilibrationFoam/periodicCubeArgon/0/U | 37 -------- .../mdEquilibrationFoam/periodicCubeWater/0/U | 37 -------- .../hotRoom/0/T | 0 .../hotRoom/0/T.org | 0 .../hotRoom/0/U | 0 .../hotRoom/0/alphat | 0 .../hotRoom/0/epsilon | 0 .../hotRoom/0/k | 0 .../hotRoom/0/nut | 0 .../hotRoom/0/p | 0 .../hotRoom/Allclean | 0 .../hotRoom/Allrun | 2 +- .../hotRoom/constant/RASProperties | 0 .../hotRoom/constant/g | 0 .../hotRoom/constant/polyMesh/blockMeshDict | 0 .../hotRoom/constant/polyMesh/boundary | 2 +- .../hotRoom/constant/transportProperties | 0 .../hotRoom/system/controlDict | 8 +- .../hotRoom/system/fvSchemes | 0 .../hotRoom/system/fvSolution | 21 ++++- .../hotRoom/0/T | 0 .../hotRoom/0/T.org | 0 .../hotRoom/0/U | 0 .../hotRoom/0/alphat | 0 .../hotRoom/0/epsilon | 0 .../hotRoom/0/k | 0 .../hotRoom/0/mut | 0 .../hotRoom/0/p | 0 .../hotRoom/Allclean | 0 .../hotRoom/Allrun | 0 .../hotRoom/constant/RASProperties | 0 .../hotRoom/constant/g | 0 .../hotRoom/constant/polyMesh/blockMeshDict | 0 .../hotRoom/constant/polyMesh/boundary | 2 +- .../hotRoom/constant/thermophysicalProperties | 0 .../hotRoom/constant/turbulenceProperties | 0 .../hotRoom/setHotRoom/Make/files | 0 .../hotRoom/setHotRoom/Make/options | 0 .../hotRoom/setHotRoom/createFields.H | 0 .../hotRoom/setHotRoom/setHotRoom.C | 0 .../hotRoom/system/controlDict | 6 +- .../hotRoom/system/fvSchemes | 0 .../hotRoom/system/fvSolution | 17 +++- .../verticalChannel/0/U | 4 +- 161 files changed, 685 insertions(+), 859 deletions(-) delete mode 100644 applications/solvers/compressible/rhoPisoFoam/Make/files delete mode 100644 applications/solvers/compressible/rhoPisoFoam/Make/options delete mode 100644 applications/solvers/compressible/rhoPisoFoam/UEqn.H delete mode 100644 applications/solvers/compressible/rhoPisoFoam/createFields.H delete mode 100644 applications/solvers/compressible/rhoPisoFoam/hEqn.H delete mode 100644 applications/solvers/compressible/rhoPisoFoam/pEqn.H delete mode 100644 applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/files rename applications/solvers/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/Make/options (100%) rename applications/solvers/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/TEqn.H (99%) rename applications/solvers/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/UEqn.H (100%) rename applications/solvers/heatTransfer/{buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C => buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C} (77%) rename applications/solvers/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/createFields.H (92%) create mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H delete mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/files delete mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H create mode 100644 applications/solvers/heatTransfer/buoyantPimpleFoam/Make/files rename applications/solvers/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/Make/options (100%) rename applications/solvers/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/UEqn.H (100%) rename applications/solvers/heatTransfer/{buoyantPisoFoam/buoyantPisoFoam.C => buoyantPimpleFoam/buoyantPimpleFoam.C} (76%) rename applications/solvers/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/createFields.H (100%) rename applications/solvers/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hEqn.H (100%) rename applications/solvers/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/pEqn.H (58%) delete mode 100644 applications/solvers/heatTransfer/buoyantPisoFoam/Make/files delete mode 100644 applications/solvers/incompressible/pimpleDyMFoam/UEqn.H create mode 100755 applications/solvers/incompressible/pimpleFoam/Allwmake rename applications/solvers/incompressible/{ => pimpleFoam}/pimpleDyMFoam/Make/files (100%) rename applications/solvers/incompressible/{ => pimpleFoam}/pimpleDyMFoam/Make/options (98%) rename applications/solvers/incompressible/{ => pimpleFoam}/pimpleDyMFoam/correctPhi.H (100%) rename applications/solvers/incompressible/{ => pimpleFoam}/pimpleDyMFoam/createFields.H (100%) create mode 100644 applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H rename applications/solvers/incompressible/{ => pimpleFoam}/pimpleDyMFoam/pimpleDyMFoam.C (65%) rename applications/solvers/incompressible/{ => pimpleFoam}/pimpleDyMFoam/readControls.H (81%) rename src/{finiteVolume/finiteVolume/fvData/fvData.C => OpenFOAM/meshes/data/data.C} (87%) rename src/{finiteVolume/finiteVolume/fvData/fvData.H => OpenFOAM/meshes/data/data.H} (85%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/0/B (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/0/T (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/0/U (93%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/0/alphaSgs (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/0/k (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/0/muSgs (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/0/muTilda (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/0/p (93%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/constant/LESProperties (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/constant/polyMesh/blockMeshDict (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/constant/polyMesh/boundary (95%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/constant/thermophysicalProperties (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/constant/turbulenceProperties (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/system/controlDict (98%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/system/fvSchemes (91%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/les/pitzDaily/system/fvSolution (77%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/0/T (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/0/U (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/0/alphat (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/0/epsilon (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/0/k (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/0/mut (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/0/p (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/constant/RASProperties (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/constant/polyMesh/blockMeshDict (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/constant/polyMesh/blockMeshDict.m4 (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/constant/polyMesh/boundary (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/constant/porousZones (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/constant/thermophysicalProperties (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/constant/turbulenceProperties (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/system/controlDict (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/system/fvSchemes (100%) rename tutorials/compressible/rhoPimpleFoam/{ => ras}/angledDuct/system/fvSolution (81%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/0/R (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/0/T (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/0/U (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/0/alphat (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/0/epsilon (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/0/k (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/0/mut (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/0/omega (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/0/p (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/constant/RASProperties (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/constant/polyMesh/blockMeshDict (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/constant/polyMesh/boundary (92%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/constant/thermophysicalProperties (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/constant/turbulenceProperties (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/system/controlDict (94%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/system/fvSchemes (100%) rename tutorials/compressible/{rhoPisoFoam => rhoPimpleFoam}/ras/cavity/system/fvSolution (87%) delete mode 100644 tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/0/U delete mode 100644 tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/0/U rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/0/T (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/0/T.org (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/0/U (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/0/alphat (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/0/epsilon (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/0/k (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/0/nut (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/0/p (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/Allclean (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/Allrun (83%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/constant/RASProperties (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/constant/g (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/constant/polyMesh/blockMeshDict (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/constant/polyMesh/boundary (94%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/constant/transportProperties (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/system/controlDict (91%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/system/fvSchemes (100%) rename tutorials/heatTransfer/{buoyantBoussinesqPisoFoam => buoyantBoussinesqPimpleFoam}/hotRoom/system/fvSolution (81%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/0/T (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/0/T.org (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/0/U (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/0/alphat (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/0/epsilon (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/0/k (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/0/mut (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/0/p (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/Allclean (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/Allrun (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/constant/RASProperties (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/constant/g (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/constant/polyMesh/blockMeshDict (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/constant/polyMesh/boundary (94%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/constant/thermophysicalProperties (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/constant/turbulenceProperties (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/setHotRoom/Make/files (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/setHotRoom/Make/options (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/setHotRoom/createFields.H (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/setHotRoom/setHotRoom.C (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/system/controlDict (93%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/system/fvSchemes (100%) rename tutorials/heatTransfer/{buoyantPisoFoam => buoyantPimpleFoam}/hotRoom/system/fvSolution (86%) diff --git a/applications/solvers/combustion/fireFoam/UEqn.H b/applications/solvers/combustion/fireFoam/UEqn.H index 3b61f2c7b9..4a2d03490d 100644 --- a/applications/solvers/combustion/fireFoam/UEqn.H +++ b/applications/solvers/combustion/fireFoam/UEqn.H @@ -7,30 +7,13 @@ fvVectorMatrix UEqn UEqn.relax(); -if (oCorr == nOuterCorr - 1) -{ - solve +solve +( + UEqn + == + fvc::reconstruct ( - UEqn - == - fvc::reconstruct - ( - fvc::interpolate(rho)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() - ), - mesh.solver("UFinal") - ); -} -else -{ - solve - ( - UEqn - == - fvc::reconstruct - ( - fvc::interpolate(rho)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() - ) - ); -} + fvc::interpolate(rho)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() + ) +); diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C index 20f418e035..cff27389d0 100644 --- a/applications/solvers/combustion/fireFoam/fireFoam.C +++ b/applications/solvers/combustion/fireFoam/fireFoam.C @@ -70,6 +70,12 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); diff --git a/applications/solvers/combustion/fireFoam/pEqn.H b/applications/solvers/combustion/fireFoam/pEqn.H index 907398581f..8d1ed0d9f8 100644 --- a/applications/solvers/combustion/fireFoam/pEqn.H +++ b/applications/solvers/combustion/fireFoam/pEqn.H @@ -30,14 +30,20 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) closedVolume = p.needReference(); - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { diff --git a/applications/solvers/combustion/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/rhoReactingFoam/pEqn.H index a58cd28dec..c76ab5110b 100644 --- a/applications/solvers/combustion/rhoReactingFoam/pEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/pEqn.H @@ -31,14 +31,20 @@ - fvm::laplacian(rho*rUA, p) ); - if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(); - } + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -64,14 +70,20 @@ - fvm::laplacian(rho*rUA, p) ); - if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(); - } + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { diff --git a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C index 3a5bb614fe..e361d5f0cc 100644 --- a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C +++ b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C @@ -69,8 +69,14 @@ int main(int argc, char *argv[]) #include "chemistry.H" #include "rhoEqn.H" - for (label ocorr=1; ocorr <= nOuterCorr; ocorr++) + for (label oCorr=1; oCorr <= nOuterCorr; oCorr++) { + bool finalIter = oCorr == nOuterCorr-1; + if (finalIter) + { + mesh.data::add("finalIteration", true); + } + #include "UEqn.H" #include "YEqn.H" #include "hsEqn.H" @@ -80,6 +86,11 @@ int main(int argc, char *argv[]) { #include "pEqn.H" } + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } turbulence->correct(); diff --git a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H index 9c12cf9585..954907d203 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H @@ -7,27 +7,13 @@ tmp UEqn + turbulence->divDevRhoReff(U) ); -if (oCorr == nOuterCorr-1) -{ - UEqn().relax(1); -} -else -{ - UEqn().relax(); -} +UEqn().relax(); volScalarField rUA = 1.0/UEqn().A(); if (momentumPredictor) { - if (oCorr == nOuterCorr-1) - { - solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal")); - } - else - { - solve(UEqn() == -fvc::grad(p)); - } + solve(UEqn() == -fvc::grad(p)); } else { diff --git a/applications/solvers/compressible/rhoPimpleFoam/createFields.H b/applications/solvers/compressible/rhoPimpleFoam/createFields.H index 1433ea5cc3..4642e10ef8 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPimpleFoam/createFields.H @@ -37,12 +37,7 @@ mesh ); -# include "compressibleCreatePhi.H" - - dimensionedScalar pMin - ( - mesh.solutionDict().subDict("PIMPLE").lookup("pMin") - ); + #include "compressibleCreatePhi.H" Info<< "Creating turbulence model\n" << endl; autoPtr turbulence @@ -56,9 +51,6 @@ ) ); - //dimensionedScalar initialMass = fvc::domainIntegrate(rho); - - Info<< "Creating field DpDt\n" << endl; volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoPimpleFoam/hEqn.H b/applications/solvers/compressible/rhoPimpleFoam/hEqn.H index e66b99442b..3125cc3ffa 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/hEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/hEqn.H @@ -8,16 +8,8 @@ DpDt ); - if (oCorr == nOuterCorr-1) - { - hEqn.relax(); - hEqn.solve(mesh.solver("hFinal")); - } - else - { - hEqn.relax(); - hEqn.solve(); - } + hEqn.relax(); + hEqn.solve(); thermo.correct(); } diff --git a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H index 0f3dfe450b..c0dba194e7 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H @@ -1,6 +1,5 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn().A(); U = rUA*UEqn().H(); if (nCorr <= 1) @@ -29,19 +28,20 @@ if (transonic) - fvm::laplacian(rho*rUA, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -55,7 +55,7 @@ else fvc::interpolate(rho)* ( (fvc::interpolate(U) & mesh.Sf()) - //+ fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rUA, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -68,19 +68,20 @@ else - fvm::laplacian(rho*rUA, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -92,30 +93,15 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -//if (oCorr != nOuterCorr-1) -{ - // Explicitly relax pressure for momentum corrector - p.relax(); +// Explicitly relax pressure for momentum corrector +p.relax(); - rho = thermo.rho(); - rho.relax(); - Info<< "rho max/min : " << max(rho).value() - << " " << min(rho).value() << endl; -} +// Recalculate density from the relaxed pressure +rho = thermo.rho(); +Info<< "rho max/min : " << max(rho).value() + << " " << min(rho).value() << endl; U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); - -bound(p, pMin); - -// For closed-volume cases adjust the pressure and density levels -// to obey overall mass continuity -/* -if (closedVolume) -{ - p += (initialMass - fvc::domainIntegrate(psi*p)) - /fvc::domainIntegrate(psi); -} -*/ diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index d4055f658d..5d21da05b6 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -61,15 +61,22 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - if (nOuterCorr != 1) - { - p.storePrevIter(); - rho.storePrevIter(); - } + #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/applications/solvers/compressible/rhoPisoFoam/Make/files b/applications/solvers/compressible/rhoPisoFoam/Make/files deleted file mode 100644 index 3c89295014..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rhoPisoFoam.C - -EXE = $(FOAM_APPBIN)/rhoPisoFoam diff --git a/applications/solvers/compressible/rhoPisoFoam/Make/options b/applications/solvers/compressible/rhoPisoFoam/Make/options deleted file mode 100644 index 5c62488b65..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/Make/options +++ /dev/null @@ -1,13 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ - -lbasicThermophysicalModels \ - -lspecie \ - -lcompressibleRASModels \ - -lcompressibleLESModels diff --git a/applications/solvers/compressible/rhoPisoFoam/UEqn.H b/applications/solvers/compressible/rhoPisoFoam/UEqn.H deleted file mode 100644 index 64dd52b1b0..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/UEqn.H +++ /dev/null @@ -1,11 +0,0 @@ - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - + turbulence->divDevRhoReff(U) - ); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/compressible/rhoPisoFoam/createFields.H b/applications/solvers/compressible/rhoPisoFoam/createFields.H deleted file mode 100644 index fdb706a14c..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/createFields.H +++ /dev/null @@ -1,58 +0,0 @@ - Info<< "Reading thermophysical properties\n" << endl; - - autoPtr pThermo - ( - basicPsiThermo::New(mesh) - ); - basicPsiThermo& thermo = pThermo(); - - volScalarField& p = thermo.p(); - volScalarField& h = thermo.h(); - const volScalarField& psi = thermo.psi(); - - 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 turbulence model\n" << endl; - autoPtr turbulence - ( - compressible::turbulenceModel::New - ( - rho, - U, - phi, - thermo - ) - ); - - - Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt = - fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoPisoFoam/hEqn.H b/applications/solvers/compressible/rhoPisoFoam/hEqn.H deleted file mode 100644 index ae60d3316e..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/hEqn.H +++ /dev/null @@ -1,12 +0,0 @@ -{ - solve - ( - fvm::ddt(rho, h) - + fvm::div(phi, h) - - fvm::laplacian(turbulence->alphaEff(), h) - == - DpDt - ); - - thermo.correct(); -} diff --git a/applications/solvers/compressible/rhoPisoFoam/pEqn.H b/applications/solvers/compressible/rhoPisoFoam/pEqn.H deleted file mode 100644 index 280842ecc3..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/pEqn.H +++ /dev/null @@ -1,68 +0,0 @@ -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) - ); - - 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) - ); - - 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/compressible/rhoPisoFoam/rhoPisoFoam.C b/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C deleted file mode 100644 index 105717378e..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C +++ /dev/null @@ -1,93 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 - rhoPisoFoam - -Description - Transient PISO solver for compressible, laminar or turbulent flow. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "basicPsiThermo.H" -#include "turbulenceModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - - #include "createTime.H" - #include "createMesh.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" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "rhoEqn.H" - #include "UEqn.H" - - // --- PISO loop - for (int corr=1; corr<=nCorr; corr++) - { - #include "hEqn.H" - #include "pEqn.H" - } - - turbulence->correct(); - - rho = thermo.rho(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H index 3b4ead17e7..a331d7dbb8 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H @@ -7,14 +7,7 @@ tmp UEqn + turbulence->divDevRhoReff(U) ); -if (oCorr == nOuterCorr-1) -{ - UEqn().relax(1); -} -else -{ - UEqn().relax(); -} +UEqn().relax(); mrfZones.addCoriolis(rho, UEqn()); pZones.addResistance(UEqn()); @@ -23,14 +16,7 @@ volScalarField rUA = 1.0/UEqn().A(); if (momentumPredictor) { - if (oCorr == nOuterCorr-1) - { - solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal")); - } - else - { - solve(UEqn() == -fvc::grad(p)); - } + solve(UEqn() == -fvc::grad(p)); } else { diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H index c74fb4d84b..56f8e9f3b5 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H @@ -30,19 +30,20 @@ if (transonic) - fvm::laplacian(rho*rUA, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -70,19 +71,20 @@ else - fvm::laplacian(rho*rUA, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C index 4bae5c1e7b..7f93493f3b 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C @@ -65,17 +65,23 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - if (nOuterCorr != 1) - { - p.storePrevIter(); - rho.storePrevIter(); - } - #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H b/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H index 09b75191db..5285e6e3b2 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H @@ -45,9 +45,14 @@ scalar pRefValue = 0.0; setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); - dimensionedScalar pMin + dimensionedScalar rhoMax ( - mesh.solutionDict().subDict("SIMPLE").lookup("pMin") + mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax") + ); + + dimensionedScalar rhoMin + ( + mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin") ); Info<< "Creating turbulence model\n" << endl; diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H b/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H index 9e5138de8a..ff0b91bcb7 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H @@ -5,8 +5,8 @@ - fvm::Sp(fvc::div(phi), h) - fvm::laplacian(turbulence->alphaEff(), h) == - fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)")) - - p*fvc::div(phi/fvc::interpolate(rho)) + fvc::div(phi/fvc::interpolate(rho), rho/psi, "div(U,p)") + - (rho/psi)*fvc::div(phi/fvc::interpolate(rho)) ); pZones.addEnthalpySource(thermo, rho, hEqn); diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H index 40b7cb3969..0386899612 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H @@ -1,3 +1,8 @@ +rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); +rho.relax(); + if (pressureImplicitPorosity) { U = trTU()&UEqn().H(); @@ -58,8 +63,6 @@ else U.correctBoundaryConditions(); -bound(p, pMin); - // For closed-volume cases adjust the pressure and density levels // to obey overall mass continuity if (closedVolume) @@ -69,5 +72,7 @@ if (closedVolume) } rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); rho.relax(); Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H index 122280cfac..aa3de6d6fb 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H @@ -37,7 +37,7 @@ mesh ); -# include "compressibleCreatePhi.H" + #include "compressibleCreatePhi.H" label pRefCell = 0; diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/files b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/files new file mode 100644 index 0000000000..19c4661a3c --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/files @@ -0,0 +1,3 @@ +buoyantBoussinesqPimpleFoam.C + +EXE = $(FOAM_APPBIN)/buoyantBoussinesqPimpleFoam diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options similarity index 100% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H similarity index 99% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H index ece4b8ffe5..a7a019a210 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H @@ -13,7 +13,6 @@ ); TEqn.relax(); - TEqn.solve(); rhok = 1.0 - beta*(T - TRef); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H similarity index 100% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C similarity index 77% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C index 0269b95c90..a035a20feb 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Application - buoyantBoussinesqPisoFoam + buoyantBoussinesqPimpleFoam Description Transient solver for buoyant, turbulent flow of incompressible fluids @@ -72,20 +72,40 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; #include "readTimeControls.H" - #include "readPISOControls.H" + #include "readPIMPLEControls.H" #include "CourantNo.H" #include "setDeltaT.H" - #include "UEqn.H" - #include "TEqn.H" - - // --- PISO loop - for (int corr=0; corrcorrect(); + if (nOuterCorr != 1) + { + p.storePrevIter(); + } + + #include "UEqn.H" + #include "TEqn.H" + + // --- PISO loop + for (int corr=0; corrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } + } runTime.write(); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H similarity index 92% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H index dde0e38b33..704918bb09 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H @@ -42,9 +42,9 @@ mesh ); -# include "createPhi.H" + #include "createPhi.H" -# include "readTransportProperties.H" + #include "readTransportProperties.H" Info<< "Creating turbulence model\n" << endl; autoPtr turbulence @@ -57,7 +57,7 @@ setRefCell ( p, - mesh.solutionDict().subDict("PISO"), + mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue ); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H new file mode 100644 index 0000000000..21be033f9b --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H @@ -0,0 +1,52 @@ +{ + volScalarField rUA("rUA", 1.0/UEqn.A()); + surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA)); + + U = rUA*UEqn.H(); + + phi = (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, U, phi); + + surfaceScalarField buoyancyPhi = + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); + phi += buoyancyPhi; + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::laplacian(rUAf, p) == fvc::div(phi) + ); + + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); + + if (nonOrth == nNonOrthCorr) + { + // Calculate the conservative fluxes + phi -= pEqn.flux(); + + // Explicitly relax pressure for momentum corrector + p.relax(); + + // Correct the momentum source with the pressure gradient flux + // calculated from the relaxed pressure + U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rUAf); + U.correctBoundaryConditions(); + } + } + + #include "continuityErrs.H" +} diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/files b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/files deleted file mode 100644 index d7b85221d8..0000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -buoyantBoussinesqPisoFoam.C - -EXE = $(FOAM_APPBIN)/buoyantBoussinesqPisoFoam diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H deleted file mode 100644 index ff0c26f058..0000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H +++ /dev/null @@ -1,41 +0,0 @@ -{ - volScalarField rUA("rUA", 1.0/UEqn.A()); - surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA)); - - U = rUA*UEqn.H(); - - surfaceScalarField phiU - ( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, U, phi) - ); - - phi = phiU + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::laplacian(rUAf, p) == fvc::div(phi) - ); - - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } - - if (nonOrth == nNonOrthCorr) - { - phi -= pEqn.flux(); - } - } - - U += rUA*fvc::reconstruct((phi - phiU)/rUAf); - U.correctBoundaryConditions(); - - #include "continuityErrs.H" -} diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/files b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/files new file mode 100644 index 0000000000..f4053436b5 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/files @@ -0,0 +1,3 @@ +buoyantPimpleFoam.C + +EXE = $(FOAM_APPBIN)/buoyantPimpleFoam diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/Make/options b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options similarity index 100% rename from applications/solvers/heatTransfer/buoyantPisoFoam/Make/options rename to applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H similarity index 100% rename from applications/solvers/heatTransfer/buoyantPisoFoam/UEqn.H rename to applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/buoyantPisoFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C similarity index 76% rename from applications/solvers/heatTransfer/buoyantPisoFoam/buoyantPisoFoam.C rename to applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C index cc649d221d..c4ac77758e 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/buoyantPisoFoam.C +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Application - buoyantPisoFoam + buoyantPimpleFoam Description Transient solver for buoyant, turbulent flow of compressible fluids for @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) while (runTime.run()) { #include "readTimeControls.H" - #include "readPISOControls.H" + #include "readPIMPLEControls.H" #include "compressibleCourantNo.H" #include "setDeltaT.H" @@ -69,21 +69,39 @@ int main(int argc, char *argv[]) #include "rhoEqn.H" - #include "UEqn.H" - - #include "hEqn.H" - - // --- PISO loop - - for (int corr=0; corrcorrect(); + + rho = thermo.rho(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } - turbulence->correct(); - - rho = thermo.rho(); - runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H similarity index 100% rename from applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H rename to applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/hEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/hEqn.H similarity index 100% rename from applications/solvers/heatTransfer/buoyantPisoFoam/hEqn.H rename to applications/solvers/heatTransfer/buoyantPimpleFoam/hEqn.H diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H similarity index 58% rename from applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H rename to applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H index c954c0ecb1..a1c3dbfed5 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H @@ -12,16 +12,15 @@ U = rUA*UEqn.H(); - surfaceScalarField phiU + phi = fvc::interpolate(rho)* ( - fvc::interpolate(rho) - *( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) - ) + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi) ); - phi = phiU + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); + surfaceScalarField buoyancyPhi = + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); + phi += buoyancyPhi; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { @@ -32,27 +31,39 @@ - fvm::laplacian(rhorUAf, p) ); - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { + // Calculate the conservative fluxes phi += pEqn.flux(); + + // Explicitly relax pressure for momentum corrector + p.relax(); + + // Correct the momentum source with the pressure gradient flux + // calculated from the relaxed pressure + U += rUA*fvc::reconstruct((buoyancyPhi + pEqn.flux())/rhorUAf); + U.correctBoundaryConditions(); } } // Second part of thermodynamic density update thermo.rho() += psi*p; - U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf); - U.correctBoundaryConditions(); - DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); #include "rhoEqn.H" diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/Make/files b/applications/solvers/heatTransfer/buoyantPisoFoam/Make/files deleted file mode 100644 index 65e5d52305..0000000000 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -buoyantPisoFoam.C - -EXE = $(FOAM_APPBIN)/buoyantPisoFoam diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index b0aa0852b2..de368a646e 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -22,16 +22,7 @@ ); pEqn.setReference(pRefCell, pRefValue); - - // retain the residual from the first iteration - if (nonOrth == 0) - { - pEqn.solve(); - } - else - { - pEqn.solve(); - } + pEqn.solve(); if (nonOrth == nNonOrthCorr) { diff --git a/applications/solvers/incompressible/pimpleDyMFoam/UEqn.H b/applications/solvers/incompressible/pimpleDyMFoam/UEqn.H deleted file mode 100644 index 2876a48b52..0000000000 --- a/applications/solvers/incompressible/pimpleDyMFoam/UEqn.H +++ /dev/null @@ -1,16 +0,0 @@ - fvVectorMatrix UEqn - ( - fvm::ddt(U) - + fvm::div(phi, U) - + turbulence->divDevReff(U) - ); - - if (ocorr != nOuterCorr-1) - { - UEqn.relax(); - } - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/incompressible/pimpleFoam/Allwmake b/applications/solvers/incompressible/pimpleFoam/Allwmake new file mode 100755 index 0000000000..71517c7319 --- /dev/null +++ b/applications/solvers/incompressible/pimpleFoam/Allwmake @@ -0,0 +1,8 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +wmake +wmake pimpleDyMFoam + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/incompressible/pimpleFoam/UEqn.H b/applications/solvers/incompressible/pimpleFoam/UEqn.H index 12b4260e5d..3574c6553a 100644 --- a/applications/solvers/incompressible/pimpleFoam/UEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/UEqn.H @@ -7,27 +7,13 @@ tmp UEqn + turbulence->divDevReff(U) ); -if (oCorr == nOuterCorr-1) -{ - UEqn().relax(1); -} -else -{ - UEqn().relax(); -} +UEqn().relax(); volScalarField rUA = 1.0/UEqn().A(); if (momentumPredictor) { - if (oCorr == nOuterCorr-1) - { - solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal")); - } - else - { - solve(UEqn() == -fvc::grad(p)); - } + solve(UEqn() == -fvc::grad(p)); } else { diff --git a/applications/solvers/incompressible/pimpleFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pEqn.H index 41f99bb542..b5dc23a58c 100644 --- a/applications/solvers/incompressible/pimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/pEqn.H @@ -21,19 +21,20 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) pEqn.setReference(pRefCell, pRefValue); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -43,11 +44,8 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) #include "continuityErrs.H" -// Explicitly relax pressure for momentum corrector except for last corrector -if (oCorr != nOuterCorr-1) -{ - p.relax(); -} +// Explicitly relax pressure for momentum corrector +p.relax(); U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); diff --git a/applications/solvers/incompressible/pimpleDyMFoam/Make/files b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/files similarity index 100% rename from applications/solvers/incompressible/pimpleDyMFoam/Make/files rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/files diff --git a/applications/solvers/incompressible/pimpleDyMFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options similarity index 98% rename from applications/solvers/incompressible/pimpleDyMFoam/Make/options rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options index 40023adad7..6af3735d63 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I.. \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ diff --git a/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/correctPhi.H similarity index 100% rename from applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/correctPhi.H diff --git a/applications/solvers/incompressible/pimpleDyMFoam/createFields.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createFields.H similarity index 100% rename from applications/solvers/incompressible/pimpleDyMFoam/createFields.H rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createFields.H diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H new file mode 100644 index 0000000000..155f43a632 --- /dev/null +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H @@ -0,0 +1,55 @@ +U = rAU*UEqn().H(); + +if (nCorr <= 1) +{ + UEqn.clear(); +} + +phi = (fvc::interpolate(U) & mesh.Sf()); + +if (p.needReference()) +{ + fvc::makeRelative(phi, U); + adjustPhi(phi, U, p); + fvc::makeAbsolute(phi, U); +} + +for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) +{ + fvScalarMatrix pEqn + ( + fvm::laplacian(rAU, p) == fvc::div(phi) + ); + + pEqn.setReference(pRefCell, pRefValue); + + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); + + if (nonOrth == nNonOrthCorr) + { + phi -= pEqn.flux(); + } +} + +#include "continuityErrs.H" + +p.relax(); + +// Make the fluxes relative to the mesh motion +fvc::makeRelative(phi, U); + +U -= rAU*fvc::grad(p); +U.correctBoundaryConditions(); diff --git a/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C similarity index 65% rename from applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C index ccb209b61a..0ec3c5b0aa 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C @@ -84,8 +84,14 @@ int main(int argc, char *argv[]) } // --- PIMPLE loop - for (int ocorr=0; ocorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/applications/solvers/incompressible/pimpleDyMFoam/readControls.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/readControls.H similarity index 81% rename from applications/solvers/incompressible/pimpleDyMFoam/readControls.H rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/readControls.H index 3bd20c5c5c..ef396ec9ff 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/readControls.H +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/readControls.H @@ -1,5 +1,5 @@ -# include "readTimeControls.H" -# include "readPIMPLEControls.H" + #include "readTimeControls.H" + #include "readPIMPLEControls.H" bool correctPhi = false; if (pimple.found("correctPhi")) diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index 5fb87ef128..780c51e7f3 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -62,6 +62,12 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H index c0daa0e7ca..ed0fbf776c 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H @@ -15,14 +15,7 @@ //- fvc::div(rho*turbulence->nuEff()*dev(fvc::grad(U)().T())) ); - if (oCorr == nOuterCorr-1) - { - UEqn.relax(1); - } - else - { - UEqn.relax(); - } + UEqn.relax(); if (momentumPredictor) { @@ -34,7 +27,6 @@ ( fvc::interpolate(rho)*(g & mesh.Sf()) - mesh.magSf()*fvc::snGrad(p) - ), - mesh.solver(oCorr == nOuterCorr-1 ? "UFinal" : "U") + ) ); } diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H index f1e07558cb..25003e1b25 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H @@ -22,18 +22,20 @@ pEqn.setReference(pRefCell, pRefValue); - if + pEqn.solve ( - corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C index f3b98ba8fe..cf6fc95a9c 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C @@ -68,6 +68,12 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index bf28d148dd..30defe5104 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -543,4 +543,6 @@ $(writers)/gnuplotGraph/gnuplotGraph.C $(writers)/xmgrGraph/xmgrGraph.C $(writers)/jplotGraph/jplotGraph.C +meshes/data/data.C + LIB = $(FOAM_LIBBIN)/libOpenFOAM diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index b4960c341d..f420291fd6 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -27,6 +27,7 @@ License #include "Time.H" #include "demandDrivenData.H" #include "dictionary.H" +#include "data.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -918,6 +919,15 @@ bool Foam::GeometricField::needReference() const template class PatchField, class GeoMesh> void Foam::GeometricField::relax(const scalar alpha) { + if (debug) + { + InfoIn + ( + "GeometricField::relax" + "(const scalar alpha)" + ) << "Relaxing" << endl << this->info() << " by " << alpha << endl; + } + operator==(prevIter() + alpha*(*this - prevIter())); } @@ -925,16 +935,33 @@ void Foam::GeometricField::relax(const scalar alpha) template class PatchField, class GeoMesh> void Foam::GeometricField::relax() { - scalar alpha = 0; + word name = this->name(); - if (this->mesh().relax(this->name())) + if (this->mesh().data::lookupOrDefault("finalIteration", false)) { - alpha = this->mesh().relaxationFactor(this->name()); + name += "Final"; } - if (alpha > 0) + if (this->mesh().relax(name)) { - relax(alpha); + relax(this->mesh().relaxationFactor(name)); + } +} + + +template class PatchField, class GeoMesh> +Foam::word Foam::GeometricField::select +( + bool final +) const +{ + if (final) + { + return this->name() + "Final"; + } + else + { + return this->name(); } } diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H index fa8ec179e4..992b4a5c83 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H @@ -476,6 +476,11 @@ public: // alpha is read from controlDict void relax(); + //- Select the final iteration parameters if `final' is true + // by returning the field name + "Final" + // otherwise the standard parameters by returning the field name + word select(bool final) const; + // Member function *this operators diff --git a/src/finiteVolume/finiteVolume/fvData/fvData.C b/src/OpenFOAM/meshes/data/data.C similarity index 87% rename from src/finiteVolume/finiteVolume/fvData/fvData.C rename to src/OpenFOAM/meshes/data/data.C index e662c3d394..6e8813f779 100644 --- a/src/finiteVolume/finiteVolume/fvData/fvData.C +++ b/src/OpenFOAM/meshes/data/data.C @@ -23,23 +23,23 @@ License \*---------------------------------------------------------------------------*/ -#include "fvData.H" +#include "data.H" #include "Time.H" #include "lduMatrix.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -int Foam::fvData::debug(Foam::debug::debugSwitch("fvData", false)); +int Foam::data::debug(Foam::debug::debugSwitch("data", false)); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::fvData::fvData(const objectRegistry& obr) +Foam::data::data(const objectRegistry& obr) : IOdictionary ( IOobject ( - "fvData", + "data", obr.time().system(), obr, IOobject::NO_READ, @@ -53,13 +53,13 @@ Foam::fvData::fvData(const objectRegistry& obr) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const Foam::dictionary& Foam::fvData::solverPerformanceDict() const +const Foam::dictionary& Foam::data::solverPerformanceDict() const { return subDict("solverPerformance"); } -void Foam::fvData::setSolverPerformance +void Foam::data::setSolverPerformance ( const word& name, const lduMatrix::solverPerformance& sp diff --git a/src/finiteVolume/finiteVolume/fvData/fvData.H b/src/OpenFOAM/meshes/data/data.H similarity index 85% rename from src/finiteVolume/finiteVolume/fvData/fvData.H rename to src/OpenFOAM/meshes/data/data.H index ab6c27e33b..c8e6f98421 100644 --- a/src/finiteVolume/finiteVolume/fvData/fvData.H +++ b/src/OpenFOAM/meshes/data/data.H @@ -22,20 +22,21 @@ License along with OpenFOAM. If not, see . Class - Foam::fvData + Foam::data Description - Database for finite volume solution data, solver performance and - other reduced data. fvMesh is derived from fvData so that all fields have - access to the fvData from the mesh reference they hold. + Database for solution data, solver performance and other reduced data. + + fvMesh is derived from data so that all fields have access to the data from + the mesh reference they hold. SourceFiles - fvData.C + data.C \*---------------------------------------------------------------------------*/ -#ifndef fvData_H -#define fvData_H +#ifndef data_H +#define data_H #include "IOdictionary.H" #include "lduMatrix.H" @@ -46,20 +47,20 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class fvData Declaration + Class data Declaration \*---------------------------------------------------------------------------*/ -class fvData +class data : public IOdictionary { // Private Member Functions //- Disallow default bitwise copy construct - fvData(const fvData&); + data(const data&); //- Disallow default bitwise assignment - void operator=(const fvData&); + void operator=(const data&); public: @@ -71,7 +72,7 @@ public: // Constructors //- Construct for objectRegistry - fvData(const objectRegistry& obr); + data(const objectRegistry& obr); // Member Functions diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 85714b5f9c..cdb0a70337 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -270,7 +270,6 @@ $(multivariateSchemes)/limitedCubic/multivariateLimitedCubic.C finiteVolume/fv/fv.C finiteVolume/fvSchemes/fvSchemes.C -finiteVolume/fvData/fvData.C ddtSchemes = finiteVolume/ddtSchemes $(ddtSchemes)/ddtScheme/ddtSchemes.C diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index fcb479465b..ea181f7761 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -506,6 +506,13 @@ void Foam::fvMatrix::relax(const scalar alpha) return; } + if (debug) + { + InfoIn("fvMatrix::relax(const scalar alpha)") + << "Relaxing " << psi_.name() << " by " << alpha + << endl; + } + Field& S = source(); scalarField& D = diag(); @@ -591,9 +598,14 @@ void Foam::fvMatrix::relax(const scalar alpha) template void Foam::fvMatrix::relax() { - if (psi_.mesh().relax(psi_.name())) + word name = psi_.select + ( + psi_.mesh().data::lookupOrDefault("finalIteration", false) + ); + + if (psi_.mesh().relax(name)) { - relax(psi_.mesh().relaxationFactor(psi_.name())); + relax(psi_.mesh().relaxationFactor(name)); } } diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C index e1984ef878..b4889660f6 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C @@ -167,21 +167,48 @@ template Foam::autoPtr::fvSolver> Foam::fvMatrix::solver() { - return solver(psi_.mesh().solverDict(psi_.name())); + return solver + ( + psi_.mesh().solverDict + ( + psi_.select + ( + psi_.mesh().data::lookupOrDefault("finalIteration", false) + ) + ) + ); } template Foam::lduMatrix::solverPerformance Foam::fvMatrix::fvSolver::solve() { - return solve(psi_.mesh().solverDict(psi_.name())); + return solve + ( + psi_.mesh().solverDict + ( + psi_.select + ( + psi_.mesh().data::lookupOrDefault("finalIteration", false) + ) + ) + ); } template Foam::lduMatrix::solverPerformance Foam::fvMatrix::solve() { - return solve(psi_.mesh().solverDict(psi_.name())); + return solve + ( + psi_.mesh().solverDict + ( + psi_.select + ( + psi_.mesh().data::lookupOrDefault("finalIteration", false) + ) + ) + ); } diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 64ea8c4103..601c1a30e0 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -153,7 +153,7 @@ Foam::fvMesh::fvMesh(const IOobject& io) surfaceInterpolation(*this), fvSchemes(static_cast(*this)), fvSolution(static_cast(*this)), - fvData(static_cast(*this)), + data(static_cast(*this)), boundary_(*this, boundaryMesh()), lduPtr_(NULL), curTimeIndex_(time().timeIndex()), @@ -248,7 +248,7 @@ Foam::fvMesh::fvMesh surfaceInterpolation(*this), fvSchemes(static_cast(*this)), fvSolution(static_cast(*this)), - fvData(static_cast(*this)), + data(static_cast(*this)), boundary_(*this), lduPtr_(NULL), curTimeIndex_(time().timeIndex()), @@ -281,7 +281,7 @@ Foam::fvMesh::fvMesh surfaceInterpolation(*this), fvSchemes(static_cast(*this)), fvSolution(static_cast(*this)), - fvData(static_cast(*this)), + data(static_cast(*this)), boundary_(*this), lduPtr_(NULL), curTimeIndex_(time().timeIndex()), diff --git a/src/finiteVolume/fvMesh/fvMesh.H b/src/finiteVolume/fvMesh/fvMesh.H index 68ca4eeed9..3348915e56 100644 --- a/src/finiteVolume/fvMesh/fvMesh.H +++ b/src/finiteVolume/fvMesh/fvMesh.H @@ -54,7 +54,7 @@ SourceFiles #include "surfaceInterpolation.H" #include "fvSchemes.H" #include "fvSolution.H" -#include "fvData.H" +#include "data.H" #include "DimensionedField.H" #include "volFieldsFwd.H" #include "surfaceFieldsFwd.H" @@ -83,7 +83,7 @@ class fvMesh public surfaceInterpolation, public fvSchemes, public fvSolution, - public fvData + public data { // Private data diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/B b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/B similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/B rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/B diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/T b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/T similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/T rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/T diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/U b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/U similarity index 93% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/U rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/U index 7ed39fbf24..1cbf4b00ef 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/U +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/U @@ -20,7 +20,7 @@ internalField uniform (0 0 0); boundaryField { - inlet + inlet { type turbulentInlet; referenceField uniform (10 0 0); @@ -28,26 +28,26 @@ boundaryField value uniform (10 0 0); } - outlet + outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } - upperWall + upperWall { type fixedValue; value uniform (0 0 0); } - lowerWall + lowerWall { type fixedValue; value uniform (0 0 0); } - frontAndBack + frontAndBack { type empty; } diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/alphaSgs b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/alphaSgs similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/alphaSgs rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/alphaSgs diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/k b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/k similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/k rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/k diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/muSgs b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/muSgs similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/muSgs rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/muSgs diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/muTilda b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/muTilda similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/muTilda rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/muTilda diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/p b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/p similarity index 93% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/p rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/p index 8fe5928e26..4893a741d7 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/p +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/p @@ -20,12 +20,12 @@ internalField uniform 1e5; boundaryField { - inlet + inlet { type zeroGradient; } - outlet + outlet { type waveTransmissive; field p; @@ -38,17 +38,17 @@ boundaryField value uniform 1e5; } - upperWall + upperWall { type zeroGradient; } - lowerWall + lowerWall { type zeroGradient; } - frontAndBack + frontAndBack { type empty; } diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/LESProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/LESProperties diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/polyMesh/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/polyMesh/blockMeshDict rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/blockMeshDict diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/polyMesh/boundary b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary similarity index 95% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/polyMesh/boundary rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary index eb4a4e461d..313dcceba1 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/polyMesh/boundary +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/thermophysicalProperties rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/turbulenceProperties rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/turbulenceProperties diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/controlDict b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/controlDict similarity index 98% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/controlDict rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/controlDict index ee66ef78e6..98ab2d342a 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/controlDict +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application rhoPisoFoam; +application rhoPimpleFoam; startFrom startTime; diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes similarity index 91% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSchemes rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes index b98e0f6c57..1512d63d8e 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes @@ -23,15 +23,13 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes { default none; - div(phi,U) Gauss linear; - div(phi,h) Gauss linear; + div(phi,U) Gauss filteredLinear2V 0.2 0; + div(phi,h) Gauss filteredLinear2 0.2 0; div(phiU,p) Gauss linear; div(phi,k) Gauss limitedLinear 1; div(phi,B) Gauss limitedLinear 1; @@ -54,7 +52,6 @@ laplacianSchemes interpolationSchemes { default linear; - interpolate(HbyA) linear; } snGradSchemes diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSolution similarity index 77% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSolution index b016735ea1..d6834127cd 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSolution @@ -21,31 +21,42 @@ solvers { solver PCG; preconditioner DIC; - tolerance 1e-06; + tolerance 1e-6; relTol 0; } - h + "(p|rho)Final" + { + $p; + relTol 0; + } + + "(U|h|k|nuTilda)" { solver PBiCG; preconditioner DILU; - tolerance 1e-06; + tolerance 1e-6; relTol 0; } - "(U|k|B|nuTilda)" + "(U|h|k|nuTilda)Final" { - $h; - tolerance 1e-05; + $U; relTol 0; } } -PISO +PIMPLE { - nCorrectors 2; + momentumPredictor yes; + nOuterCorrectors 2; + nCorrectors 1; nNonOrthogonalCorrectors 0; } +relaxationFactors +{ + "(U|h|k|epsilon|omega).*" 1; +} // ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/T b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/T similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/T rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/T diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/U b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/U rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/alphat b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/alphat similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/alphat rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/alphat diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/epsilon b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/epsilon similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/epsilon rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/epsilon diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/k b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/k similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/k rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/k diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/mut b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/mut similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/mut rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/mut diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/p b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/p similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/p rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/p diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/RASProperties b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/RASProperties similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/RASProperties rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/RASProperties diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/blockMeshDict rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/blockMeshDict diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/blockMeshDict.m4 similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/blockMeshDict.m4 diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/boundary b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/boundary similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/boundary rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/boundary diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/porousZones b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/porousZones similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/porousZones rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/porousZones diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/thermophysicalProperties rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/turbulenceProperties rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/turbulenceProperties diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/controlDict b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/controlDict similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/system/controlDict rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/controlDict diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSchemes rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSolution similarity index 81% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSolution index bb9efe6559..bc91389ba3 100644 --- a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSolution @@ -32,14 +32,7 @@ solvers relTol 0; } - rho - { - $p; - tolerance 1e-05; - relTol 0; - } - - U + "(rho|U|h|k|epsilon|omega)" { solver PBiCG; preconditioner DILU; @@ -47,9 +40,7 @@ solvers relTol 0.1; } - h { $U; } - - "(UFinal|hFinal|R|k|epsilon|omega)" + "(rho|U|h|k|epsilon|omega)Final" { $U; tolerance 1e-05; @@ -60,20 +51,18 @@ solvers PIMPLE { + momentumPredictor yes; nOuterCorrectors 50; nCorrectors 1; nNonOrthogonalCorrectors 0; - momentumPredictor yes; - pMin pMin [ 1 -1 -2 0 0 0 0 ] 1000; } relaxationFactors { - p 0.3; - rho 0.05; - U 0.7; - h 0.7; - "(k|epsilon|omega)" 0.7; + "p.*" 0.3; + "rho.*" 1; + "(U|h|k|epsilon|omega)" 0.7; + "(U|h|k|epsilon|omega)Final" 1; } diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/R b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/R similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/R rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/R diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/T b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/T similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/T rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/T diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/U b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/U similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/U rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/U diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/alphat b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/alphat similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/alphat rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/alphat diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/epsilon b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/epsilon similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/epsilon rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/epsilon diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/k b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/k similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/k rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/k diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/mut b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/mut similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/mut rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/mut diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/omega b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/omega similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/omega rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/omega diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/p b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/p similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/p rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/p diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/RASProperties b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/RASProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/constant/RASProperties rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/RASProperties diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/polyMesh/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/constant/polyMesh/blockMeshDict rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/polyMesh/blockMeshDict diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/polyMesh/boundary b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/polyMesh/boundary similarity index 92% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/constant/polyMesh/boundary rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/polyMesh/boundary index 8947c6cace..5cfd85f252 100644 --- a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/polyMesh/boundary +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/polyMesh/boundary @@ -1,14 +1,14 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; - format ascii; + format binary; class polyBoundaryMesh; location "constant/polyMesh"; object boundary; diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/constant/thermophysicalProperties rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/constant/turbulenceProperties rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/turbulenceProperties diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/controlDict b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/controlDict similarity index 94% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/system/controlDict rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/system/controlDict index 5207df21bb..8e0460733b 100644 --- a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/controlDict +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application rhoPisoFoam; +application rhoPimpleFoam; startFrom startTime; @@ -33,9 +33,9 @@ writeInterval 0.1; purgeWrite 0; -writeFormat ascii; +writeFormat binary; -writePrecision 6; +writePrecision 10; writeCompression off; diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSchemes rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSolution similarity index 87% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSolution index 863d53ae7f..4f6ea01974 100644 --- a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSolution @@ -22,10 +22,16 @@ solvers solver PCG; preconditioner DIC; tolerance 1e-06; + relTol 0.01; + } + + pFinal + { + $p; relTol 0; } - rho + "rho.*" { $p; tolerance 1e-05; @@ -37,15 +43,22 @@ solvers solver PBiCG; preconditioner DILU; tolerance 1e-05; + relTol 0.1; + } + + "(U|h|R|k|epsilon|omega)Final" + { + $U; relTol 0; } } -PISO +PIMPLE { + momentumPredictor yes; + nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 0; - momentumPredictor yes; } diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/0/U b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/0/U deleted file mode 100644 index 5e3b0435c4..0000000000 --- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/0/U +++ /dev/null @@ -1,37 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / 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 -{ - periodicX - { - type cyclic; - } - periodicY - { - type cyclic; - } - periodicZ - { - type cyclic; - } -} - -// ************************************************************************* // diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/0/U b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/0/U deleted file mode 100644 index 5e3b0435c4..0000000000 --- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/0/U +++ /dev/null @@ -1,37 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / 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 -{ - periodicX - { - type cyclic; - } - periodicY - { - type cyclic; - } - periodicZ - { - type cyclic; - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/T similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/T diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T.org b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/T.org similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T.org rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/T.org diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/U b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/U similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/U rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/U diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/alphat b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/alphat similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/alphat rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/alphat diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/epsilon similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/epsilon diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/k similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/k diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/nut similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/nut diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/p b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/p similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/p rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/p diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allclean rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun similarity index 83% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allrun rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun index 814ade458e..cb0be1e6e0 100755 --- a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allrun +++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun @@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # run from this directory application=`getApplication` -compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom +compileApplication ../../buoyantPimpleFoam/hotRoom/setHotRoom runApplication blockMesh runApplication setHotRoom runApplication $application diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/RASProperties b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/RASProperties similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/RASProperties rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/RASProperties diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/g b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/g similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/g rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/g diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/blockMeshDict b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/blockMeshDict rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/polyMesh/blockMeshDict diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/boundary b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/polyMesh/boundary similarity index 94% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/boundary rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/polyMesh/boundary index b66c382b6a..0d4d0e498d 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/boundary +++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/transportProperties b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/transportProperties similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/transportProperties rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/transportProperties diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/controlDict b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/controlDict similarity index 91% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/controlDict rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/controlDict index 53d1882a04..1d5d0b66a7 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/controlDict +++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application buoyantBoussinesqPisoFoam; +application buoyantBoussinesqPimpleFoam; startFrom startTime; @@ -23,13 +23,13 @@ startTime 0; stopAt endTime; -endTime 1000; +endTime 2000; -deltaT 1; +deltaT 2; writeControl timeStep; -writeInterval 100; +writeInterval 200; purgeWrite 0; diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSchemes rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSolution similarity index 81% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSolution index 2526e8b4b1..8a3fb56375 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSolution @@ -21,14 +21,13 @@ solvers { solver PCG; preconditioner DIC; - tolerance 1e-07; + tolerance 1e-8; relTol 0.1; } pFinal { $p; - tolerance 1e-07; relTol 0; } @@ -36,19 +35,31 @@ solvers { solver PBiCG; preconditioner DILU; - tolerance 1e-05; + tolerance 1e-6; + relTol 0.1; + } + + "(U|T|k|epsilon|R)Final" + { + $U; relTol 0; } } -PISO +PIMPLE { - momentumPredictor yes; + momentumPredictor no; + nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } +relaxationFactors +{ + "(U|T|k|epsilon|R)" 1; + "(U|T|k|epsilon|R)Final" 1; +} // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/T b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/T similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/T rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/T diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/T.org b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/T.org similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/T.org rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/T.org diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/U b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/U similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/U rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/U diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/alphat similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/alphat diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/epsilon b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/epsilon similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/epsilon rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/epsilon diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/k b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/k similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/k rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/k diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/mut similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/mut diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/p b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/p similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/p rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/p diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/Allclean rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/Allrun rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/RASProperties b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/RASProperties similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/RASProperties rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/RASProperties diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/g b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/g similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/g rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/g diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/polyMesh/blockMeshDict b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/polyMesh/blockMeshDict rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/polyMesh/blockMeshDict diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/polyMesh/boundary b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/polyMesh/boundary similarity index 94% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/polyMesh/boundary rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/polyMesh/boundary index b66c382b6a..0d4d0e498d 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/polyMesh/boundary +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/thermophysicalProperties rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/turbulenceProperties b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/turbulenceProperties similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/turbulenceProperties rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/turbulenceProperties diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/Make/files b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/Make/files similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/Make/files rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/Make/files diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/Make/options b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/Make/options similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/Make/options rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/Make/options diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/createFields.H b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/createFields.H similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/createFields.H rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/createFields.H diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/setHotRoom.C b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/setHotRoom.C similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/setHotRoom.C rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/setHotRoom.C diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/controlDict b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/controlDict similarity index 93% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/controlDict rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/controlDict index 11e3efe957..df7983f0d9 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/controlDict +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application buoyantPisoFoam; +application buoyantPimpleFoam; startFrom startTime; @@ -23,9 +23,9 @@ startTime 0; stopAt endTime; -endTime 1000; +endTime 2000; -deltaT 1; +deltaT 2; writeControl timeStep; diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSchemes rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSolution similarity index 86% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSolution index c1e26f6e57..eb860df2b2 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - rho + "rho.*" { solver PCG; preconditioner DIC; @@ -29,14 +29,13 @@ solvers { solver PCG; preconditioner DIC; - tolerance 1e-06; + tolerance 1e-8; relTol 0.1; } pFinal { $p; - tolerance 1e-06; relTol 0; } @@ -44,13 +43,21 @@ solvers { solver PBiCG; preconditioner DILU; - tolerance 1e-05; + tolerance 1e-6; + relTol 0; + } + + "(U|h|k|epsilon|R)Final" + { + $U; relTol 0; } } -PISO +PIMPLE { + momentumPredictor no; + nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 0; } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U index 39d9711c40..be47ccdfa5 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U @@ -33,13 +33,13 @@ boundaryField { type flowRateInletVelocity; flowRate 0.00379; - value uniform (0 10.82857143 0); + value uniform (0 14.68 0); } inletSides { type flowRateInletVelocity; flowRate 0.00832; - value uniform (0 11.88571429 0); + value uniform (0 17.79 0); } outlet {