CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CD-adapco (
-   -   How to calculate mean pressure in a pipe flow (

James August 30, 2001 07:22

How to calculate mean pressure in a pipe flow
I want to find the mean pressure in a cross section But how to get the mean pressure Please tell me step by step Anyway thank for your help

John C. Chien August 30, 2001 13:30

Re: How to calculate mean pressure in a pipe flow
(1). I don't know how to do it, but I know that there are different types of "mean pressure". (2). So, the first thing to do is : define the "mean pressure" first in terms of algebraic equation. Then you can find out whether you can write a piece of code to do it, or you need to contact the support engineer. (3). Sometimes, the solution is rather simple, depending on the geometry.

Joern Beilke August 30, 2001 13:59

Re: How to calculate mean pressure in a pipe flow
Hi John,

please answer those question where you have someting to contribute. Otherwise be quiet.

Now for the mean pressure:

If you have a cell-layer which forms your section then it is simple. Put those cells into a cset. Then load the pressure ("getc p") and type "summ cset". So you should see some average value for register 4.

You can also do a cell-volume based averaging. Then you also have to load the cell-volume into another register and multiply .....

Just use the "operate" command for this purpose.

John C. Chien August 30, 2001 18:32

Re: How to calculate mean pressure in a pipe flow
(1). If I follow your suggestions, what kind of mean pressure would I be getting? (2). Could you be more specific? Is that a simple algebraic mean pressure? (which is usually not very useful). Or Is that an area weighted average pressure? (in that case, you need the the 2-D area of the cell on that particular cut (or cross-section) There is no such thing as the volume averaged pressure on a cross-sectional plane. (3). Well, normally we are interested in the mass-flow averaged pressure or total pressure. In that case, the averaged density and velocity of that particular cell cut also must be available. (4). At the inlet plane or the exit plane, it might be relatively straight-forward because the cell faces are normally on a flat surface. In the middle of the pipe, in general, when you make a cross-sectional cut, it will not go through an existing flat cell surfaces. (5). I had the same need before, when I was using CFX-TASCflow. And I had to use hand integration using graph paper, because the mesh was 3-D. (6). Since I am no longer using the code, I don't have the need to know whether it can be done or not.

stefan August 31, 2001 03:06

Re: How to calculate mean pressure in a pipe flow
Define the section you need using spoi and snor (as for a section plot). Make sure the section only cuts the cells you want to calculate the mean for. Enter command "inte cset". You get the area and the integrated values for normal vector (A*VN), scalar (A*S) and normal vector*scalar (A*VN*S) for the section. For the mean of the scalar value, you must divide the integrated scalar (A*S) value by the area (A).

(Another application of this command: load the velocities and the density (getc all dens). Then the "inte cset" command gives you the mean velocity (A*VN / A) and the massflow (A*VN*S) through the section.)

stefan August 31, 2001 03:09

Re: How to calculate mean pressure in a pipe flow
I forgot something: of course, you must first load the pressure.

Joern Beilke August 31, 2001 07:33

Re: How to calculate mean pressure in a pipe flow
Since you have access to all variables you can do any sort of averaging you want.

If you want to do an averaging about an arbitrary area (also a curved one) then you have to create a shell mesh which describes this section and use "pmap" to map the post results to this shells. Then you can use the "summ" or "integate" commands.

Philip Jones August 31, 2001 08:21

Re: How to calculate mean pressure in a pipe flow

Philip Jones August 31, 2001 08:59

Re: How to calculate mean pressure in a pipe flow
Damn you John C Chien, a guy asks a question in a group, we get two good answers from knowledgeable users (Joern and Stefan) and then you pop up to pump hot air into the forum, if you don't know squat be quiet!

My mother always taught me it was rude to knock someone down and not try to help them afterwards so let's give a quick lesson in html tags:

if you want a list of points
  1. First point
  2. Second point
  3. Third point

then type it like this

&#60li&#62First point&#60/li&#62
&#60li&#62Second point&#60/li&#62
&#60li&#62Third point&#60/li&#62

John C. Chien August 31, 2001 12:00

Re: How to calculate mean pressure in a pipe flow
(1). If someone has to ask a question about how to compute mean pressure when using a commercial code, then we know that the code is not very user-friendly. (2). And if the vendor think that two good answers is enough to solve the problem, then it answered the question why this code is not as popular as the other. It looks like that the people behind are not user-friendly. (3). The better answer is to give the macro to the reader so that he can compute the mean pressure. He is not interested in your mother's teaching at all. (4). So, is it possible to list the macro "nicely in your expert HTML form here", so that we can all verify the result? A step-by-step macro instruction to get the mean pressure in a pipe here, please.

marco October 11, 2001 11:19

Re: How to calculate mean pressure in a pipe flow
Of course you should load also the velocity vector. The following prostar commands are needed:

load,, !load post-file getc all ptot !get velocity and total pressure spoint .... !define section point snorm .... !define section normal cset .... !define cell set to cut integ cset !-->see stefan's message

All times are GMT -4. The time now is 00:10.