Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

UDF define zone motion multiple rotations at once

    • xfreekx
      Subscriber

      Hi,


      I want to define a motion of a zone by 2 rotations on different origins/axis. First I want it to rotate the body around the z-axis and then I want it to rotate around an internal axis as to reorientate it.


      Can you define multiple rotation origins, axis and angular velocities in a UDF for 1 zone?


      Thanks,


      Freek

    • Keyur Kanade
      Ansys Employee

      Hello, 


      Please have a look at following video. 


      Regards,


      Keyur


      https://www.youtube.com/watch?v=A3bnO5r2SWQ

    • Keyur Kanade
      Ansys Employee

      Moving to fluid dynamics category for better response. 


       


      Regards,


      Keyur

    • xfreekx
      Subscriber

      Hi,


      Thanks for your replay.


      Unfortunately it is not what I was looking for.


      I want to specify the movement of a single body with 2 rotations around different axis.


      In UDF define_zone_motion you can give origin, axis and omega.


      But I want to give 2 origins and 2 omegas (axis is always z because it is 2D).


      So the body will rotate to a certain position and then rotate again to reorient itself.


       


      Maybe this is not possible and I have to find another solution to my problem

    • Keyur Kanade
      Ansys Employee

      Hi 


      So you want to rotate about one origin for few iterations and then after that rotate about second origin after few iterations. Let me know if I understand correctly. 


      For this you may need to use journal file where you iterate and then change udf and then iterate again. 


      Regards,


      Keyur

    • tanujsrivastava28
      Subscriber

      Hello, 


      Please have a look at following video. 


      Regards,


      Keyur


      https://www.youtube.com/watch?v=A3bnO5r2SWQ


       


      Sir I want to do something similar to this, you can find my geometry in this link "https://ibb.co/6BfDD1h"


      I want to give simple harmonic motion about the origin using "DEFINE ZONE MOTION" in cell zone condition. The video that you posted here give idea about the RPM, but if we supply UDF, it shows no motion. My UDF is attached in the figure below. Please suggest any changes in it.



      On compiling, there is no error and while on checking the case in run calculation, there is no recommendation appears but while animating the case there is no motion appears. Please suggest modification in code


    • tanujsrivastava28
      Subscriber
      Sir, by default if we do not make change, then axis of rotation is z axis (at origin) for 2d geometry in XY plane. If I want to shift the axis to, say y = 0.5 unit, then what changes need to be made in UDF for shifting axis of rotation?nWhat if instead of writing omega[0], i write omega[0, 0.5, 0]?n
    • Rob
      Forum Moderator
      It depends on the UDF. If it's a DEFINE_PROFILE you need to change the axis in the cell zone panel. n
    • tanujsrivastava28
      Subscriber
      I am using DEFINE_ZONE_MOTION n#include udf.hn#define Freq 0.125n#define angular_freq 2.0*M_PI*Freqn#define tetmax 5.0*M_PI/180nDEFINE_ZONE_MOTION(TP8AMP05, omega, axis, origin, velocity, time, dtime)n{nN3V_D(velocity, = , 0.0, 0.0, 0.0);n*omega = tetmax*angular_freq*cos(angular_freq*time);n}nWhen I hook the code in the cell zone condition, there comes no option to change the axis. So some modifications might be needed in UDF. I saw udf manual as well and googled it, but could not get any hint.nArrayn
    • Rob
      Forum Moderator
      Do you just want to alter the rotation speed? The axis is also set in the cell zone panel if that's the case. You may want to explore the relative and absolute options re adjacent cell zone in the cell zone panel. n
    • tanujsrivastava28
      Subscriber
      I want my frame to do SHM as per the equation mentioned. Axis set option I did not find after hooking UDF, but let me look for the options that you told.nActually in my case, there is only one zone as you can see in the attachment. So in cell zone condition, there is only one zone that appears. might be that is why there is no options for relative there is no effect of surroundings, what is inside the zone that only matters. nn
    • Rob
      Forum Moderator
      OK, you may need to set the axis separately then and use a profile for the rotation. n
    • tanujsrivastava28
      Subscriber
      Yes, and that is where I am facing problem to set axis separately. I went through ansys UDF manual, but could not find anywhere about the shifting of axis of rotation or any similar thing. please guide. n
    • Jai Aditya Garg
      Subscriber

      Hi, Jai here.

      I am facing a similar problem and I need to change the axis of rotation from about the origin to some other axis. my problem is 2-D and I simulating the movement of a flap at the trailling edge of the airfoil. is there a way to change the rotation axis in DEFINE_CG_motion UDF?

       

Viewing 13 reply threads
  • The topic ‘UDF define zone motion multiple rotations at once’ is closed to new replies.