# setting pressure gradient in the internal field

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 15, 2015, 19:01 setting pressure gradient in the internal field #1 New Member   ahmad Join Date: Oct 2012 Posts: 5 Rep Power: 12 Hi guys. Can anyone explain how I can set the pressure gradient as the initial condition in the internal field? Most studies use pressure gradient as their initial condition to drive the flow in the streamwise direction. I'm trying to do the same using pisoFoam. I would appreciate any suggestions. Thanks.

 January 16, 2015, 17:08 #2 Senior Member   Michael Prinkey Join Date: Mar 2009 Location: Pittsburgh PA Posts: 363 Rep Power: 24 If the flow is internal, you can use inlet and outlet pressure conditions to manifest your pressure gradient. The pressure field cannot just be applied as an initial condition because it will depend on potentially complicated flow behavior between the inlet and outlet. pisoFoam will solve the pressure field during its first timestep calculation and the pressure driven flow will evolve. That is all I can offer without more details about what you are trying to accomplish. I know some simulations may use periodic domains (maybe for DNS/LES) and try to apply a pressure gradient to drive the flow. If that is what you are trying to accomplish, you can pick a pressure gradient and then add it as a source term to the momentum equation as a body force. Note that this is applicable only to simple flow domain (periodic channel flow, periodic flow between two plates) because in more complicated flow configurations, you cannot assume a uniform pressure gradient source term.

 January 18, 2015, 19:58 #3 New Member   ahmad Join Date: Oct 2012 Posts: 5 Rep Power: 12 Hi Michael. Thanks for ur suggestion. I'm running LES for turbulent flow over a surface with two rows of buildings. And, it's a periodic domain, very small with low velocity applied at the top boundary. So, within the internal domain, I wish to set constant pressure gradient, as done in previous studies as u said. So far, I have only set uniform velocity within the internal field as the initial condition, and its value is the same as the one on the top boundary. That's pretty much summarized my boundary conditions. But of course I will look into how I could add the pressure gradient term. This would involve compiling a new version of pisoFoam solver, which I haven't done before. Thanks again.

 January 18, 2015, 20:32 #4 Senior Member   Michael Prinkey Join Date: Mar 2009 Location: Pittsburgh PA Posts: 363 Rep Power: 24 Conceptually, replace with . and are the pressures on either side of the periodic BCs. is the distance between the two periodic boundaries. When you insert that into the equation, you get the form for the body force. PisoFoam will be solving the flow with the modified pressure . So the full pressure (for post processing) will require you to add the linear term back on by hand. As long as your boundary conditions are only periodic or zero-gradient for pressure, this transformation is valid for any geometric configuration. Also, this assumes incompressible flow.

 Tags internal field, pisofoam, pressure gradient