|
[Sponsors] |
July 25, 2017, 05:19 |
How to change pressure in iterative process
|
#1 |
New Member
Duyikang
Join Date: Jun 2015
Location: Wuhan,China
Posts: 4
Rep Power: 11 |
Hello everyone! I am encountering an interesting problem.How to setthe negative gauge pressure to zero when negative values occur in the hydrodynamic bearings or hydrostatic bearings? From the fluent help, the define_adjust can change the pressure and velocity in every iterative step.However, it can't make it.The programm as follows:
#include "udf.h" DEFINE_ADJUST(adjust_pressure, domain) { Thread *t; cell_t c; face_t f; 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) } thread_loop_f(t, domain) { begin_f_loop(c, t) { if (C_P(c, t) <= 0.0) C_P(c, t) = 0.0; } end_f_loop(c, t) } } Although the DEFINE_EXECUTE_AT_END can make it, it is unreason.The programm is from this forum.(UDF to fix the pressure in domain - not working) #include "udf.h" DEFINE_EXECUTE_AT_END(pressure_adjust) { Domain *d; Thread *t; cell_t c; face_t f; d = Get_Domain(1); thread_loop_c(t,d) { begin_c_loop (c,t) { if (C_P(c,t)<=0.0) C_P(c,t)=0.0; } end_c_loop (c,t) } thread_loop_f(t,d) { begin_f_loop(c,t) { if (C_P(c,t)<=0.0) C_P(c,t)=0.0; } end_f_loop(c,t) } } |
|
July 25, 2017, 07:26 |
|
#2 |
Senior Member
Kal-El
Join Date: Apr 2017
Location: Finland
Posts: 150
Rep Power: 9 |
||
July 25, 2017, 21:57 |
|
#3 | |
New Member
Duyikang
Join Date: Jun 2015
Location: Wuhan,China
Posts: 4
Rep Power: 11 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What are ways to reduce the time taken by fluent and meshing process in phase change. | ~Akshay350~ | FLUENT | 0 | March 23, 2017 13:39 |
total pressure change in a pipe flow | Im | FLUENT | 5 | February 23, 2017 09:55 |
static vs. total pressure | auf dem feld | FLUENT | 17 | February 26, 2016 14:04 |
Calculate Density | mumtaz ersan | FloEFD, FloWorks & FloTHERM | 1 | September 17, 2015 05:26 |
pressure change in CFX 11 | Greg | CFX | 3 | May 8, 2007 16:05 |