rotorDiskSource: Corrected coordinate transformations

Now the rotor axis may be specified in other than the z-direction
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1290
This commit is contained in:
Henry
2014-12-22 19:54:58 +00:00
parent 2366712a54
commit 7c35ea521b
4 changed files with 46 additions and 43 deletions

View File

@ -103,9 +103,10 @@ void Foam::axesRotation::calcTransform
}
}
// the global->local transformation
// Global->local transformation
Rtr_ = Rtr;
// the local->global transformation
// Local->global transformation
R_ = Rtr.T();
}
@ -298,7 +299,8 @@ void Foam::axesRotation::operator=(const dictionary& dict)
}
else if (dict.found("axis") || dict.found("direction"))
{
// let it bomb if only one of axis/direction is defined
// Both "axis" and "direction" are required
// If one is missing the appropriate error message will be generated
order = e3e1;
dict.lookup("axis") >> axis1;
dict.lookup("direction") >> axis2;

View File

@ -88,6 +88,7 @@ class axesRotation
const axisOrder& order = e3e1
);
public:
//- Runtime type information
@ -134,7 +135,7 @@ public:
//- Update the rotation for a list of cells
virtual void updateCells(const polyMesh&, const labelList&)
{
// do nothing
// Do nothing
}
//- Return local-to-global transformation tensor
@ -196,14 +197,14 @@ public:
) const;
//- Transform vectorField using transformation tensorField and return
// symmetrical tensorField
// symmetric tensorField
virtual tmp<symmTensorField> transformVector
(
const vectorField& st
) const;
//- Transform vector using transformation tensor and return
// symmetrical tensor
// symmetric tensor
virtual symmTensor transformVector(const vector& st) const;