UDF to compute forces and moments in dynamic mesh

    • Shuvadeep

      The equation of motion is:
      theta(t)=M(e^(-0.823t)) {(0.0001709(e^0.823t))-(0.000017177 sin(8.19t))-(0.0001709 cos(8.19t)) }

      M is the moment about the z-axis. All other dof are arrested. The domains are created similar to the link below (the airfoil replaced by flat plate):

      The fluid flow over the flat plate generates moment about z-axis of the plate (origin). this moment should rotate the inner domain (with fine mesh) as rigid body, according to the equation of motion above. On rotation, the effective angle of attack of plate changes, and hence the fluid forces and moments. This changes the moment about the z-axis which further rotates the domain (hence the plate AOA). 

      The moment should fed into the equation of motion at every time-step. The time step iteration should end with the rotation of the inner domain as rigid body. This process continues, until the end of time.

      In dynamic mesh options, I would specify the inner domain as passive 6dof udf rigid motion (i.e., no deformation in the inner domain mesh) and the plate as sdof udf rigid motion and the outer boundary as deforming zone.


      I use this udf below. The problem is, the moment is not updated at each time step. and the solution shows no rotation.. Can anyone suggest a solution?

    • Shuvadeep

      #include "udf.h"

      DEFINE_CG_MOTION (rotational_motion, dt, cg_vel, cg omega, time, dtime)
      Domain *d =Get Domain(1);
      Thread *t_object = Lookup_Thread(d, 2);
      real moment [ND_ND], cg[ND_ND], force [ND_ND];

      Compute_Force_And_Moment(d, t_object, cg, force, moment, TRUE)
      real moment_z= moment [3]; * To compute the moment at the beginning of the time step and feed into the equation of motion */

      real i1 = exp(-0.823*time);
      real i2 = cos (8.19*time);
      real i3 = 48870 sin(8.19*time);
      real i4 = 2.893 pow(10,-8);
      real omega = -i4 * moment_z * i1 * (i2-i3);

      cg_vel [1]=0.0;

      cg omega [0]-0.0 ;
      cg omega (1)-0.0;
      cg omega [2]=real omega;

    • DrAmine
      Ansys Employee
      You can check if the moment you are using is what you want and returns plausible values. Moreover the indices go only till 2.
Viewing 2 reply threads
  • You must be logged in to reply to this topic.