# wrong transient solution in different time steps of Dynamic mesh

 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 29, 2011, 10:00 wrong transient solution in different time steps of Dynamic mesh #1 New Member   Esmail Join Date: May 2009 Posts: 11 Rep Power: 10 Hello Recently, I have tried to solve the dynamic mesh problem of a 2d moving object with the drag force of the fluid in one direction(x). I used the following UDF and after the steady simulation (for initial condition of transient) when i change the solver to unsteady (PISO) the direction of the x-force change after each time step. After 3 or 4 time steps, It reciprocate and lead to negative cells error. I have tried different boundary conditions, time steps, lower residual, different transient solver model, higher number of cells but still the contours of pressure totally change after each time step. Can any body tell me why this is happening? #include "udf.h" static real v_prev = 0.0; DEFINE_CG_MOTION(BodyDrag,dt,vel,omega,time,dtime) { Thread *t; face_t f; real NV_VEC(A); real force, dv; /* reset velocities */ NV_S(vel, =, 0.0); NV_S(omega, =, 0.0); if (!Data_Valid_P()) return; /* get the thread pointer for which this motion is defined */ t = DT_THREAD(dt); /* compute pressure force on body by looping through all faces */ force = 0.0; begin_f_loop(f,t) { F_AREA(A,f,t); force += F_P(f,t) * A[0]; } end_f_loop(f,t) /* compute change in velocity, i.e., dv = F * dt / mass velocity update using explicit Euler formula */ dv = dtime * force / 0.0005; v_prev += dv; Message ("time = %f, x_vel = %f, force = %f\n", time, v_prev, force); /* set x-component of velocity */ vel[0] = v_prev; }

 January 29, 2012, 14:00 #2 New Member   Esmail Join Date: May 2009 Posts: 11 Rep Power: 10 Hey Guys, Could you please look at my .cas and .dat files and also the UDF file, here http://www.mediafire.com/?4dirqdz25b5bxhq with different time steps, after several iterations it leads to Update-Dynamic-Mesh failed. Negative cell volume detected. Regards, Essi Last edited by esicia; February 26, 2012 at 14:29.

 February 11, 2012, 23:37 #3 New Member   Join Date: Feb 2012 Posts: 4 Rep Power: 7 Hi Esicia According to my experience, merely smoothing should be able to complete the task if the parameters are set properly.(The spring constant should be around 0.1) However, this may cause degradation of the mesh. Then add 'resmeshing', check info. for parameters setting. Everything should be fine. Regards, Tony

 February 12, 2012, 10:39 Hello #4 New Member   Esmail Join Date: May 2009 Posts: 11 Rep Power: 10 Dear tony thanks for your response I already checked both of 'smoothing' and 'remeshing' in dynamic mesh setting but it still lead to negative cells after 4 iterations. I can not see why it is not working. The problem is so simple. Could please download the .cas, .dat and udf file which uploaded here http://www.mediafire.com/?4dirqdz25b5bxhq and try it. Best Regards, Essi Last edited by esicia; February 26, 2012 at 14:29.

 February 18, 2012, 09:45 #5 Senior Member   Join Date: Mar 2009 Location: Indiana, US Posts: 185 Rep Power: 10 Hi Essi, Sorry cannot view your files right now. But hav you tried a preview mesh before running your simulation Regards Luke

 February 18, 2012, 11:33 #6 New Member   Esmail Join Date: May 2009 Posts: 11 Rep Power: 10 Thanks Luke, for the response In this problem the body move by drag force of the surrounding fluid and the preview mesh tools does not make sense here. This UDF works with constant velocity or time dependent velocity. Could you take a minute and run the simulation by yourself?

 February 24, 2012, 07:37 #7 Senior Member   Join Date: Mar 2009 Location: Indiana, US Posts: 185 Rep Power: 10 I would suggest that you, give a translational velocity (instead of your drag UDF) to move the mesh and preview it. If all works ok then move on to the drag UDF for movement. Post some pics of your case and dynamic mesh settings. Regards Luke

February 26, 2012, 14:27
#8
New Member

Esmail
Join Date: May 2009
Posts: 11
Rep Power: 10
Thanks Luke, for the response
When I change the UDF to constant velocity of the body or time dependent velocity, It pretty works. However, for the drag force movement of the body, It leads to negative cells. Here I uploaded some pictures.

link of .cas and udf file.
http://www.mediafire.com/?4dirqdz25b5bxhq
Attached Images
 1.JPG (33.1 KB, 18 views) 2.JPG (39.3 KB, 22 views) 3.JPG (15.3 KB, 17 views)

 Tags dynamic mesh, transient

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 14:40 xujjun CFX 9 June 9, 2009 07:59 SSL FLUENT 2 January 26, 2008 12:55 Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32 Frank Muldoon Main CFD Forum 1 January 5, 1999 11:09

All times are GMT -4. The time now is 07:13.