MFIX  2016-1
set_ro_g.f
Go to the documentation of this file.
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 
integer ijkend3
Definition: compar_mod.f:80
double precision, dimension(:), allocatable ep_g
Definition: fldvar_mod.f:15
double precision, dimension(:), allocatable t_g
Definition: fldvar_mod.f:63
subroutine set_ro_g
Definition: set_ro_g.f:24
double precision, dimension(:), allocatable p_g
Definition: fldvar_mod.f:26
double precision, parameter undefined
Definition: param1_mod.f:18
double precision function eosg(MW, PG, TG)
Definition: eos_mod.f:22
double precision ro_g0
Definition: physprop_mod.f:59
Definition: eos_mod.f:10
Definition: param_mod.f:2
double precision, dimension(:), allocatable mw_mix_g
Definition: physprop_mod.f:130
integer ijkstart3
Definition: compar_mod.f:80
double precision, dimension(:), allocatable ro_g
Definition: fldvar_mod.f:32
double precision, dimension(:), allocatable rop_g
Definition: fldvar_mod.f:38