-
-
March 5, 2020 at 10:58 am
Egnir1711
SubscriberHello,
I am very new to ansys and trying to implement the flap type wavemaker. For my geometry the wavetank has height in Z direction and length in X direction and width in Y direction. I want a regular wave which i can validate through wave theory. Although as u can see from the result its irregular. I want to know if i am doing some mistake in code or is it the setting for dynamic mesh which is wrong. Please provide me with some feedback for improving my wave through flap motion. Thank youÂ
the code is as follows : #include "udf.h"
#include "dynamesh_tools.h"
static real period =2;
static real amplitude = 0.1;
static real pi = 3.14159265358979323846;
DEFINE_CG_MOTION(oscillate,dt,vel,omega,time,dtime)
{
   /* define the variables */
   Thread *t;
   face_t f;
   real dv, ang_freq;
   /* get the thread pointer for which this motion is defined */
   t = DT_THREAD(dt);
   ang_freq = 2 * pi / period;
  Â
   /* loop over each face in the zone to create an array of data */
   begin_f_loop(f,t)
   {
      /* set x-component of velocity */
      omega[1] = amplitude * cos(ang_freq * time) ;
   }
   end_f_loop(f,t)
   Message("time = %f, x_vel = %fn", time, omega[1]);
}
-
March 6, 2020 at 2:43 pm
Rob
Forum ModeratorRead up on how C code defines direction vectors:Â what direction is omega[1] referring to?Â
-
March 6, 2020 at 3:19 pm
-
March 6, 2020 at 3:26 pm
Rob
Forum ModeratorYou've lost me. How would the y component alter the position of the node in the x direction?
-
March 9, 2020 at 8:30 am
Egnir1711
SubscriberI want the motion of the Flap in a way the it is applicable to my 3d model. Should I try to make two code for defining each direction?
-
March 9, 2020 at 1:29 pm
Rob
Forum ModeratorIsn't all the flapping/motion in the x-direction?
-
March 9, 2020 at 2:15 pm
Egnir1711
Subscriberyeah i can make it vel[0] for motion although it act as pistion motion as I have taken face loop. I wanted to have flap motion so I chose omega but when taking omega[0] the motion is not like flap. So I choose omega[1] which relates to my model.
-
March 10, 2020 at 11:31 am
Rob
Forum ModeratorBut y is parallel to the inlet?Â
-
March 10, 2020 at 11:34 am
Egnir1711
SubscriberIn boundary condition I have just pressure outlet which is assigned to airopening. The motion is through UDF file which is assigned to rigid body piston.
-
- The topic ‘Irregular waves from flap motion’ is closed to new replies.
-
3492
-
1057
-
1051
-
966
-
942
© 2025 Copyright ANSYS, Inc. All rights reserved.