CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Question about extracting volume averaged pressure value (http://www.cfd-online.com/Forums/cfx/109843-question-about-extracting-volume-averaged-pressure-value.html)

 Anna Tian November 28, 2012 03:56

Question about extracting volume averaged pressure value

1 Attachment(s)
Hi,

May I ask, in cfx-post, how to extract the volume averaged pressure value of a cylinder shape volume(like in the attached picture) from my fluid domain?

Shall I still go 'Insert -> Location - Volume'?

http://www.cfd-online.com/Forums/dat...BJRU5ErkJggg==

Thank you very much!

 ghorrocks November 28, 2012 07:10

The image was not attached.

 Anna Tian November 29, 2012 04:25

Quote:
 Originally Posted by ghorrocks (Post 394615) The image was not attached.
The picture is already attached. It is just a small cylinder. And I only need to know the averaged pressure value in this volume. Thanks!

 Lance November 29, 2012 05:03

A search in the manual on volume average would give you: volumeAve(<var|Expression>)@<Location>

In your case it would be something like volumeAve(Pressure)@cylinder

 Anna Tian November 29, 2012 10:32

Quote:
 Originally Posted by Lance (Post 394819) A search in the manual on volume average would give you: volumeAve()@ In your case it would be something like volumeAve(Pressure)@cylinder
The problem is my fluid domain is not cylindrical. I need to put a cylinder there by myself so that I can extract only the value inside the cylinder. But how to put a cylinder into my fluid domain?

 brunoc November 29, 2012 12:27

1. Take the equation of your cylinder, such as
2. Create an expression for the radius
radius = sqrt(x^2 + y^2)

3. Create a other expressions to check whether you're inside the cylinder:
insideCylinderZdir = if(radius < , yourvariable, 0)
insideCylinder = if( zCylinderInf < z && z < zCylinderTop, insideCylinderZdir, 0 )
where 'zCylinderInf' and 'zCylinderTop' are the extreme positions of your cylinder in it's axial direction.

4. Create an expression to average 'insideCylinder' over your entire domain:
cylAve = volumeAve(insideCylinder)@domain
That should do it.

Cheers.

 Anna Tian November 29, 2012 12:47

Quote:
 Originally Posted by brunoc (Post 394887) 1. Take the equation of your cylinder, such as2. Create an expression for the radiusradius = sqrt(x^2 + y^2)3. Create a other expressions to check whether you're inside the cylinder:insideCylinderZdir = if(radius < , yourvariable, 0)insideCylinder = if( zCylinderInf < z && z < zCylinderTop, insideCylinderZdir, 0 )where 'zCylinderInf' and 'zCylinderTop' are the extreme positions of your cylinder in it's axial direction. 4. Create an expression to average 'insideCylinder' over your entire domain:cylAve = volumeAve(insideCylinder)@domainThat should do it. Cheers.

Where should I add these expressions?

 brunoc November 29, 2012 12:55

They should be added as CEL Expressions. CFX has lots of tutorials that address how to use them.

 All times are GMT -4. The time now is 22:18.