# DEFINE_CG_MOTION and DEFINE_GRID_MOTION for same zone type (boundary)

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

April 26, 2022, 18:37
DEFINE_CG_MOTION and DEFINE_GRID_MOTION for same zone type (boundary)
#1
New Member

Nick 0704
Join Date: Oct 2021
Posts: 2
Rep Power: 0
Hi to everybody,

I'm tackling a 2D transient problem of an airfoil that is supposed to oscillate and simultaneously deflect it leading edge. The domain layout is depicted in the attached figure.

Basically, what I'm aiming to obtain is an airfoil that harmonically oscillate around it's axis at 0.25 chord lenght, and that at a given time step start also to deform accordignly to specific equations the leading edge.

INITIAL SEPARATE TRYS:
For the first simulation of pure pitching motion of the airfoil I created a UDF with the DEFINE_CG_MOTION macro. In the dynamic mesh zone I decleared as rigid body both airfoil boundary (boundary condition) and inner rotating grid (Cell Zone Condition), and as deforming the rest of the doamin. The obtained results showed a good agrement with other published results, ok so far.
For the leadinge edge deformation I created a UDF with DEFINE_GRID_MOTION macro to modify the interested portion of the airfoil. Here, I set up as User-Defined the airfoil boundary (boundary condition) and as deforming the inner rotating grid (Cell Zone Condition). Also for this single motion everthing was working perfectly.

NOW:
How can I specify CG_MOTION and GRID_MOTION at the same time to the airfoil boundary ? one possible logical solution would be that the first function (CG MOTION) rotate each node of the airfoil boundary along with the internal domain, and only afterward the second function of the UDF (GRID MOTION) move the nodes of the leading edge. Simultaneously also the internal domain should behave first as a rigid body and then (when the airfoil deformation apply) as a deforming for allow the adjacent mesh to adapt to the new modified airfoil boundary. How can I achieve that?
Should I implement this algorithm inside a UDF?

Any suggestion/tip or solutions for this problem is highly appriciated.

Many Thanks to all of you
Attached Images
 domain.png (43.2 KB, 20 views)

Last edited by NickZonzini; April 27, 2022 at 06:15.

 June 7, 2023, 02:00 #2 New Member   Bilal Join Date: Apr 2019 Posts: 5 Rep Power: 7 Can you share your Grid Motion UDF you wrote separately?

 July 20, 2023, 02:18 DEFINE_GRID_MOTION UDF code #3 New Member   Naren Join Date: Jul 2023 Posts: 4 Rep Power: 3 Hi Im trying to use DEFINE_GRID_MOTION UDF code to bring prescribed dynamic mesh motion around my airfoil..But when it try to run the code, it show "parse error"...Is there any other option to define the sinusoidal deformation of the airfoil in ansys fluent...Please let me know..Thanks in Advance.