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

Boundary condition to simulate X meters of pipe

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2023, 17:05
Default Boundary condition to simulate X meters of pipe
  #1
New Member
 
Eduardo
Join Date: Feb 2019
Posts: 9
Rep Power: 7
ERodriguez is on a distinguished road
Hello,

I have an open question about a relatively simple problem, but with different potential solutions.

I am trying to solve the flow in a couple of manifolds distributing water. The water comes into one of the manifolds from a single pipe with a prescribed mass flow rate. The flowrate is relatively high therefore imposing a high discharge velocity in the inlet pipe. The first manifold is connected to the second manifold by a series of different-length pipes. These are several pipes (say 60-80 different pipes) each of them with different geometries. Some of them are long, some are short, a few of them are thinner and some others are thicker. The second manifold may be considered as large enough as to assume that all the connecting pipes are discharging into a constant-pressure volume. In order to make it harder, the first manifold has a relatively complex geometry with several elements crossing it and generating a highly turbulent flow. On the other hand, the pipes, despite being different to each other, are relatively simple (mostly straight lines or smooth curvature) so the flow inside them may be assumed to be quasi-1D. I attach a very simplified sketch of the flow problem to this post.

The objective of the analysis is to resolve the flowrate crossing each of the pipes connecting both manifolds. A secondary objective is to find the pressure drop across each of these channels. However, once the mass flow rate is known, it is very easy to obtain a reasonable estimation of the pressure drop by using simple 1D approximations.

I have (at least) three possible options to solve this problem:


Quote:
Option A
Brute force approach. I generate a CFD mesh of the whole flow domain (not including manifold 2) but I do include the flow inside the pipes.
Advantages:
  • Boundary conditions are straightforward: inlet velocity and p=0 at the outlet of each pipe
  • We resolve the whole flow at once obtaining flowrate and pressure drop across each pipe
Disadvantage:
  • I need to invest a considerable amount of computational power (almost half of the mesh size) in resolving a problem which, despite being the subject of many PhDs (mine amongst them) is rather boring from an engineering perspective: 1D Pipe flow.
I would rather model the flow inside the pipes as a simpler 1D flow without the need to invest that much mesh in solving it. This leads me to option B:

Quote:
Opention B: Iterative B.C.
Ideally, I would like to solve the flow within the first manifold only by imposing a pressure boundary condition in each pipe entrance. However, this is not straightforward because the pressure at these points is a function of the mass flow rate through each pipe. We could solve this in an iterative approach. First we set a constant pressure for all the pipe outlets, then we obtain the flowrate across them. By knowing the flowrates we can update the pressure at the pipe entrance (by using simple 1D correlations) and knowing they all discharge into a constant-pressure manifold. I hope that, with a few iterations, the problem converges and I obtain a consistent entrance-pressure / flowrate through the pipes.

Advantages:
  • CFD mesh is focused where the real problem happens (manifold 1) and the pipes are solved by simple engineering correlations
Disadvantages:
  • I don’t know whether it will converge in a few iterations
  • Even if it does, it may be a rather tedious problem with a few try-and-error iterations
This lead me to think that something may already exist. Which is what I call option C:

Quote:
Option C: pipe-outlet-BC
First of all, I do now know whether this option exists and that is the main question of this post: Is this possible?
If we analyse the problem, this is rather simple I would like to impose a pressure boundary condition at the pipe entrances which is a simple 1D function (\Delta P = 1/2 \rho U^2 \xi L/D) of the flowrate crossing the pipe. Then it could be (theoretically) possible to impose a pressure boundary condition equivalent to telling the flow “from now on, you will have X meters of straight pipe with diameter D and then you will discharge in a P=0 manifold”. The boundary condition would need to integrate the flowrate across the outlet patches, then compute what would be the pressure and impose it. Of course, this implies the outlet pressure may be changing along time (or along simpleFoam iterations) until it converges into a stable value. Perhaps this imposes stability problems in the flow (too many changes in the pressure BCs), but perhaps this is manageable by imposing a reasonable starting point.

So my question is: Does option C exist in OpenFOAM? I am currently using OF v2212 but I do have access to other versions if needed.

My secondary question is: does anyone know other alternative to options A, B and C above?


I hope the problem is clearly described, but if anyone has any question, please let me know.

Best regards and thanks for your time foamers!
Attached Images
File Type: jpg Manifolds.jpg (19.8 KB, 10 views)
ERodriguez is offline   Reply With Quote

Old   May 23, 2023, 10:14
Default
  #2
New Member
 
Eduardo
Join Date: Feb 2019
Posts: 9
Rep Power: 7
ERodriguez is on a distinguished road
Nobody? I thought this would be possible...
ERodriguez is offline   Reply With Quote

Reply

Tags
boundary conditions, flow distribution, manifolds, pipe flow


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
Outlet boundary condition for pipe cut-off face FutureCX FLUENT 0 April 22, 2023 13:57
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 17, 2020 00:44
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 18:38
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


All times are GMT -4. The time now is 13:59.