CFD Online URL
[Sponsors]
Home > Wiki > Output aa.f90 - output of all necessary information

Output aa.f90 - output of all necessary information

From CFD-Wiki

Jump to: navigation, search

All output for postprocessing was made for TECPLOT format


!Sample program for solving Smith-Hutton Test using different schemes 
!of covective terms approximation -  Profile and post processing output modul
!Copyright (C) 2005  Michail Kirichkov

!This program is free software; you can redistribute it and/or
!modify it under the terms of the GNU General Public License
!as published by the Free Software Foundation; either version 2
!of the License, or (at your option) any later version.

!This program is distributed in the hope that it will be useful,
!but WITHOUT ANY WARRANTY; without even the implied warranty of
!MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!GNU General Public License for more details.

!You should have received a copy of the GNU General Public License
!along with this program; if not, write to the Free Software
!Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

!***************************************************************************



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
My wiki