CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Rotating patch not rotating? (http://www.cfd-online.com/Forums/openfoam-programming-development/77899-rotating-patch-not-rotating.html)

cwang5 July 7, 2010 05:50

Rotating patch not rotating?
 
Hi guys,

I am trying to implement a rotational motion on a patch in OF1.6.x so that the patch rotates for 0.001 radian per time step. The rotation was implemented using a rotational tensor, and the points on the patch moved using the following algorithm:

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;
}

Where CoR is the center of rotation and RotTen is the rotational tensor mentioned above.

However, after running the solver for a couple of time steps (~1,000) the patch and the grid points around it hardly moved as oppose of turning the prescribed 1 radian (~58 degrees). I'm wondering if I'm doing anything wrong or has used the wrong expression for implementing the displacement fields. Any help will be greatly appreciated.

John


All times are GMT -4. The time now is 19:07.