From 3f5eda25f02071b8683d23cf5f914f9a13283c4a Mon Sep 17 00:00:00 2001 From: Henry <Henry> Date: Fri, 6 Dec 2013 15:45:11 +0000 Subject: [PATCH] symmetryPlane: add symmetryPlane as a special type of symmetry condition applied to a single plane The standard/previous general symmetry type is now named symmetry both in class and lookup name for consistency. The rigorous symmetryPlane type is needed for moving-mesh cases in which the motion it constrained by one or two planes. --- .../foamMeshToFluent/fluentFvMesh.C | 13 +- .../streamFunction/streamFunction.C | 3 + etc/caseDicts/setConstraintTypes | 5 + etc/controlDict | 1 + src/OpenFOAM/Make/files | 3 + .../symmetryPlanePointPatchField.C | 149 +++++++++++++ .../symmetryPlanePointPatchField.H | 161 ++++++++++++++ .../symmetryPlanePointPatchFields.C | 43 ++++ .../symmetryPlanePointPatchFields.H | 49 +++++ .../constraint/symmetry/symmetryPointPatch.H | 7 +- .../symmetryPlane/symmetryPlanePointPatch.C | 71 +++++++ .../symmetryPlane/symmetryPlanePointPatch.H | 107 ++++++++++ .../constraint/symmetry/symmetryPolyPatch.H | 9 +- .../symmetryPlane/symmetryPlanePolyPatch.C | 136 ++++++++++++ .../symmetryPlane/symmetryPlanePolyPatch.H | 177 +++++++++++++++ src/finiteVolume/Make/files | 4 + .../basicSymmetryFvPatchScalarField.C | 19 +- .../symmetry/symmetryFvPatchField.H | 2 +- .../symmetryPlane/symmetryPlaneFvPatchField.C | 201 ++++++++++++++++++ .../symmetryPlane/symmetryPlaneFvPatchField.H | 189 ++++++++++++++++ .../symmetryPlaneFvPatchFields.C | 43 ++++ .../symmetryPlaneFvPatchFields.H | 49 +++++ .../symmetryPlaneFvPatchFieldsFwd.H | 50 +++++ .../symmetryPlaneFvPatchScalarField.C | 55 +++++ .../symmetryPlaneFvsPatchField.C | 130 +++++++++++ .../symmetryPlaneFvsPatchField.H | 139 ++++++++++++ .../symmetryPlaneFvsPatchFields.C | 43 ++++ .../symmetryPlaneFvsPatchFields.H | 49 +++++ .../symmetryPlaneFvsPatchFieldsFwd.H | 50 +++++ .../constraint/symmetry/symmetryFvPatch.H | 4 +- .../symmetryPlane/symmetryPlaneFvPatch.C | 43 ++++ .../symmetryPlane/symmetryPlaneFvPatch.H | 97 +++++++++ src/lagrangian/basic/particle/particle.H | 10 + .../basic/particle/particleTemplates.C | 22 ++ .../trackedParticle/trackedParticle.C | 11 + .../trackedParticle/trackedParticle.H | 10 +- .../field/nearWallFields/findCellParticle.C | 11 + .../field/nearWallFields/findCellParticle.H | 10 +- .../field/streamLine/streamLineParticle.C | 11 + .../field/streamLine/streamLineParticle.H | 10 +- .../wallBoundedParticle.H | 11 +- .../wallBoundedParticleTemplates.C | 19 ++ .../basic/potentialFoam/cylinder/0.org/U | 2 +- .../basic/potentialFoam/cylinder/0.org/p | 2 +- .../cylinder/constant/polyMesh/blockMeshDict | 2 +- .../dsmcFoam/supersonicCorner/0/boundaryT | 2 +- .../dsmcFoam/supersonicCorner/0/boundaryU | 2 +- .../dsmcFoam/supersonicCorner/0/dsmcRhoN | 2 +- .../dsmcFoam/supersonicCorner/0/fD | 2 +- .../dsmcFoam/supersonicCorner/0/iDof | 2 +- .../dsmcFoam/supersonicCorner/0/internalE | 2 +- .../dsmcFoam/supersonicCorner/0/linearKE | 2 +- .../dsmcFoam/supersonicCorner/0/momentum | 2 +- .../dsmcFoam/supersonicCorner/0/q | 2 +- .../dsmcFoam/supersonicCorner/0/rhoM | 2 +- .../dsmcFoam/supersonicCorner/0/rhoN | 2 +- .../constant/polyMesh/blockMeshDict | 10 +- .../pimpleFoam/elipsekkLOmega/0/U | 2 +- .../pimpleFoam/elipsekkLOmega/0/kl | 2 +- .../pimpleFoam/elipsekkLOmega/0/kt | 2 +- .../pimpleFoam/elipsekkLOmega/0/nut | 2 +- .../pimpleFoam/elipsekkLOmega/0/omega | 2 +- .../pimpleFoam/elipsekkLOmega/0/p | 2 +- .../constant/polyMesh/blockMeshDict | 6 +- .../pisoFoam/les/motorBike/motorBike/0.org/U | 2 +- .../0.org/include/frontBackUpperPatches | 2 +- .../pisoFoam/les/motorBike/motorBike/0.org/k | 2 +- .../les/motorBike/motorBike/0.org/nuTilda | 2 +- .../les/motorBike/motorBike/0.org/nut | 2 +- .../pisoFoam/les/motorBike/motorBike/0.org/p | 2 +- .../motorBike/constant/polyMesh/blockMeshDict | 9 +- .../constant/polyMesh/blockMeshDict.8pSmall | 9 +- .../motorBike/constant/polyMesh/boundary | 13 +- .../foamyHexMesh/mixerVessel/system/fvSchemes | 6 +- .../multiphase/LTSInterFoam/wigleyHull/0/U | 2 +- .../LTSInterFoam/wigleyHull/0/alpha.water.org | 2 +- .../multiphase/LTSInterFoam/wigleyHull/0/k | 2 +- .../multiphase/LTSInterFoam/wigleyHull/0/nut | 2 +- .../LTSInterFoam/wigleyHull/0/omega | 2 +- .../LTSInterFoam/wigleyHull/0/p_rgh | 2 +- .../constant/polyMesh/blockMeshDict | 2 +- .../mixerVessel2D/system/fvSchemes | 2 +- .../mixerVessel2D/system/fvSchemes | 2 +- .../ras/sloshingTank2D/system/fvSchemes | 6 +- .../laminar/depthCharge2D/system/fvSchemes | 6 +- .../laminar/depthCharge3D/system/fvSchemes | 6 +- .../laminar/damBreak4phase/0.org/T | 2 +- .../laminar/damBreak4phase/system/fvSchemes | 6 +- .../constant/dynamicMeshDict | 2 +- .../ras/damBreakWithObstacle/system/fvSchemes | 2 +- .../ras/mixerVesselAMI/system/fvSchemes | 6 +- .../ras/sloshingTank2D/system/fvSchemes | 2 +- .../ras/sloshingTank2D3DoF/system/fvSchemes | 2 +- .../ras/sloshingTank3D/system/fvSchemes | 2 +- .../ras/sloshingTank3D3DoF/system/fvSchemes | 2 +- .../ras/sloshingTank3D6DoF/system/fvSchemes | 2 +- .../ras/testTubeMixer/system/fvSchemes | 2 +- .../laminar/capillaryRise/system/fvSchemes | 2 +- .../laminar/damBreak/system/fvSchemes | 2 +- .../laminar/damBreak/system/fvSolution | 2 +- .../LTSInterFoam/system/controlDict | 2 +- .../LTSInterFoam/system/fvSchemes | 2 +- .../ras/waterChannel/system/controlDict | 2 +- .../ras/waterChannel/system/fvSchemes | 2 +- .../ras/waterChannel/system/fvSolution | 2 +- .../ras/weirOverflow/system/fvSchemes | 2 +- .../laminar/damBreak/system/fvSchemes | 2 +- .../interPhaseChangeFoam/cavitatingBullet/0/U | 2 +- .../cavitatingBullet/0/alpha.water | 2 +- .../cavitatingBullet/0/p_rgh | 2 +- .../constant/polyMesh/blockMeshDict | 2 +- .../constant/polyMesh/boundary | 4 +- .../cavitatingBullet/system/fvSolution | 2 +- .../lockExchange/system/fvSchemes | 2 +- 114 files changed, 2318 insertions(+), 115 deletions(-) create mode 100644 src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C create mode 100644 src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H create mode 100644 src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchFields.C create mode 100644 src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchFields.H create mode 100644 src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetryPlane/symmetryPlanePointPatch.C create mode 100644 src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetryPlane/symmetryPlanePointPatch.H create mode 100644 src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C create mode 100644 src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.H create mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C create mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H create mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFields.C create mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFields.H create mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFieldsFwd.H create mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchScalarField.C create mode 100644 src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C create mode 100644 src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H create mode 100644 src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFields.C create mode 100644 src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFields.H create mode 100644 src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFieldsFwd.H create mode 100644 src/finiteVolume/fvMesh/fvPatches/constraint/symmetryPlane/symmetryPlaneFvPatch.C create mode 100644 src/finiteVolume/fvMesh/fvPatches/constraint/symmetryPlane/symmetryPlaneFvPatch.H diff --git a/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C b/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C index fcb38fb9a5c..56809f59729 100644 --- a/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C +++ b/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C @@ -33,6 +33,7 @@ using std::ios; #include "fluentFvMesh.H" #include "primitiveMesh.H" #include "wallFvPatch.H" +#include "symmetryPlaneFvPatch.H" #include "symmetryFvPatch.H" #include "cellModeller.H" @@ -177,7 +178,11 @@ void Foam::fluentFvMesh::writeFluentMesh() const { fluentMeshFile << 3; } - else if (isA<symmetryFvPatch>(boundary()[patchI])) + else if + ( + isA<symmetryPlaneFvPatch>(boundary()[patchI]) + || isA<symmetryFvPatch>(boundary()[patchI]) + ) { fluentMeshFile << 7; } @@ -280,7 +285,11 @@ void Foam::fluentFvMesh::writeFluentMesh() const { fluentMeshFile << "wall "; } - else if (isA<symmetryFvPatch>(boundary()[patchI])) + else if + ( + isA<symmetryPlaneFvPatch>(boundary()[patchI]) + || isA<symmetryFvPatch>(boundary()[patchI]) + ) { fluentMeshFile << "symmetry "; } diff --git a/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C b/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C index de9af38b878..11874fe2ead 100644 --- a/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C +++ b/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C @@ -33,6 +33,7 @@ Description #include "fvCFD.H" #include "pointFields.H" #include "emptyPolyPatch.H" +#include "symmetryPlanePolyPatch.H" #include "symmetryPolyPatch.H" #include "wedgePolyPatch.H" #include "OSspecific.H" @@ -286,6 +287,8 @@ int main(int argc, char *argv[]) ( !isType<emptyPolyPatch> (patches[patchNo]) + && !isType<symmetryPlanePolyPatch> + (patches[patchNo]) && !isType<symmetryPolyPatch> (patches[patchNo]) && !isType<wedgePolyPatch> diff --git a/etc/caseDicts/setConstraintTypes b/etc/caseDicts/setConstraintTypes index 1678e2a1479..6b075c73825 100644 --- a/etc/caseDicts/setConstraintTypes +++ b/etc/caseDicts/setConstraintTypes @@ -51,6 +51,11 @@ symmetryPlane type symmetryPlane; } +symmetry +{ + type symmetry; +} + wedge { type wedge; diff --git a/etc/controlDict b/etc/controlDict index 8f811534dc0..68d8f86a44f 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -813,6 +813,7 @@ DebugSwitches symmTensorAverageField 0; symmTensorField 0; symmetryPlane 0; + symmetry 0; syringePressure 0; tensorAverageField 0; tensorField 0; diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index 4d2062b421c..33810bc56b6 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -409,6 +409,7 @@ $(constraintPolyPatches)/empty/emptyPolyPatch.C $(constraintPolyPatches)/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.C $(constraintPolyPatches)/processorCyclic/processorCyclicPolyPatch.C $(constraintPolyPatches)/processor/processorPolyPatch.C +$(constraintPolyPatches)/symmetryPlane/symmetryPlanePolyPatch.C $(constraintPolyPatches)/symmetry/symmetryPolyPatch.C $(constraintPolyPatches)/wedge/wedgePolyPatch.C @@ -528,6 +529,7 @@ $(constraintPointPatches)/empty/emptyPointPatch.C $(constraintPointPatches)/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C $(constraintPointPatches)/processor/processorPointPatch.C $(constraintPointPatches)/processorCyclic/processorCyclicPointPatch.C +$(constraintPointPatches)/symmetryPlane/symmetryPlanePointPatch.C $(constraintPointPatches)/symmetry/symmetryPointPatch.C $(constraintPointPatches)/wedge/wedgePointPatch.C @@ -597,6 +599,7 @@ $(constraintPointPatchFields)/empty/emptyPointPatchFields.C $(constraintPointPatchFields)/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.C $(constraintPointPatchFields)/processor/processorPointPatchFields.C $(constraintPointPatchFields)/processorCyclic/processorCyclicPointPatchFields.C +$(constraintPointPatchFields)/symmetryPlane/symmetryPlanePointPatchFields.C $(constraintPointPatchFields)/symmetry/symmetryPointPatchFields.C $(constraintPointPatchFields)/wedge/wedgePointPatchFields.C diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C new file mode 100644 index 00000000000..b91c965e92e --- /dev/null +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C @@ -0,0 +1,149 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlanePointPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField +( + const pointPatch& p, + const DimensionedField<Type, pointMesh>& iF +) +: + basicSymmetryPointPatchField<Type>(p, iF), + symmetryPlanePatch_(refCast<const symmetryPlanePointPatch>(p)) +{} + + +template<class Type> +symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField +( + const pointPatch& p, + const DimensionedField<Type, pointMesh>& iF, + const dictionary& dict +) +: + basicSymmetryPointPatchField<Type>(p, iF, dict), + symmetryPlanePatch_(refCast<const symmetryPlanePointPatch>(p)) +{ + if (!isType<symmetryPlanePointPatch>(p)) + { + FatalIOErrorIn + ( + "symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField\n" + "(\n" + " const pointPatch& p,\n" + " const Field<Type>& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "patch " << this->patch().index() << " not symmetry type. " + << "Patch type = " << p.type() + << exit(FatalIOError); + } +} + + +template<class Type> +symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField +( + const symmetryPlanePointPatchField<Type>& ptf, + const pointPatch& p, + const DimensionedField<Type, pointMesh>& iF, + const pointPatchFieldMapper& mapper +) +: + basicSymmetryPointPatchField<Type>(ptf, p, iF, mapper), + symmetryPlanePatch_(refCast<const symmetryPlanePointPatch>(p)) +{ + if (!isType<symmetryPlanePointPatch>(this->patch())) + { + FatalErrorIn + ( + "symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField\n" + "(\n" + " const symmetryPlanePointPatchField<Type>& ptf,\n" + " const pointPatch& p,\n" + " const DimensionedField<Type, pointMesh>& iF,\n" + " const pointPatchFieldMapper& mapper\n" + ")\n" + ) << "Field type does not correspond to patch type for patch " + << this->patch().index() << "." << endl + << "Field type: " << typeName << endl + << "Patch type: " << this->patch().type() + << exit(FatalError); + } +} + + +template<class Type> +symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField +( + const symmetryPlanePointPatchField<Type>& ptf, + const DimensionedField<Type, pointMesh>& iF +) +: + basicSymmetryPointPatchField<Type>(ptf, iF), + symmetryPlanePatch_(ptf.symmetryPlanePatch_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +void Foam::symmetryPlanePointPatchField<Type>::evaluate +( + const Pstream::commsTypes +) +{ + vector nHat = symmetryPlanePatch_.n(); + + tmp<Field<Type> > tvalues = + ( + ( + this->patchInternalField() + + transform(I - 2.0*sqr(nHat), this->patchInternalField()) + )/2.0 + ); + + // Get internal field to insert values into + Field<Type>& iF = const_cast<Field<Type>&>(this->internalField()); + + this->setInInternalField(iF, tvalues()); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H new file mode 100644 index 00000000000..c3774789d83 --- /dev/null +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.H @@ -0,0 +1,161 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +Class + Foam::symmetryPlanePointPatchField + +Description + A symmetry-plane boundary condition for pointField + +SourceFiles + symmetryPlanePointPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlanePointPatchField_H +#define symmetryPlanePointPatchField_H + +#include "basicSymmetryPointPatchField.H" +#include "symmetryPlanePointPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class symmetryPlanePointPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class symmetryPlanePointPatchField +: + public basicSymmetryPointPatchField<Type> +{ + // Private data + + //- Local reference cast into the symmetryPlane patch + const symmetryPlanePointPatch& symmetryPlanePatch_; + + +public: + + //- Runtime type information + TypeName(symmetryPlanePointPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + symmetryPlanePointPatchField + ( + const pointPatch&, + const DimensionedField<Type, pointMesh>& + ); + + //- Construct from patch, internal field and dictionary + symmetryPlanePointPatchField + ( + const pointPatch&, + const DimensionedField<Type, pointMesh>&, + const dictionary& + ); + + //- Construct by mapping given patchField<Type> onto a new patch + symmetryPlanePointPatchField + ( + const symmetryPlanePointPatchField<Type>&, + const pointPatch&, + const DimensionedField<Type, pointMesh>&, + const pointPatchFieldMapper& + ); + + //- Construct and return a clone + virtual autoPtr<pointPatchField<Type> > clone() const + { + return autoPtr<pointPatchField<Type> > + ( + new symmetryPlanePointPatchField<Type> + ( + *this + ) + ); + } + + //- Construct as copy setting internal field reference + symmetryPlanePointPatchField + ( + const symmetryPlanePointPatchField<Type>&, + const DimensionedField<Type, pointMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual autoPtr<pointPatchField<Type> > clone + ( + const DimensionedField<Type, pointMesh>& iF + ) const + { + return autoPtr<pointPatchField<Type> > + ( + new symmetryPlanePointPatchField<Type> + ( + *this, + iF + ) + ); + } + + + // Member functions + + //- Return the constraint type this pointPatchField implements + virtual const word& constraintType() const + { + return symmetryPlanePointPatch::typeName; + } + + // Evaluation functions + + //- Update the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::blocking + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "symmetryPlanePointPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchFields.C b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchFields.C new file mode 100644 index 00000000000..2317f097350 --- /dev/null +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchFields.C @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlanePointPatchFields.H" +#include "pointPatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makePointPatchFields(symmetryPlane); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchFields.H b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchFields.H new file mode 100644 index 00000000000..61e35ee4fe0 --- /dev/null +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchFields.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlanePointPatchFields_H +#define symmetryPlanePointPatchFields_H + +#include "symmetryPlanePointPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePointPatchFieldTypedefs(symmetryPlane); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.H index 99041195210..35cf991cb96 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,11 +25,14 @@ Class Foam::symmetryPointPatch Description - Symmetry-plane patch. + Symmetry patch for non-planar or multi-plane patches. SourceFiles symmetryPointPatch.C +SeeAlso + symmetryPlanePointPatch + \*---------------------------------------------------------------------------*/ #ifndef symmetryPointPatch_H diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetryPlane/symmetryPlanePointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetryPlane/symmetryPlanePointPatch.C new file mode 100644 index 00000000000..f8f70537e95 --- /dev/null +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetryPlane/symmetryPlanePointPatch.C @@ -0,0 +1,71 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlanePointPatch.H" +#include "pointConstraint.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(symmetryPlanePointPatch, 0); + + // Add the patch constructor functions to the hash tables + addToRunTimeSelectionTable + ( + facePointPatch, + symmetryPlanePointPatch, + polyPatch + ); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::symmetryPlanePointPatch::symmetryPlanePointPatch +( + const polyPatch& patch, + const pointBoundaryMesh& bm +) +: + facePointPatch(patch, bm), + symmetryPlanePolyPatch_(refCast<const symmetryPlanePolyPatch>(patch)) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::symmetryPlanePointPatch::applyConstraint +( + const label, + pointConstraint& pc +) const +{ + pc.applyConstraint(symmetryPlanePolyPatch_.n()); +} + + +// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetryPlane/symmetryPlanePointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetryPlane/symmetryPlanePointPatch.H new file mode 100644 index 00000000000..a791d3828f1 --- /dev/null +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetryPlane/symmetryPlanePointPatch.H @@ -0,0 +1,107 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +Class + Foam::symmetryPlanePointPatch + +Description + Symmetry-plane patch. + +SourceFiles + symmetryPlanePointPatch.C + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlanePointPatch_H +#define symmetryPlanePointPatch_H + +#include "facePointPatch.H" +#include "symmetryPlanePolyPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class symmetryPlanePointPatch Declaration +\*---------------------------------------------------------------------------*/ + +class symmetryPlanePointPatch +: + public facePointPatch +{ + // Private data + + //- Local reference cast into the symmetryPlane patch + const symmetryPlanePolyPatch& symmetryPlanePolyPatch_; + + +public: + + //- Runtime type information + TypeName(symmetryPlanePolyPatch::typeName_()); + + + // Constructors + + //- Construct from polyPatch + symmetryPlanePointPatch + ( + const polyPatch& patch, + const pointBoundaryMesh& bm + ); + + + // Member Functions + + //- Return the constraint type this pointPatch implements. + virtual const word& constraintType() const + { + return type(); + } + + //- Accumulate the effect of constraint direction of this patch + virtual void applyConstraint + ( + const label pointi, + pointConstraint& + ) const; + + //- Return symmetry plane normal + const vector& n() const + { + return symmetryPlanePolyPatch_.n(); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.H index 9df659518f7..c07f46eb69e 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetry/symmetryPolyPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,11 +25,14 @@ Class Foam::symmetryPolyPatch Description - Symmetry-plane patch. + Symmetry patch for non-planar or multi-plane patches. SourceFiles symmetryPolyPatch.C +SeeAlso + symmetryPlanePolyPatch + \*---------------------------------------------------------------------------*/ #ifndef symmetryPolyPatch_H @@ -53,7 +56,7 @@ class symmetryPolyPatch public: //- Runtime type information - TypeName("symmetryPlane"); + TypeName("symmetry"); // Constructors diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C new file mode 100644 index 00000000000..49b48f8df7c --- /dev/null +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.C @@ -0,0 +1,136 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlanePolyPatch.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(symmetryPlanePolyPatch, 0); + + addToRunTimeSelectionTable(polyPatch, symmetryPlanePolyPatch, word); + addToRunTimeSelectionTable(polyPatch, symmetryPlanePolyPatch, dictionary); +} + +// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * // + +Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch +( + const word& name, + const label size, + const label start, + const label index, + const polyBoundaryMesh& bm, + const word& patchType +) +: + polyPatch(name, size, start, index, bm, patchType), + n_(vector::zero) +{} + + +Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch +( + const word& name, + const dictionary& dict, + const label index, + const polyBoundaryMesh& bm, + const word& patchType +) +: + polyPatch(name, dict, index, bm, patchType), + n_(vector::zero) +{} + + +Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch +( + const symmetryPlanePolyPatch& pp, + const polyBoundaryMesh& bm +) +: + polyPatch(pp, bm), + n_(vector::zero) +{} + + +Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch +( + const symmetryPlanePolyPatch& pp, + const polyBoundaryMesh& bm, + const label index, + const label newSize, + const label newStart +) +: + polyPatch(pp, bm, index, newSize, newStart), + n_(vector::zero) +{} + + +Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch +( + const symmetryPlanePolyPatch& pp, + const polyBoundaryMesh& bm, + const label index, + const labelUList& mapAddressing, + const label newStart +) +: + polyPatch(pp, bm, index, mapAddressing, newStart), + n_(vector::zero) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const Foam::vector& Foam::symmetryPlanePolyPatch::n() const +{ + // If the symmetry normal is not set calculate it + // as the average face-normal + if (magSqr(n_) < 0.5) + { + const vectorField& nf(faceNormals()); + n_ = gAverage(nf); + + // Check the symmetry plane is planar + forAll(nf, facei) + { + if (magSqr(n_ - nf[facei]) > SMALL) + { + FatalErrorIn("symmetryPlanePolyPatch::n()") + << "Symmetry plane '" << name() << "' is not planar" + << exit(FatalError); + } + } + } + + return n_; +} + + +// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.H new file mode 100644 index 00000000000..81b8afcd728 --- /dev/null +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/symmetryPlane/symmetryPlanePolyPatch.H @@ -0,0 +1,177 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +Class + Foam::symmetryPlanePolyPatch + +Description + Symmetry-plane patch. + +SourceFiles + symmetryPlanePolyPatch.C + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlanePolyPatch_H +#define symmetryPlanePolyPatch_H + +#include "polyPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class symmetryPlanePolyPatch Declaration +\*---------------------------------------------------------------------------*/ + +class symmetryPlanePolyPatch +: + public polyPatch +{ + // Private data + + //- Symmetry plane normal (calculated on demand) + mutable vector n_; + + +public: + + //- Runtime type information + TypeName("symmetryPlane"); + + + // Constructors + + //- Construct from components + symmetryPlanePolyPatch + ( + const word& name, + const label size, + const label start, + const label index, + const polyBoundaryMesh& bm, + const word& patchType + ); + + //- Construct from dictionary + symmetryPlanePolyPatch + ( + const word& name, + const dictionary& dict, + const label index, + const polyBoundaryMesh& bm, + const word& patchType + ); + + //- Construct as copy, resetting the boundary mesh + symmetryPlanePolyPatch + ( + const symmetryPlanePolyPatch&, + const polyBoundaryMesh& + ); + + //- Construct given the original patch and resetting the + // face list and boundary mesh information + symmetryPlanePolyPatch + ( + const symmetryPlanePolyPatch& pp, + const polyBoundaryMesh& bm, + const label index, + const label newSize, + const label newStart + ); + + //- Construct given the original patch and a map + symmetryPlanePolyPatch + ( + const symmetryPlanePolyPatch& pp, + const polyBoundaryMesh& bm, + const label index, + const labelUList& mapAddressing, + const label newStart + ); + + //- Construct and return a clone, resetting the boundary mesh + virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const + { + return autoPtr<polyPatch>(new symmetryPlanePolyPatch(*this, bm)); + } + + //- Construct and return a clone, resetting the face list + // and boundary mesh + virtual autoPtr<polyPatch> clone + ( + const polyBoundaryMesh& bm, + const label index, + const label newSize, + const label newStart + ) const + { + return autoPtr<polyPatch> + ( + new symmetryPlanePolyPatch(*this, bm, index, newSize, newStart) + ); + } + + //- Construct and return a clone, resetting the face list + // and boundary mesh + virtual autoPtr<polyPatch> clone + ( + const polyBoundaryMesh& bm, + const label index, + const labelUList& mapAddressing, + const label newStart + ) const + { + return autoPtr<polyPatch> + ( + new symmetryPlanePolyPatch + ( + *this, + bm, + index, + mapAddressing, + newStart + ) + ); + } + + + // Member Functions + + //- Return symmetry plane normal + const vector& n() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 67deac58109..0bcfcf48a57 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -24,6 +24,7 @@ $(constraintFvPatches)/empty/emptyFvPatch.C $(constraintFvPatches)/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.C $(constraintFvPatches)/processor/processorFvPatch.C $(constraintFvPatches)/processorCyclic/processorCyclicFvPatch.C +$(constraintFvPatches)/symmetryPlane/symmetryPlaneFvPatch.C $(constraintFvPatches)/symmetry/symmetryFvPatch.C $(constraintFvPatches)/wedge/wedgeFvPatch.C @@ -119,6 +120,8 @@ $(constraintFvPatchFields)/nonuniformTransformCyclic/nonuniformTransformCyclicFv $(constraintFvPatchFields)/processor/processorFvPatchFields.C $(constraintFvPatchFields)/processor/processorFvPatchScalarField.C $(constraintFvPatchFields)/processorCyclic/processorCyclicFvPatchFields.C +$(constraintFvPatchFields)/symmetryPlane/symmetryPlaneFvPatchFields.C +$(constraintFvPatchFields)/symmetryPlane/symmetryPlaneFvPatchScalarField.C $(constraintFvPatchFields)/symmetry/symmetryFvPatchFields.C $(constraintFvPatchFields)/wedge/wedgeFvPatchFields.C $(constraintFvPatchFields)/wedge/wedgeFvPatchScalarField.C @@ -213,6 +216,7 @@ $(constraintFvsPatchFields)/empty/emptyFvsPatchFields.C $(constraintFvsPatchFields)/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.C $(constraintFvsPatchFields)/processor/processorFvsPatchFields.C $(constraintFvsPatchFields)/processorCyclic/processorCyclicFvsPatchFields.C +$(constraintFvsPatchFields)/symmetryPlane/symmetryPlaneFvsPatchFields.C $(constraintFvsPatchFields)/symmetry/symmetryFvsPatchFields.C $(constraintFvsPatchFields)/wedge/wedgeFvsPatchFields.C diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchScalarField.C index 32ab1deb1f5..40f3f5467fb 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,22 +26,21 @@ License #include "basicSymmetryFvPatchField.H" #include "volFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<> -tmp<scalarField > basicSymmetryFvPatchField<scalar>::snGrad() const +Foam::tmp<Foam::scalarField> +Foam::basicSymmetryFvPatchField<Foam::scalar>::snGrad() const { return tmp<scalarField >(new scalarField(size(), 0.0)); } template<> -void basicSymmetryFvPatchField<scalar>::evaluate(const Pstream::commsTypes) +void Foam::basicSymmetryFvPatchField<Foam::scalar>::evaluate +( + const Pstream::commsTypes +) { if (!updated()) { @@ -53,8 +52,4 @@ void basicSymmetryFvPatchField<scalar>::evaluate(const Pstream::commsTypes) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H index a5812c09b4b..84ee2cf8dde 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetry/symmetryFvPatchField.H @@ -36,7 +36,7 @@ Description \verbatim myPatch { - type symmetryPlane; + type symmetry; } \endverbatim diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C new file mode 100644 index 00000000000..053a56689b6 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C @@ -0,0 +1,201 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlaneFvPatchField.H" + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField +( + const fvPatch& p, + const DimensionedField<Type, volMesh>& iF +) +: + basicSymmetryFvPatchField<Type>(p, iF), + symmetryPlanePatch_(refCast<const symmetryPlaneFvPatch>(p)) +{} + + +template<class Type> +Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField +( + const symmetryPlaneFvPatchField<Type>& ptf, + const fvPatch& p, + const DimensionedField<Type, volMesh>& iF, + const fvPatchFieldMapper& mapper +) +: + basicSymmetryFvPatchField<Type>(ptf, p, iF, mapper), + symmetryPlanePatch_(refCast<const symmetryPlaneFvPatch>(p)) +{ + if (!isType<symmetryPlaneFvPatch>(this->patch())) + { + FatalErrorIn + ( + "symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField\n" + "(\n" + " const symmetryPlaneFvPatchField<Type>& ptf,\n" + " const fvPatch& p,\n" + " const DimensionedField<Type, volMesh>& iF,\n" + " const fvPatchFieldMapper& mapper\n" + ")\n" + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalIOError); + } +} + + +template<class Type> +Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField +( + const fvPatch& p, + const DimensionedField<Type, volMesh>& iF, + const dictionary& dict +) +: + basicSymmetryFvPatchField<Type>(p, iF, dict), + symmetryPlanePatch_(refCast<const symmetryPlaneFvPatch>(p)) +{ + if (!isType<symmetryPlaneFvPatch>(p)) + { + FatalIOErrorIn + ( + "symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField\n" + "(\n" + " const fvPatch& p,\n" + " const Field<Type>& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalIOError); + } +} + + +template<class Type> +Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField +( + const symmetryPlaneFvPatchField<Type>& ptf +) +: + basicSymmetryFvPatchField<Type>(ptf), + symmetryPlanePatch_(ptf.symmetryPlanePatch_) +{} + + +template<class Type> +Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField +( + const symmetryPlaneFvPatchField<Type>& ptf, + const DimensionedField<Type, volMesh>& iF +) +: + basicSymmetryFvPatchField<Type>(ptf, iF), + symmetryPlanePatch_(ptf.symmetryPlanePatch_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +Foam::tmp<Foam::Field<Type> > +Foam::symmetryPlaneFvPatchField<Type>::snGrad() const +{ + vector nHat(symmetryPlanePatch_.n()); + + const Field<Type> iF(this->patchInternalField()); + + return + (transform(I - 2.0*sqr(nHat), iF) - iF) + *(this->patch().deltaCoeffs()/2.0); +} + + +template<class Type> +void Foam::symmetryPlaneFvPatchField<Type>::evaluate(const Pstream::commsTypes) +{ + if (!this->updated()) + { + this->updateCoeffs(); + } + + vector nHat(symmetryPlanePatch_.n()); + + const Field<Type> iF(this->patchInternalField()); + + Field<Type>::operator= + ( + (iF + transform(I - 2.0*sqr(nHat), iF))/2.0 + ); + + transformFvPatchField<Type>::evaluate(); +} + + +template<class Type> +Foam::tmp<Foam::Field<Type> > +Foam::symmetryPlaneFvPatchField<Type>::snGradTransformDiag() const +{ + vector nHat(symmetryPlanePatch_.n()); + + const vector diag + ( + mag(nHat.component(vector::X)), + mag(nHat.component(vector::Y)), + mag(nHat.component(vector::Z)) + ); + + return tmp<Field<Type> > + ( + new Field<Type> + ( + this->size(), + transformMask<Type> + ( + //pow<vector, pTraits<Type>::rank>(diag) + pow + ( + diag, + pTraits<typename powProduct<vector, pTraits<Type>::rank> + ::type>::zero + ) + ) + ) + ); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H new file mode 100644 index 00000000000..5f17938aa49 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.H @@ -0,0 +1,189 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +Class + Foam::symmetryPlaneFvPatchField + +Group + grpConstraintBoundaryConditions + +Description + This boundary condition enforces a symmetryPlane constraint + + \heading Patch usage + + Example of the boundary condition specification: + \verbatim + myPatch + { + type symmetryPlane; + } + \endverbatim + +SourceFiles + symmetryPlaneFvPatchField.C + symmetryPlaneFvPatchFields.C + symmetryPlaneFvPatchFields.H + symmetryPlaneFvPatchFieldsFwd.H + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlaneFvPatchField_H +#define symmetryPlaneFvPatchField_H + +#include "basicSymmetryFvPatchField.H" +#include "symmetryPlaneFvPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class symmetryPlaneFvPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class symmetryPlaneFvPatchField +: + public basicSymmetryFvPatchField<Type> +{ + // Private data + + //- Local reference cast into the symmetryPlane patch + const symmetryPlaneFvPatch& symmetryPlanePatch_; + + +public: + + //- Runtime type information + TypeName(symmetryPlaneFvPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + symmetryPlaneFvPatchField + ( + const fvPatch&, + const DimensionedField<Type, volMesh>& + ); + + //- Construct from patch, internal field and dictionary + symmetryPlaneFvPatchField + ( + const fvPatch&, + const DimensionedField<Type, volMesh>&, + const dictionary& + ); + + //- Construct by mapping given symmetryPlaneFvPatchField + // onto a new patch + symmetryPlaneFvPatchField + ( + const symmetryPlaneFvPatchField<Type>&, + const fvPatch&, + const DimensionedField<Type, volMesh>&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + symmetryPlaneFvPatchField + ( + const symmetryPlaneFvPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<fvPatchField<Type> > clone() const + { + return tmp<fvPatchField<Type> > + ( + new symmetryPlaneFvPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + symmetryPlaneFvPatchField + ( + const symmetryPlaneFvPatchField<Type>&, + const DimensionedField<Type, volMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<fvPatchField<Type> > clone + ( + const DimensionedField<Type, volMesh>& iF + ) const + { + return tmp<fvPatchField<Type> > + ( + new symmetryPlaneFvPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Evaluation functions + + //- Return gradient at boundary + virtual tmp<Field<Type> > snGrad() const; + + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::blocking + ); + + //- Return face-gradient transform diagonal + virtual tmp<Field<Type> > snGradTransformDiag() const; +}; + + +// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * // + +template<> +tmp<scalarField> symmetryPlaneFvPatchField<scalar>::snGrad() const; + +template<> +void symmetryPlaneFvPatchField<scalar>::evaluate +( + const Pstream::commsTypes commsType +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "symmetryPlaneFvPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFields.C new file mode 100644 index 00000000000..5430190f01b --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFields.C @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlaneFvPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makePatchFields(symmetryPlane); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFields.H b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFields.H new file mode 100644 index 00000000000..8b32421c211 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFields.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlaneFvPatchFields_H +#define symmetryPlaneFvPatchFields_H + +#include "symmetryPlaneFvPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeFieldTypedefs(symmetryPlane); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFieldsFwd.H b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFieldsFwd.H new file mode 100644 index 00000000000..ef8a3946a37 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchFieldsFwd.H @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlaneFvPatchFieldsFwd_H +#define symmetryPlaneFvPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class symmetryPlaneFvPatchField; + +makePatchTypeFieldTypedefs(symmetryPlane); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchScalarField.C new file mode 100644 index 00000000000..4f439406268 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchScalarField.C @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlaneFvPatchField.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<> +Foam::tmp<Foam::scalarField> +Foam::symmetryPlaneFvPatchField<Foam::scalar>::snGrad() const +{ + return tmp<scalarField >(new scalarField(size(), 0.0)); +} + + +template<> +void Foam::symmetryPlaneFvPatchField<Foam::scalar>::evaluate +( + const Pstream::commsTypes +) +{ + if (!updated()) + { + updateCoeffs(); + } + + scalarField::operator=(patchInternalField()); + transformFvPatchField<scalar>::evaluate(); +} + + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C new file mode 100644 index 00000000000..9e3477d5864 --- /dev/null +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.C @@ -0,0 +1,130 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlaneFvsPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField +( + const fvPatch& p, + const DimensionedField<Type, surfaceMesh>& iF +) +: + fvsPatchField<Type>(p, iF) +{} + + +template<class Type> +symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField +( + const symmetryPlaneFvsPatchField<Type>& ptf, + const fvPatch& p, + const DimensionedField<Type, surfaceMesh>& iF, + const fvPatchFieldMapper& mapper +) +: + fvsPatchField<Type>(ptf, p, iF, mapper) +{ + if (!isType<symmetryPlaneFvPatch>(this->patch())) + { + FatalErrorIn + ( + "symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField\n" + "(\n" + " const symmetryPlaneFvsPatchField<Type>& ptf,\n" + " const fvPatch& p,\n" + " const DimensionedField<Type, surfaceMesh>& iF,\n" + " const fvPatchFieldMapper& mapper\n" + ")\n" + ) << "Field type does not correspond to patch type for patch " + << this->patch().index() << "." << endl + << "Field type: " << typeName << endl + << "Patch type: " << this->patch().type() + << exit(FatalError); + } +} + + +template<class Type> +symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField +( + const fvPatch& p, + const DimensionedField<Type, surfaceMesh>& iF, + const dictionary& dict +) +: + fvsPatchField<Type>(p, iF, dict) +{ + if (!isType<symmetryPlaneFvPatch>(p)) + { + FatalIOErrorIn + ( + "symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField\n" + "(\n" + " const fvPatch& p,\n" + " const Field<Type>& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "patch " << this->patch().index() << " not symmetryPlane type. " + << "Patch type = " << p.type() + << exit(FatalIOError); + } +} + + +template<class Type> +symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField +( + const symmetryPlaneFvsPatchField<Type>& ptf +) +: + fvsPatchField<Type>(ptf) +{} + + +template<class Type> +symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField +( + const symmetryPlaneFvsPatchField<Type>& ptf, + const DimensionedField<Type, surfaceMesh>& iF +) +: + fvsPatchField<Type>(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H new file mode 100644 index 00000000000..8dd20356101 --- /dev/null +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchField.H @@ -0,0 +1,139 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +Class + Foam::symmetryPlaneFvsPatchField + +Description + Foam::symmetryPlaneFvsPatchField + +SourceFiles + symmetryPlaneFvsPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlaneFvsPatchField_H +#define symmetryPlaneFvsPatchField_H + +#include "fvsPatchField.H" +#include "symmetryPlaneFvPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class symmetryPlaneFvsPatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class symmetryPlaneFvsPatchField +: + public fvsPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName(symmetryPlaneFvPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + symmetryPlaneFvsPatchField + ( + const fvPatch&, + const DimensionedField<Type, surfaceMesh>& + ); + + //- Construct from patch, internal field and dictionary + symmetryPlaneFvsPatchField + ( + const fvPatch&, + const DimensionedField<Type, surfaceMesh>&, + const dictionary& + ); + + //- Construct by mapping given symmetryPlaneFvsPatchField + // onto a new patch + symmetryPlaneFvsPatchField + ( + const symmetryPlaneFvsPatchField<Type>&, + const fvPatch&, + const DimensionedField<Type, surfaceMesh>&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + symmetryPlaneFvsPatchField + ( + const symmetryPlaneFvsPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<fvsPatchField<Type> > clone() const + { + return tmp<fvsPatchField<Type> > + ( + new symmetryPlaneFvsPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + symmetryPlaneFvsPatchField + ( + const symmetryPlaneFvsPatchField<Type>&, + const DimensionedField<Type, surfaceMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<fvsPatchField<Type> > clone + ( + const DimensionedField<Type, surfaceMesh>& iF + ) const + { + return tmp<fvsPatchField<Type> > + ( + new symmetryPlaneFvsPatchField<Type>(*this, iF) + ); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "symmetryPlaneFvsPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFields.C b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFields.C new file mode 100644 index 00000000000..0d881f615c0 --- /dev/null +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFields.C @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlaneFvsPatchFields.H" +#include "fvsPatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFvsPatchFields(symmetryPlane); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFields.H b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFields.H new file mode 100644 index 00000000000..b7d5e2cab80 --- /dev/null +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFields.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlaneFvsPatchFields_H +#define symmetryPlaneFvsPatchFields_H + +#include "symmetryPlaneFvsPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFvsPatchTypeFieldTypedefs(symmetryPlane); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFieldsFwd.H b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFieldsFwd.H new file mode 100644 index 00000000000..c041cbf295b --- /dev/null +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/symmetryPlane/symmetryPlaneFvsPatchFieldsFwd.H @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlaneFvsPatchFieldsFwd_H +#define symmetryPlaneFvsPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class symmetryPlaneFvsPatchField; + +makeFvsPatchTypeFieldTypedefs(symmetryPlane); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.H index 11ca298ec4e..ba10021d519 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/symmetry/symmetryFvPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ Class Foam::symmetryFvPatch Description - Symmetry-plane patch. + Symmetry patch for non-planar or multi-plane patches. SourceFiles symmetryFvPatch.C diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/symmetryPlane/symmetryPlaneFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/symmetryPlane/symmetryPlaneFvPatch.C new file mode 100644 index 00000000000..cabfd123c6b --- /dev/null +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/symmetryPlane/symmetryPlaneFvPatch.C @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlaneFvPatch.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defineTypeNameAndDebug(symmetryPlaneFvPatch, 0); +addToRunTimeSelectionTable(fvPatch, symmetryPlaneFvPatch, polyPatch); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/symmetryPlane/symmetryPlaneFvPatch.H b/src/finiteVolume/fvMesh/fvPatches/constraint/symmetryPlane/symmetryPlaneFvPatch.H new file mode 100644 index 00000000000..069b37b6bc3 --- /dev/null +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/symmetryPlane/symmetryPlaneFvPatch.H @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 <http://www.gnu.org/licenses/>. + +Class + Foam::symmetryPlaneFvPatch + +Description + Symmetry-plane patch. + +SourceFiles + symmetryPlaneFvPatch.C + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlaneFvPatch_H +#define symmetryPlaneFvPatch_H + +#include "fvPatch.H" +#include "symmetryPlanePolyPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class symmetryPlaneFvPatch Declaration +\*---------------------------------------------------------------------------*/ + +class symmetryPlaneFvPatch +: + public fvPatch +{ + // Private data + + //- Local reference cast into the symmetryPlane patch + const symmetryPlanePolyPatch& symmetryPlanePolyPatch_; + + +public: + + //- Runtime type information + TypeName(symmetryPlanePolyPatch::typeName_()); + + + // Constructors + + //- Construct from polyPatch + symmetryPlaneFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm) + : + fvPatch(patch, bm), + symmetryPlanePolyPatch_ + ( + refCast<const symmetryPlanePolyPatch>(patch) + ) + {} + + + // Member Functions + + //- Return symmetry plane normal + const vector& n() const + { + return symmetryPlanePolyPatch_.n(); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/basic/particle/particle.H b/src/lagrangian/basic/particle/particle.H index 0275cc5fd1e..6cb1838e83a 100644 --- a/src/lagrangian/basic/particle/particle.H +++ b/src/lagrangian/basic/particle/particle.H @@ -55,6 +55,7 @@ class polyPatch; class cyclicPolyPatch; class processorPolyPatch; +class symmetryPlanePolyPatch; class symmetryPolyPatch; class wallPolyPatch; class wedgePolyPatch; @@ -248,6 +249,15 @@ protected: template<class TrackData> void hitWedgePatch(const wedgePolyPatch&, TrackData& td); + //- Overridable function to handle the particle hitting a + // symmetryPlanePatch + template<class TrackData> + void hitSymmetryPlanePatch + ( + const symmetryPlanePolyPatch&, + TrackData& td + ); + //- Overridable function to handle the particle hitting a // symmetryPatch template<class TrackData> diff --git a/src/lagrangian/basic/particle/particleTemplates.C b/src/lagrangian/basic/particle/particleTemplates.C index ad50f7ddd82..3f47fe82e6a 100644 --- a/src/lagrangian/basic/particle/particleTemplates.C +++ b/src/lagrangian/basic/particle/particleTemplates.C @@ -28,6 +28,7 @@ License #include "cyclicPolyPatch.H" #include "cyclicAMIPolyPatch.H" #include "processorPolyPatch.H" +#include "symmetryPlanePolyPatch.H" #include "symmetryPolyPatch.H" #include "wallPolyPatch.H" #include "wedgePolyPatch.H" @@ -585,6 +586,13 @@ Foam::scalar Foam::particle::trackToFace static_cast<const wedgePolyPatch&>(patch), td ); } + else if (isA<symmetryPlanePolyPatch>(patch)) + { + p.hitSymmetryPlanePatch + ( + static_cast<const symmetryPlanePolyPatch&>(patch), td + ); + } else if (isA<symmetryPolyPatch>(patch)) { p.hitSymmetryPatch @@ -958,6 +966,20 @@ void Foam::particle::hitWedgePatch } +template<class TrackData> +void Foam::particle::hitSymmetryPlanePatch +( + const symmetryPlanePolyPatch& spp, + TrackData& +) +{ + vector nf = normal(); + nf /= mag(nf); + + transformProperties(I - 2.0*nf*nf); +} + + template<class TrackData> void Foam::particle::hitSymmetryPatch ( diff --git a/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C b/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C index b861bdb0372..c8e8be3d06b 100644 --- a/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C +++ b/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C @@ -141,6 +141,17 @@ void Foam::trackedParticle::hitWedgePatch } +void Foam::trackedParticle::hitSymmetryPlanePatch +( + const symmetryPlanePolyPatch&, + trackingData& td +) +{ + // Remove particle + td.keepParticle = false; +} + + void Foam::trackedParticle::hitSymmetryPatch ( const symmetryPolyPatch&, diff --git a/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.H b/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.H index 30acbc2fcc3..4500cab11df 100644 --- a/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.H +++ b/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.H @@ -214,7 +214,15 @@ public: ); //- Overridable function to handle the particle hitting a - // symmetryPlane + // symmetry plane + void hitSymmetryPlanePatch + ( + const symmetryPlanePolyPatch&, + trackingData& td + ); + + //- Overridable function to handle the particle hitting a + // symmetry patch void hitSymmetryPatch ( const symmetryPolyPatch&, diff --git a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C index 5fe71cac6ea..ad4d234a35d 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C @@ -140,6 +140,17 @@ void Foam::findCellParticle::hitWedgePatch } +void Foam::findCellParticle::hitSymmetryPlanePatch +( + const symmetryPlanePolyPatch&, + trackingData& td +) +{ + // Remove particle + td.keepParticle = false; +} + + void Foam::findCellParticle::hitSymmetryPatch ( const symmetryPolyPatch&, diff --git a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H index 0e87f644e26..82a430778a2 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H +++ b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H @@ -196,7 +196,15 @@ public: ); //- Overridable function to handle the particle hitting a - // symmetryPlane + // symmetry plane + void hitSymmetryPlanePatch + ( + const symmetryPlanePolyPatch&, + trackingData& td + ); + + //- Overridable function to handle the particle hitting a + // symmetry patch void hitSymmetryPatch ( const symmetryPolyPatch&, diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C index ff03f1160b3..b62409d6bb1 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C @@ -345,6 +345,17 @@ void Foam::streamLineParticle::hitWedgePatch } +void Foam::streamLineParticle::hitSymmetryPlanePatch +( + const symmetryPlanePolyPatch& pp, + trackingData& td +) +{ + // Remove particle + td.keepParticle = false; +} + + void Foam::streamLineParticle::hitSymmetryPatch ( const symmetryPolyPatch& pp, diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H index 02bd609933f..381680bf9a0 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H @@ -237,7 +237,15 @@ public: ); //- Overridable function to handle the particle hitting a - // symmetryPlane + // symmetry plane + void hitSymmetryPlanePatch + ( + const symmetryPlanePolyPatch&, + trackingData& td + ); + + //- Overridable function to handle the particle hitting a + // symmetry patch void hitSymmetryPatch ( const symmetryPolyPatch&, diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H index df93215be1a..85979062194 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H @@ -159,7 +159,16 @@ protected: ); //- Overridable function to handle the particle hitting a - // symmetryPlane + // symmetry plane + template<class TrackData> + void hitSymmetryPlanePatch + ( + const symmetryPlanePolyPatch&, + TrackData& td + ); + + //- Overridable function to handle the particle hitting a + // symmetry patch template<class TrackData> void hitSymmetryPatch ( diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C index 18b1b37a898..265621ae05e 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C @@ -80,6 +80,13 @@ void Foam::wallBoundedParticle::patchInteraction static_cast<const wedgePolyPatch&>(patch), td ); } + else if (isA<symmetryPlanePolyPatch>(patch)) + { + p.hitSymmetryPlanePatch + ( + static_cast<const symmetryPlanePolyPatch&>(patch), td + ); + } else if (isA<symmetryPolyPatch>(patch)) { p.hitSymmetryPatch @@ -403,6 +410,18 @@ void Foam::wallBoundedParticle::hitWedgePatch } +template<class TrackData> +void Foam::wallBoundedParticle::hitSymmetryPlanePatch +( + const symmetryPlanePolyPatch& pp, + TrackData& td +) +{ + // Remove particle + td.keepParticle = false; +} + + template<class TrackData> void Foam::wallBoundedParticle::hitSymmetryPatch ( diff --git a/tutorials/basic/potentialFoam/cylinder/0.org/U b/tutorials/basic/potentialFoam/cylinder/0.org/U index c4b3d7fb847..d6116b31aab 100644 --- a/tutorials/basic/potentialFoam/cylinder/0.org/U +++ b/tutorials/basic/potentialFoam/cylinder/0.org/U @@ -43,7 +43,7 @@ boundaryField cylinder { - type symmetryPlane; + type symmetry; } defaultFaces diff --git a/tutorials/basic/potentialFoam/cylinder/0.org/p b/tutorials/basic/potentialFoam/cylinder/0.org/p index 89f2085d0de..6f49804a73c 100644 --- a/tutorials/basic/potentialFoam/cylinder/0.org/p +++ b/tutorials/basic/potentialFoam/cylinder/0.org/p @@ -43,7 +43,7 @@ boundaryField cylinder { - type symmetryPlane; + type symmetry; } defaultFaces diff --git a/tutorials/basic/potentialFoam/cylinder/constant/polyMesh/blockMeshDict b/tutorials/basic/potentialFoam/cylinder/constant/polyMesh/blockMeshDict index b234ca868aa..7bfe080d73f 100644 --- a/tutorials/basic/potentialFoam/cylinder/constant/polyMesh/blockMeshDict +++ b/tutorials/basic/potentialFoam/cylinder/constant/polyMesh/blockMeshDict @@ -138,7 +138,7 @@ boundary } cylinder { - type symmetryPlane; + type symmetry; faces ( (10 5 24 29) diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryT b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryT index 53679a4d401..ef322d8c87d 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryT +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryT @@ -26,7 +26,7 @@ boundaryField value uniform 300; } - entrance + "entrance.*" { type symmetryPlane; } diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryU b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryU index ea3b12802ee..744ecbbfb81 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryU +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/boundaryU @@ -26,7 +26,7 @@ boundaryField value uniform (1936 0 0); } - entrance + "entrance.*" { type symmetryPlane; } diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/dsmcRhoN b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/dsmcRhoN index d4692578fb6..785995c6cf9 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/dsmcRhoN +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/dsmcRhoN @@ -25,7 +25,7 @@ boundaryField type zeroGradient; } - entrance + "entrance.*" { type symmetryPlane; } diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/fD b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/fD index 25c79baa0df..7b9c6df33ab 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/fD +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/fD @@ -26,7 +26,7 @@ boundaryField value uniform (0 0 0); } - entrance + "entrance.*" { type symmetryPlane; } diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/iDof b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/iDof index a7675b5581c..ead6eebcbd0 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/iDof +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/iDof @@ -25,7 +25,7 @@ boundaryField type zeroGradient; } - entrance + "entrance.*" { type symmetryPlane; } diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/internalE b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/internalE index f906279f837..ced72b0e8dc 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/internalE +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/internalE @@ -25,7 +25,7 @@ boundaryField type zeroGradient; } - entrance + "entrance.*" { type symmetryPlane; } diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/linearKE b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/linearKE index 46d7cf4032d..0bd68d2dd0b 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/linearKE +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/linearKE @@ -25,7 +25,7 @@ boundaryField type zeroGradient; } - entrance + "entrance.*" { type symmetryPlane; } diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/momentum b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/momentum index 366978bbc47..2a65f62e049 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/momentum +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/momentum @@ -25,7 +25,7 @@ boundaryField type zeroGradient; } - entrance + "entrance.*" { type symmetryPlane; } diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/q b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/q index 497d603d75e..49d5c4c775c 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/q +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/q @@ -27,7 +27,7 @@ boundaryField } - entrance + "entrance.*" { type symmetryPlane; } diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/rhoM b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/rhoM index 20a8d376945..a07b9b4cc57 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/rhoM +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/rhoM @@ -25,7 +25,7 @@ boundaryField type zeroGradient; } - entrance + "entrance.*" { type symmetryPlane; } diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/rhoN b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/rhoN index 9aec13a5eed..10cad731ebd 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/rhoN +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/0/rhoN @@ -25,7 +25,7 @@ boundaryField type zeroGradient; } - entrance + "entrance.*" { type symmetryPlane; } diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/constant/polyMesh/blockMeshDict b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/constant/polyMesh/blockMeshDict index 66a179d00eb..599dfd540ca 100644 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/constant/polyMesh/blockMeshDict +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/constant/polyMesh/blockMeshDict @@ -56,12 +56,20 @@ boundary ); } - entrance + entrance1 { type symmetryPlane; faces ( (0 1 5 4) + ); + } + + entrance2 + { + type symmetryPlane; + faces + ( (0 3 2 1) ); } diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/U b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/U index b6507db443d..9b63f3c191a 100644 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/U +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/U @@ -33,7 +33,7 @@ boundaryField } up { - type symmetryPlane; + type symmetry; } hole { diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/kl b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/kl index 496477b8a65..b35fc203808 100644 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/kl +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/kl @@ -34,7 +34,7 @@ boundaryField } up { - type symmetryPlane; + type symmetry; } hole { diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/kt b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/kt index 265bd65e66f..c64ca0f6cff 100644 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/kt +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/kt @@ -34,7 +34,7 @@ boundaryField } up { - type symmetryPlane; + type symmetry; } hole { diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/nut b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/nut index e2a11d2cffc..435c96ce84a 100644 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/nut +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/nut @@ -33,7 +33,7 @@ boundaryField } up { - type symmetryPlane; + type symmetry; } hole { diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/omega b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/omega index 9ed9c7a2dc0..fed86624a8e 100644 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/omega +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/omega @@ -34,7 +34,7 @@ boundaryField } up { - type symmetryPlane; + type symmetry; } hole { diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/p b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/p index fbb21d38abc..e2ef78a3210 100644 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/p +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/0/p @@ -31,7 +31,7 @@ boundaryField } up { - type symmetryPlane; + type symmetry; } hole { diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/polyMesh/blockMeshDict b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/polyMesh/blockMeshDict index 64e4d59a024..28e1b8a9f39 100644 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/polyMesh/blockMeshDict +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/constant/polyMesh/blockMeshDict @@ -67,7 +67,7 @@ boundary ( left { - type symmetryPlane; + type symmetry; faces ( (8 9 20 19) @@ -85,7 +85,7 @@ boundary } down { - type symmetryPlane; + type symmetry; faces ( (0 1 12 11) @@ -94,7 +94,7 @@ boundary } up { - type symmetryPlane; + type symmetry; faces ( (7 8 19 18) diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/U b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/U index 8cbb63e1160..cee307a730f 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/U +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/U @@ -54,7 +54,7 @@ boundaryField { type symmetryPlane; } - frontAndBack + "(front|back)" { type symmetryPlane; } diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/frontBackUpperPatches b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/frontBackUpperPatches index 69519e55ad0..ae6ea03155c 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/frontBackUpperPatches +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/include/frontBackUpperPatches @@ -11,7 +11,7 @@ upperWall type symmetryPlane; } -frontAndBack +"(front|back)" { type symmetryPlane; } diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/k b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/k index 17fb5eca6d0..b4cd87638c3 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/k +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/k @@ -46,7 +46,7 @@ boundaryField { type symmetryPlane; } - frontAndBack + "(front|back)" { type symmetryPlane; } diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nuTilda b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nuTilda index 8fb0fba67ec..41461e67111 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nuTilda +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nuTilda @@ -46,7 +46,7 @@ boundaryField { type symmetryPlane; } - frontAndBack + "(front|back)" { type symmetryPlane; } diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nut b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nut index 9f5768c2e73..915f16d2257 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nut +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/nut @@ -21,7 +21,7 @@ internalField uniform 0; boundaryField { - frontAndBack + "(front|back)" { type symmetryPlane; value uniform 0; diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/p b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/p index ea47d98bd96..f85ce77a8ce 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/p +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/0.org/p @@ -42,7 +42,7 @@ boundaryField { type symmetryPlane; } - frontAndBack + "(front|back)" { type symmetryPlane; } diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict index ecd71ab96cb..53f4ee34474 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict @@ -40,12 +40,19 @@ edges boundary ( - frontAndBack + front { type symmetryPlane; faces ( (3 7 6 2) + ); + } + back + { + type symmetryPlane; + faces + ( (1 5 4 0) ); } diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict.8pSmall b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict.8pSmall index 9272e693015..c865acf47b5 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict.8pSmall +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/blockMeshDict.8pSmall @@ -40,12 +40,19 @@ edges boundary ( - frontAndBack + front { type symmetryPlane; faces ( (3 7 6 2) + ); + } + back + { + type symmetryPlane; + faces + ( (1 5 4 0) ); } diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/boundary b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/boundary index 70a305827af..40530a746d0 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/boundary +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/constant/polyMesh/boundary @@ -15,15 +15,22 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -5 +6 ( - frontAndBack + front { type symmetryPlane; inGroups 1(symmetryPlane); - nFaces 320; + nFaces 160; startFace 3456; } + back + { + type symmetryPlane; + inGroups 1(symmetryPlane); + nFaces 160; + startFace 3616; + } inlet { type patch; diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSchemes b/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSchemes index 70e7cf49ab6..84e4f5d57df 100644 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSchemes +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSchemes @@ -28,13 +28,13 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss linearUpwind grad(U); + div(rhoPhi,U) Gauss linearUpwind grad(U); div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression 1; div(phid1,p_rgh) Gauss upwind; div(phid2,p_rgh) Gauss upwind; - div(rho*phi,T) Gauss linearUpwind unlimited; - div(rho*phi,K) Gauss upwind; + div(rhoPhi,T) Gauss linearUpwind unlimited; + div(rhoPhi,K) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div((muEff*dev2(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/U b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/U index 92d3cfd744c..cdfb0476f51 100644 --- a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/U +++ b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/U @@ -39,7 +39,7 @@ boundaryField sides { - type symmetryPlane; + type symmetry; } atmosphere diff --git a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/alpha.water.org b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/alpha.water.org index d722029120e..9f0c8ce1fc6 100644 --- a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/alpha.water.org +++ b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/alpha.water.org @@ -34,7 +34,7 @@ boundaryField sides { - type symmetryPlane; + type symmetry; } atmosphere diff --git a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/k b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/k index 9f4d8df1c01..aad177972c3 100644 --- a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/k +++ b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/k @@ -34,7 +34,7 @@ boundaryField sides { - type symmetryPlane; + type symmetry; } atmosphere diff --git a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/nut b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/nut index 5106e2b1029..c36622b5504 100644 --- a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/nut +++ b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/nut @@ -34,7 +34,7 @@ boundaryField sides { - type symmetryPlane; + type symmetry; } atmosphere diff --git a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/omega b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/omega index 885912311ac..cf768115ca3 100644 --- a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/omega +++ b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/omega @@ -40,7 +40,7 @@ boundaryField sides { - type symmetryPlane; + type symmetry; } atmosphere diff --git a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/p_rgh b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/p_rgh index 83553165570..d041cce82d0 100644 --- a/tutorials/multiphase/LTSInterFoam/wigleyHull/0/p_rgh +++ b/tutorials/multiphase/LTSInterFoam/wigleyHull/0/p_rgh @@ -33,7 +33,7 @@ boundaryField sides { - type symmetryPlane; + type symmetry; } atmosphere diff --git a/tutorials/multiphase/LTSInterFoam/wigleyHull/constant/polyMesh/blockMeshDict b/tutorials/multiphase/LTSInterFoam/wigleyHull/constant/polyMesh/blockMeshDict index 15c061cdf7c..989ecac8b0a 100644 --- a/tutorials/multiphase/LTSInterFoam/wigleyHull/constant/polyMesh/blockMeshDict +++ b/tutorials/multiphase/LTSInterFoam/wigleyHull/constant/polyMesh/blockMeshDict @@ -68,7 +68,7 @@ boundary sides { - type symmetryPlane; + type symmetry; faces ( (1 5 4 0) diff --git a/tutorials/multiphase/MRFInterFoam/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/MRFInterFoam/mixerVessel2D/system/fvSchemes index 568660217fe..e6b91940f08 100644 --- a/tutorials/multiphase/MRFInterFoam/mixerVessel2D/system/fvSchemes +++ b/tutorials/multiphase/MRFInterFoam/mixerVessel2D/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss linear; + div(rhoPhi,U) Gauss linear; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/MRFMultiphaseInterFoam/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/MRFMultiphaseInterFoam/mixerVessel2D/system/fvSchemes index d1ed26cae3b..8c391523146 100644 --- a/tutorials/multiphase/MRFMultiphaseInterFoam/mixerVessel2D/system/fvSchemes +++ b/tutorials/multiphase/MRFMultiphaseInterFoam/mixerVessel2D/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss limitedLinearV 1; + div(rhoPhi,U) Gauss limitedLinearV 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/fvSchemes b/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/fvSchemes index 3d39f5b409e..85be6a2abe5 100644 --- a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/fvSchemes @@ -30,11 +30,11 @@ divSchemes div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression 1; - div(rho*phi,U) Gauss vanLeerV; + div(rhoPhi,U) Gauss vanLeerV; div(phi,thermo:rho.water) Gauss linear; div(phi,thermo:rho.air) Gauss linear; - div(rho*phi,T) Gauss vanLeer; - div(rho*phi,K) Gauss linear; + div(rhoPhi,T) Gauss vanLeer; + div(rhoPhi,K) Gauss linear; div((phi+meshPhi),p) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSchemes index b44890f3896..2003e43e507 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSchemes @@ -30,11 +30,11 @@ divSchemes div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression 1; - div(rho*phi,U) Gauss upwind; + div(rhoPhi,U) Gauss upwind; div(phi,thermo:rho.water) Gauss upwind; div(phi,thermo:rho.air) Gauss upwind; - div(rho*phi,T) Gauss upwind; - div(rho*phi,K) Gauss upwind; + div(rhoPhi,T) Gauss upwind; + div(rhoPhi,K) Gauss upwind; div(phi,p) Gauss upwind; div(phi,k) Gauss upwind; diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSchemes index b44890f3896..2003e43e507 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSchemes @@ -30,11 +30,11 @@ divSchemes div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression 1; - div(rho*phi,U) Gauss upwind; + div(rhoPhi,U) Gauss upwind; div(phi,thermo:rho.water) Gauss upwind; div(phi,thermo:rho.air) Gauss upwind; - div(rho*phi,T) Gauss upwind; - div(rho*phi,K) Gauss upwind; + div(rhoPhi,T) Gauss upwind; + div(rhoPhi,K) Gauss upwind; div(phi,p) Gauss upwind; div(phi,k) Gauss upwind; diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0.org/T b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0.org/T index 1dc67cd149c..8041c3700d9 100644 --- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0.org/T +++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/0.org/T @@ -39,7 +39,7 @@ boundaryField atmosphere { type inletOutlet; - phi rho*phi; + phi rhoPhi; inletValue $internalField; } defaultFaces diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes index 9f3fac1dce5..fd250014359 100644 --- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes +++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/system/fvSchemes @@ -27,12 +27,12 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss upwind; + div(rhoPhi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; "div\(phi,.*rho.*\)" Gauss upwind; - div(rho*phi,T) Gauss upwind; - div(rho*phi,K) Gauss upwind; + div(rhoPhi,T) Gauss upwind; + div(rhoPhi,K) Gauss upwind; div(phi,p) Gauss upwind; div((muEff*dev2(T(grad(U))))) Gauss linear; } diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict index 6c2f78df72a..7132713ff0c 100644 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict +++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict @@ -41,7 +41,7 @@ dynamicRefineFvMeshCoeffs ( (phi none) (nHatf none) - (rho*phi none) + (rhoPhi none) (ghf none) ); // Write the refinement level as a volScalarField diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes index ba444728e19..6a01390f25e 100644 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss upwind; + div(rhoPhi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/fvSchemes index 70e7cf49ab6..84e4f5d57df 100644 --- a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/fvSchemes @@ -28,13 +28,13 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss linearUpwind grad(U); + div(rhoPhi,U) Gauss linearUpwind grad(U); div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression 1; div(phid1,p_rgh) Gauss upwind; div(phid2,p_rgh) Gauss upwind; - div(rho*phi,T) Gauss linearUpwind unlimited; - div(rho*phi,K) Gauss upwind; + div(rhoPhi,T) Gauss linearUpwind unlimited; + div(rhoPhi,K) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div((muEff*dev2(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes index b2c0af769de..90379ecc541 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss vanLeerV; + div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes index b2c0af769de..90379ecc541 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss vanLeerV; + div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes index b2c0af769de..90379ecc541 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss vanLeerV; + div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSchemes index b2c0af769de..90379ecc541 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss vanLeerV; + div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes index b2c0af769de..90379ecc541 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss vanLeerV; + div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes index b2c0af769de..90379ecc541 100644 --- a/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes +++ b/tutorials/multiphase/interDyMFoam/ras/testTubeMixer/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss vanLeerV; + div(rhoPhi,U) Gauss vanLeerV; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss vanLeer; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/interFoam/laminar/capillaryRise/system/fvSchemes b/tutorials/multiphase/interFoam/laminar/capillaryRise/system/fvSchemes index aded32f1953..ef8581b85fa 100644 --- a/tutorials/multiphase/interFoam/laminar/capillaryRise/system/fvSchemes +++ b/tutorials/multiphase/interFoam/laminar/capillaryRise/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss upwind; + div(rhoPhi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes b/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes index 1d9632b6746..672ec59cc1f 100644 --- a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes +++ b/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss limitedLinearV 1; + div(rhoPhi,U) Gauss limitedLinearV 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution b/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution index 9e473a78650..0836eb66e57 100644 --- a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution +++ b/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - alpha.water + "alpha.water.*" { nAlphaCorr 2; nAlphaSubCycles 1; diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/controlDict b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/controlDict index 64eae52fe0c..bfea3cad847 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/controlDict +++ b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/controlDict @@ -66,7 +66,7 @@ functions fields ( - rho*phi + rhoPhi ); } diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes index de873558162..803b55e9954 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/waterChannel/LTSInterFoam/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss linearUpwind grad(U); + div(rhoPhi,U) Gauss linearUpwind grad(U); div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div(phi,k) Gauss upwind; diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/controlDict b/tutorials/multiphase/interFoam/ras/waterChannel/system/controlDict index 05b109778c5..7d4ac3e2ef2 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/system/controlDict +++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/controlDict @@ -67,7 +67,7 @@ functions fields ( - rho*phi + rhoPhi ); } diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes index 11fc30f2729..053e51aa7f2 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSchemes @@ -29,7 +29,7 @@ divSchemes { default none; - div(rho*phi,U) Gauss linearUpwind grad(U); + div(rhoPhi,U) Gauss linearUpwind grad(U); div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSolution b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSolution index f6208ef3d23..1a7bff2000b 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSolution +++ b/tutorials/multiphase/interFoam/ras/waterChannel/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - alpha.water + "alpha.water.*" { nAlphaCorr 1; nAlphaSubCycles 1; diff --git a/tutorials/multiphase/interFoam/ras/weirOverflow/system/fvSchemes b/tutorials/multiphase/interFoam/ras/weirOverflow/system/fvSchemes index 8ed8e03cc08..3869ad107b6 100644 --- a/tutorials/multiphase/interFoam/ras/weirOverflow/system/fvSchemes +++ b/tutorials/multiphase/interFoam/ras/weirOverflow/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss linear; + div(rhoPhi,U) Gauss linear; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div(phi,k) Gauss upwind; diff --git a/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/fvSchemes b/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/fvSchemes index ea304e7042c..1de7b2421d4 100644 --- a/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/fvSchemes +++ b/tutorials/multiphase/interMixingFoam/laminar/damBreak/system/fvSchemes @@ -27,7 +27,7 @@ gradSchemes divSchemes { - div(rho*phi,U) Gauss limitedLinearV 1; + div(rhoPhi,U) Gauss limitedLinearV 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div((muEff*dev(T(grad(U))))) Gauss linear; diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/U b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/U index 35049b5a32a..2929f0e5869 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/U +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/U @@ -36,7 +36,7 @@ boundaryField walls { - type symmetryPlane; + type symmetry; } bullet diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/alpha.water b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/alpha.water index 6ca929b8551..c08ba3184e0 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/alpha.water +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/alpha.water @@ -35,7 +35,7 @@ boundaryField walls { - type symmetryPlane; + type symmetry; } bullet diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/p_rgh b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/p_rgh index f2ef63d0be0..1106c436ecf 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/p_rgh +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/0/p_rgh @@ -34,7 +34,7 @@ boundaryField walls { - type symmetryPlane; + type symmetry; } bullet diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/blockMeshDict b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/blockMeshDict index 100156548dc..a88ee223dcf 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/blockMeshDict +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/blockMeshDict @@ -54,7 +54,7 @@ boundary } walls { - type symmetryPlane; + type symmetry; faces ( (0 4 7 3) diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary index 17c34d0093b..c87bd5dc917 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/constant/polyMesh/boundary @@ -31,8 +31,8 @@ FoamFile } walls { - type symmetryPlane; - inGroups 1(symmetryPlane); + type symmetry; + inGroups 1(symmetry); nFaces 3000; startFace 1130431; } diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSolution b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSolution index 41c0ac39c6a..f19f2cd8b23 100644 --- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSolution +++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/fvSolution @@ -16,7 +16,7 @@ FoamFile solvers { - alpha.water + "alpha.water.*" { cAlpha 0; nAlphaCorr 2; diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes index c4837bb39f9..84a24f49246 100644 --- a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes +++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes { default none; - div(rho*phi,U) Gauss linear; + div(rhoPhi,U) Gauss linear; div(phi,alpha) Gauss vanLeer; div(phi,k) Gauss limitedLinear 1; div((muEff*dev(T(grad(U))))) Gauss linear; -- GitLab