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

Pressure gradient in channel flow - mapped BC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2012, 13:34
Default Pressure gradient in channel flow - mapped BC
  #1
Member
 
Join Date: Jul 2010
Posts: 52
Rep Power: 15
MaryBau is on a distinguished road
Hi!!

I want to simulate a simple channel flow with periodic boundary contidions in the inlet/outlet. If I understand correctly I have two ways of doing it:

Option 1: Use channelFoam and the solver will verify the mass flow rate.

Option 2: Use pisoFoam solver instead with the mapped (directMapped in previous OF versions) boundary conditions with "setAverage true" for the velocity. The code is also verify and correct the mass flow rate.

Is that correct? Are there any diferences between the two options?

Does it mean that by using a "mapped boundary" conditions I am imposing a pressure gradient in that direction?

Thanks in advance...
MaryBau is offline   Reply With Quote

Old   February 15, 2013, 13:35
Default
  #2
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 14
ripperjack is on a distinguished road
Quote:
Originally Posted by MaryBau View Post
Hi!!

I want to simulate a simple channel flow with periodic boundary contidions in the inlet/outlet. If I understand correctly I have two ways of doing it:

Option 1: Use channelFoam and the solver will verify the mass flow rate.

Option 2: Use pisoFoam solver instead with the mapped (directMapped in previous OF versions) boundary conditions with "setAverage true" for the velocity. The code is also verify and correct the mass flow rate.

Is that correct? Are there any diferences between the two options?

Does it mean that by using a "mapped boundary" conditions I am imposing a pressure gradient in that direction?

Thanks in advance...
Same question, how to add pressure gradient.
ripperjack is offline   Reply With Quote

Old   February 19, 2013, 16:41
Default
  #3
Member
 
Join Date: Jul 2010
Posts: 52
Rep Power: 15
MaryBau is on a distinguished road
I tried two cases:

1) mapped boundary conditions (or directMapped in older versions) in the inlet/outlet with a "setAverage true" and using the regular OF pisoFoam (no pressure gradient).

2) having a pressure gradient added to the pisoFoam UEqn and cyclic inlet/outlet boundary conditions.

and I obtained the same results in both cases.

Now, to add a pressure gradient to drive the flow, you have to modified the UEqn in pisoFoam.

Code:
fvVectorMatrix UEqn
            (
                fvm::ddt(U)
              + fvm::div(phi, U)
              + turbulence->divDevReff(U)
              + gradP
            );
where

Code:
    dimensionedVector gradP
    (
        "gradP",
        dimensionSet(0, 1, -2, 0, 0),
        vector::zero
    );
Hope it helps!
MaryBau is offline   Reply With Quote

Old   February 26, 2013, 15:30
Default
  #4
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 14
ripperjack is on a distinguished road
Hi MaryBau.
Thanks very much! In code:
Code:
    dimensionedVector gradP
    (
        "gradP",
        dimensionSet(0, 1, -2, 0, 0),
        vector::zero
    );
Why did you set the gradP=0? Since there is no pressure gradient, how to drive the flow?
I am a new user of openFoam.....

Quote:
Originally Posted by MaryBau View Post
I tried two cases:

1) mapped boundary conditions (or directMapped in older versions) in the inlet/outlet with a "setAverage true" and using the regular OF pisoFoam (no pressure gradient).

2) having a pressure gradient added to the pisoFoam UEqn and cyclic inlet/outlet boundary conditions.

and I obtained the same results in both cases.

Now, to add a pressure gradient to drive the flow, you have to modified the UEqn in pisoFoam.

Code:
fvVectorMatrix UEqn
            (
                fvm::ddt(U)
              + fvm::div(phi, U)
              + turbulence->divDevReff(U)
              + gradP
            );
where

Code:
    dimensionedVector gradP
    (
        "gradP",
        dimensionSet(0, 1, -2, 0, 0),
        vector::zero
    );
Hope it helps!
ripperjack is offline   Reply With Quote

Reply

Tags
channelfoam, mappedfixedvalue, pisofoam, pressure gradient


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
Maintaining Static Pressure at Fluid Flow Inlet cdevalve FLUENT 3 January 14, 2012 00:11
How apply pressure gradient to get fully developed flow? nihossain FLUENT 0 November 5, 2011 15:20
Channel flow: Inlet pressure AND uniform velocity? frmap1 Main CFD Forum 0 April 15, 2010 10:32
pressure outlet (open channel flow) Willem Brantegem Main CFD Forum 0 April 3, 2007 09:39
flow simulation across a small fan jane luo Main CFD Forum 15 April 12, 2004 17:49


All times are GMT -4. The time now is 15:14.