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

Gravity source term in PisoFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 28, 2012, 15:56
Default Gravity source term in PisoFoam
  #1
New Member
 
Dan M
Join Date: Sep 2010
Location: Munich, Germany
Posts: 20
Rep Power: 16
DanM is on a distinguished road
Hello,

I have a question regarding adding a source term to the momentum equation in the piso solver. I would like to model a channel flow taking into account the effect of gravity. To do so I have adjusted the solver as follows:

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

I have specified a non uniform pressure outlet condition to the channel that takes into account the effect of gravity. When solving the problem I attain a pressure distribution that seem reasonable (hydrostatic pressure distribution). However, I experience oscillations of the vertical velocity component (U1). This is seen in the attached picture that shows the velocity distribution across the channel height. The picture corresponds to the beginning of the simulation where the horizontal velocity is still zero and the vertical velocity should also be equal to zero across the height. It seems like the boundaries are causing some issues. I have used standard no slip conditions for U and zeroGradient for p so I am not sure what is causing the error. Is there something else I need to consider when trying to include gravity in a pisoFoam flow?

I would greatly appreciate any help.

Thank you very much,

Dan
Attached Images
File Type: jpg velocityDistribution.jpg (29.4 KB, 83 views)
DanM is offline   Reply With Quote

Old   December 3, 2012, 09:44
Default
  #2
New Member
 
Guillaume
Join Date: Nov 2012
Posts: 10
Rep Power: 14
Gloq is on a distinguished road
Hello Dan,

i'm trying to solve a channel case like yours but with reactingFOAM.

I obtained a pressure distribution along height accounting for gravity effects like you. But close to outlet BC, I got a big recirculation zone with unphysical magnitudes for velocity and low pressure.


You said you "specified a non uniform pressure outlet condition to the channel".
What did you do actually ?
You created a boundary condition for p that accounts for gravity effects ?
Do you think I could get better results which such a trick ?

Thanks in advance for your help.

Guillaume
Gloq is offline   Reply With Quote

Old   December 3, 2012, 09:52
Default
  #3
New Member
 
Dan M
Join Date: Sep 2010
Location: Munich, Germany
Posts: 20
Rep Power: 16
DanM is on a distinguished road
Hello Guillaume,

yes, I set the outlet boundary conditions equal to the hydrostatic pressure distribution using groovyBC. I have figured out by now why the problems at the boundaries (top and bottom of the channel) arises. I had prescribed zeroGradient for the pressure but this doesn't take into account the hydrostatic pressure. I have switched to a fixedGradient condition but I still am experiencing difficulties attaining a physical solution. I guess a work around would be the approach taken by the buoyancy solvers of OpenFoam, which solve for p_rgh rather than p. This makes the definition of the boundary conditions significantly easier.

Greetings,

Daniel
DanM is offline   Reply With Quote

Old   December 4, 2012, 13:17
Default
  #4
New Member
 
Guillaume
Join Date: Nov 2012
Posts: 10
Rep Power: 14
Gloq is on a distinguished road
Dan,

thanks a lot for your (very quick !) answer.

I will try to see if it is easy or not to replace/complete p equation of reactingFoam solver with p_rgh equation, being inspired by buoyancy or two-phase flow solvers.

Guillaume
Gloq is offline   Reply With Quote

Old   May 24, 2013, 12:30
Default
  #5
New Member
 
Join Date: Feb 2013
Posts: 17
Rep Power: 13
redhoax is on a distinguished road
I am experiencing this exact same issue using reactingFoam in an open domain - a resirculation zone at the outlet. I have created a pressure gradient at the outlet with the use of groovyBC, still I obtain unreasonable velocity magnitudes. did you solve your problem? if so, i am very keen to know how

Lasse
redhoax is offline   Reply With Quote

Reply


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
Problem of SOURCE term gradient in UDS wind Fluent UDF and Scheme Programming 6 December 1, 2022 15:21
How to write source term into scalar Fiel JimKnopf OpenFOAM Programming & Development 0 March 23, 2011 06:59
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 BlGene OpenFOAM Meshing & Mesh Conversion 10 August 6, 2009 05:26
Adding a momentum source term segersson OpenFOAM Running, Solving & CFD 5 March 3, 2006 00:06
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 04:43


All times are GMT -4. The time now is 07:38.