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

Remeshing error using Define_grid_motion in Macro parallel

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2021, 11:29
Post Remeshing error using Define_grid_motion in Macro parallel
  #1
msw
New Member
 
Marvin
Join Date: Jan 2018
Posts: 4
Rep Power: 8
msw is on a distinguished road
Hello,

I am having trouble using the remeshing option when using the define_grid_motion Macro in parallel, smoothing is working fine.
It is also working fine in serial.

I have attached a screenshot after it crashes. Does anyone have any suggestions, thank you for taking the time. Happy to provide further infromation if needed.

Code:
DEFINE_GRID_MOTION(foil, domain, dt, time, dtime)
{
#if !RP_HOST
	Thread *tf = DT_THREAD(dt);
	face_t f;
	Node *v;
	int n;

	SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));
	begin_f_loop(f, tf)
	{
		f_node_loop(f, tf, n)
		{
			v = F_NODE(f, tf, n);						
			if (NODE_POS_NEED_UPDATE(v))
			{
				NODE_POS_UPDATED(v);

                           //Update NODE_Y(v) = y(x,t)
                          
                         }
                  }
        }
	end_f_loop(f, tf);
	
 #endif
}
Attached Images
File Type: jpg remeshing_error.jpg (201.8 KB, 7 views)
msw is offline   Reply With Quote

Old   May 25, 2021, 22:49
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
looks like you don't need to do anything to run this code in parallel
try to remove:
#if !RP_HOST
#endif

If doesn't help you may try this:
Code:
DEFINE_GRID_MOTION(foil, domain, dt, time, dtime)
{
	Thread *tf = DT_THREAD(dt);
	face_t f;
	Node *v;
	int n;

	SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));
	begin_f_loop(f, tf)
	{
if PRINCIPAL_FACE_P(f,tf)
{
		f_node_loop(f, tf, n)
		{
			v = F_NODE(f, tf, n);						
			if (NODE_POS_NEED_UPDATE(v))
			{
				NODE_POS_UPDATED(v);
                         }
                  }
}
        }
	end_f_loop(f, tf);
}
for more information look for Cells and Faces in a Partitioned Mesh
in Ansys Fluent Customization manual
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   May 26, 2021, 12:00
Default
  #3
msw
New Member
 
Marvin
Join Date: Jan 2018
Posts: 4
Rep Power: 8
msw is on a distinguished road
Thank you for the fast reply, AlexanderZ!

I removed the parallel lines of code and it still runs but still crashes with the same error.

I also added the line of code as suggestion but no improvement.

Attached is another image showing the crashed mesh.

The simulated 'swimmer' is moving through the domain based on Newton second law. Could the issue be the global movement, hence, movement between different partitions and is there a way fluent can re partition during the simulation?

Many thanks again!
Attached Images
File Type: jpg remeshing_error2.jpg (204.3 KB, 3 views)
msw is offline   Reply With Quote

Old   May 27, 2021, 05:51
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
unfortunately, I have no experience regarding your issue.

if you find solution, please drop a message here. Hope you will solve the issue soon
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   May 27, 2021, 09:03
Default
  #5
msw
New Member
 
Marvin
Join Date: Jan 2018
Posts: 4
Rep Power: 8
msw is on a distinguished road
Thank you, will do.
msw is offline   Reply With Quote

Reply


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
Remeshing error in parallel in FLUENT loving_cfd FLUENT 0 November 14, 2020 05:38
timestep extraction for macro manuc Tecplot 0 August 10, 2016 12:20
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45
simpleFoam in parallel issue plucas OpenFOAM Running, Solving & CFD 3 July 17, 2013 11:30
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 Amitava Majumdar Main CFD Forum 0 January 5, 1999 12:00


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