CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   A UDF to prescribe the pressure at the outlet (https://www.cfd-online.com/Forums/fluent-udf/93082-udf-prescribe-pressure-outlet.html)

Naseem October 4, 2011 15:42

A UDF to prescribe the pressure at the outlet
 
Hi guys,

I would like to set the pressure at the outlet to be the same as those of the adjacent cells. What Macro shoud I use, PROFILE or ADJUST? Does Fluent allow me to do this if I activate pressure-outlet boundary condition at the outlet? Any more suggestions and advice are highly appreciated.

Thanks in advance,
Naseem

m2montazari October 5, 2011 16:27

hi,
I think in theory you must set a variable value at the outlet(usually pressure) and setting it to adjacent cell means a zero gradient for pressure. check if it is theoretically true or not?
but if you want to this, maybe setting face value equal to cell value could result what you want. however I think it would have some errors but better than nothing!!
yours,
mohammad

Naseem October 6, 2011 03:36

Thanks Mohammed for your reply. I am trying to solve a natural convection problem. I know that there is a boundary condition by which you can prescribe the pressure gradient to be zero, namely Outflow. However, there are some complications associated with this boundary condition: as en example, you are not supposed to prescribe other pressure boundary conditions other than the 'Outflow'. Also, you do not have to use compressible flow.

As suggested by Fluent manual, I will use the ouflow BC and write a UDF to set the desnity of the gas as a function of temperature. I will let you know if this works. Thanks once again for your reply.

Naseem October 7, 2011 16:02

Hi guys,

I have managed to get a coverged solution for the problem using Outflow boundary conditions. However, I have used the density-based solver rather than the pressure based one. I have written two UDFs to express the density of the two mixtures being available as a funcation of temperture as one of the requirements to use Outflow boundary condition is to do so. However, while postprocessing the data, I have noticed that the density of the mixture that must be dominantly present in one of the threads is incorrect: it does have the density of the other mixture available in the opposite thread. It must be noticed that these two threads (flow channels) are separated by an impermeable membrane. Here are the UDFs:

#include"udf.h"
DEFINE_PROPERTY(cell_density_o2,c,t)
{
real temp = C_T(c,t);
real rho;
rho = 0.000009638*temp*temp - 0.00962*temp + 3.19;
return rho;
}
DEFINE_PROPERTY(cell_density_h2,c,t)
{
real temp = C_T(c,t);
real rho;
rho = 0.0000006684*temp*temp - 0.0006671*temp + 0.2212;
return rho;
}

I would appreciate any help to resolve this problem.

Naseem


All times are GMT -4. The time now is 18:34.