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

UDM value for stopping calculation based on convergence criteria

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 21, 2020, 09:20
Default UDM value for stopping calculation based on convergence criteria
  #1
Member
 
Deutschland
Join Date: Jun 2020
Location: https://t.me/pump_upp
Posts: 43
Rep Power: 5
schwaral is on a distinguished road
Send a message via ICQ to schwaral Send a message via AIM to schwaral Send a message via Yahoo to schwaral
Hi, I want to interrupt my calculation based on convergence criteria. My criteria should be the value I store in tthe UDM. Somehow I don't manage to store the value in the UDM with my UDF. I activate 1 UDM in fluent.

I receive an error, that is most likely becauce I use the loops not correctly.
when I just message0 the value of my criteria (fnew*fprev) in the console, everything works great. When I build in the loops and want to set the UDM to 0 or 1 it fails.

Error: Error: received a fatal signal (Segmentation fault).
Error Object: #f

UDF:
Code:
 DEFINE_ADJUST(adjust_UDS_bc, d)
{
	Thread* t;
	cell_t c;
	face_t f;
	thread_loop_c(t, d);
	{
		if ((fnew * fprev) <= 0)
		{
			begin_c_loop(c, t)
			{
				C_UDMI(c, t, 0) = 1;
			}
			end_c_loop(c, t)
			Message0(" UDM: %lf \n", fnew * fprev);
		}
		if ((fnew * fprev) > 0)
		{
			begin_c_loop(c, t)
			{
				C_UDMI(c, t, 0) = 0;
			}
			end_c_loop(c, t)
			Message0(" UDM: %lf \n", fnew* fprev);
		}
	}
}

Maybe someone has a better understanding of the loops and can help
schwaral is offline   Reply With Quote

 

Tags
udf


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
Setting up additional convergence criteria: output parameters are ‘constant’ Pierre1 CFX 3 March 21, 2015 04:47
question about convergence criteria in Flow Simulation drdet FloEFD, FloWorks & FloTHERM 2 January 16, 2015 09:36
Individual convergence criteria for velocity components? CoolHand OpenFOAM Running, Solving & CFD 0 March 3, 2014 16:47
Convergence criteria Gaurav Siemens 0 February 3, 2006 04:53
Convergence criteria Sileno Phoenics 1 December 6, 2005 07:25


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