CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Wiki > Out array 1.f90

Out array 1.f90

From CFD-Wiki

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
-
Subroutine Output_all
+
Subroutine Out_array(F_out,NImax,NJmax,Filename)
-
include 'icomm_1.f90'
+
Dimension F_out(500,500)
-
Dimension  X_inlet(nx),  &
+
Character  Filename*10
-
T_inlet(nx),   &
+
Open(10,file=Filename)
-
  X_outlet(nx), &
+
Do 12 J=1,NJmax
-
T_outlet(nx)  
+
! write(10,11)(F_out(i,j),i=1,NImax)  
 +
11 format(15F6.3)
-
!--------------------------------------------------------------------------
+
12 continue
-
!--------------------------------------------------------------------------
 
-
 
-
!--------------------------------------------------------------------------
 
-
 
-
open (22,file='GRID_p.dat')
 
-
WRITE(22,*)'VARIABLES = "X", "Y" '
+
close(10)
-
 
+
-
 
+
-
      WRITE (22,*)' ZONE I=' ,NXmax, ', J=', NYmax, ', F=POINT'
+
-
 
+
-
DO 1 J=1, NYmax
+
-
 
+
-
DO 1 I=1, NXmax
+
-
 
+
-
WRITE (22,*) X(I,J), Y(I,J) 
+
-
 
+
-
  1    continue
+
-
 
+
-
 
+
-
close(22)
+
-
 
+
-
!--------------------------------------------------------------------------
+
-
 
+
-
open (23,file='GRID_pp.dat')
+
-
+
-
WRITE(23,*)'VARIABLES = "Xp", "Yp"  '
+
-
 
+
-
      WRITE (23,*)' ZONE I=' ,NXmaxP, ', J=', NYmaxP, ', F=POINT'
+
-
 
+
-
DO 2 J=1, NYmaxP
+
-
 
+
-
DO 2 I=1, NXmaxP
+
-
 
+
-
WRITE (23,*) Xp(I,J), Yp(I,J) 
+
-
 
+
-
  2    continue
+
-
 
+
-
close(23)
+
-
 
+
-
!--------------------------------------------------------------------------
+
-
 
+
-
open (23,file='Domain_all.dat')
+
-
+
-
WRITE(23,*)'VARIABLES = "Xp", "Yp" , "Up" , "Vp" , "Tp" '
+
-
 
+
-
      WRITE (23,*)' ZONE I=' ,NXmaxP, ', J=', NYmaxP, ', F=POINT'
+
-
 
+
-
DO 4 J=1, NYmaxP
+
-
 
+
-
DO 4 I=1, NXmaxP
+
-
 
+
-
WRITE (23,*) Xp(I,J), Yp(I,J) , F(i,j,1) , F(i,j,2) , F(i,j,5) 
+
-
 
+
-
  4    continue
+
-
 
+
-
close(23)
+
-
 
+
-
!--------------------------------------------------------------------------
+
-
 
+
-
!--------------------------------------------------------------------------
+
-
 
+
-
!--------------------------------------------------------------------------
+
-
 
+
-
!--------------------------------------------------------------------------
+
-
 
+
-
+
-
DO 6 I=1, NXmaxP
+
-
+
-
if (Xp(i,1)<0.) then
+
-
+
-
T_inlet(I) =  F(i,1,5)
+
-
 
+
-
    X_inlet(I) =  Xp(i,1)
+
-
 
+
-
Ibeg_inlet = 1
+
-
 
+
-
Iend_inlet = I
+
-
+
-
end if
+
-
 
+
-
if (Xp(i,1)>0.) then
+
-
+
-
I_outlet = I - Iend_inlet
+
-
 
+
-
  T_outlet(I_outlet) =  F(i,1,5)
+
-
 
+
-
    X_outlet(I_outlet)  =  Xp(i,1)
+
-
 
+
-
Ibeg_outlet = Iend_inlet + 1
+
-
 
+
-
Iend_outlet = I_outlet
+
-
+
-
end if
+
-
 
+
-
  6    continue
+
-
 
+
-
!--------------------------------------------------------------------------
+
-
 
+
-
open (23,file='Profiles.dat')
+
-
 
+
-
  WRITE(23,*)'VARIABLES = "Xp", "Tp"  '
+
-
 
+
-
WRITE (23,*) 'ZONE I=', Iend_inlet, ', F=POINT'
+
-
 
+
-
DO 12 I=Iend_inlet,1,-1
+
-
 
+
-
12 WRITE (23,*)  -1.* X_inlet(I),T_inlet(I)
+
-
 
+
-
WRITE (23,*) 'ZONE I=', Iend_outlet, ', F=POINT'
+
-
+
-
  DO 11 I=1,Iend_outlet
+
-
 
+
-
11 WRITE (23,*) X_outlet(I),T_outlet(I)
+
-
 
+
-
close(23)  
+
-
 
+
-
!--------------------------------------------------------------------------
+
Return
Return
End
End

Revision as of 02:28, 19 September 2005

Subroutine Out_array(F_out,NImax,NJmax,Filename)

Dimension F_out(500,500)

Character Filename*10

Open(10,file=Filename)

Do 12 J=1,NJmax

! write(10,11)(F_out(i,j),i=1,NImax)

11 format(15F6.3)

12 continue


close(10)

Return

End

My wiki