
[Sponsors] 
Dynamic mesh crashes in parallel, but works in serial 

LinkBack  Thread Tools  Search this Thread  Display Modes 
January 27, 2014, 10:32 
Dynamic mesh crashes in parallel, but works in serial

#1 
New Member
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 11 
Hello everyone.
I am trying to model deposition in tube arrays and I need dynamic mesh. I compile an UDF that works well in serial and crashes in parallel. I tried to correct it by adding the statements #if !RP_HOST and #endif at the beginning and end of the functions, but still does not work in parallel. Tried in Windows and in Linux with similar result. Has anyone a clue about what's wrong? Mesh is 2D. The crash error printed in console is is: Code:
Updating mesh to time 1.00000e+00 (step = 00001)... 999999 (..\src\mpsystem.c@1172): mpt_read: failed: errno = 10054 999999: mpt_read: error: read failed trying to read 4 bytes: No such file or directory MPI Application rank 0 exited before MPI_Finalize() with status 1073741819 The fl process could not be started. Interrupting... Done. Code:
DEFINE_GRID_MOTION(movimiento02,domain,dt,time,dtime) { #if !RP_HOST Thread *tf=DT_THREAD(dt); face_t f; Node *node_p; real theta, y0, x0, y1,A,C,D2,E,F,DR,sy,xcentro,x0prim,x1prim,sx; int n; int cil; SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); node_p=F_NODE(10,tf,0); /* mesh consists of 6 cylinders, this is to obtain an ID for cylinder by using the function ordinal_cilindro*/ x0=NODE_X(node_p); cil=ordinal_cilindro(x0) ; xcentro=(cil1)*sl_divD*D; /*these are global defined variables*/ A=0.004; C=0.00860338434543819; D2= 0.00743270295949046; E=0.00180871094287687; F= 0.000119719241166301; /*coefficients to determine the growth of the layer of deposit in a cyinder through a polynomial function*/ begin_f_loop (f,tf) { node_p=F_NODE(f,tf,0); NODE_POS_UPDATED(node_p); x0=NODE_X(node_p); x0prim=x0xcentro; y0=NODE_Y(node_p); if (y0==0) sy=0; else sy=y0/fabs(y0); /*sign of y*/ if (x0prim==0) sx=0; else sx=x0prim/fabs(x0prim); /*sign of x*/ if (y0==0) theta=0; else if(x0prim==0) theta=M_PI/2; else theta=atan2(y0*sy,x0prim);/*to obtain properly the value of the angle*/ DR=(A+C*pow(theta,2)+D2*pow(theta,3)+E*pow(theta,4)+F*pow(theta,5))/100; /*radius variation*/ x1prim=x0prim+DR*cos(theta); y1=y0+DR*sin(theta)*sy; if (y0==0) { y1=0; if (x0prim <0) x1prim=x0prim2*A/100; } if (x0prim==0) x1prim=0; NODE_X(node_p)=x1prim+xcentro; NODE_Y(node_p)=y1; } end_f_loop(f,tf) #endif } 

February 12, 2014, 07:41 

#2 
New Member
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 11 
By modifying the UDF to small displacements, it works fine during few timesteps. But then in crashes again. Never crashes in Serial, crashes after few time steps in parallel, what makes me think there must be a problem when the mesh is modified (remeshing) and FLUENT tries to repartition it. But still can't figure out what is wrong here.
Anyone has a clue? 

February 12, 2014, 08:40 

#3 
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 25 
I really don't have any idea, I have no experience with a parallel udf.
I only came here to say that you have a good way of asking questions: you explain what you want, what you tried, what went wrong, the code you used, and you show your attempts to solve the problem. You even used a title for this thread that describes the problem. I may in the future refer to this question to show other users how they should ask questions here. I really, really hope that there will also be an answer, to show that this way of asking questions really helps... 

February 24, 2014, 13:24 

#4 
New Member
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 11 
Thanks for your compliment
I think that if you request anonymous help, you must be very accurate and precise. Otherwise, the a helper may just pass by. Maybe he/she even knows a solution, but does not understand the problem because of a bad explanation. I have being trying with that, but still I haven't been able to find out what is wrong. I have tried that UDF in a different simplified meshes and it works in some of them, not in most. This demonstrates that the code is OK. However, for some reason I don't know, it crashes in parallel. I have also found out that unsteady tracking of particles using DPM makes FLUENT to crash (again, not in serial at all, but in parallel). Error displayed in the console was similar. It is horrible that I have to do the calculations in serial. Gonna take 1 week each . 

May 30, 2014, 12:03 
Solution?

#5 
New Member
Join Date: Apr 2014
Posts: 3
Rep Power: 10 
Hello 86lolo,
please did you solved the problem? I have exactly the same error like you had, also with DEFINE_GRID_MOTION UDF. I tryed the same solutions, like you did, but didn't help. Please it would be very helpful, if you know, how to solve it. Thanks a lot! 

May 30, 2014, 12:57 

#6 
New Member
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 11 
Unfortunately, not.
I could not make it. The only way I could skip the problem (not actually solving) was to code another program which will run FLUENT externally (you can do this with Matlab, Bash, or similar). Since my model only needed to update the grid once every 1000 timesteps, I coded that: Start loop Run Fluent in parallel, read case and data, simulate in parallel 1000 timesteps, write case and data.End loop I am not yet happy with this. I actually did not solve the problem, just could avoided it, I was in a hurry to get the results and that trick somehow worked out. However I still would like to know why it was crashing. To clarify sth else: My domain is a rectangle with 4 holes (2D simulation of flow over array of cylinders). I checked, surprisingly that:  This crashed in that mesh, but when I cut the mesh off the centre of the 1st cylinder (thus, there is not any full hole in the domain), it works fine.Tell me, tombyk, how is your geometry? 

June 24, 2014, 05:20 

#7 
New Member
Join Date: Apr 2014
Posts: 3
Rep Power: 10 
Hey 86lolo!
I managed the problem. It seemed there is a bug using partitioning in version of Fluent 14.5.7. It worked for me in version 6.3 and now it is working perfectly in the latest version 15.0. Maybe worth trying also for you! tombyk 

June 24, 2014, 05:24 

#8 
New Member
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 11 
Well, I don't have either version 6 or 15. I will try to obtain them and check, but anyway, thanks a lot for your answer. It is nice to realize that it was a bug and not my fault


Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Moving mesh  Niklas Wikstrom (Wikstrom)  OpenFOAM Running, Solving & CFD  122  June 15, 2014 06:20 
Update of the variables after dynamic mesh motion.  gtg258f  OpenFOAM Programming & Development  9  January 18, 2014 10:08 
dynamic mesh refinement and rhoCentralFoam  ChrisA  OpenFOAM Running, Solving & CFD  1  March 21, 2013 08:00 
Convergence moving mesh  lr103476  OpenFOAM Running, Solving & CFD  30  November 19, 2007 14:09 
Automatic Mesh Motion solver  michele  OpenFOAM Running, Solving & CFD  10  September 26, 2005 08:21 