cwang5 
July 12, 2010 08:23 
Problem with patch rotation using pointDisplacement
Dear all,
I've been on this problem for ages, and could really use some help from you guys. I am working on a 1 DoF rotation solve adapted from the OF1.6.x pimpleDyMFoam solver. The rotational motion was set so that the patch would rotate an angle based on the fluid force until the patch comes within certain distance from the side wall. The output file from the solver looks like this:
Code:
Courant Number mean: 1.687486318e07 max: 4.771403433e06
Time = 0.005488
The current angle of rotation is 0.0101409026
The cummulative angle of rotation is 27.41162474
The rotational Tensor is (0.9999485815 0.01014072879 0 0.01014072879 0.9999485815 0 0 0 1)
DICPCG: Solving for cellDisplacementx, Initial residual = 8.323386496e07, Final residual = 8.284646139e09, No Iterations 5
DICPCG: Solving for cellDisplacementy, Initial residual = 4.176329538e07, Final residual = 4.176378834e09, No Iterations 5
DICPCG: Solving for cellDisplacementz, Initial residual = 6.907626607e09, Final residual = 6.907626607e09, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 2.563012164e06, Final residual = 2.563012164e06, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 2.83695964e06, Final residual = 2.83695964e06, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 1.12315512e07, Final residual = 1.12315512e07, No Iterations 0
DICPCG: Solving for p, Initial residual = 0.0002383668533, Final residual = 5.899082318e06, No Iterations 2
time step continuity errors : sum local = 1.111412268e17, global = 2.737806772e21, cumulative = 1.364305262e12
DILUPBiCG: Solving for Ux, Initial residual = 2.728957463e12, Final residual = 2.728957463e12, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 3.225840715e12, Final residual = 3.225840715e12, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 4.912966005e14, Final residual = 4.912966005e14, No Iterations 0
DICPCG: Solving for p, Initial residual = 5.876274734e06, Final residual = 9.725726683e07, No Iterations 4
time step continuity errors : sum local = 1.832042973e18, global = 1.027336569e19, cumulative = 1.364305159e12
DILUPBiCG: Solving for omega, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for k, Initial residual = 0.0009829920571, Final residual = 3.05954052e11, No Iterations 1
Initializing Moment Calculation...
Calculating Moment...
The force moment acting on the flap is 0.2993934284
ExecutionTime = 140.92 s ClockTime = 147 s
As you can see from the output log, the cumulative angle that was passed down to the rotation matrix indicated that the patch would have rotated around the origin for a few times already, yet in the paraFoam visualization very little motion was noticed.
I am wondering if it has to do with the tolerance setting of pointDisplacement or with the way that I define the pointDisplacement field in each time step:
Code:
forAllConstIter(labelHashSet, patchList_, iter)
{
label patchi = iter.key();
vectorField oldCell = mesh.C().boundaryField()[patchi];
pointField oldPoint = mesh.boundaryMesh()[patchi].localPoints();
vectorField newCell = ((oldCellCoR) & RotTen) + CoR;
pointField newPoint = ((oldPointCoR) & RotTen) + CoR;
pointDisplacement.boundaryField()[patchi] == newPoint  oldPoint;
cellDisplacement.boundaryField()[patchi] == newCell  oldCell;
}
which was based on the codes by Erik Ekedahl on one of the OpenFOAM PhD course website
http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2008/
I would really appreciate some help in resolving this issue.
Best Regards,
John
