# pipe model numerical integration

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

November 22, 2013, 12:30
pipe model numerical integration
#1
New Member

Mr. Lee
Join Date: Nov 2013
Posts: 7
Rep Power: 12
Hi,
I have a pipe with 2 pressure sensors installed at two ends so that I can know two boundary conditions P(0,t) and P(L,t) (see the picture attached). In this figure, p is pressure, u is mean velocity of flow, t is time, x is coordinate in pipe, rho is fluid density, c is speed of sound, lambda is friction coefficient, D is diameter of the pipe.
Assume that I know every parameters, relationship between fluid density and pressure, diameter of the pipe, thickness of the pipe, relationship between fluid bulk modulus and pressure, Young modulus of steel, thickness of the pipe, constant temperature, I want to calculate the flow u(x,t) and pressure P(x,t). I would like to ask if this problem is solvable?
As I investigated, I need to have initial conditions for both u and P. Therefore, I set u(x,0) = 0 and P(x,0) is linear with distance as in the figure. I wonder if an error in this setting (for example offset in u(x,0)) can cause trouble with simulation?
I then used method of characteristics to solve u(x,t) and P(x,t) and does not get a reasonable result to me now. And one problem in using method of characteristics is that I need to know lambda at the initial condition when there is no flow. If I use the equation for lambda as in the figure, then lambda = infinity. I then set lambda = 0 at the beginning. Is this a valid assumption?
I am not working in fluid mechanics, the question then may be simple to everyone. I appreciate your help.
Thanks,
Attached Images
 Pipe_model.jpg (23.7 KB, 20 views)

 November 22, 2013, 15:31 #2 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,793 Rep Power: 71 I really do not understand how you solve a flow problem with friction by using the method of characteristic... you have no invariant therefore you must use integration of the entropy which is not necessarily constant along path-lines ...

 November 22, 2013, 16:45 #3 New Member   Mr. Lee Join Date: Nov 2013 Posts: 7 Rep Power: 12 The equations I am having are continuity equation and momentum equation, not the energy equation so it is not related to entropy here..Please correct me if I am wrong though. I am actually trying to use the strategy from the paper at https://www.dropbox.com/s/i85if1hc1n...%20engines.pdf (page 4).

November 22, 2013, 17:13
#4
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by datle The equations I am having are continuity equation and momentum equation, not the energy equation so it is not related to entropy here..Please correct me if I am wrong though. I am actually trying to use the strategy from the paper at https://www.dropbox.com/s/i85if1hc1n...%20engines.pdf (page 4).

ok, you have a compressible 1D unsteady inviscid flow, the system is hyperbolic and can be solved by MOC.
However, I don't understand why the convective term is disregarded in the momentum equation, it is a fundamental one as contains the non-linearity.
For homoentropic-homoenthalpic flows, you can have analytical solutions by using the Riemann invariant. For isoentropic flows, the invariant does not exist but you can integrate along dx/dx = u+/-a.
In your case, I see a source term that is not clear to me, upon what physical issue it depends ?

November 22, 2013, 19:08
#5
New Member

Mr. Lee
Join Date: Nov 2013
Posts: 7
Rep Power: 12
Quote:
 Originally Posted by FMDenaro ok, you have a compressible 1D unsteady inviscid flow, the system is hyperbolic and can be solved by MOC. However, I don't understand why the convective term is disregarded in the momentum equation, it is a fundamental one as contains the non-linearity. For homoentropic-homoenthalpic flows, you can have analytical solutions by using the Riemann invariant. For isoentropic flows, the invariant does not exist but you can integrate along dx/dx = u+/-a. In your case, I see a source term that is not clear to me, upon what physical issue it depends ?
Yes, the convective term is negligible for this case. I am doing integration along dx/dt = +/-a. What is the source term you are talking about? This is a high pressure system btw. Could you have any comments on what I was asking on the first post?
Thanks,

November 23, 2013, 04:09
#6
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by datle Yes, the convective term is negligible for this case. I am doing integration along dx/dt = +/-a. What is the source term you are talking about? This is a high pressure system btw. Could you have any comments on what I was asking on the first post? Thanks,
1) what is not clear to me is the role of the Re number. Is you flow inviscid or not?
2) why disregarding the non-linear term in the momentum?
3) the problem is such that an elastic interation exists with the flow? Why are you talking about the Young module?
4) the paper you cited is very old, many more sophisticated numerical models exist

 November 23, 2013, 12:23 #7 New Member   Mr. Lee Join Date: Nov 2013 Posts: 7 Rep Power: 12 1) Flow is viscid 2) I don't know in real life sense of why the convective terms are smaller than other terms in these 2 equations to be neglected but I see many papers for high pressure common rail neglect them. Maybe you can explain? 3) Young module is to take into account of elasticity of the pipe material, in addition to fluid bulk modulus 4) I use MOC since at the moment, I see it is easy to code. If it works, I can change the method later. It's just a matter of implementation.

 November 23, 2013, 13:21 #8 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,793 Rep Power: 71 Still not clear to me ... I admit that I have not direct experience in your specific high pressure model but I know the basis of MOC for Euler flow... if (as in your case) the flow has a finite viscosity then the momentum equation contains the diffusive terms, the system is no longer hyperbolic... if the flow is not viscous but is isoentropic you have to consider that pressure and density can not be related everywhere by the homoentropic relation p=C*rho^gamma. For isoentropic flows, you need to integrate numerically the Euler equations along three caracteristic lines. One of them is the path-line for which ds/dt+u*ds/dx=0 (and p=C*rho^gamma). Could you check in the well-known book of Zucrow how to relate your model to the MOC?

 November 26, 2013, 10:16 #9 New Member   Mr. Lee Join Date: Nov 2013 Posts: 7 Rep Power: 12 As far as I know, hyperbolic PDE can still nonlinear. Could you tell me why you say that it is no longer hyperbolic? Btw, you have experience with MacCormack method? I just skimmed through the method and see there is no mention of boundary condition for MacCormack. The formula they give just for calculation of inner triangular of the grid x and t. Without BC, the result for the entire domain can't be calculated.

November 26, 2013, 10:29
#10
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by datle As far as I know, hyperbolic PDE can still nonlinear. Could you tell me why you say that it is no longer hyperbolic? Btw, you have experience with MacCormack method? I just skimmed through the method and see there is no mention of boundary condition for MacCormack. The formula they give just for calculation of inner triangular of the grid x and t. Without BC, the result for the entire domain can't be calculated.
Viscous flows are governed by the momentum equation and energy equation possessing viscous and conducibility fluxes. Newton and Fourier relations are used and the the PDE turn to be second order. Therefore, for unsteady flows they are still non-linear but parabolic. The only equation the remains hyperbolic is the density.

This is for the classical NS model, I have no experience in your particolar model you are using that seems to me have the viscous effect somehow modelled differently

November 26, 2013, 12:11
#11
New Member

Mr. Lee
Join Date: Nov 2013
Posts: 7
Rep Power: 12
Quote:
 Originally Posted by FMDenaro Viscous flows are governed by the momentum equation and energy equation possessing viscous and conducibility fluxes. Newton and Fourier relations are used and the the PDE turn to be second order. Therefore, for unsteady flows they are still non-linear but parabolic. The only equation the remains hyperbolic is the density.
Are you talking about the equations in the picture of my first post or not?
Quote:
 Originally Posted by FMDenaro This is for the classical NS model, I have no experience in your particolar model you are using that seems to me have the viscous effect somehow modelled differently
In the previous post, I was talking about Maccormack in general though, not for that specific model. However, Maccormack should be able to be used for this problem. I am reading carefully instead of just skimming now...

 November 26, 2013, 12:26 #12 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,793 Rep Power: 71 McCormack is an old scheme, used for time integration (e.g. see Hirsch), at present RK schemes are common. However, depending on the spatial integration you can have numerical oscillations (non-monotone preserving solutions). Anyway, in the paper https://www.dropbox.com/s/i85if1hc1n...%20engines.pdf I still have not understood the model, the disregarding of the convective flux in the momentum and the hypotesis for the friction pressure....