CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Pre-Processing

Writing an explicit Pressure source

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

LinkBack Thread Tools Display Modes
Old   January 18, 2014, 08:31
Default Writing an explicit Pressure source
Join Date: Oct 2013
Location: Göteborg
Posts: 37
Rep Power: 5
MaLa is on a distinguished road

I need some help. I wish to run a channel flow simulation. I am trying to set my flow conditions to Re_tau = 590. To achieve that, I have kept the half channel width = 1, u_tau =1 and nu =1/590.

To ensure that u_tau =1, I have used the relation that
2 * rho * u_tau ˛ =(dP/dx) * ( 2 * half-channel-width)
I need to specify an (explicit) pressure gradient source to make sure that u_tau = 1.

Do you think this approach is correct so far?

Now the second question: To specify a pressure gradient explicit source, I looked up the file pressureGradientExplicitSource.C. What I could make out from it was that, the user specifies a U_bar. At each time step, the current U_bar is calculated by averaging across all cell volumes, and depending on the difference between the averaged and the specified U_bar, the pressure gradient is adjusted.

If this is true, then the pressure gradient is NOT constant but adjusts itself to meet the U_bar. This is not what I want. I want to enforce a constant pressure gradient source, so that the u_tau (as mentioned above) stays fixed.

What do you think? Comments and thoughts would be greatly appreciated.
MaLa is offline   Reply With Quote

Old   January 20, 2014, 14:47
Senior Member
mturcios777's Avatar
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 735
Rep Power: 21
mturcios777 will become famous soon enough
What about setting the pressure BC's at the start and end of the channel, using fixedValue or totalPressure?
mturcios777 is offline   Reply With Quote

Old   January 20, 2014, 18:13
Join Date: Oct 2013
Location: Göteborg
Posts: 37
Rep Power: 5
MaLa is on a distinguished road
Yes mturcios777, that would be an option. But I wanted to use the cyclic boundary condition on the inlet and outlet patches. If I do that, I have to change the solver explicitly I guess, in order to include the (constant) pressure gradient term. What do you think?
MaLa is offline   Reply With Quote

Old   February 22, 2016, 12:58
New Member
Join Date: Nov 2015
Posts: 2
Rep Power: 0
turbu is on a distinguished road

I met the same problem, do you find a solution to set the constant pressure gradient value?

thank you
turbu is offline   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Matlab code for pipe flow cici Main CFD Forum 72 May 12, 2017 18:05
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 02:22
swak4foam building problem GGerber OpenFOAM Installation 54 April 24, 2015 16:02
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18
Does star cd takes reference pressure? monica Siemens 1 April 19, 2007 11:26

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