CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

initialize pressure gradient

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2011, 08:55
Default initialize pressure gradient
  #1
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Dear Foamers

I am try to setup a Gaussian vortex case, which has a given velocity field and pressure gradient field. I am able to write a app to initialize the velocity across the flow domain by looping through each individual cells. However, I am having problem to initialize the pressure gradient as it requires more than one cell. Would anyone have some suggestions on how to implement this?

Thank you.
jiejie is offline   Reply With Quote

Old   June 30, 2011, 10:25
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
my suggestion :
1) add to createFields.H
volVectorField dpdx
(
IOobject
(
"dpdx",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);

2) add file dpdx with dimension of (p/length) in folder 0

3) use funkySetFields from openFoam wiki to initialize the field
nimasam is offline   Reply With Quote

Old   June 30, 2011, 10:36
Default
  #3
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Hi nimasam

It requires more cell points to calculate the pressure gradient but not sure how to convert pressure gradient to pressure?

I came across the funkyFields but never used it before. Would you be able to elaborate a bit more on it?

Thanks for the reply.
jiejie is offline   Reply With Quote

Old   June 30, 2011, 10:46
Default
  #4
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
i can't understand, whats ur mean ?
nimasam is offline   Reply With Quote

Old   June 30, 2011, 10:49
Default
  #5
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Quote:
Originally Posted by nimasam View Post
i can't understand, whats ur mean ?
Sorry for the confusion. What I mean is you need more than one cell to calculate the pressure gradient. Is it possible to calculate the pressure at each cell if I know the pressure gradient? This is because I need to initialize the pressure field but I only have the information of the pressure gradient.
jiejie is offline   Reply With Quote

Old   June 30, 2011, 10:59
Default
  #6
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
im not sure! it would be compilicated but maybe you can look at streamFunction and use similar method!
nimasam is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
steam flow in a pipe driven by a pressure gradient between inlet and outlet SalvoCalvo COMSOL 0 March 11, 2010 07:52
Inputting pressure gradient in Fluent Josyula FLUENT 2 December 23, 2009 08:26
Atmospheric pressure gradient Luc3er FLUENT 1 October 30, 2009 07:46
maximum pressure gradient Rashmi FLUENT 0 March 20, 2006 22:15
Flat plate with pressure gradient Sheila Main CFD Forum 3 September 24, 2005 14:58


All times are GMT -4. The time now is 05:17.