CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

wrong transient solution in different time steps of Dynamic mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 29, 2011, 09:00
Default wrong transient solution in different time steps of Dynamic mesh
  #1
New Member
 
Esmail
Join Date: May 2009
Posts: 11
Rep Power: 16
esicia is on a distinguished road
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;
}
esicia is offline   Reply With Quote

Old   January 29, 2012, 13:00
Default
  #2
New Member
 
Esmail
Join Date: May 2009
Posts: 11
Rep Power: 16
esicia is on a distinguished road
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 13:29.
esicia is offline   Reply With Quote

Old   February 11, 2012, 22:37
Default
  #3
New Member
 
Join Date: Feb 2012
Posts: 4
Rep Power: 14
tony25800 is on a distinguished road
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
tony25800 is offline   Reply With Quote

Old   February 12, 2012, 09:39
Default Hello
  #4
New Member
 
Esmail
Join Date: May 2009
Posts: 11
Rep Power: 16
esicia is on a distinguished road
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 13:29.
esicia is offline   Reply With Quote

Old   February 18, 2012, 08:45
Default
  #5
Senior Member
 
Join Date: Mar 2009
Location: Indiana, US
Posts: 186
Rep Power: 17
delaneyluke is on a distinguished road
Hi Essi,
Sorry cannot view your files right now. But hav you tried a preview mesh before running your simulation
Regards
Luke
delaneyluke is offline   Reply With Quote

Old   February 18, 2012, 10:33
Default
  #6
New Member
 
Esmail
Join Date: May 2009
Posts: 11
Rep Power: 16
esicia is on a distinguished road
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?
esicia is offline   Reply With Quote

Old   February 24, 2012, 06:37
Default
  #7
Senior Member
 
Join Date: Mar 2009
Location: Indiana, US
Posts: 186
Rep Power: 17
delaneyluke is on a distinguished road
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
delaneyluke is offline   Reply With Quote

Old   February 26, 2012, 13:27
Default
  #8
New Member
 
Esmail
Join Date: May 2009
Posts: 11
Rep Power: 16
esicia is on a distinguished road
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
File Type: jpg 1.JPG (33.1 KB, 19 views)
File Type: jpg 2.JPG (39.3 KB, 23 views)
File Type: jpg 3.JPG (15.3 KB, 18 views)
esicia is offline   Reply With Quote

Reply

Tags
dynamic mesh, transient


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 13:40
air bubble is disappear increasing time using vof xujjun CFX 9 June 9, 2009 07:59
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32
unstructured vs. structured grids Frank Muldoon Main CFD Forum 1 January 5, 1999 10:09


All times are GMT -4. The time now is 09:45.