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

Geom 1.f90

From CFD-Wiki

(Difference between revisions)
Jump to: navigation, search

Revision as of 02:14, 19 September 2005

Subroutine Geom

include 'icomm_1.f90'

! calculation Xp,Yp

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

do 2 I=2,NXmax

   do  2 J=2,NYmax

Xp(I,J)=( X(i-1,j-1) + X(i-1,j ) + &

    	  	      X(i  ,j  ) + X(i  ,j-1)      ) * 0.25 

Yp(I,J)=( Y(i-1,j-1) + Y(i-1,j ) + &

        	       Y(i  ,j  ) + Y(i  ,j-1)     ) * 0.25 

2 continue

! ------------------------------------------------------------------------ do 4 I=2,NXmax

Xp(i,1 ) = ( X(i ,1 ) + X(i-1,1 ) ) * 0.5

Xp(i,NYmax+1) = ( X(i ,NYmax) + X(i-1,NYmax) ) * 0.5


Yp(i,1 ) = ( Y(i ,1 ) + Y(i-1,1 ) ) * 0.5

Yp(i,NYmax+1) = ( Y(i ,NYmax) + Y(i-1,NYmax) ) * 0.5

4 continue

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

Xp(1 , 1) = X( 1, 1)

Xp(NXmax+1, 1) = X(NXmax, 1)

Xp( 1,NYmax+1) = X( 1,NYmax)

Xp(NXmax+1,NYmax+1) = X(NXmax,NYmax)

Yp(1 , 1) = Y( 1, 1)

Yp(NXmax+1, 1) = Y(NXmax, 1)

Yp( 1,NYmax+1) = Y( 1,NYmax)

Yp(NXmax+1,NYmax+1) = Y(NXmax,NYmax)

!-------------------------------------------------------------------------- ! ------------------------------------------------------------------------ do 5 J=2,NYmax

Yp(1 ,j ) = ( Y(1 ,j) + Y(1 ,j-1) ) * 0.5

Yp(NXmax+1,j ) = ( Y(NXmax ,j) + Y(NXmax,j-1) ) * 0.5

Xp(1 ,j ) = ( X(1 ,j) + X(1 ,j-1) ) * 0.5

Xp(NXmax+1,j ) = ( X(NXmax ,j) + X(NXmax,j-1) ) * 0.5

5 continue

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

! ------------------------------------------------------------------------ ! Xi (vertical)

Do 101 I=1,NXmax

Do 101 J=1,NYmax-1

X_xi(I,J) = X(i ,j+1) - X(i ,j )

Y_xi(I,J) = Y(i ,j+1) - Y(i ,j )

101 continue

! Eta (horisontal)

Do 102 I=1,NXmax-1

Do 102 J=1,NYmax

X_et(I,J) = X(i+1,j ) - X(i ,j )

Y_et(I,J) = Y(i+1,j ) - Y(i ,j )

102 continue

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

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

! Xi (vertical)

Do 201 I=1,NXmaxP

Do 201 J=1,NYmax

Del_X_xi(i ,j ) = Xp(i ,j+1) - Xp(i ,j )

Del_Y_xi(i ,j ) = Yp(i ,j+1) - Yp(i ,j )

201 continue


! Eta (horisontal)

Do 202 I=1,NXmax

Do 202 J=1,NYmaxP

Del_X_et(i ,j ) = Xp(i+1,j ) - Xp(i ,j )

Del_Y_et(i ,j ) = Yp(i+1,j ) - Yp(i ,j )

202 continue

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

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

Return

End

My wiki