|
[Sponsors] |
December 9, 2003, 02:56 |
UDF to update Operating pressure
|
#1 |
Guest
Posts: n/a
|
Hi All, I am performing a analysis which require to update operating pressure based on other parameters. Can someone suggest me how to tackle this problem? As operating pressure doesn't have hook it may need some other way like adjust function to take care of this. Thanks in advance, Rahul
|
|
June 19, 2013, 16:53 |
|
#2 |
New Member
Mahboobe Mahdavi
Join Date: Mar 2013
Posts: 22
Rep Power: 13 |
could you find the solution for this problem?
|
|
June 26, 2020, 03:01 |
|
#3 |
Senior Member
Arun raj.S
Join Date: Jul 2011
Posts: 207
Rep Power: 16 |
Is there a solution to the problem?
|
|
June 26, 2020, 04:11 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
you can use TUI command to set operating pressure.
If you need to make it under criteria you can use scheme + TUI. It is possible to transfer data from UDF to scheme using rpvariables Look for rpvar in Ansys FLuent Customization manual
__________________
best regards ****************************** press LIKE if this message was helpful |
|
June 26, 2020, 04:17 |
|
#5 |
Senior Member
Arun raj.S
Join Date: Jul 2011
Posts: 207
Rep Power: 16 |
Dear Alexander,
Thank you for the reply. I want to apply corrected operating pressure as UDF. Is this what you mean? Can I add this at the end of DEFINE_ADJUST after calculating new operating pressure. Abs_Pres = 0; DEFINE_ADJUST(PRESSURE, domain) { ;;;; ;;; ;; p_op_new =mass_vap_old*(TIME_STEP*AAA*DDD); { RP_Set_Real("operating-pressure", p_op_new); thread_loop_c(t,d) { begin_c_loop(c,t) { Abs_Pres = ABS_P(C_P(c,t), p_op_new); } end_c_loop(c,t) return Abs_Pres; } } (or) { RP_Set_Real("operating-pressure", p_op_new); thread_loop_c(t,d) { begin_c_loop(c,t) { return p_op_new; } end_c_loop(c,t) } |
|
June 26, 2020, 05:39 |
|
#6 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
it could be something like this, however, I'm not sure if it works or not, you should test first. Make few timesteps and check operating pressure
In your code Abs_Pres is calculated each time during cell/thread loop. So you will get Abs_Pres only from last cell. What exactly you want? If you want to get the field of recalulated pressure you may use UDMIs Code:
Abs_Pres = 0; DEFINE_ADJUST(PRESSURE, domain) { ;;;; ;;; ;; p_op_new =mass_vap_old*(TIME_STEP*AAA*DDD); { RP_Set_Real("operating-pressure", p_op_new); thread_loop_c(t,d) { begin_c_loop(c,t) { Abs_Pres = ABS_P(C_P(c,t), p_op_new); C_UDMI(c,t,0) = Abs_Pres; } end_c_loop(c,t) } }
__________________
best regards ****************************** press LIKE if this message was helpful |
|
June 26, 2020, 05:54 |
|
#7 |
Senior Member
Arun raj.S
Join Date: Jul 2011
Posts: 207
Rep Power: 16 |
Thank you so much for your reply.
I solved with the following command. I hope it is correct. Can you please confirm? (rp-var-define 'p_op_new 0.0 'real #f) /define/operating-conditions/operating-pressure (rpgetvar 'p_op_new) Last edited by arunraj; June 26, 2020 at 12:36. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
the role of operating pressure in flow simulation | sunflower | FLUENT | 1 | December 20, 2010 22:24 |
Floting operating pressure | Edwardo | FLUENT | 0 | November 12, 2005 17:08 |
correct UDF code for unsteady pressure boundary | James W | FLUENT | 0 | November 2, 2005 12:38 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) | HB &DS | CFX | 0 | January 9, 2000 14:19 |