Coupled patch transformations: Removed the hideous and unphysical non-uniform transformation support

The implementation of the optional non-uniform transformations in coupled
patches was based on transform property lists which could be either length 0 for
no transformation, 1 for uniform transformation or n-faces for non-uniform
transformation.  This complexity was maintenance nightmare but kept to support
the hack in the original film implementation to partially work around the
conservation error.  Now that film has been re-implemented in fully mass
conservative form this unphysical non-uniform transformation support is no
longer needed and the coupled patch transformations have been completely
refactored to be simpler and more rational with single values for the
transformation properties and boolians to indicate which transformations are
needed.
This commit is contained in:
Henry Weller
2019-12-25 11:26:30 +00:00
parent bae37a52a6
commit 03207b1538
53 changed files with 322 additions and 618 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -457,28 +457,14 @@ void Foam::FaceCellWave<Type, TrackingData>::enterDomain
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::transform
(
const tensorField& rotTensor,
const tensor& rotTensor,
const label nFaces,
List<Type>& faceInfo
)
{
// Transform. Implementation referred to Type
if (rotTensor.size() == 1)
for (label facei = 0; facei < nFaces; facei++)
{
const tensor& T = rotTensor[0];
for (label facei = 0; facei < nFaces; facei++)
{
faceInfo[facei].transform(mesh_, T, td_);
}
}
else
{
for (label facei = 0; facei < nFaces; facei++)
{
faceInfo[facei].transform(mesh_, rotTensor[facei], td_);
}
faceInfo[facei].transform(mesh_, rotTensor, td_);
}
}

View File

@ -215,7 +215,7 @@ protected:
//- Apply transformation to Type
void transform
(
const tensorField& rotTensor,
const tensor& rotTensor,
const label nFaces,
List<Type>& faceInfo
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -119,31 +119,13 @@ template<class Type, class TrackingData>
void Foam::PointEdgeWave<Type, TrackingData>::transform
(
const polyPatch& patch,
const tensorField& rotTensor,
const tensor& rotTensor,
List<Type>& pointInfo
) const
{
if (rotTensor.size() == 1)
forAll(pointInfo, i)
{
const tensor& T = rotTensor[0];
forAll(pointInfo, i)
{
pointInfo[i].transform(T, td_);
}
}
else
{
FatalErrorInFunction
<< "Non-uniform transformation on patch " << patch.name()
<< " of type " << patch.type()
<< " not supported for point fields"
<< abort(FatalError);
forAll(pointInfo, i)
{
pointInfo[i].transform(rotTensor[i], td_);
}
pointInfo[i].transform(rotTensor, td_);
}
}

View File

@ -160,7 +160,7 @@ class PointEdgeWave
void transform
(
const polyPatch& patch,
const tensorField& rotTensor,
const tensor& rotTensor,
List<Type>& pointInfo
) const;