|
[Sponsors] |
December 8, 2015, 15:30 |
Problem in DEFINE_ZONE_MOTION UDF
|
#1 |
New Member
mohsen
Join Date: Jun 2015
Posts: 25
Rep Power: 10 |
Hi every body
I have written an UDF to define zone motion. actually, rotation of a section of TORUS around it's axial axis (as shown in picture). but answers are wrong!! the UDF is: #include "udf.h" #include "math.h" #include "sg_udms.h" #include "sg.h" #include "stdio.h" #include "mem.h" #include "dpm.h" #include "surf.h" #include "unsteady.h" DEFINE_ZONE_MOTION(TORUSrotation,omega,axis,origin ,velocity,time,dtime) { real x[ND_ND]; real r=573; real teta,m; teta=atan(x[0]/x[1]); m=-x[0]/sqrt(r*r-x[0]*x[0]); origin[0]=-r*cos(teta); origin[1]=-r*sin(teta); origin[2]=0.0; axis[0]=-r*cos(teta+dtime*teta); axis[1]=-m*r*(cos(teta+dtime*teta)-cos(teta))+r*sin(teta); axis[2]=0.0; *omega=50.0; return; } i have no idea why answers are wrong?!?!?!? it's my pleasure if any body could suggest/help me. BEST REGARDS Curve_00.jpg |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 06:05 |
Problem with DPM simulation with particles injection and EXECUTE_AT_THE_END UDF. | Ari | Fluent UDF and Scheme Programming | 4 | May 31, 2016 08:51 |
udf loading problem | santu | Fluent UDF and Scheme Programming | 1 | May 22, 2015 15:47 |
Vaporization pressure UDF property problem? | lehoanganh07 | Fluent UDF and Scheme Programming | 1 | September 13, 2014 10:59 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 06:56 |