|
[Sponsors] |
October 20, 2017, 04:10 |
Automatic stop calculation
|
#1 |
New Member
ChenChong
Join Date: Jul 2017
Posts: 7
Rep Power: 9 |
hello,I am trying to stop calculation automatically according to a parameter value,such as temperature,if the temperature reach 300k,stop calculation.
Can someone help me? thanks a lot! |
|
October 20, 2017, 06:32 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Hello.
You can do it through scheme script + UDF, or fluent GUI + UDF. I will share with you these approaches, however, text is translated by google, I'm lazy to modify, excuse me. 1. http://www.eureka.im/996.html 2. It is a way to take advantage of ANSYS Fluent's Convergence Conditions feature. I have implemented the content as an example. This is an example of configuring a certain number of Iteration as a convergence condition and stopping the calculation if satisfied. It consists of two steps. The first step is to set the convergence criterion through the UDF. Code:
#include "udf.h" real stop_coeff; DEFINE_ADJUST(stop_value, d) { Thread *t; cell_t c; if(N_ITER >= 416) { real stop_coeff=1; } else { stop_coeff+=1; } thread_loop_c(t,d) { begin_c_loop(c,t) { C_UDMI(c,t,0) = stop_coeff; } end_c_loop(c,t) } } And when it reaches 416 times of iteration which is the target that is desired, stop_coeff is saved in UDM with a certain value. This value remains constant for the 417th iteration. (If you are familiar with Scheme, you can do this with Scheme instead of UDF.) The next step is to set convergence judgment based on the content of the corresponding variable (UDM). ANSYS FLUENT's "Convergence Conditions" feature allows you to configure. This example averages the UDMI values of the entire cell and uses the values as a convergence criterion. Therefore, we define an average value in "Report Definitions", And in "Convergence Conditions" we set it to judge convergence based on this value. The results show that although the Max Iteration number has not been reached and the "Residual Convergence Criterion" is set to "none" As a result, you can see that the calculation stops at the desired target (Iteration 417). Obviously the content is not efficient because it loops all cells. Nevertheless, if you apply this method appropriately, it will be enough for the setting that you desire. Best regards |
|
October 20, 2017, 07:54 |
|
#3 |
New Member
ChenChong
Join Date: Jul 2017
Posts: 7
Rep Power: 9 |
thanks for your reply.you have provided 2methods,and I tried the second method as you said. But in "Convergence Conditions" ,I can't find " UDMI values",so how to set it ,could you give me the detail?
|
|
October 22, 2017, 21:44 |
|
#4 | |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Quote:
in Fluent GUI go to "Solution" -> "Report Definitions" -> create new for User-Defined variable ( in Field variable choose User-Defined Memory... and select UDMI - 0, for this example) Than you will have this report definition in "Convergence conditions" menu. If you are not familiar with UDF and user-defined memory, try to use google and ANSYS Fluent Customization Manual Best regards |
||
October 24, 2017, 05:14 |
|
#5 | |
New Member
ChenChong
Join Date: Jul 2017
Posts: 7
Rep Power: 9 |
Quote:
|
||
April 16, 2018, 06:35 |
|
#6 |
Member
Join Date: Nov 2017
Posts: 54
Rep Power: 9 |
hi dear
I use Ansys fluent 2017, but i can't find "convergence conditions" can u help me? Also I can't find User-Defined variable in Field variable of report definitions |
|
April 16, 2018, 23:25 |
|
#7 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
"convergence conditions" is implemented in version 18.0
best regards |
|
April 17, 2018, 06:02 |
|
#8 | |
Member
Join Date: Nov 2017
Posts: 54
Rep Power: 9 |
Quote:
when i go to "Report Definitions" , I have some choices like area weighted average and etc which of these task I must choose for your example? also what is stop criterion in convergence manager in fluent 17? |
||
April 17, 2018, 06:31 |
|
#9 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
because you apply same value to UDMI_0 ,that's why it doesn't matter, which option you will select, area-weight average for instance.
for v17.0 I recommend you to use 1st approach with scheme script best regards |
|
January 16, 2021, 09:00 |
|
#10 | |
New Member
Sagar
Join Date: Apr 2016
Posts: 23
Rep Power: 10 |
Quote:
Thanks |
||
January 18, 2021, 01:54 |
|
#11 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
instead of condition in UDF
Code:
if(N_ITER >= 416)
__________________
best regards ****************************** press LIKE if this message was helpful |
|
February 3, 2021, 09:36 |
Stop Iterations Execute command
|
#12 | |
New Member
Alaa
Join Date: Feb 2021
Posts: 1
Rep Power: 0 |
Quote:
I'm using ANSYS 2019 , and try to use solution>calculation activities>Execute Commands to stop the transient solution iterations based on defined Report Definition for heat flux<100. Can you help me to put the appropriate statement into execute command window, please. Regards. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Transfer output data as input for second calculation | mannobot | Main CFD Forum | 3 | December 7, 2018 10:37 |
compiling firefoam | Farshad_Noravesh | OpenFOAM | 27 | December 24, 2012 05:21 |
FSI doesnt stop if i click stop button | peterputer | CFX | 7 | November 20, 2012 16:56 |
continuityErrs.h, coninuity equation, automatic stop are reaching continuity | idrama | OpenFOAM | 0 | September 20, 2010 16:09 |
transient simulation of a rotating rectangle | icesniffer | CFX | 1 | August 8, 2009 08:25 |