We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.

Ansys Learning Forum Forums Discuss Simulation Fluids Dynamic mesh-nan in cg definition Reply To: Dynamic mesh-nan in cg definition

Thodorisdm
Subscriber
I always check the mesh prior to the preview of the mesh motion. Hereby my UDF. Always works for frequency 1-5 but not for larger.
 
#include "udf.h"
 
#define amplitude 0.01
#define frequency 10
 
DEFINE_CG_MOTION(ymotion,dt,vel,omega,time,dtime)
{
real vmax;
real Tper; 
 
Tper = 1/frequency;
vmax = (amplitude * 2*M_PI) / Tper;
vel[1] = vmax*(cos(2 * M_PI * time / Tper));
}