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

Input.f90

From CFD-Wiki

(Difference between revisions)
Jump to: navigation, search

Revision as of 02:22, 19 September 2005

Subroutine Init_all

include 'icomm_1.f90'


DO 2 I=1,NXmaxP

DO 2 J=1,NYmaxP

    F(i,j,1) =          2. * Yp(i,j) * (1. - Xp(i,j)**2.) 
    F(i,j,2) =  (-1.) * 2. * Xp(i,j) * (1. - Yp(i,j)**2.) 

! F(i,j,1) = 1.

! F(i,j,2) = -1.

2 continue


DO 3 I=1,NXmaxP 
DO 3 J=1,NYmaxP 

Gam(i,j) = 1. /1000000.

Ro(i,j) = 1.

3 continue


! F( 1,:,5) = 0.  ! x = -1

! F(NXmaxP,:,5) = 0.  ! x = 1

! F(:, 1,5) = 0.  ! y = 0

! F(:,NYmaxP,5) = 0.  ! y = 1

!------------------------------------------------

!------------------------------------------------

F(:,:,5)=0.00001


alfff = 20.
   F(     1,:,5) = 1. -  tanh(alfff)  ! x = -1   0<y<1

F(NXmaxP,:,5) = 1. - tanh(alfff)  ! x = -1 0<y<1

F(:,NYmaxP,5) = 1. - tanh(alfff)  ! -1<x<1 y = 1


! DO 3 I=1,NXmaxP

! DO 3 J=1,NYmaxP

! 3 continue


!------------------------------------------------


open(54, file='inlet_prof.txt')

 DO 5 I=1,NXmaxP 
 
 	If ( Xp(i,1)<0.) then  
			
 				F(i,1,5) = 1. + tanh(alfff * ( 2.* Xp(i,1) + 1.) )

write(54,*) Xp(i,1),F(i,1,5)

	end if
 5 continue  

close(54)


Return

End

My wiki