File: /nfs/home/0/users/jenkins/mfix.git/model/set_ro_g.f

1     !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvC
2     !                                                                      C
3     !  Subroutine: SET_RO_g                                                C
4     !  Purpose: Initialize the gas densities                               C
5     !                                                                      C
6     !  Author: M. Syamlal                                 Date: 21-JAN-92  C
7     !  Reviewer:M. Syamlal, S. Venkatesan, P. Nicoletti,  Date: 29-JAN-92  C
8     !           W. Rogers                                                  C
9     !                                                                      C
10     !  Revision Number:                                                    C
11     !  Purpose:                                                            C
12     !  Author:                                            Date: dd-mmm-yy  C
13     !  Reviewer:                                          Date: dd-mmm-yy  C
14     !                                                                      C
15     !  Literature/Document References:                                     C
16     !                                                                      C
17     !  Variables referenced: MW_MIX_g, P_g, T_g, EP_g, RO_g0               C
18     !  Variables modified: RO_g, ROP_g                                     C
19     !  Local variables: IJK                                                C
20     !                                                                      C
21     !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^C
22     
23           SUBROUTINE SET_RO_G
24     
25     !-----------------------------------------------
26     ! Modules
27     !-----------------------------------------------
28           USE compar
29           USE constant
30           USE eos, only: EOSG
31           USE fldvar
32           USE functions
33           USE geometry
34           USE indices
35           USE parallel
36           USE param
37           USE param1
38           USE physprop
39           IMPLICIT NONE
40     !-----------------------------------------------
41     ! Local variables
42     !-----------------------------------------------
43           INTEGER :: IJK
44     !-----------------------------------------------
45           IF (RO_G0 == UNDEFINED) THEN   ! compressible case
46     
47     !!$omp parallel do private(IJK)
48              DO IJK = ijkstart3, ijkend3
49     ! calculate ro_g and rop_g in all fluid and flow boundary cells
50                 IF (.NOT.WALL_AT(IJK)) THEN
51     ! set_bc0 will have already defined ro_g and rop_g in MI and PI
52     ! boundary cells (redundant-remove in set_bc0?)
53                    RO_G(IJK) = EOSG(MW_MIX_G(IJK),P_G(IJK),T_G(IJK))
54                    ROP_G(IJK) = EP_G(IJK)*RO_G(IJK)
55                 ENDIF
56              ENDDO
57     
58           ELSE   ! incompressible case
59     
60     !!$omp   parallel do private(ijk)
61              DO IJK = ijkstart3, ijkend3
62                 IF (.NOT.WALL_AT(IJK)) THEN
63     ! assign ro_g and calculate rop_g in all fluid and flow boundary cells
64     ! set_constprop will have already defined ro_g in fluid and flow
65     ! boundary cells (redundant- remove here?)
66                    RO_G(IJK) = RO_G0
67     ! set_bc0 will have already defined rop_g in MI and PI boundary cells
68     ! (redundant-remove in set_bc0?)
69                    ROP_G(IJK) = EP_G(IJK)*RO_G(IJK)
70                 ENDIF
71              ENDDO
72           ENDIF
73     
74           RETURN
75           END SUBROUTINE SET_RO_G
76     
77     
78