CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   average value in any plane (http://www.cfd-online.com/Forums/cfx/22884-average-value-any-plane.html)

 aloise July 25, 2006 04:18

average value in any plane

Hello everyone,

I have a question about cfx5-post.

This question is almost the same like Roy Chen had in 2002: http://www.cfd-online.com/Forum/cfx_....cgi/read/3538

As he I also want to know an average value across a plane. But I want to move this plane and plott all the average values along the movementline.

In my case I need the distribution of the mass averaged temperature.

Does anyone know who to achieve this without having a lot of planes and also as many expressions. There needs to be an easier way than having thousand planes. Probably with power syntax?

 Mike July 25, 2006 07:52

Re: average value in any plane

Record a session file that does this for one plane, then go and edit the session file so that you put a "for" loop around the plane generation and temperature calculation. There an example in the CFX-Post doc under Power Syntax that is fairly similar. Miike

 aloise July 26, 2006 15:21

average value in any plane => RESULT!

Thanks Mike!!

It toke me a while to figure out how to get this working. For others facing the same problem here is me result:

VIEWPORT MANAGER: Viewport List = Viewport Order = 1, 2, 3, 4 Maximized Viewport = -1 END

VIEWPORT MANAGER: Viewport List = Viewport Order = 1, 2, 3, 4 Maximized Viewport = -1 END

VIEWPORT MANAGER: Viewport List = Viewport Order = 1, 2, 3, 4 Maximized Viewport = -1 END

! #Variablen hier verändern ! open(Filehandle,">>C:\Temp\kellerlog.log"); ! \$length = 320; ! \$steps = 320; ! \$delimiter = ","; ! \$i = 0; ! \$einheit = "mm"; ! while(\$i<=\$steps){

PLANE:Plane 1

Apply Instancing Transform = On

Apply Texture = Off

Blend Texture = On

Colour = 0.75, 0.75, 0.75

Colour Map = Rainbow

Colour Mode = Constant

Colour Scale = Linear

Colour Variable = Pressure

Colour Variable Boundary Values = Hybrid

Culling Mode = No Culling

Direction 1 Bound = 1 [m]

Direction 1 Orientation = 0 [degree]

Direction 1 Points = 10

Direction 2 Bound = 1 [m]

Direction 2 Points = 10

Domain List = All Domains

Draw Faces = On

Draw Lines = Off

Instancing Transform = Default Transform

Invert Plane Bound = Off

Lighting = On

Line Colour = 0, 0, 0

Line Colour Mode = Default

Line Width = 1

Max = 0.0 [Pa]

Min = 0.0 [Pa]

Normal = 1 , 0 , 0

Option = YZ Plane

Plane Bound = None

Plane Type = Slice

Point = 0 [m], 0 [m], 0 [m]

Point 1 = 0 [m], 0 [m], 0 [m]

Point 2 = 1 [m], 0 [m], 0 [m]

Point 3 = 0 [m], 1 [m], 0 [m]

Range = Global

Render Edge Angle = 0 [degree]

Specular Lighting = On

Texture Angle = 0

Texture Direction = 0 , 1 , 0

Texture File =

Texture Material = Metal

Texture Position = 0 , 0

Texture Scale = 1

Texture Type = Predefined

Tile Texture = Off

Transform Texture = Off

Transparency = 0.0

Visibility = On

X = \$i [\$einheit]

Y = 0.0 [m]

Z = 0.0 [m]

OBJECT VIEW TRANSFORM:

Apply Reflection = Off

Apply Rotation = Off

Apply Scale = Off

Apply Translation = Off

Principal Axis = Z

Reflection Plane Option = XY Plane

Rotation Angle = 0.0 [degree]

Rotation Axis From = 0 [m], 0 [m], 0 [m]

Rotation Axis To = 0 [m], 0 [m], 0 [m]

Rotation Axis Type = Principal Axis

Scale Vector = 1 , 1 , 1

Translation Vector = 0 [m], 0 [m], 0 [m]

X = 0.0 [m]

Y = 0.0 [m]

Z = 0.0 [m]

END

END

VIEWPORT MANAGER:

Viewport List =

Viewport Order = 1, 2, 3, 4

Maximized Viewport = -1

END

LIBRARY:

CEL:

EXPRESSIONS:

Tbulk=massFlowAve(Temperature )@Plane 1

END

END

END

EXPRESSION EVALUATOR:

Evaluated Expression = Tbulk

END

> forceupdate EXPRESSION EVALUATOR

! (\$evalex,\$evalex2) = evaluate("massFlowAve(Temperature)\@Plane 1");

! \$line = \$i.\$einheit.\$delimiter.\$evalex.\$evalex2."\n"; ! print Filehandle \$line; ! #print \$line; ! \$i++; ! } ! close(Filehandle);

 aloise July 26, 2006 15:30

Chart this?

Hello,

now that i know how to get these average values across a plane i would like to get them plotted in a chart. The file I get can`t be reread from cfx as file-import to create a chart-line.

Can anybody tell me what I need to consider?

Or is there even an easier way to get these average values plotted in a chart?