Output aa.f90
From CFD-Wiki
Subroutine Output_all
include 'icomm_1.f90'
Dimension X_inlet(nx), &
T_inlet(nx), &
X_outlet(nx), &
T_outlet(nx)
!--------------------------------------------------------------------------
!--------------------------------------------------------------------------
!--------------------------------------------------------------------------
open (22,file='GRID_p.dat')
WRITE(22,*)'VARIABLES = "X", "Y" '
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
End