CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Phoenics (http://www.cfd-online.com/Forums/phoenics/)
-   -   calculate average velocity whith Phoenics (http://www.cfd-online.com/Forums/phoenics/51919-calculate-average-velocity-whith-phoenics.html)

Olfa Daboussi June 22, 2005 05:19

calculate average velocity whith Phoenics
 
how could I proceede to calculate the average velocity for a sectional velocity distribution. Many Thanks

mick June 23, 2005 12:46

Re: calculate average velocity whith Phoenics
 
I suggest using inform as I think this is the sort of thing that this feature should be good for. I must admit I think the documentation could be easier. However it seems that the way to go with this feature is to suck it and see. You need to try and find/manipulate examples and experiment.

I managed to get an average from some simple code such as below. You could try modifying this or perhaps reading the documentation and coming up with something better.

INFORM7BEGIN

** declare variable

(MAKE ASUM is 0.)

PATCH(PATCH1,CELL,1,NX,1,NY,3,3,1,LSTEP) ! patch over which this works

(STORE1 ASUM at PATCH1 is SUM(W1))

(STORED VAVE at PATCH1 is ASUM/(nx*ny))

** Print-out into INFOROUT file (PRINT of w_average at PATCH is VAVE)

INFORM7END

cham June 24, 2005 05:04

Re: calculate average velocity whith Phoenics
 
The VR Viewer contour-map facility displays the average value for the selected plane on the background.

Olfa Daboussi June 30, 2005 11:24

Re: calculate average velocity whith Phoenics
 
I do it but PHOENICS do'nt give me a result. and when I insert the print-out syntax the solver displays an error message that in-form false syntax

Steven October 14, 2005 16:37

Re: calculate average velocity whith Phoenics
 
This works for me (calculates local bulk velocity at NX locations in x direction) using Inform:

DO II=1,NX

PATCH(M:II:,CELL,:II:,:II:,1,NY,1,NZ,1,LSTEP)

ENDDO

(MAKE ATOT)

(MAKE UBULK)

DO II=1,NX

(STORE1 of ATOT at M:II: is SUM(ARE) with SWPFIN)

(STORE1 of UBULK at M:II: is SUM(U1*ARE)/ATOT with

SWPFIN)

ENDDO

You can also define the PATCHes in VR no problem. However if you have arbitrary shaped facetted objects the areas etc. may not be right. You can output the last value (at NX)using;

(PRINT UBULK is UBULK)

It goes to the file INFOROUT



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