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

UDF to update Operating pressure

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 9, 2003, 01:56
Default UDF to update Operating pressure
  #1
Rahul
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

  Reply With Quote

Old   June 19, 2013, 15:53
Default
  #2
New Member
 
Mahboobe Mahdavi
Join Date: Mar 2013
Posts: 22
Rep Power: 13
Mahboobe365 is on a distinguished road
could you find the solution for this problem?
Mahboobe365 is offline   Reply With Quote

Old   June 26, 2020, 02:01
Default
  #3
Senior Member
 
Arun raj.S
Join Date: Jul 2011
Posts: 194
Rep Power: 14
arunraj is on a distinguished road
Is there a solution to the problem?
arunraj is offline   Reply With Quote

Old   June 26, 2020, 03:11
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
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
AlexanderZ is offline   Reply With Quote

Old   June 26, 2020, 03:17
Default
  #5
Senior Member
 
Arun raj.S
Join Date: Jul 2011
Posts: 194
Rep Power: 14
arunraj is on a distinguished road
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)
}
arunraj is offline   Reply With Quote

Old   June 26, 2020, 04:39
Default
  #6
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
AlexanderZ is offline   Reply With Quote

Old   June 26, 2020, 04:54
Default
  #7
Senior Member
 
Arun raj.S
Join Date: Jul 2011
Posts: 194
Rep Power: 14
arunraj is on a distinguished road
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 11:36.
arunraj 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
the role of operating pressure in flow simulation sunflower FLUENT 1 December 20, 2010 21:24
Floting operating pressure Edwardo FLUENT 0 November 12, 2005 16:08
correct UDF code for unsteady pressure boundary James W FLUENT 0 November 2, 2005 11:38
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 05:13
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 13:19


All times are GMT -4. The time now is 14:04.