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

Main.f90 - Main modul

From CFD-Wiki

(Difference between revisions)
Jump to: navigation, search
(fix the bug)
 
(2 intermediate revisions not shown)
Line 1: Line 1:
 +
<pre>
 +
 +
!Sample program for solving Smith-Hutton Test using different schemes
 +
!of covective terms approximation -  Main modul
 +
!Copyright (C) 2005  Michail Kiričkov
 +
 +
!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.
 +
 +
!***************************************************************************
 +
Program Main
Program Main
Line 4: Line 26:
Dimension F_out(nx,ny)
Dimension F_out(nx,ny)
-
 
Character  Filename*10
Character  Filename*10
-
Call Ini  
+
        Call Ini  
-
 
+
Call Grid_rectangular
Call Grid_rectangular
-
 
-
Call input_all
 
-
 
Call Geom
Call Geom
-
 
Call Init_all
Call Init_all
Line 28: Line 44:
  !  Alfa = 0.95     
  !  Alfa = 0.95     
-
 
  !  Call Under_Relaxation(Alfa,5)
  !  Call Under_Relaxation(Alfa,5)
Line 38: Line 53:
100 continue
100 continue
-
 
-
 
!----------------------------------------------------------------
!----------------------------------------------------------------
NImax = NXmaxp
NImax = NXmaxp
-
 
NJmax = NYmaxp
NJmax = NYmaxp
Line 51: Line 63:
!    Call  Out_array(F_out,NImax,NJmax,Filename)
!    Call  Out_array(F_out,NImax,NJmax,Filename)
-
 
!-------------------------------------------------------------------
!-------------------------------------------------------------------
-
 
!----------------------------------------------------------------
!----------------------------------------------------------------
-
 
NImax = NXmaxp
NImax = NXmaxp
-
 
NJmax = NYmaxp
NJmax = NYmaxp
F_out    = F(:,:,2)
F_out    = F(:,:,2)
-
 
  Filename  ='1_V_s.txt'  
  Filename  ='1_V_s.txt'  
!    Call  Out_array(F_out,NImax,NJmax,Filename)
!    Call  Out_array(F_out,NImax,NJmax,Filename)
-
 
!-------------------------------------------------------------------
!-------------------------------------------------------------------
-
 
!----------------------------------------------------------------
!----------------------------------------------------------------
-
 
NImax = NXmaxp
NImax = NXmaxp
-
 
NJmax = NYmaxp
NJmax = NYmaxp
Line 79: Line 82:
!    Call  Out_array(F_out,NImax,NJmax,Filename)
!    Call  Out_array(F_out,NImax,NJmax,Filename)
-
 
!-------------------------------------------------------------------
!-------------------------------------------------------------------
-
 
-
 
-
 
-
 
  Call output_all
  Call output_all
Line 92: Line 90:
END
END
 +
</pre>

Latest revision as of 17:54, 20 April 2012


!Sample program for solving Smith-Hutton Test using different schemes 
!of covective terms approximation -  Main modul
!Copyright (C) 2005  Michail Kiričkov

!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.

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

Program Main

include 'icomm_1.f90'

Dimension F_out(nx,ny)
Character  Filename*10

        Call Ini 
	Call Grid_rectangular
	Call Geom
	Call Init_all

    Call Control_gem

	Do 100 Niter=1,100

write(*,*) '------------------------',Niter,'------------------------',Niter

	Call Coef_1(5)

 	Call Check_koeff	

 !  Alfa = 0.95     
 !  Call Under_Relaxation(Alfa,5)

    Call TDMA_1(5)
  
	Call Bound_condition
	 
   Call Convergence_Criteria(5)

	100 continue
!----------------------------------------------------------------

	NImax = NXmaxp
	NJmax = NYmaxp

	F_out     = F(:,:,1)

 	Filename  ='1_U_s.txt' 

!    Call  Out_array(F_out,NImax,NJmax,Filename)
!-------------------------------------------------------------------
!----------------------------------------------------------------
	NImax = NXmaxp
	NJmax = NYmaxp

	F_out     = F(:,:,2)
 	Filename  ='1_V_s.txt' 

!    Call  Out_array(F_out,NImax,NJmax,Filename)
!-------------------------------------------------------------------
!----------------------------------------------------------------
	NImax = NXmaxp
	NJmax = NYmaxp

	F_out     = F(:,:,5)

 	Filename  ='1_T_s.txt' 

!    Call  Out_array(F_out,NImax,NJmax,Filename)
!-------------------------------------------------------------------
 	Call output_all
	
	WRITE(*,*) 'PRIVET'

	STOP 

	END
My wiki