View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001249 | OpenFOAM | Bug | public | 2014-03-28 15:40 | 2014-03-28 16:01 |
Reporter | AndreasG | Assigned To | |||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | Fedora 19 | OS Version | amd64 |
Summary | 0001249: Transformation Tensor in AMI is calculated wrong when using given rotation angle | ||||
Description | The implementation of calculation of the transformation for given rotation angle in cyclicAMI is not correct. Instead of cos(phi)*(I+T)+... it is cos(phi)*(I-T)+... (See http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle ) This leads to a wronng transformation matrix causing AMI to fail when given rotation angle != 90 deg. The following fix works for me: FIX: From cea306b10b6e013c969c064bfd5f6b5c092b98dc Mon Sep 17 00:00:00 2001 From: AndreasG < XXX > Date: Fri, 28 Mar 2014 15:39:41 +0100 Subject: [PATCH] correction of rotation tensor calculation for given rotation angle in cyclicAMIPolyPatch.C --- .../patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index 8c41bc6..91ac2b8 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -154,13 +154,13 @@ void Foam::cyclicAMIPolyPatch::calcTransforms tensor RPos ( T - + cos(rotationAngle_)*(tensor::I + T) + + cos(rotationAngle_)*(tensor::I - T) + sin(rotationAngle_)*S ); tensor RNeg ( T - + cos(-rotationAngle_)*(tensor::I + T) + + cos(-rotationAngle_)*(tensor::I - T) + sin(-rotationAngle_)*S ); -- 1.8.1.4 I still get a warning from cyclicAMI, but the case starts and seems to run stable | ||||
Tags | No tags attached. | ||||
duplicate of | 0001217 | resolved | problem with cyclicAMI |
|
Could note add this in the original form: Steps to reproduce # copy tutorial case and cd there cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pipeCyclic /tmp cd /tmp/pipeCyclic # change rotation angle to non-90 deg sed "s/halfAngle 45.0;/halfAngle 15.0;/" -i constant/polyMesh/blockMeshDict # make Allrun modify the boundary definition to use given rotation angle sed '/cp -r 0.org 0/a sed "\/ rotationCentre (0 0 0);\/a rotationAngle 30;" -i constant\/polyMesh\/boundary' -i Allrun # run testcase ./Allrun |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-03-28 15:40 | AndreasG | New Issue | |
2014-03-28 15:40 | AndreasG | Note Added: 0002985 | |
2014-03-28 15:43 |
|
Relationship added | duplicate of 0001217 |
2014-03-28 16:01 |
|
Status | new => resolved |
2014-03-28 16:01 |
|
Resolution | open => fixed |
2014-03-28 16:01 |
|
Assigned To | => user2 |