|
[Sponsors] |
Boundary conditions 2D Poisseuille flow in a pipe |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 9, 2011, 04:51 |
Boundary conditions 2D Poisseuille flow in a pipe
|
#1 |
New Member
Jochem van den Bosch
Join Date: Oct 2011
Location: Rotterdam, The Netherlands
Posts: 20
Rep Power: 15 |
Dear OpenFOAMers,
I'm relatively new to OpenFOAM and as a part of my MSc-thesis I am trying to simulate a fully developed (Poisseuille) flow in a pipe (and get the pressure losses, just for validation of the solver I'm using). I'm having trouble what boundary conditions to set for P and U in the '0' map. I'm working with a 2D geometry (with a 'wedge' on both sides). Any help would be MUCH appreciated! Best regards, |
|
November 9, 2011, 05:08 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
You'll have three boundaries: inlet, outlet and sidewall. If you know the inlet velocity, this should work:
Inlet: U fixedValue, p zeroGradient Outlet: U zeroGradient, p fixedValue uniform 0 Walls: U fixedValue uniform (0 0 0), p zeroGradient |
|
November 9, 2011, 05:20 |
|
#3 |
New Member
Jochem van den Bosch
Join Date: Oct 2011
Location: Rotterdam, The Netherlands
Posts: 20
Rep Power: 15 |
Hi Anton, thanks so much for your quick response. I already suspected that this is the way to do it, but I was unsure whether this directly yields a parabolic velocity profile or that the flow first will have to develop.
I see you're from Delft, any affiliation with the Delft University? I'm doing my thesis under prof. Van Rhee @ offshore & dredging engineering. |
|
November 9, 2011, 05:49 |
|
#4 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
If you specify a uniform fixedValue velocity on the inlet, the flow will have to develop first. I think the easiest way to specify a parabolic inlet velocity profile is using an extension called groovyBC.
We are neighbors. I'm a PhD candidate at Multiscale Physics, right behind 3ME. |
|
November 9, 2011, 08:24 |
|
#5 |
New Member
Jochem van den Bosch
Join Date: Oct 2011
Location: Rotterdam, The Netherlands
Posts: 20
Rep Power: 15 |
Now when I try to run the simulation (solver=settlingFoam but I run it for just the continuous phase for now), I get the following error:
Build : 2.0.1-51f1de99a4bc Exec : settlingFoam Date : Nov 09 2011 Time : 13:20:52 Host : Jochem PID : 3900 Case : /home/jochem/OpenFOAM/jochem-2.0.1/run/tutorials/multiphase/settlingFoam/ras/pipe2D nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading g Reading field p_rgh --> FOAM FATAL IO ERROR: inconsistent patch and patchField types for patch type wedge and patchField type empty file: /home/jochem/OpenFOAM/jochem-2.0.1/run/tutorials/multiphase/settlingFoam/ras/pipe2D/0/p_rgh::boundaryField::front from line 25 to line 25. From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&) in file /home/opencfd/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 164. FOAM exiting I have defined the wedges as type empty in the '0' map for both pressure and speed. I tried symmetryPlane and zeroGradient as wel, just to see if that would change anything, but no luck. What could be the cause of this problem? Best regards, ps. Anton, nice to hear we're neighbours, what are you working on currently? EDIT: never mind, I should of course use the wedge as type Last edited by jochemvandenbosch; November 9, 2011 at 08:31. Reason: Fixed it, not relevant anymore |
|
December 20, 2011, 12:36 |
|
#6 | |
Member
Joe
Join Date: Dec 2011
Location: Groton, CT
Posts: 69
Rep Power: 15 |
Quote:
How can you have a gradient of velocity (i.e. wouldn't that be the divergence)? In other codes when it comes to poisseuille flow, the velocity at the inlet and the pressure at the outlet will be fixed boundary conditions, but the pressure at the inlet and the velocity at the outlet will be calcualted - OpenFOAM seems to require hard boundary conditions at each boundary and doesn't (to my knowledge) seem to care about initial conditions (aside from the 0 time step folder). How can you differentiate between initial and boundary conditions? I know I just rattled off a lot of questions, but I'm just having trouble understanding OpenFOAM's boundary conditions versus initial conditions, how to specify each, and what exactly the zeroGradient does/is on a fundamental level. I'd appreciate any insight you can give me. |
||
December 20, 2011, 13:13 |
|
#7 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Because we are specifying information on a boundary, a zero gradient condition means that the gradient of velocity normal to the boundary is zero. For the example of Poisseuille flow with the channel oriented along the z axis, specifying zeroGradient at the outlet means that dUx/dz, dUy/dz, dUz/dz are all zero. At the inlet, dp/dz is zero.
|
|
December 21, 2011, 15:02 |
|
#8 | |
Member
Joe
Join Date: Dec 2011
Location: Groton, CT
Posts: 69
Rep Power: 15 |
Quote:
Thanks for the reply Marco, I think I understand what is meant by the zeroGradient condition now. I'm still unclear as to why you even need the boundary conditions for both pressure and velocity at the inlet and outlet. Wouldn't just the pressure at the outlet and just the velocity at the inlet be sufficient to solve the problem? |
||
December 22, 2011, 13:08 |
|
#9 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
If you look at the analytical solution for 2D Poiseuille flow, those zero-gradient boundary conditions are enforcing your fully developed condition, which (after applying the zero slip conditions at the wall and other assumptions) and solving the equations give you a flow that is only in the axial direction and only varies as you cross the channel.
OF solvers solve for the Navier-Stokes equations in a fully 3D and time-dependant form. By using the wedge you enforce axisymmetry, while in the 2D (using empty patches front and back), you state that the solution for flow normal to those boundaries are 0. In a sense, specifying the BC as they are is like making all the assumptions/simplifications that you would when solving analytically (take a look at an analytical solution to Posieuille flow to see what I mean: http://lions.math.hr/tok-kroz-cijev/...euille_en.html). Note that they use the pressure at either end as the two BC. If a code ever got smart enough to do everything that page shows when you specified a problem, I'm sure we'd have a SkyNet scenario just around the corner... Last edited by mturcios777; December 22, 2011 at 13:13. Reason: A note about the linked example. |
|
March 27, 2013, 15:49 |
|
#10 | |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
Quote:
I would like to know, if you were able to solve the 2D laminar pipe flow using axisymmetric simulations in openfoam. If so, can you share your geometry and the code, as I am trying to solve similar geometry for my problem. Thanks for the help Regards Vishal |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
Open Channel Flow Boundary Conditions | TWaung | STAR-CCM+ | 2 | October 7, 2011 01:37 |
1D unsteady flow boundary and initial conditions | Hooman | Main CFD Forum | 0 | August 7, 2011 07:21 |
boundary conditions for 2D flow around a circle | abcdef123 | Main CFD Forum | 0 | April 21, 2010 03:26 |
Boundary conditions? | Tom | Main CFD Forum | 0 | November 5, 2002 02:54 |