dns-hit3d-fdm/m_hit_result.f90
2014-04-26 20:16:36 +09:00

107 lines
3.4 KiB
Fortran

!================================================================================
! m_hit_result - module for printing out the results
! such as energy spectrum and velocity field
!
! Time-stamp: <2014-03-19 J. Kwon>
!================================================================================
module m_hit_result
contains
subroutine result_files_open
use m_parameters
! statistics
write(*,*) 'result_open,ITMIN',ITMIN
if(ITMIN.eq.0) then
open(69,file='tp_stat.dat',form='formatted')
write(69,*) 'VARIABLES = "itime","time","tke","rms_u`","int_LS","Eddy_TO_time","Kol_LS"' !
write(69,*) '"Kol_VS","Kol_TS","Taylor_LS","dissipation"'
else
open(69,file='tp_stat.dat',status='old',position='append')
endif
! flucating velocity field, u',v',w'
write(*,*) 'result_files_open, fdm_sw',fdm_sw
if(fdm_sw.eq.0) then
if(ITMIN.eq.0) then
open(101,FILE='tp_field.dat')
write(101,*) 'VARIABLES = "x","y","z","u","v","w"'
else
open(101,file='tp_field.dat',status='old',position='append')
endif
else
if(ITMIN.eq.0) then
open(101,file='tp_field.dat')
write(101,*) 'VARIABLES = "X","Y","Z","C","U","V","W"'
else
open(101,file='tp_field.dat',status='old',position='append')
endif
endif
! model spectrum
if(ITMIN.eq.0) then
open(unit=404,file="model_spectrum.dat")
write(404,*) 'VARIABLES = "k","Model_E(k)"' !
write(404,*) '"Kolmogorov","Exponential","VonKarman"' !
endif
! realtime energy/dissipation spectrum
if(ITMIN.eq.0) then
open(unit=501,file="tp_spec.dat")
write(501,*) 'VARIABLES = "k","E(k)","D(k)"'
else
open(unit=501,file="tp_spec.dat",status='old',position='append')
endif
! realtime energy spectrum
if(ITMIN.eq.0) then
open(unit=502,file="tp_tke_spec.dat")
write(502,*) 'VARIABLES = "k","E(k)"'
else
open(unit=502,file="tp_tke_spec.dat",status='old',position='append')
endif
! realtime dissipation spectrum
if(ITMIN.eq.0) then
open(unit=503,file="tp_eps_spec.dat")
write(503,*) 'VARIABLES = "k","D(k)"'
else
open(unit=503,file="tp_eps_spec.dat",status='old',position='append')
endif
! realtime max, min velocities
if(ITMIN.eq.0) then
open(unit=504,file="tp_max_min_uvw.dat")
write(504,*) 'VARIABLES = "time","max_u","max_v","max_w","min_u","min_v","min_w"'
else
open(unit=504,file="tp_max_min_uvw.dat",status='old',position='append')
endif
! FDM temporary output
! OPEN(23,FILE='St_data.dat')
! write(23,*)'VARIABLES = "Time","Mean Velocity","Sc","Flame Location"'
! OPEN(22,FILE='3D_Field.dat')
! WRITE(22,*) 'VARIABLES = "X","Y","Z","C","U","V","
if(fdm_sw.ne.0) then
if(ITMIN.eq.0) then
open(505,file='St_data.dat')
write(505,*)'VARIABLES = "Time","Mean Velocity","Sc","Flame Location"'
else
open(505,file='St_data.dat',status='old',position='append')
endif
endif
! if(fdm_sw.ne.0) then
! if(ITMIN.eq.0) then
! open(506,file='3D_field.dat')
! write(506,*) 'VARIABLES = "X","Y","Z","C","U","V","W"'
! else
! open(506,file='3D_field.dat',status='old',position='append')
! endif
! endif
end subroutine result_files_open
end module m_hit_result