UDF to update Operating pressure
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
|
could you find the solution for this problem?
|
Is there a solution to the problem?
|
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 |
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) } |
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; |
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) |
All times are GMT -4. The time now is 18:13. |