diff --git a/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C b/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C index fcb38fb9a5..56809f5972 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(boundary()[patchI])) + else if + ( + isA(boundary()[patchI]) + || isA(boundary()[patchI]) + ) { fluentMeshFile << 7; } @@ -280,7 +285,11 @@ void Foam::fluentFvMesh::writeFluentMesh() const { fluentMeshFile << "wall "; } - else if (isA(boundary()[patchI])) + else if + ( + isA(boundary()[patchI]) + || isA(boundary()[patchI]) + ) { fluentMeshFile << "symmetry "; } diff --git a/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C b/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C index de9af38b87..11874fe2ea 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 (patches[patchNo]) + && !isType + (patches[patchNo]) && !isType (patches[patchNo]) && !isType diff --git a/etc/caseDicts/setConstraintTypes b/etc/caseDicts/setConstraintTypes index 1678e2a147..6b075c7382 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 8f811534dc..68d8f86a44 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 4d2062b421..33810bc56b 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 0000000000..b91c965e92 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlanePointPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +symmetryPlanePointPatchField::symmetryPlanePointPatchField +( + const pointPatch& p, + const DimensionedField& iF +) +: + basicSymmetryPointPatchField(p, iF), + symmetryPlanePatch_(refCast(p)) +{} + + +template +symmetryPlanePointPatchField::symmetryPlanePointPatchField +( + const pointPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + basicSymmetryPointPatchField(p, iF, dict), + symmetryPlanePatch_(refCast(p)) +{ + if (!isType(p)) + { + FatalIOErrorIn + ( + "symmetryPlanePointPatchField::symmetryPlanePointPatchField\n" + "(\n" + " const pointPatch& p,\n" + " const Field& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "patch " << this->patch().index() << " not symmetry type. " + << "Patch type = " << p.type() + << exit(FatalIOError); + } +} + + +template +symmetryPlanePointPatchField::symmetryPlanePointPatchField +( + const symmetryPlanePointPatchField& ptf, + const pointPatch& p, + const DimensionedField& iF, + const pointPatchFieldMapper& mapper +) +: + basicSymmetryPointPatchField(ptf, p, iF, mapper), + symmetryPlanePatch_(refCast(p)) +{ + if (!isType(this->patch())) + { + FatalErrorIn + ( + "symmetryPlanePointPatchField::symmetryPlanePointPatchField\n" + "(\n" + " const symmetryPlanePointPatchField& ptf,\n" + " const pointPatch& p,\n" + " const DimensionedField& 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 +symmetryPlanePointPatchField::symmetryPlanePointPatchField +( + const symmetryPlanePointPatchField& ptf, + const DimensionedField& iF +) +: + basicSymmetryPointPatchField(ptf, iF), + symmetryPlanePatch_(ptf.symmetryPlanePatch_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::symmetryPlanePointPatchField::evaluate +( + const Pstream::commsTypes +) +{ + vector nHat = symmetryPlanePatch_.n(); + + tmp > tvalues = + ( + ( + this->patchInternalField() + + transform(I - 2.0*sqr(nHat), this->patchInternalField()) + )/2.0 + ); + + // Get internal field to insert values into + Field& iF = const_cast&>(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 0000000000..c3774789d8 --- /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 . + +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 symmetryPlanePointPatchField +: + public basicSymmetryPointPatchField +{ + // 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& + ); + + //- Construct from patch, internal field and dictionary + symmetryPlanePointPatchField + ( + const pointPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given patchField onto a new patch + symmetryPlanePointPatchField + ( + const symmetryPlanePointPatchField&, + const pointPatch&, + const DimensionedField&, + const pointPatchFieldMapper& + ); + + //- Construct and return a clone + virtual autoPtr > clone() const + { + return autoPtr > + ( + new symmetryPlanePointPatchField + ( + *this + ) + ); + } + + //- Construct as copy setting internal field reference + symmetryPlanePointPatchField + ( + const symmetryPlanePointPatchField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual autoPtr > clone + ( + const DimensionedField& iF + ) const + { + return autoPtr > + ( + new symmetryPlanePointPatchField + ( + *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 0000000000..2317f09735 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#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 0000000000..61e35ee4fe --- /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 . + +\*---------------------------------------------------------------------------*/ + +#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 9904119521..35cf991cb9 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 0000000000..f8f70537e9 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#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(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 0000000000..a791d3828f --- /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 . + +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 9df659518f..c07f46eb69 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 0000000000..49b48f8df7 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#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 0000000000..81b8afcd72 --- /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 . + +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 clone(const polyBoundaryMesh& bm) const + { + return autoPtr(new symmetryPlanePolyPatch(*this, bm)); + } + + //- Construct and return a clone, resetting the face list + // and boundary mesh + virtual autoPtr clone + ( + const polyBoundaryMesh& bm, + const label index, + const label newSize, + const label newStart + ) const + { + return autoPtr + ( + new symmetryPlanePolyPatch(*this, bm, index, newSize, newStart) + ); + } + + //- Construct and return a clone, resetting the face list + // and boundary mesh + virtual autoPtr clone + ( + const polyBoundaryMesh& bm, + const label index, + const labelUList& mapAddressing, + const label newStart + ) const + { + return autoPtr + ( + 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 67deac5810..0bcfcf48a5 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 32ab1deb1f..40f3f5467f 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 basicSymmetryFvPatchField::snGrad() const +Foam::tmp +Foam::basicSymmetryFvPatchField::snGrad() const { return tmp(new scalarField(size(), 0.0)); } template<> -void basicSymmetryFvPatchField::evaluate(const Pstream::commsTypes) +void Foam::basicSymmetryFvPatchField::evaluate +( + const Pstream::commsTypes +) { if (!updated()) { @@ -53,8 +52,4 @@ void basicSymmetryFvPatchField::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 a5812c09b4..84ee2cf8dd 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 0000000000..053a56689b --- /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 . + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlaneFvPatchField.H" + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::symmetryPlaneFvPatchField::symmetryPlaneFvPatchField +( + const fvPatch& p, + const DimensionedField& iF +) +: + basicSymmetryFvPatchField(p, iF), + symmetryPlanePatch_(refCast(p)) +{} + + +template +Foam::symmetryPlaneFvPatchField::symmetryPlaneFvPatchField +( + const symmetryPlaneFvPatchField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + basicSymmetryFvPatchField(ptf, p, iF, mapper), + symmetryPlanePatch_(refCast(p)) +{ + if (!isType(this->patch())) + { + FatalErrorIn + ( + "symmetryPlaneFvPatchField::symmetryPlaneFvPatchField\n" + "(\n" + " const symmetryPlaneFvPatchField& ptf,\n" + " const fvPatch& p,\n" + " const DimensionedField& 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 +Foam::symmetryPlaneFvPatchField::symmetryPlaneFvPatchField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + basicSymmetryFvPatchField(p, iF, dict), + symmetryPlanePatch_(refCast(p)) +{ + if (!isType(p)) + { + FatalIOErrorIn + ( + "symmetryPlaneFvPatchField::symmetryPlaneFvPatchField\n" + "(\n" + " const fvPatch& p,\n" + " const Field& 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 +Foam::symmetryPlaneFvPatchField::symmetryPlaneFvPatchField +( + const symmetryPlaneFvPatchField& ptf +) +: + basicSymmetryFvPatchField(ptf), + symmetryPlanePatch_(ptf.symmetryPlanePatch_) +{} + + +template +Foam::symmetryPlaneFvPatchField::symmetryPlaneFvPatchField +( + const symmetryPlaneFvPatchField& ptf, + const DimensionedField& iF +) +: + basicSymmetryFvPatchField(ptf, iF), + symmetryPlanePatch_(ptf.symmetryPlanePatch_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +Foam::tmp > +Foam::symmetryPlaneFvPatchField::snGrad() const +{ + vector nHat(symmetryPlanePatch_.n()); + + const Field iF(this->patchInternalField()); + + return + (transform(I - 2.0*sqr(nHat), iF) - iF) + *(this->patch().deltaCoeffs()/2.0); +} + + +template +void Foam::symmetryPlaneFvPatchField::evaluate(const Pstream::commsTypes) +{ + if (!this->updated()) + { + this->updateCoeffs(); + } + + vector nHat(symmetryPlanePatch_.n()); + + const Field iF(this->patchInternalField()); + + Field::operator= + ( + (iF + transform(I - 2.0*sqr(nHat), iF))/2.0 + ); + + transformFvPatchField::evaluate(); +} + + +template +Foam::tmp > +Foam::symmetryPlaneFvPatchField::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 > + ( + new Field + ( + this->size(), + transformMask + ( + //pow::rank>(diag) + pow + ( + diag, + pTraits::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 0000000000..5f17938aa4 --- /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 . + +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 symmetryPlaneFvPatchField +: + public basicSymmetryFvPatchField +{ + // 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& + ); + + //- Construct from patch, internal field and dictionary + symmetryPlaneFvPatchField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given symmetryPlaneFvPatchField + // onto a new patch + symmetryPlaneFvPatchField + ( + const symmetryPlaneFvPatchField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + symmetryPlaneFvPatchField + ( + const symmetryPlaneFvPatchField& + ); + + //- Construct and return a clone + virtual tmp > clone() const + { + return tmp > + ( + new symmetryPlaneFvPatchField(*this) + ); + } + + //- Construct as copy setting internal field reference + symmetryPlaneFvPatchField + ( + const symmetryPlaneFvPatchField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp > clone + ( + const DimensionedField& iF + ) const + { + return tmp > + ( + new symmetryPlaneFvPatchField(*this, iF) + ); + } + + + // Member functions + + // Evaluation functions + + //- Return gradient at boundary + virtual tmp > snGrad() const; + + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::blocking + ); + + //- Return face-gradient transform diagonal + virtual tmp > snGradTransformDiag() const; +}; + + +// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * // + +template<> +tmp symmetryPlaneFvPatchField::snGrad() const; + +template<> +void symmetryPlaneFvPatchField::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 0000000000..5430190f01 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#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 0000000000..8b32421c21 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#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 0000000000..ef8a3946a3 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlaneFvPatchFieldsFwd_H +#define symmetryPlaneFvPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template 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 0000000000..4f43940626 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlaneFvPatchField.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<> +Foam::tmp +Foam::symmetryPlaneFvPatchField::snGrad() const +{ + return tmp(new scalarField(size(), 0.0)); +} + + +template<> +void Foam::symmetryPlaneFvPatchField::evaluate +( + const Pstream::commsTypes +) +{ + if (!updated()) + { + updateCoeffs(); + } + + scalarField::operator=(patchInternalField()); + transformFvPatchField::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 0000000000..9e3477d586 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#include "symmetryPlaneFvsPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fvsPatchField(p, iF) +{} + + +template +symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField +( + const symmetryPlaneFvsPatchField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fvsPatchField(ptf, p, iF, mapper) +{ + if (!isType(this->patch())) + { + FatalErrorIn + ( + "symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField\n" + "(\n" + " const symmetryPlaneFvsPatchField& ptf,\n" + " const fvPatch& p,\n" + " const DimensionedField& 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 +symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fvsPatchField(p, iF, dict) +{ + if (!isType(p)) + { + FatalIOErrorIn + ( + "symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField\n" + "(\n" + " const fvPatch& p,\n" + " const Field& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "patch " << this->patch().index() << " not symmetryPlane type. " + << "Patch type = " << p.type() + << exit(FatalIOError); + } +} + + +template +symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField +( + const symmetryPlaneFvsPatchField& ptf +) +: + fvsPatchField(ptf) +{} + + +template +symmetryPlaneFvsPatchField::symmetryPlaneFvsPatchField +( + const symmetryPlaneFvsPatchField& ptf, + const DimensionedField& iF +) +: + fvsPatchField(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 0000000000..8dd2035610 --- /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 . + +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 symmetryPlaneFvsPatchField +: + public fvsPatchField +{ + +public: + + //- Runtime type information + TypeName(symmetryPlaneFvPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + symmetryPlaneFvsPatchField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + symmetryPlaneFvsPatchField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given symmetryPlaneFvsPatchField + // onto a new patch + symmetryPlaneFvsPatchField + ( + const symmetryPlaneFvsPatchField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + symmetryPlaneFvsPatchField + ( + const symmetryPlaneFvsPatchField& + ); + + //- Construct and return a clone + virtual tmp > clone() const + { + return tmp > + ( + new symmetryPlaneFvsPatchField(*this) + ); + } + + //- Construct as copy setting internal field reference + symmetryPlaneFvsPatchField + ( + const symmetryPlaneFvsPatchField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp > clone + ( + const DimensionedField& iF + ) const + { + return tmp > + ( + new symmetryPlaneFvsPatchField(*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 0000000000..0d881f615c --- /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 . + +\*---------------------------------------------------------------------------*/ + +#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 0000000000..b7d5e2cab8 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#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 0000000000..c041cbf295 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryPlaneFvsPatchFieldsFwd_H +#define symmetryPlaneFvsPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template 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 11ca298ec4..ba10021d51 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 0000000000..cabfd123c6 --- /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 . + +\*---------------------------------------------------------------------------*/ + +#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 0000000000..069b37b6bc --- /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 . + +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(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 0275cc5fd1..6cb1838e83 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 void hitWedgePatch(const wedgePolyPatch&, TrackData& td); + //- Overridable function to handle the particle hitting a + // symmetryPlanePatch + template + void hitSymmetryPlanePatch + ( + const symmetryPlanePolyPatch&, + TrackData& td + ); + //- Overridable function to handle the particle hitting a // symmetryPatch template diff --git a/src/lagrangian/basic/particle/particleTemplates.C b/src/lagrangian/basic/particle/particleTemplates.C index ad50f7ddd8..3f47fe82e6 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(patch), td ); } + else if (isA(patch)) + { + p.hitSymmetryPlanePatch + ( + static_cast(patch), td + ); + } else if (isA(patch)) { p.hitSymmetryPatch @@ -958,6 +966,20 @@ void Foam::particle::hitWedgePatch } +template +void Foam::particle::hitSymmetryPlanePatch +( + const symmetryPlanePolyPatch& spp, + TrackData& +) +{ + vector nf = normal(); + nf /= mag(nf); + + transformProperties(I - 2.0*nf*nf); +} + + template void Foam::particle::hitSymmetryPatch ( diff --git a/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C b/src/mesh/autoMesh/autoHexMesh/trackedParticle/trackedParticle.C index b861bdb037..c8e8be3d06 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 30acbc2fcc..4500cab11d 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 5fe71cac6e..ad4d234a35 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 0e87f644e2..82a430778a 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 ff03f1160b..b62409d6bb 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 02bd609933..381680bf9a 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 df93215be1..8597906219 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 + void hitSymmetryPlanePatch + ( + const symmetryPlanePolyPatch&, + TrackData& td + ); + + //- Overridable function to handle the particle hitting a + // symmetry patch template void hitSymmetryPatch ( diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C index 18b1b37a89..265621ae05 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(patch), td ); } + else if (isA(patch)) + { + p.hitSymmetryPlanePatch + ( + static_cast(patch), td + ); + } else if (isA(patch)) { p.hitSymmetryPatch @@ -403,6 +410,18 @@ void Foam::wallBoundedParticle::hitWedgePatch } +template +void Foam::wallBoundedParticle::hitSymmetryPlanePatch +( + const symmetryPlanePolyPatch& pp, + TrackData& td +) +{ + // Remove particle + td.keepParticle = false; +} + + template void Foam::wallBoundedParticle::hitSymmetryPatch ( diff --git a/tutorials/basic/potentialFoam/cylinder/0.org/U b/tutorials/basic/potentialFoam/cylinder/0.org/U index c4b3d7fb84..d6116b31aa 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 89f2085d0d..6f49804a73 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 b234ca868a..7bfe080d73 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 53679a4d40..ef322d8c87 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 ea3b12802e..744ecbbfb8 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 d4692578fb..785995c6cf 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 25c79baa0d..7b9c6df33a 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 a7675b5581..ead6eebcbd 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 f906279f83..ced72b0e8d 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 46d7cf4032..0bd68d2dd0 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 366978bbc4..2a65f62e04 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 497d603d75..49d5c4c775 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 20a8d37694..a07b9b4cc5 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 9aec13a5ee..10cad731eb 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 66a179d00e..599dfd540c 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 b6507db443..9b63f3c191 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 496477b8a6..b35fc20380 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 265bd65e66..c64ca0f6cf 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 e2a11d2cff..435c96ce84 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 9ed9c7a2dc..fed86624a8 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 fbb21d38ab..e2ef78a321 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 64e4d59a02..28e1b8a9f3 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 8cbb63e116..cee307a730 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 69519e55ad..ae6ea03155 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 17fb5eca6d..b4cd87638c 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 8fb0fba67e..41461e6711 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 9f5768c2e7..915f16d225 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 ea47d98bd9..f85ce77a8c 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 ecd71ab96c..53f4ee3447 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 9272e69301..c865acf47b 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 70a305827a..40530a746d 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 70e7cf49ab..84e4f5d57d 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 92d3cfd744..cdfb0476f5 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 d722029120..9f0c8ce1fc 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 9f4d8df1c0..aad177972c 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 5106e2b102..c36622b550 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 885912311a..cf768115ca 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 8355316557..d041cce82d 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 15c061cdf7..989ecac8b0 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 568660217f..e6b91940f0 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 d1ed26cae3..8c39152314 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 3d39f5b409..85be6a2abe 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 b44890f389..2003e43e50 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 b44890f389..2003e43e50 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 1dc67cd149..8041c3700d 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 9f3fac1dce..fd25001435 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 6c2f78df72..7132713ff0 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 ba444728e1..6a01390f25 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 70e7cf49ab..84e4f5d57d 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 b2c0af769d..90379ecc54 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 b2c0af769d..90379ecc54 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 b2c0af769d..90379ecc54 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 b2c0af769d..90379ecc54 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 b2c0af769d..90379ecc54 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 b2c0af769d..90379ecc54 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 aded32f195..ef8581b85f 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 1d9632b674..672ec59cc1 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 9e473a7865..0836eb66e5 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 64eae52fe0..bfea3cad84 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 de87355816..803b55e995 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 05b109778c..7d4ac3e2ef 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 11fc30f272..053e51aa7f 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 f6208ef3d2..1a7bff2000 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 8ed8e03cc0..3869ad107b 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 ea304e7042..1de7b2421d 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 35049b5a32..2929f0e586 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 6ca929b855..c08ba3184e 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 f2ef63d0be..1106c436ec 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 100156548d..a88ee223dc 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 17c34d0093..c87bd5dc91 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 41c0ac39c6..f19f2cd8b2 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 c4837bb39f..84a24f4924 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;