CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Wiki > Init all.f90 - Initiation of arrays

Init all.f90 - Initiation of arrays

From CFD-Wiki

(Difference between revisions)
Jump to: navigation, search
(New page: <pre> !Sample program for solving Lid-driven cavity flow test using SIMPLE-algorithm ! initiation of arrays modul !Copyright (C) 2010 Michail Kiričkov !This program is free software; y...)
 
Line 4: Line 4:
! initiation of arrays modul
! initiation of arrays modul
!Copyright (C) 2010  Michail Kiričkov
!Copyright (C) 2010  Michail Kiričkov
-
 
+
!Copyright (C) 2016  Michail Kiričkov, Kaunas University for Technology
 +
!
!This program is free software; you can redistribute it and/or
!This program is free software; you can redistribute it and/or
!modify it under the terms of the GNU General Public License
!modify it under the terms of the GNU General Public License
Line 20: Line 21:
!**********************************************************************
!**********************************************************************
-
 
+
Subroutine Init_all_cavity
-
Subroutine Ini
+
-
 
+
include 'icomm_1.f90'
include 'icomm_1.f90'
-
 
+
!------------------------------------------------
-
 
+
    F(:,:,1) = 0.0
-
  U(:,:) = 0.
+
    F(:,:,2) = 0.0
-
  V(:,:) = 0.  
+
    F(:,:,3) = 0.0
-
+
    F(:,:,4) = 0.0
-
  F(:,:,:) = 0.
+
    Gam(:,:) = 1.  /1000.
-
Xc(:,:) = 0.
+
    Ro(:,:) = 1.  
-
Yc(:,:) = 0.
+
    F(1    ,:     ,1) = 0.
-
  X(:,:) = 0.
+
    F(NXmaxC,:     ,1) = 0.
-
  Y(:,:) = 0.
+
    F(:     ,1    ,1) = 0.
-
Gam(:,:) = 0.
+
    F(:     ,NYmaxC,1) = 1.
-
Ro(:,:) = 1.
+
    F(:     ,1    ,2) = 0.
-
 
+
    F(:     ,NYmaxC,2) = 0.
-
Con_e(:,:) = 0.
+
    F(1    ,:     ,2) = 0.
-
Con_n(:,:) = 0.
+
    F(NXmaxC,:     ,2) = 0.
-
+
!------------------------------------------------
-
DPx_c(:,:) = 0.
+
Return  
-
DPy_c(:,:) = 0.
+
End
-
 
+
-
Dx_c(:,:) = 0.
+
-
Dy_c(:,:) = 0.
+
-
 
+
-
Ap(:,:,:) = 0.
+
-
As(:,:) = 0.
+
-
An(:,:) = 0.
+
-
Aw(:,:) = 0.
+
-
Ae(:,:) = 0.
+
-
Sp(:,:,:) = 0.
+
-
 
+
-
 
+
-
Return
+
-
End
+
</pre>
</pre>

Latest revision as of 14:48, 19 May 2016


!Sample program for solving Lid-driven cavity flow test using SIMPLE-algorithm
! initiation of arrays modul
!Copyright (C) 2010  Michail Kiričkov
!Copyright (C) 2016  Michail Kiričkov, Kaunas University for Technology
!
!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 Init_all_cavity
include 'icomm_1.f90'
!------------------------------------------------
     F(:,:,1) = 0.0
     F(:,:,2) = 0.0 
     F(:,:,3) = 0.0
     F(:,:,4) = 0.0
     Gam(:,:) = 1.  /1000.
     Ro(:,:)  = 1. 
     F(1     ,:     ,1) = 0.
     F(NXmaxC,:     ,1) = 0.
     F(:     ,1     ,1) = 0.
     F(:     ,NYmaxC,1) = 1.
     F(:     ,1     ,2) = 0.
     F(:     ,NYmaxC,2) = 0.
     F(1     ,:     ,2) = 0.
     F(NXmaxC,:     ,2) = 0.
!------------------------------------------------
Return 
End

My wiki