# Problem with patch rotation using pointDisplacement

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 12, 2010, 08:23 Problem with patch rotation using pointDisplacement #1 Member   John Wang Join Date: Mar 2009 Location: Singapore Posts: 72 Rep Power: 10 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.687486318e-07 max: 4.771403433e-06 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.323386496e-07, Final residual = 8.284646139e-09, No Iterations 5 DICPCG: Solving for cellDisplacementy, Initial residual = 4.176329538e-07, Final residual = 4.176378834e-09, No Iterations 5 DICPCG: Solving for cellDisplacementz, Initial residual = 6.907626607e-09, Final residual = 6.907626607e-09, No Iterations 0 DILUPBiCG: Solving for Ux, Initial residual = 2.563012164e-06, Final residual = 2.563012164e-06, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 2.83695964e-06, Final residual = 2.83695964e-06, No Iterations 0 DILUPBiCG: Solving for Uz, Initial residual = 1.12315512e-07, Final residual = 1.12315512e-07, No Iterations 0 DICPCG: Solving for p, Initial residual = 0.0002383668533, Final residual = 5.899082318e-06, No Iterations 2 time step continuity errors : sum local = 1.111412268e-17, global = 2.737806772e-21, cumulative = 1.364305262e-12 DILUPBiCG: Solving for Ux, Initial residual = 2.728957463e-12, Final residual = 2.728957463e-12, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 3.225840715e-12, Final residual = 3.225840715e-12, No Iterations 0 DILUPBiCG: Solving for Uz, Initial residual = 4.912966005e-14, Final residual = 4.912966005e-14, No Iterations 0 DICPCG: Solving for p, Initial residual = 5.876274734e-06, Final residual = 9.725726683e-07, No Iterations 4 time step continuity errors : sum local = 1.832042973e-18, global = -1.027336569e-19, cumulative = 1.364305159e-12 DILUPBiCG: Solving for omega, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for k, Initial residual = 0.0009829920571, Final residual = 3.05954052e-11, 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 = ((oldCell-CoR) & RotTen) + CoR; pointField newPoint = ((oldPoint-CoR) & 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

 July 23, 2010, 10:26 #2 New Member   Anonymous Join Date: Jan 2010 Posts: 9 Rep Power: 10 You should have applied the cumulative, rather than current, angle while overriding the operator ==. Looks like you are doing the opposite.

July 24, 2010, 07:05
#3
Member

John Wang
Join Date: Mar 2009
Location: Singapore
Posts: 72
Rep Power: 10
Quote:
 Originally Posted by Philer You should have applied the cumulative, rather than current, angle while overriding the operator ==. Looks like you are doing the opposite.
Umm... what do you mean by cummulative? Was the pointDisplacement value supposed to be a cummulative value from the start time to the current time?
I think I've fixed the motion solver by only applying the rotation algorithm every 5 timesteps for now, but I couldn't seems to get the rest of the grid points to move with the patch, any idea what might have cause it? Thanks.

John

 July 26, 2010, 09:54 #4 New Member   Anonymous Join Date: Jan 2010 Posts: 9 Rep Power: 10 Yes, the pointDisplacement value is supposed to be a cummulative value from the start time to the current time. The new version 1.7 is very good at this. Try it. Philer

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04 besto OpenFOAM Meshing & Mesh Conversion 1 March 14, 2010 04:09 adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19 Harmeet CFX 6 February 11, 2005 16:27 Andrea CFX 2 October 11, 2004 05:12

All times are GMT -4. The time now is 23:08.