CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   STAR-CCM+ (http://www.cfd-online.com/Forums/star-ccm/)
-   -   pressure outlet boundary condition (http://www.cfd-online.com/Forums/star-ccm/101694-pressure-outlet-boundary-condition.html)

liladhar May 11, 2012 03:19

pressure outlet boundary condition
 
hey hi everybody
i want to use pressure outlet boundary condition as to get the flow analysis. further i want to use a user defined boundary condition (user code) for that. does anybody can tell me whether we can use user code as a pressure outlet boundary condition.
thanks in advance

rwryne May 11, 2012 08:25

Quote:

Originally Posted by liladhar (Post 360489)
hey hi everybody
i want to use pressure outlet boundary condition as to get the flow analysis. further i want to use a user defined boundary condition (user code) for that. does anybody can tell me whether we can use user code as a pressure outlet boundary condition.
thanks in advance


You can use a field function or a table to set the values of a boundary condition

abdul099 May 11, 2012 17:51

User coding should be the last thing to choose. Are you really sure, you need user coding and there is no other way to do your job? Are you sure, user coding can solve your issues? If not, you should think about other solutions.
Nearly all jobs (but half a handful) can be solved by using tables or field functions (like rwryne said) or as a second last step, by using Java macros.

Maybe you can tell us what you try to achieve, so we might be able to tell you the most convenient way.

liladhar May 12, 2012 00:21

thanks fr your suggestions. i never tried field function or table to give pressure outlet boundary condition. i will try that. my problem is that i have to specify a varying pressure at the outlet which varies with depth. can i use field function or table in that case?

abdul099 May 12, 2012 04:43

Should be possible with both, tables and field functions. Which one is better depends on your pressure profile. When it can be described by a more or less simple equation (can be time-dependent or position-dependent), I would go for a field function.You can also combine field functions to apply more complicated settings.
Tables are nice when you easily can export a table with the settings from another simulation / program. But they don't allow that much flexibility like field functions. However, they also could be combined, since tables can be interpolated to field functions.
There are some examples in the user guide how to use them. Let us know if it works or when you need assistance.

liladhar May 12, 2012 04:54

thanks for the help abdul. i tried the field function. it doesn't work, may be because i didnt gave write boundary condition. my problem is to get the pressure at the outlet boundary as vary with depth "patm+rho*g*h". i have height as a variable. i got the example of varying velocity in a bend pipe in the user guide of star ccm+ as [($$Centroid[0] < 5) ? 1 : 0, ($$Centroid[0] < 5) ? 0 : -1, 0]. but this variation is in x-direction. they didnt mentioned how to do it for y-direction variation.
i was trying doing this
($height >= 0.1) ? 106000 : 101325+997.56*9.81*$height
where height from free surface is 1.4m. but it doesn't work for me.
need help.
thanks

abdul099 May 12, 2012 05:09

Well, $height is no primitive field function (the FF already existing in ccm+ by default), so you can't reference that when you haven't created it on your own.

The statement $$Centroid[0] means "Cell center will be evaluated in X-direction". Replace the [0] with [1] for the Y-direction or [2] for the Z-direction.


All times are GMT -4. The time now is 00:13.