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

Dynamic mesh crashes in parallel, but works in serial

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 27, 2014, 11:32
Question Dynamic mesh crashes in parallel, but works in serial
  #1
New Member
 
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 12
86lolo is on a distinguished road
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.
The UDF is
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=(cil-1)*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=x0-xcentro;
		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=x0prim-2*A/100;
			
		}
		if (x0prim==0) x1prim=0;
			
		NODE_X(node_p)=x1prim+xcentro;
		NODE_Y(node_p)=y1;
			
	}	end_f_loop(f,tf)
	#endif
}
86lolo is offline   Reply With Quote

Old   February 12, 2014, 08:41
Default
  #2
New Member
 
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 12
86lolo is on a distinguished road
By modifying the UDF to small displacements, it works fine during few time-steps. 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?
86lolo is offline   Reply With Quote

Old   February 12, 2014, 09:40
Thumbs up
  #3
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
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...
pakk is offline   Reply With Quote

Old   February 24, 2014, 14:24
Default
  #4
New Member
 
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 12
86lolo is on a distinguished road
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 .
86lolo is offline   Reply With Quote

Old   May 30, 2014, 13:03
Default Solution?
  #5
New Member
 
Join Date: Apr 2014
Posts: 3
Rep Power: 12
tombyk is on a distinguished road
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!
tombyk is offline   Reply With Quote

Old   May 30, 2014, 13:57
Default
  #6
New Member
 
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 12
86lolo is on a distinguished road
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 time-steps, I coded that:
-Start loop
-Run Fluent in parallel, read case and data, simulate in parallel 1000 time-steps, write case and data.
-Run Fluent in serial: read case and data, activate dynamic mesh, move the mesh, deactivate dynamic mesh, save 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.
- This made me suspect that maybe it crashes if partition boundaries fall in the moving zones: I manually re-partitioned the domain so that the partition boundaries did not touch them, tried it out, did not work.
- Now that I think again about this... would it fail because my moving boundary was a circle? (I mean, start and end nodes were the same)? I don't see why it would crash in that condition, but I think it's worth checking: split the moving thread into 2 parts, will it work now? If you try, please, let us know
Tell me, tombyk, how is your geometry?
86lolo is offline   Reply With Quote

Old   June 24, 2014, 06:20
Default
  #7
New Member
 
Join Date: Apr 2014
Posts: 3
Rep Power: 12
tombyk is on a distinguished road
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
tombyk is offline   Reply With Quote

Old   June 24, 2014, 06:24
Default
  #8
New Member
 
Manuel
Join Date: Jan 2014
Posts: 18
Rep Power: 12
86lolo is on a distinguished road
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
86lolo is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
Update of the variables after dynamic mesh motion. gtg258f OpenFOAM Programming & Development 9 January 18, 2014 11:08
dynamic mesh refinement and rhoCentralFoam ChrisA OpenFOAM Running, Solving & CFD 1 March 21, 2013 09:00
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
Automatic Mesh Motion solver michele OpenFOAM Running, Solving & CFD 10 September 26, 2005 09:21


All times are GMT -4. The time now is 16:12.