CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Phoenics (http://www.cfd-online.com/Forums/phoenics/)
-   -   3d array..... (http://www.cfd-online.com/Forums/phoenics/65971-3d-array.html)

fastnfuriousamit July 2, 2009 06:18

3d array.....
 
Hello friends,
Well I use PHOENICS 3.5.1 and am currently trying to do a current distribution problem in 3 dimensions.
I need to give the boundary conditions in 3-d patches.
While doing the same problem in 2-d i gave the following ground coding.
"DO IY=1,IG(2)
DO IX=NX,NX
F(INDYX(VAL))=23.008
ENDDO
ENDDO"
But how do i declare a 3-d array??
I need to know what functions should i use instead of F(INDYX)???

John_L August 13, 2009 12:24

The patches are always visited 'per Z plane', and only on planes where the patch exists. You do not need to declare 3D arrays or change your code, though something like:

l0val=l0f(val)
do ix=ixf,ixl
do iy=iyf,iyl
i=(ix-1)*ny+iy
f(l0val+i)=23
enddo
enddo

would be a more normal way of doing it. ixf,ixl,iyf,oyl are set internally to the limts of the current patch so you don't need to set them yourself.


All times are GMT -4. The time now is 11:12.