symmetryPlane: add symmetryPlane as a special type of symmetry condition applied to a single plane

The standard/previous general symmetry type is now named symmetry
    both in class and lookup name for consistency.  The rigorous
    symmetryPlane type is needed for moving-mesh cases in which the
    motion it constrained by one or two planes.
This commit is contained in:
Henry 2013-12-06 15:45:11 +00:00
parent 7c54adb178
commit 3f5eda25f0
114 changed files with 2318 additions and 115 deletions

View File

@ -33,6 +33,7 @@ using std::ios;
#include "fluentFvMesh.H"
#include "primitiveMesh.H"
#include "wallFvPatch.H"
#include "symmetryPlaneFvPatch.H"
#include "symmetryFvPatch.H"
#include "cellModeller.H"
@ -177,7 +178,11 @@ void Foam::fluentFvMesh::writeFluentMesh() const
{
fluentMeshFile << 3;
}
else if (isA<symmetryFvPatch>(boundary()[patchI]))
else if
(
isA<symmetryPlaneFvPatch>(boundary()[patchI])
|| isA<symmetryFvPatch>(boundary()[patchI])
)
{
fluentMeshFile << 7;
}
@ -280,7 +285,11 @@ void Foam::fluentFvMesh::writeFluentMesh() const
{
fluentMeshFile << "wall ";
}
else if (isA<symmetryFvPatch>(boundary()[patchI]))
else if
(
isA<symmetryPlaneFvPatch>(boundary()[patchI])
|| isA<symmetryFvPatch>(boundary()[patchI])
)
{
fluentMeshFile << "symmetry ";
}

View File

@ -33,6 +33,7 @@ Description
#include "fvCFD.H"
#include "pointFields.H"
#include "emptyPolyPatch.H"
#include "symmetryPlanePolyPatch.H"
#include "symmetryPolyPatch.H"
#include "wedgePolyPatch.H"
#include "OSspecific.H"
@ -286,6 +287,8 @@ int main(int argc, char *argv[])
(
!isType<emptyPolyPatch>
(patches[patchNo])
&& !isType<symmetryPlanePolyPatch>
(patches[patchNo])
&& !isType<symmetryPolyPatch>
(patches[patchNo])
&& !isType<wedgePolyPatch>

View File

@ -51,6 +51,11 @@ symmetryPlane
type symmetryPlane;
}
symmetry
{
type symmetry;
}
wedge
{
type wedge;

View File

@ -813,6 +813,7 @@ DebugSwitches
symmTensorAverageField 0;
symmTensorField 0;
symmetryPlane 0;
symmetry 0;
syringePressure 0;
tensorAverageField 0;
tensorField 0;

View File

@ -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

View File

@ -0,0 +1,149 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "symmetryPlanePointPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF
)
:
basicSymmetryPointPatchField<Type>(p, iF),
symmetryPlanePatch_(refCast<const symmetryPlanePointPatch>(p))
{}
template<class Type>
symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF,
const dictionary& dict
)
:
basicSymmetryPointPatchField<Type>(p, iF, dict),
symmetryPlanePatch_(refCast<const symmetryPlanePointPatch>(p))
{
if (!isType<symmetryPlanePointPatch>(p))
{
FatalIOErrorIn
(
"symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField\n"
"(\n"
" const pointPatch& p,\n"
" const Field<Type>& field,\n"
" const dictionary& dict\n"
")\n",
dict
) << "patch " << this->patch().index() << " not symmetry type. "
<< "Patch type = " << p.type()
<< exit(FatalIOError);
}
}
template<class Type>
symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
(
const symmetryPlanePointPatchField<Type>& ptf,
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF,
const pointPatchFieldMapper& mapper
)
:
basicSymmetryPointPatchField<Type>(ptf, p, iF, mapper),
symmetryPlanePatch_(refCast<const symmetryPlanePointPatch>(p))
{
if (!isType<symmetryPlanePointPatch>(this->patch()))
{
FatalErrorIn
(
"symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField\n"
"(\n"
" const symmetryPlanePointPatchField<Type>& ptf,\n"
" const pointPatch& p,\n"
" const DimensionedField<Type, pointMesh>& iF,\n"
" const pointPatchFieldMapper& mapper\n"
")\n"
) << "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl
<< "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type()
<< exit(FatalError);
}
}
template<class Type>
symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField
(
const symmetryPlanePointPatchField<Type>& ptf,
const DimensionedField<Type, pointMesh>& iF
)
:
basicSymmetryPointPatchField<Type>(ptf, iF),
symmetryPlanePatch_(ptf.symmetryPlanePatch_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::symmetryPlanePointPatchField<Type>::evaluate
(
const Pstream::commsTypes
)
{
vector nHat = symmetryPlanePatch_.n();
tmp<Field<Type> > tvalues =
(
(
this->patchInternalField()
+ transform(I - 2.0*sqr(nHat), this->patchInternalField())
)/2.0
);
// Get internal field to insert values into
Field<Type>& iF = const_cast<Field<Type>&>(this->internalField());
this->setInInternalField(iF, tvalues());
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,161 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::symmetryPlanePointPatchField
Description
A symmetry-plane boundary condition for pointField
SourceFiles
symmetryPlanePointPatchField.C
\*---------------------------------------------------------------------------*/
#ifndef symmetryPlanePointPatchField_H
#define symmetryPlanePointPatchField_H
#include "basicSymmetryPointPatchField.H"
#include "symmetryPlanePointPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class symmetryPlanePointPatchField Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class symmetryPlanePointPatchField
:
public basicSymmetryPointPatchField<Type>
{
// Private data
//- Local reference cast into the symmetryPlane patch
const symmetryPlanePointPatch& symmetryPlanePatch_;
public:
//- Runtime type information
TypeName(symmetryPlanePointPatch::typeName_());
// Constructors
//- Construct from patch and internal field
symmetryPlanePointPatchField
(
const pointPatch&,
const DimensionedField<Type, pointMesh>&
);
//- Construct from patch, internal field and dictionary
symmetryPlanePointPatchField
(
const pointPatch&,
const DimensionedField<Type, pointMesh>&,
const dictionary&
);
//- Construct by mapping given patchField<Type> onto a new patch
symmetryPlanePointPatchField
(
const symmetryPlanePointPatchField<Type>&,
const pointPatch&,
const DimensionedField<Type, pointMesh>&,
const pointPatchFieldMapper&
);
//- Construct and return a clone
virtual autoPtr<pointPatchField<Type> > clone() const
{
return autoPtr<pointPatchField<Type> >
(
new symmetryPlanePointPatchField<Type>
(
*this
)
);
}
//- Construct as copy setting internal field reference
symmetryPlanePointPatchField
(
const symmetryPlanePointPatchField<Type>&,
const DimensionedField<Type, pointMesh>&
);
//- Construct and return a clone setting internal field reference
virtual autoPtr<pointPatchField<Type> > clone
(
const DimensionedField<Type, pointMesh>& iF
) const
{
return autoPtr<pointPatchField<Type> >
(
new symmetryPlanePointPatchField<Type>
(
*this,
iF
)
);
}
// Member functions
//- Return the constraint type this pointPatchField implements
virtual const word& constraintType() const
{
return symmetryPlanePointPatch::typeName;
}
// Evaluation functions
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "symmetryPlanePointPatchField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "symmetryPlanePointPatchFields.H"
#include "pointPatchFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makePointPatchFields(symmetryPlane);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,49 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#ifndef symmetryPlanePointPatchFields_H
#define symmetryPlanePointPatchFields_H
#include "symmetryPlanePointPatchField.H"
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePointPatchFieldTypedefs(symmetryPlane);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -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

View File

@ -0,0 +1,71 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "symmetryPlanePointPatch.H"
#include "pointConstraint.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(symmetryPlanePointPatch, 0);
// Add the patch constructor functions to the hash tables
addToRunTimeSelectionTable
(
facePointPatch,
symmetryPlanePointPatch,
polyPatch
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::symmetryPlanePointPatch::symmetryPlanePointPatch
(
const polyPatch& patch,
const pointBoundaryMesh& bm
)
:
facePointPatch(patch, bm),
symmetryPlanePolyPatch_(refCast<const symmetryPlanePolyPatch>(patch))
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::symmetryPlanePointPatch::applyConstraint
(
const label,
pointConstraint& pc
) const
{
pc.applyConstraint(symmetryPlanePolyPatch_.n());
}
// ************************************************************************* //

View File

@ -0,0 +1,107 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::symmetryPlanePointPatch
Description
Symmetry-plane patch.
SourceFiles
symmetryPlanePointPatch.C
\*---------------------------------------------------------------------------*/
#ifndef symmetryPlanePointPatch_H
#define symmetryPlanePointPatch_H
#include "facePointPatch.H"
#include "symmetryPlanePolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class symmetryPlanePointPatch Declaration
\*---------------------------------------------------------------------------*/
class symmetryPlanePointPatch
:
public facePointPatch
{
// Private data
//- Local reference cast into the symmetryPlane patch
const symmetryPlanePolyPatch& symmetryPlanePolyPatch_;
public:
//- Runtime type information
TypeName(symmetryPlanePolyPatch::typeName_());
// Constructors
//- Construct from polyPatch
symmetryPlanePointPatch
(
const polyPatch& patch,
const pointBoundaryMesh& bm
);
// Member Functions
//- Return the constraint type this pointPatch implements.
virtual const word& constraintType() const
{
return type();
}
//- Accumulate the effect of constraint direction of this patch
virtual void applyConstraint
(
const label pointi,
pointConstraint&
) const;
//- Return symmetry plane normal
const vector& n() const
{
return symmetryPlanePolyPatch_.n();
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -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

View File

@ -0,0 +1,136 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "symmetryPlanePolyPatch.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(symmetryPlanePolyPatch, 0);
addToRunTimeSelectionTable(polyPatch, symmetryPlanePolyPatch, word);
addToRunTimeSelectionTable(polyPatch, symmetryPlanePolyPatch, dictionary);
}
// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch
(
const word& name,
const label size,
const label start,
const label index,
const polyBoundaryMesh& bm,
const word& patchType
)
:
polyPatch(name, size, start, index, bm, patchType),
n_(vector::zero)
{}
Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch
(
const word& name,
const dictionary& dict,
const label index,
const polyBoundaryMesh& bm,
const word& patchType
)
:
polyPatch(name, dict, index, bm, patchType),
n_(vector::zero)
{}
Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch
(
const symmetryPlanePolyPatch& pp,
const polyBoundaryMesh& bm
)
:
polyPatch(pp, bm),
n_(vector::zero)
{}
Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch
(
const symmetryPlanePolyPatch& pp,
const polyBoundaryMesh& bm,
const label index,
const label newSize,
const label newStart
)
:
polyPatch(pp, bm, index, newSize, newStart),
n_(vector::zero)
{}
Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch
(
const symmetryPlanePolyPatch& pp,
const polyBoundaryMesh& bm,
const label index,
const labelUList& mapAddressing,
const label newStart
)
:
polyPatch(pp, bm, index, mapAddressing, newStart),
n_(vector::zero)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::vector& Foam::symmetryPlanePolyPatch::n() const
{
// If the symmetry normal is not set calculate it
// as the average face-normal
if (magSqr(n_) < 0.5)
{
const vectorField& nf(faceNormals());
n_ = gAverage(nf);
// Check the symmetry plane is planar
forAll(nf, facei)
{
if (magSqr(n_ - nf[facei]) > SMALL)
{
FatalErrorIn("symmetryPlanePolyPatch::n()")
<< "Symmetry plane '" << name() << "' is not planar"
<< exit(FatalError);
}
}
}
return n_;
}
// ************************************************************************* //

View File

@ -0,0 +1,177 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::symmetryPlanePolyPatch
Description
Symmetry-plane patch.
SourceFiles
symmetryPlanePolyPatch.C
\*---------------------------------------------------------------------------*/
#ifndef symmetryPlanePolyPatch_H
#define symmetryPlanePolyPatch_H
#include "polyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class symmetryPlanePolyPatch Declaration
\*---------------------------------------------------------------------------*/
class symmetryPlanePolyPatch
:
public polyPatch
{
// Private data
//- Symmetry plane normal (calculated on demand)
mutable vector n_;
public:
//- Runtime type information
TypeName("symmetryPlane");
// Constructors
//- Construct from components
symmetryPlanePolyPatch
(
const word& name,
const label size,
const label start,
const label index,
const polyBoundaryMesh& bm,
const word& patchType
);
//- Construct from dictionary
symmetryPlanePolyPatch
(
const word& name,
const dictionary& dict,
const label index,
const polyBoundaryMesh& bm,
const word& patchType
);
//- Construct as copy, resetting the boundary mesh
symmetryPlanePolyPatch
(
const symmetryPlanePolyPatch&,
const polyBoundaryMesh&
);
//- Construct given the original patch and resetting the
// face list and boundary mesh information
symmetryPlanePolyPatch
(
const symmetryPlanePolyPatch& pp,
const polyBoundaryMesh& bm,
const label index,
const label newSize,
const label newStart
);
//- Construct given the original patch and a map
symmetryPlanePolyPatch
(
const symmetryPlanePolyPatch& pp,
const polyBoundaryMesh& bm,
const label index,
const labelUList& mapAddressing,
const label newStart
);
//- Construct and return a clone, resetting the boundary mesh
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
{
return autoPtr<polyPatch>(new symmetryPlanePolyPatch(*this, bm));
}
//- Construct and return a clone, resetting the face list
// and boundary mesh
virtual autoPtr<polyPatch> clone
(
const polyBoundaryMesh& bm,
const label index,
const label newSize,
const label newStart
) const
{
return autoPtr<polyPatch>
(
new symmetryPlanePolyPatch(*this, bm, index, newSize, newStart)
);
}
//- Construct and return a clone, resetting the face list
// and boundary mesh
virtual autoPtr<polyPatch> clone
(
const polyBoundaryMesh& bm,
const label index,
const labelUList& mapAddressing,
const label newStart
) const
{
return autoPtr<polyPatch>
(
new symmetryPlanePolyPatch
(
*this,
bm,
index,
mapAddressing,
newStart
)
);
}
// Member Functions
//- Return symmetry plane normal
const vector& n() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,22 +26,21 @@ License
#include "basicSymmetryFvPatchField.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<>
tmp<scalarField > basicSymmetryFvPatchField<scalar>::snGrad() const
Foam::tmp<Foam::scalarField>
Foam::basicSymmetryFvPatchField<Foam::scalar>::snGrad() const
{
return tmp<scalarField >(new scalarField(size(), 0.0));
}
template<>
void basicSymmetryFvPatchField<scalar>::evaluate(const Pstream::commsTypes)
void Foam::basicSymmetryFvPatchField<Foam::scalar>::evaluate
(
const Pstream::commsTypes
)
{
if (!updated())
{
@ -53,8 +52,4 @@ void basicSymmetryFvPatchField<scalar>::evaluate(const Pstream::commsTypes)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -36,7 +36,7 @@ Description
\verbatim
myPatch
{
type symmetryPlane;
type symmetry;
}
\endverbatim

View File

@ -0,0 +1,201 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "symmetryPlaneFvPatchField.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF
)
:
basicSymmetryFvPatchField<Type>(p, iF),
symmetryPlanePatch_(refCast<const symmetryPlaneFvPatch>(p))
{}
template<class Type>
Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField
(
const symmetryPlaneFvPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
basicSymmetryFvPatchField<Type>(ptf, p, iF, mapper),
symmetryPlanePatch_(refCast<const symmetryPlaneFvPatch>(p))
{
if (!isType<symmetryPlaneFvPatch>(this->patch()))
{
FatalErrorIn
(
"symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField\n"
"(\n"
" const symmetryPlaneFvPatchField<Type>& ptf,\n"
" const fvPatch& p,\n"
" const DimensionedField<Type, volMesh>& iF,\n"
" const fvPatchFieldMapper& mapper\n"
")\n"
) << "\n patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->dimensionedInternalField().name()
<< " in file " << this->dimensionedInternalField().objectPath()
<< exit(FatalIOError);
}
}
template<class Type>
Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
)
:
basicSymmetryFvPatchField<Type>(p, iF, dict),
symmetryPlanePatch_(refCast<const symmetryPlaneFvPatch>(p))
{
if (!isType<symmetryPlaneFvPatch>(p))
{
FatalIOErrorIn
(
"symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField\n"
"(\n"
" const fvPatch& p,\n"
" const Field<Type>& field,\n"
" const dictionary& dict\n"
")\n",
dict
) << "\n patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->dimensionedInternalField().name()
<< " in file " << this->dimensionedInternalField().objectPath()
<< exit(FatalIOError);
}
}
template<class Type>
Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField
(
const symmetryPlaneFvPatchField<Type>& ptf
)
:
basicSymmetryFvPatchField<Type>(ptf),
symmetryPlanePatch_(ptf.symmetryPlanePatch_)
{}
template<class Type>
Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField
(
const symmetryPlaneFvPatchField<Type>& ptf,
const DimensionedField<Type, volMesh>& iF
)
:
basicSymmetryFvPatchField<Type>(ptf, iF),
symmetryPlanePatch_(ptf.symmetryPlanePatch_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
Foam::tmp<Foam::Field<Type> >
Foam::symmetryPlaneFvPatchField<Type>::snGrad() const
{
vector nHat(symmetryPlanePatch_.n());
const Field<Type> iF(this->patchInternalField());
return
(transform(I - 2.0*sqr(nHat), iF) - iF)
*(this->patch().deltaCoeffs()/2.0);
}
template<class Type>
void Foam::symmetryPlaneFvPatchField<Type>::evaluate(const Pstream::commsTypes)
{
if (!this->updated())
{
this->updateCoeffs();
}
vector nHat(symmetryPlanePatch_.n());
const Field<Type> iF(this->patchInternalField());
Field<Type>::operator=
(
(iF + transform(I - 2.0*sqr(nHat), iF))/2.0
);
transformFvPatchField<Type>::evaluate();
}
template<class Type>
Foam::tmp<Foam::Field<Type> >
Foam::symmetryPlaneFvPatchField<Type>::snGradTransformDiag() const
{
vector nHat(symmetryPlanePatch_.n());
const vector diag
(
mag(nHat.component(vector::X)),
mag(nHat.component(vector::Y)),
mag(nHat.component(vector::Z))
);
return tmp<Field<Type> >
(
new Field<Type>
(
this->size(),
transformMask<Type>
(
//pow<vector, pTraits<Type>::rank>(diag)
pow
(
diag,
pTraits<typename powProduct<vector, pTraits<Type>::rank>
::type>::zero
)
)
)
);
}
// ************************************************************************* //

View File

@ -0,0 +1,189 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::symmetryPlaneFvPatchField
Group
grpConstraintBoundaryConditions
Description
This boundary condition enforces a symmetryPlane constraint
\heading Patch usage
Example of the boundary condition specification:
\verbatim
myPatch
{
type symmetryPlane;
}
\endverbatim
SourceFiles
symmetryPlaneFvPatchField.C
symmetryPlaneFvPatchFields.C
symmetryPlaneFvPatchFields.H
symmetryPlaneFvPatchFieldsFwd.H
\*---------------------------------------------------------------------------*/
#ifndef symmetryPlaneFvPatchField_H
#define symmetryPlaneFvPatchField_H
#include "basicSymmetryFvPatchField.H"
#include "symmetryPlaneFvPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class symmetryPlaneFvPatchField Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class symmetryPlaneFvPatchField
:
public basicSymmetryFvPatchField<Type>
{
// Private data
//- Local reference cast into the symmetryPlane patch
const symmetryPlaneFvPatch& symmetryPlanePatch_;
public:
//- Runtime type information
TypeName(symmetryPlaneFvPatch::typeName_());
// Constructors
//- Construct from patch and internal field
symmetryPlaneFvPatchField
(
const fvPatch&,
const DimensionedField<Type, volMesh>&
);
//- Construct from patch, internal field and dictionary
symmetryPlaneFvPatchField
(
const fvPatch&,
const DimensionedField<Type, volMesh>&,
const dictionary&
);
//- Construct by mapping given symmetryPlaneFvPatchField
// onto a new patch
symmetryPlaneFvPatchField
(
const symmetryPlaneFvPatchField<Type>&,
const fvPatch&,
const DimensionedField<Type, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
symmetryPlaneFvPatchField
(
const symmetryPlaneFvPatchField<Type>&
);
//- Construct and return a clone
virtual tmp<fvPatchField<Type> > clone() const
{
return tmp<fvPatchField<Type> >
(
new symmetryPlaneFvPatchField<Type>(*this)
);
}
//- Construct as copy setting internal field reference
symmetryPlaneFvPatchField
(
const symmetryPlaneFvPatchField<Type>&,
const DimensionedField<Type, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchField<Type> > clone
(
const DimensionedField<Type, volMesh>& iF
) const
{
return tmp<fvPatchField<Type> >
(
new symmetryPlaneFvPatchField<Type>(*this, iF)
);
}
// Member functions
// Evaluation functions
//- Return gradient at boundary
virtual tmp<Field<Type> > snGrad() const;
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
//- Return face-gradient transform diagonal
virtual tmp<Field<Type> > snGradTransformDiag() const;
};
// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * //
template<>
tmp<scalarField> symmetryPlaneFvPatchField<scalar>::snGrad() const;
template<>
void symmetryPlaneFvPatchField<scalar>::evaluate
(
const Pstream::commsTypes commsType
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "symmetryPlaneFvPatchField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "symmetryPlaneFvPatchFields.H"
#include "addToRunTimeSelectionTable.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makePatchFields(symmetryPlane);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,49 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#ifndef symmetryPlaneFvPatchFields_H
#define symmetryPlaneFvPatchFields_H
#include "symmetryPlaneFvPatchField.H"
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeFieldTypedefs(symmetryPlane);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#ifndef symmetryPlaneFvPatchFieldsFwd_H
#define symmetryPlaneFvPatchFieldsFwd_H
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type> class symmetryPlaneFvPatchField;
makePatchTypeFieldTypedefs(symmetryPlane);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "symmetryPlaneFvPatchField.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<>
Foam::tmp<Foam::scalarField>
Foam::symmetryPlaneFvPatchField<Foam::scalar>::snGrad() const
{
return tmp<scalarField >(new scalarField(size(), 0.0));
}
template<>
void Foam::symmetryPlaneFvPatchField<Foam::scalar>::evaluate
(
const Pstream::commsTypes
)
{
if (!updated())
{
updateCoeffs();
}
scalarField::operator=(patchInternalField());
transformFvPatchField<scalar>::evaluate();
}
// ************************************************************************* //

View File

@ -0,0 +1,130 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "symmetryPlaneFvsPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
(
const fvPatch& p,
const DimensionedField<Type, surfaceMesh>& iF
)
:
fvsPatchField<Type>(p, iF)
{}
template<class Type>
symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
(
const symmetryPlaneFvsPatchField<Type>& ptf,
const fvPatch& p,
const DimensionedField<Type, surfaceMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
fvsPatchField<Type>(ptf, p, iF, mapper)
{
if (!isType<symmetryPlaneFvPatch>(this->patch()))
{
FatalErrorIn
(
"symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField\n"
"(\n"
" const symmetryPlaneFvsPatchField<Type>& ptf,\n"
" const fvPatch& p,\n"
" const DimensionedField<Type, surfaceMesh>& iF,\n"
" const fvPatchFieldMapper& mapper\n"
")\n"
) << "Field type does not correspond to patch type for patch "
<< this->patch().index() << "." << endl
<< "Field type: " << typeName << endl
<< "Patch type: " << this->patch().type()
<< exit(FatalError);
}
}
template<class Type>
symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
(
const fvPatch& p,
const DimensionedField<Type, surfaceMesh>& iF,
const dictionary& dict
)
:
fvsPatchField<Type>(p, iF, dict)
{
if (!isType<symmetryPlaneFvPatch>(p))
{
FatalIOErrorIn
(
"symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField\n"
"(\n"
" const fvPatch& p,\n"
" const Field<Type>& field,\n"
" const dictionary& dict\n"
")\n",
dict
) << "patch " << this->patch().index() << " not symmetryPlane type. "
<< "Patch type = " << p.type()
<< exit(FatalIOError);
}
}
template<class Type>
symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
(
const symmetryPlaneFvsPatchField<Type>& ptf
)
:
fvsPatchField<Type>(ptf)
{}
template<class Type>
symmetryPlaneFvsPatchField<Type>::symmetryPlaneFvsPatchField
(
const symmetryPlaneFvsPatchField<Type>& ptf,
const DimensionedField<Type, surfaceMesh>& iF
)
:
fvsPatchField<Type>(ptf, iF)
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,139 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::symmetryPlaneFvsPatchField
Description
Foam::symmetryPlaneFvsPatchField
SourceFiles
symmetryPlaneFvsPatchField.C
\*---------------------------------------------------------------------------*/
#ifndef symmetryPlaneFvsPatchField_H
#define symmetryPlaneFvsPatchField_H
#include "fvsPatchField.H"
#include "symmetryPlaneFvPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class symmetryPlaneFvsPatch Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class symmetryPlaneFvsPatchField
:
public fvsPatchField<Type>
{
public:
//- Runtime type information
TypeName(symmetryPlaneFvPatch::typeName_());
// Constructors
//- Construct from patch and internal field
symmetryPlaneFvsPatchField
(
const fvPatch&,
const DimensionedField<Type, surfaceMesh>&
);
//- Construct from patch, internal field and dictionary
symmetryPlaneFvsPatchField
(
const fvPatch&,
const DimensionedField<Type, surfaceMesh>&,
const dictionary&
);
//- Construct by mapping given symmetryPlaneFvsPatchField
// onto a new patch
symmetryPlaneFvsPatchField
(
const symmetryPlaneFvsPatchField<Type>&,
const fvPatch&,
const DimensionedField<Type, surfaceMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
symmetryPlaneFvsPatchField
(
const symmetryPlaneFvsPatchField<Type>&
);
//- Construct and return a clone
virtual tmp<fvsPatchField<Type> > clone() const
{
return tmp<fvsPatchField<Type> >
(
new symmetryPlaneFvsPatchField<Type>(*this)
);
}
//- Construct as copy setting internal field reference
symmetryPlaneFvsPatchField
(
const symmetryPlaneFvsPatchField<Type>&,
const DimensionedField<Type, surfaceMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvsPatchField<Type> > clone
(
const DimensionedField<Type, surfaceMesh>& iF
) const
{
return tmp<fvsPatchField<Type> >
(
new symmetryPlaneFvsPatchField<Type>(*this, iF)
);
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "symmetryPlaneFvsPatchField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "symmetryPlaneFvsPatchFields.H"
#include "fvsPatchFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makeFvsPatchFields(symmetryPlane);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,49 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#ifndef symmetryPlaneFvsPatchFields_H
#define symmetryPlaneFvsPatchFields_H
#include "symmetryPlaneFvsPatchField.H"
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeFvsPatchTypeFieldTypedefs(symmetryPlane);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#ifndef symmetryPlaneFvsPatchFieldsFwd_H
#define symmetryPlaneFvsPatchFieldsFwd_H
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type> class symmetryPlaneFvsPatchField;
makeFvsPatchTypeFieldTypedefs(symmetryPlane);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -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

View File

@ -0,0 +1,43 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "symmetryPlaneFvPatch.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defineTypeNameAndDebug(symmetryPlaneFvPatch, 0);
addToRunTimeSelectionTable(fvPatch, symmetryPlaneFvPatch, polyPatch);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,97 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::symmetryPlaneFvPatch
Description
Symmetry-plane patch.
SourceFiles
symmetryPlaneFvPatch.C
\*---------------------------------------------------------------------------*/
#ifndef symmetryPlaneFvPatch_H
#define symmetryPlaneFvPatch_H
#include "fvPatch.H"
#include "symmetryPlanePolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class symmetryPlaneFvPatch Declaration
\*---------------------------------------------------------------------------*/
class symmetryPlaneFvPatch
:
public fvPatch
{
// Private data
//- Local reference cast into the symmetryPlane patch
const symmetryPlanePolyPatch& symmetryPlanePolyPatch_;
public:
//- Runtime type information
TypeName(symmetryPlanePolyPatch::typeName_());
// Constructors
//- Construct from polyPatch
symmetryPlaneFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
:
fvPatch(patch, bm),
symmetryPlanePolyPatch_
(
refCast<const symmetryPlanePolyPatch>(patch)
)
{}
// Member Functions
//- Return symmetry plane normal
const vector& n() const
{
return symmetryPlanePolyPatch_.n();
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -55,6 +55,7 @@ class polyPatch;
class cyclicPolyPatch;
class processorPolyPatch;
class symmetryPlanePolyPatch;
class symmetryPolyPatch;
class wallPolyPatch;
class wedgePolyPatch;
@ -248,6 +249,15 @@ protected:
template<class TrackData>
void hitWedgePatch(const wedgePolyPatch&, TrackData& td);
//- Overridable function to handle the particle hitting a
// symmetryPlanePatch
template<class TrackData>
void hitSymmetryPlanePatch
(
const symmetryPlanePolyPatch&,
TrackData& td
);
//- Overridable function to handle the particle hitting a
// symmetryPatch
template<class TrackData>

View File

@ -28,6 +28,7 @@ License
#include "cyclicPolyPatch.H"
#include "cyclicAMIPolyPatch.H"
#include "processorPolyPatch.H"
#include "symmetryPlanePolyPatch.H"
#include "symmetryPolyPatch.H"
#include "wallPolyPatch.H"
#include "wedgePolyPatch.H"
@ -585,6 +586,13 @@ Foam::scalar Foam::particle::trackToFace
static_cast<const wedgePolyPatch&>(patch), td
);
}
else if (isA<symmetryPlanePolyPatch>(patch))
{
p.hitSymmetryPlanePatch
(
static_cast<const symmetryPlanePolyPatch&>(patch), td
);
}
else if (isA<symmetryPolyPatch>(patch))
{
p.hitSymmetryPatch
@ -958,6 +966,20 @@ void Foam::particle::hitWedgePatch
}
template<class TrackData>
void Foam::particle::hitSymmetryPlanePatch
(
const symmetryPlanePolyPatch& spp,
TrackData&
)
{
vector nf = normal();
nf /= mag(nf);
transformProperties(I - 2.0*nf*nf);
}
template<class TrackData>
void Foam::particle::hitSymmetryPatch
(

View File

@ -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&,

View File

@ -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&,

View File

@ -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&,

View File

@ -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&,

View File

@ -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,

View File

@ -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&,

View File

@ -159,7 +159,16 @@ protected:
);
//- Overridable function to handle the particle hitting a
// symmetryPlane
// symmetry plane
template<class TrackData>
void hitSymmetryPlanePatch
(
const symmetryPlanePolyPatch&,
TrackData& td
);
//- Overridable function to handle the particle hitting a
// symmetry patch
template<class TrackData>
void hitSymmetryPatch
(

View File

@ -80,6 +80,13 @@ void Foam::wallBoundedParticle::patchInteraction
static_cast<const wedgePolyPatch&>(patch), td
);
}
else if (isA<symmetryPlanePolyPatch>(patch))
{
p.hitSymmetryPlanePatch
(
static_cast<const symmetryPlanePolyPatch&>(patch), td
);
}
else if (isA<symmetryPolyPatch>(patch))
{
p.hitSymmetryPatch
@ -403,6 +410,18 @@ void Foam::wallBoundedParticle::hitWedgePatch
}
template<class TrackData>
void Foam::wallBoundedParticle::hitSymmetryPlanePatch
(
const symmetryPlanePolyPatch& pp,
TrackData& td
)
{
// Remove particle
td.keepParticle = false;
}
template<class TrackData>
void Foam::wallBoundedParticle::hitSymmetryPatch
(

View File

@ -43,7 +43,7 @@ boundaryField
cylinder
{
type symmetryPlane;
type symmetry;
}
defaultFaces

View File

@ -43,7 +43,7 @@ boundaryField
cylinder
{
type symmetryPlane;
type symmetry;
}
defaultFaces

View File

@ -138,7 +138,7 @@ boundary
}
cylinder
{
type symmetryPlane;
type symmetry;
faces
(
(10 5 24 29)

View File

@ -26,7 +26,7 @@ boundaryField
value uniform 300;
}
entrance
"entrance.*"
{
type symmetryPlane;
}

View File

@ -26,7 +26,7 @@ boundaryField
value uniform (1936 0 0);
}
entrance
"entrance.*"
{
type symmetryPlane;
}

View File

@ -25,7 +25,7 @@ boundaryField
type zeroGradient;
}
entrance
"entrance.*"
{
type symmetryPlane;
}

View File

@ -26,7 +26,7 @@ boundaryField
value uniform (0 0 0);
}
entrance
"entrance.*"
{
type symmetryPlane;
}

View File

@ -25,7 +25,7 @@ boundaryField
type zeroGradient;
}
entrance
"entrance.*"
{
type symmetryPlane;
}

View File

@ -25,7 +25,7 @@ boundaryField
type zeroGradient;
}
entrance
"entrance.*"
{
type symmetryPlane;
}

View File

@ -25,7 +25,7 @@ boundaryField
type zeroGradient;
}
entrance
"entrance.*"
{
type symmetryPlane;
}

View File

@ -25,7 +25,7 @@ boundaryField
type zeroGradient;
}
entrance
"entrance.*"
{
type symmetryPlane;
}

View File

@ -27,7 +27,7 @@ boundaryField
}
entrance
"entrance.*"
{
type symmetryPlane;
}

View File

@ -25,7 +25,7 @@ boundaryField
type zeroGradient;
}
entrance
"entrance.*"
{
type symmetryPlane;
}

View File

@ -25,7 +25,7 @@ boundaryField
type zeroGradient;
}
entrance
"entrance.*"
{
type symmetryPlane;
}

View File

@ -56,12 +56,20 @@ boundary
);
}
entrance
entrance1
{
type symmetryPlane;
faces
(
(0 1 5 4)
);
}
entrance2
{
type symmetryPlane;
faces
(
(0 3 2 1)
);
}

View File

@ -33,7 +33,7 @@ boundaryField
}
up
{
type symmetryPlane;
type symmetry;
}
hole
{

View File

@ -34,7 +34,7 @@ boundaryField
}
up
{
type symmetryPlane;
type symmetry;
}
hole
{

View File

@ -34,7 +34,7 @@ boundaryField
}
up
{
type symmetryPlane;
type symmetry;
}
hole
{

View File

@ -33,7 +33,7 @@ boundaryField
}
up
{
type symmetryPlane;
type symmetry;
}
hole
{

View File

@ -34,7 +34,7 @@ boundaryField
}
up
{
type symmetryPlane;
type symmetry;
}
hole
{

View File

@ -31,7 +31,7 @@ boundaryField
}
up
{
type symmetryPlane;
type symmetry;
}
hole
{

View File

@ -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)

View File

@ -54,7 +54,7 @@ boundaryField
{
type symmetryPlane;
}
frontAndBack
"(front|back)"
{
type symmetryPlane;
}

View File

@ -11,7 +11,7 @@ upperWall
type symmetryPlane;
}
frontAndBack
"(front|back)"
{
type symmetryPlane;
}

View File

@ -46,7 +46,7 @@ boundaryField
{
type symmetryPlane;
}
frontAndBack
"(front|back)"
{
type symmetryPlane;
}

View File

@ -46,7 +46,7 @@ boundaryField
{
type symmetryPlane;
}
frontAndBack
"(front|back)"
{
type symmetryPlane;
}

View File

@ -21,7 +21,7 @@ internalField uniform 0;
boundaryField
{
frontAndBack
"(front|back)"
{
type symmetryPlane;
value uniform 0;

View File

@ -42,7 +42,7 @@ boundaryField
{
type symmetryPlane;
}
frontAndBack
"(front|back)"
{
type symmetryPlane;
}

View File

@ -40,12 +40,19 @@ edges
boundary
(
frontAndBack
front
{
type symmetryPlane;
faces
(
(3 7 6 2)
);
}
back
{
type symmetryPlane;
faces
(
(1 5 4 0)
);
}

View File

@ -40,12 +40,19 @@ edges
boundary
(
frontAndBack
front
{
type symmetryPlane;
faces
(
(3 7 6 2)
);
}
back
{
type symmetryPlane;
faces
(
(1 5 4 0)
);
}

View File

@ -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;

View File

@ -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;

View File

@ -39,7 +39,7 @@ boundaryField
sides
{
type symmetryPlane;
type symmetry;
}
atmosphere

View File

@ -34,7 +34,7 @@ boundaryField
sides
{
type symmetryPlane;
type symmetry;
}
atmosphere

View File

@ -34,7 +34,7 @@ boundaryField
sides
{
type symmetryPlane;
type symmetry;
}
atmosphere

View File

@ -34,7 +34,7 @@ boundaryField
sides
{
type symmetryPlane;
type symmetry;
}
atmosphere

View File

@ -40,7 +40,7 @@ boundaryField
sides
{
type symmetryPlane;
type symmetry;
}
atmosphere

View File

@ -33,7 +33,7 @@ boundaryField
sides
{
type symmetryPlane;
type symmetry;
}
atmosphere

View File

@ -68,7 +68,7 @@ boundary
sides
{
type symmetryPlane;
type symmetry;
faces
(
(1 5 4 0)

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -39,7 +39,7 @@ boundaryField
atmosphere
{
type inletOutlet;
phi rho*phi;
phi rhoPhi;
inletValue $internalField;
}
defaultFaces

View File

@ -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;
}

View File

@ -41,7 +41,7 @@ dynamicRefineFvMeshCoeffs
(
(phi none)
(nHatf none)
(rho*phi none)
(rhoPhi none)
(ghf none)
);
// Write the refinement level as a volScalarField

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -17,7 +17,7 @@ FoamFile
solvers
{
alpha.water
"alpha.water.*"
{
nAlphaCorr 2;
nAlphaSubCycles 1;

Some files were not shown because too many files have changed in this diff Show More