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 fix the pressure in domain - not working

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Far
  • 1 Post By Far

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 17, 2015, 00:58
Default UDF to fix the pressure in domain - not working
  #1
Far
Senior Member
 
Sijal
Join Date: Mar 2009
Location: Islamabad
Posts: 4,558
Blog Entries: 6
Rep Power: 54
Far has a spectacular aura aboutFar has a spectacular aura about
Send a message via Skype™ to Far
Hi Every One

I am trying to fix the pressure in domain using DEFINE_EXECUTE_AT_END macro for the journal bearing simulation.

Although I am able to solve it using the cavitation model along with mixture model, but there are some variables for which I don't have info, for example vaporization pressure...therefore I am preferring the first method...

Here is the UDF I am using (got it from this forum in some thread), but it is not fixing static pressure in domain as intended i.e. I want to make the static pressure at end of each iteration to zero...




Here are the results i am getting after each iteration (some random iteration)

Attached Images
File Type: jpg Untitled.jpg (32.3 KB, 115 views)
File Type: jpg Untitled2.jpg (28.9 KB, 112 views)
Attached Files
File Type: c halfpressure.c (361 Bytes, 26 views)
Dinesh_Dhande likes this.
Far is offline   Reply With Quote

Old   August 17, 2015, 05:47
Default
  #2
Far
Senior Member
 
Sijal
Join Date: Mar 2009
Location: Islamabad
Posts: 4,558
Blog Entries: 6
Rep Power: 54
Far has a spectacular aura aboutFar has a spectacular aura about
Send a message via Skype™ to Far
It is working now . Thanks every one




Attached Images
File Type: jpg Untitled.jpg (17.7 KB, 111 views)
File Type: jpg Untitled2.jpg (30.1 KB, 112 views)
moon shine likes this.
Far is offline   Reply With Quote

Old   July 24, 2017, 10:34
Default
  #3
New Member
 
Duyikang
Join Date: Jun 2015
Location: Wuhan,China
Posts: 4
Rep Power: 11
DuYikang is on a distinguished road
hello,I am glad to know you success.Now, i am encountering the same difficult.Can you tell me how to change the negative pressure into zero?Thanks a lot!
DEFINE_ADJUST(adjust_pressure,domain)
{
Thread *t;
cell_t c;
thread_loop_c(t,domain)
{
begin_c_loop(c,t)
{
if(C_P(c, t) < 0)
{
C_P(c, t) = 0;
}
}
end_c_loop(c,t)
}
}
DuYikang 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
Domain Reference Pressure and mass flow inlet boundary AdidaKK CFX 75 August 20, 2018 06:37
pulsatile blood flow - developing larger pressure in the fluid domain KushalJ CFX 4 April 29, 2015 01:14
UDF to set velocity and pressure in inlet GerardX89 Fluent UDF and Scheme Programming 0 July 16, 2012 11:15
how to get pressure and pressure gradient using UDF Honglin Fluent UDF and Scheme Programming 0 May 24, 2012 07:47
Gas pressure question Dan Moskal Main CFD Forum 0 October 24, 2002 23:02


All times are GMT -4. The time now is 19:22.