Fluent UDF File

download Fluent UDF File

of 1

Transcript of Fluent UDF File

  • 7/22/2019 Fluent UDF File

    1/1

    #include "udf.h"

    static real v_prev = 0.0;

    DEFINE_CG_MOTION(osc,dt,vel,omega,time,dtime){ Thread *t; Domain *d = Get_Domain(1); real x_cg[3], force[3], moment[3]; real accl, dv; real mass = 0.2; real wn = 12.0; real k= mass * wn*wn; real c = 2*mass*wn*0.00; int i;

    NV_S(vel, =, 0.0); NV_S(omega, =, 0.0); t = DT_THREAD(dt); for(i=0;i