|
[Sponsors] |
Issues with UDF for ball movement inside a valve |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 29, 2015, 15:04 |
Issues with UDF for ball movement inside a valve
|
#1 |
New Member
Ahmed Jalal
Join Date: Mar 2015
Posts: 22
Rep Power: 11 |
Hello All,
I am trying to simulate motion of a ball in a valve. The model I created is a simple 2D half model of the cross-section of a hypothetical valve. There is an attachment of the model. I have created a UDF file to define motion of the ball due to velocity using the 6DOF solver. The symmetry line should also be deforming. I have a few questions. 1) Do I need to run a case without any Dynamic Mesh before compiling the code? 2) I keep getting an error that says: Unable to read motion history file 3) Can you please let me know if there are any suggestions to make to the UDF. Here is the UDF for the motion: #include "udf.h" DEFINE_SDOF_PROPERTIES(Lightweight_ball, prop, dt, time,dtime) { prop[SDOF_ZERO_TRANS_X]= TRUE; prop[SDOF_ZERO_TRANS_Z]= TRUE; prop[SDOF_ZERO_ROT_X]= TRUE; prop[SDOF_ZERO_ROT_Y]= TRUE; prop[SDOF_ZERO_ROT_Z]= TRUE; prop[SDOF_MASS] = 1e-3; prop[SDOF_IXX] = 1.92e-8; prop[SDOF_IYY] = 1.92e-8; prop[SDOF_IZZ] = 1.92e-8; } And someone suggested I do a changing time step UDF as well: #include "udf.h" #include "dx.h" #include "grid.h" #include "var.h" #include "mem.h" #include "dynamesh_tools.h" DEFINE_DELTAT(mydeltat,d) { int z_ID =5; real urf = 0.5; real mydx=1e-5; real maxT= 1e-3; real minT= 1e-10; real time_step; real my_vel; real TS1; Dynamic_Thread *ndt = NULL; Thread *ball_ft = Lookup_Thread(d,z_ID); ndt = THREAD_DT(ball_ft); my_vel = DT_VEL_CG(ndt)[1]; TS1 = ABS(urf*mydx/(my_vel+0.00000001)); //Message("\n My TS1 %f",TS1); time_step = MIN(TS1,maxT); //Message("\n My Time Step1 %f",time_step); time_step = MAX( time_step, minT); Message("\n My Time Step %f",time_step); return time_step; } Thanks |
|
July 30, 2015, 02:11 |
|
#2 |
Senior Member
Join Date: May 2012
Location: Melbourne
Posts: 161
Rep Power: 14 |
maybe it doesn't save the backup/results/convergence plot files, but no idea, how to make it do it.
|
|
Tags |
6dof, dynamic mesh, mesh motion, udf, valve |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
About UDF compiling issues: 'nmake' | Haoyin Shan | Fluent UDF and Scheme Programming | 15 | November 4, 2019 19:05 |
UDF loading issues | xinquanzhoucn | Fluent UDF and Scheme Programming | 1 | February 10, 2013 19:53 |
Consulting for some issues of FLUENT UDF and UDS | wjl163 | Fluent UDF and Scheme Programming | 2 | November 12, 2012 04:24 |
DEFINE_GRID_MOTION UDF issues | quantum.tejas | FLUENT | 0 | June 29, 2011 02:31 |
UDF issues | ehooi | FLUENT | 4 | May 13, 2011 06:21 |