MFIX  2016-1
write_out1.f
Go to the documentation of this file.
1 !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvC
2 ! C
3 ! Module name: WRITE_OUT1 C
4 ! Purpose: write out the field variables to standard output C
5 ! C
6 ! Author: P. Nicoletti Date: 03-DEC-91 C
7 ! Reviewer: W. Rogers, M. Syamlal, S. Venkatesan Date: 31-JAN-92 C
8 ! C
9 ! Revision Number: C
10 ! Purpose: C
11 ! Author: Date: dd-mmm-yy C
12 ! Reviewer: Date: dd-mmm-yy C
13 ! C
14 ! Literature/Document References: C
15 ! C
16 ! Variables referenced: TIME, P_g, EP_g, RO_g, ROP_g, MMAX, ROP_s C
17 ! T_g, T_s, U_g, V_g, W_g, U_s, V_s, W_s C
18 ! Variables modified: None C
19 ! C
20 ! Local variables: LC, N C
21 ! C
22 !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^C
23 !
24  SUBROUTINE write_out1
25 !...Translated by Pacific-Sierra Research VAST-90 2.06G5 12:17:31 12/09/98
26 !...Switches: -xf
27 !-----------------------------------------------
28 ! M o d u l e s
29 !-----------------------------------------------
30  USE param
31  USE param1
32  USE physprop
33  USE fldvar
34  USE run
35  USE scalars
36  USE funits
37  USE rxns
38  USE compar !//d
39  USE mpi_utility !//d
40  IMPLICIT NONE
41 !-----------------------------------------------
42 ! G l o b a l P a r a m e t e r s
43 !-----------------------------------------------
44 !-----------------------------------------------
45 ! L o c a l P a r a m e t e r s
46 !-----------------------------------------------
47 !-----------------------------------------------
48 ! L o c a l V a r i a b l e s
49 !-----------------------------------------------
50  INTEGER :: LC, NN
51 !-----------------------------------------------
52 !
53  double precision, allocatable :: array1(:) !//d
54 !
55 
56 
57  if (mype == pe_io) then
58  allocate (array1(ijkmax3)) !//d
59  else
60  allocate (array1(1)) !//d
61  end if
62 !
63 ! form feed character = CHAR(12)
64 !
65  if (mype == pe_io) WRITE (unit_out, 1000) char(12), time
66 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
67  call gather (p_g,array1,root) !//
68 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
69  if (mype == pe_io) CALL out_array (array1, 'P_g')
70 !
71  if (mype == pe_io) WRITE (unit_out, 1050) char(12), time
72 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
73  call gather (p_star,array1,root) !//
74 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
75  if (mype == pe_io) CALL out_array (array1, 'P_star')
76 !
77  if (mype == pe_io) WRITE (unit_out, 1100) char(12), time
78 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
79  call gather (ep_g,array1,root) !//
80 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
81  if (mype == pe_io) CALL out_array (array1, 'EP_g')
82 !
83  if (mype == pe_io) WRITE (unit_out, 1200) char(12), time
84 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
85  call gather (ro_g,array1,root) !//
86 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
87  if (mype == pe_io) CALL out_array (array1, 'RO_g')
88 !
89  DO lc = 1, mmax
90  if (mype == pe_io) WRITE (unit_out, 1400) char(12), lc, time
91 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
92  call gather (rop_s(:,lc),array1,root) !//
93 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
94  if (mype == pe_io) CALL out_array (array1, 'ROP_s')
95  if (lc == 2) then
96  if (mype == pe_io) WRITE (unit_out, *) 'solid phase ', lc, 'at t= ', time
97  call gather (ro_s(:,lc),array1,root)
98  if (mype == pe_io) CALL out_array (array1, 'RO_S')
99  call gather (err_array(:,lc),array1,root)
100  if (mype == pe_io) CALL out_array (array1, 'ERR_EPS')
101  endif
102  END DO
103  if (mype == pe_io) WRITE (unit_out, 1500) char(12), time
104 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
105  call gather (t_g,array1,root) !//
106 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
107  if (mype == pe_io) CALL out_array (array1, 'T_g')
108 !
109  DO lc = 1, mmax
110  if (mype == pe_io) WRITE (unit_out, 1600) char(12), lc, time
111 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
112  call gather (t_s(:,lc),array1,root) !//
113 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
114  if (mype == pe_io) CALL out_array (array1, 'T_s')
115  END DO
116  IF (species_eq(0)) THEN
117  DO nn = 1, nmax(0)
118  if (mype == pe_io) WRITE (unit_out, 1710) char(12), nn, time
119 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
120  call gather (x_g(:,nn),array1,root) !//
121 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
122  if (mype == pe_io) CALL out_array (array1, 'X_g')
123  END DO
124  ENDIF
125 !
126  DO lc = 1, mmax
127  IF (species_eq(lc)) THEN
128  DO nn = 1, nmax(lc)
129  if (mype == pe_io) WRITE (unit_out, 1720) char(12), lc, nn, time
130 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
131  call gather (x_s(:,lc,nn),array1,root) !//
132 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
133  if (mype == pe_io) CALL out_array (array1, 'X_s')
134  END DO
135  ENDIF
136  END DO
137  if (mype == pe_io) WRITE (unit_out, 1800) char(12), time
138 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
139  call gather (u_g,array1,root) !//
140 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
141 !//SP - Changed U_G to array1
142  if (mype == pe_io) CALL out_array (array1, 'U_g')
143 !
144  if (mype == pe_io) WRITE (unit_out, 1900) char(12), time
145 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
146  call gather (v_g,array1,root) !//
147 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
148 !//SP - Changed V_G to array1
149  if (mype == pe_io) CALL out_array (array1, 'V_g')
150 !
151  if (mype == pe_io) WRITE (unit_out, 2000) char(12), time
152 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
153  call gather (w_g,array1,root) !//
154 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
155 !//SP - Changed W_G to array1
156  if (mype == pe_io) CALL out_array (array1, 'W_g')
157 !
158  DO lc = 1, mmax
159  if (mype == pe_io) WRITE (unit_out, 2100) char(12), lc, time
160 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
161  call gather (u_s(:,lc),array1,root) !//
162 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
163  if (mype == pe_io) CALL out_array (array1, 'U_s')
164 !
165  if (mype == pe_io) WRITE (unit_out, 2200) char(12), lc, time
166 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
167  call gather (v_s(:,lc),array1,root) !//
168 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
169  if (mype == pe_io) CALL out_array (array1, 'V_s')
170 !
171  if (mype == pe_io) WRITE (unit_out, 2300) char(12), lc, time
172 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
173  call gather (w_s(:,lc),array1,root) !//
174 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
175  if (mype == pe_io) CALL out_array (array1, 'W_s')
176 !
177 ! IF(GRANULAR_ENERGY)THEN
178  if (mype == pe_io) WRITE (unit_out, 2400) char(12), lc, time
179 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
180  call gather (theta_m(:,lc),array1,root) !//
181 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
182  if (mype == pe_io) CALL out_array (array1, 'Theta_m')
183  END DO
184  if (mype == pe_io) WRITE (unit_out, '(/1X,1A1)') char(12)
185  IF (call_usr) CALL usr_write_out1
186 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
187 
188  IF(nscalar /= 0) THEN
189  DO lc = 1, nscalar
190  if (mype == pe_io) WRITE (unit_out, 2500) char(12), lc, time
191 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
192  call gather (scalar(:,lc),array1,root) !//
193 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
194  if (mype == pe_io) CALL out_array (array1, 'Scalar')
195  END DO
196  ENDIF
197 
198  IF(k_epsilon) THEN
199  if (mype == pe_io) WRITE (unit_out, 2600) char(12), time
200 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
201  call gather (k_turb_g,array1,root) !//
202 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
203  if (mype == pe_io) CALL out_array (array1, 'K_Turb_G')
204  call gather (e_turb_g,array1,root) !//
205  if (mype == pe_io) CALL out_array (array1, 'E_Turb_G')
206  ENDIF
207  IF(nrr /= 0) THEN
208  DO lc = 1, nrr
209  if (mype == pe_io) WRITE (unit_out, 2500) char(12), lc, time
210 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
211  call gather (reactionrates(:,lc),array1,root) !//
212 ! call MPI_Barrier(MPI_COMM_WORLD,mpierr) !//PAR_I/O enforce barrier here
213  if (mype == pe_io) CALL out_array (array1, 'RRates')
214  END DO
215  ENDIF
216 
217  deallocate(array1) !//
218 
219 !
220 ! form feed character = CHAR(12)
221  if (mype == pe_io) WRITE (unit_out, '(/1X,1A1)') char(12)
222  IF (call_usr) CALL usr_write_out1
223  RETURN
224  1000 FORMAT(1x,a1,/5x,'--- Gas pressure (P_g) at time ',g12.5,' ---',2/)
225  1050 FORMAT(1x,a1,/5x,'--- Solids pressure (P_star) at time ',g12.5,' ---',2/)
226  1100 FORMAT(1x,a1,/5x,'--- Void fraction (EP_g) at time ',g12.5,' ---',2/)
227  1200 FORMAT(1x,a1,/5x,'--- Gas density (RO_g) at time ',g12.5,' ---',2/)
228  1400 FORMAT(1x,a1,/5x,'--- Solids Phase-',i1,' density x volume',&
229  ' fraction (ROP_s) at time ',g12.5,' ---',2/)
230  1500 FORMAT(1x,a1,/5x,'--- Gas temperature (T_g) at time ',g12.5,' ---',2/)
231  1600 FORMAT(1x,a1,/5x,'--- Solids Phase-',i1,' temperature (T_s)',' at time ',&
232  g12.5,' ---',2/)
233  1710 FORMAT(1x,a1,/5x,'--- Mass fraction of gas species (X_g) ',&
234  i2,' at time ',&
235  g12.5,' ---',2/)
236  1720 FORMAT(1x,a1,/5x,'--- Mass fraction of solids-',i1,' species (X_s)',i2,&
237  ' at time ',g12.5,' ---',2/)
238  1800 FORMAT(1x,a1,/5x,'--- X-component of gas velocity (U_g) at time ',g12.5,&
239  ' ---',2/)
240  1900 FORMAT(1x,a1,/5x,'--- Y-component of gas velocity (V_g) at time ',g12.5,&
241  ' ---',2/)
242  2000 FORMAT(1x,a1,/5x,'--- Z-component of gas velocity (W_g) at time ',g12.5,&
243  ' ---',2/)
244  2100 FORMAT(1x,a1,/5x,'--- X-component of Solids Phase-',i1,&
245  ' velocity (U_s) at time ',g12.5,' ---',2/)
246  2200 FORMAT(1x,a1,/5x,'--- Y-component of Solids Phase-',i1,&
247  ' velocity (V_s) at time ',g12.5,' ---',2/)
248  2300 FORMAT(1x,a1,/5x,'--- Z-component of Solids Phase-',i1,&
249  ' velocity (W_s) at time ',g12.5,' ---',2/)
250  2400 FORMAT(1x,a1,/5x,'--- Granular temperature of Solids Phase-',i1,&
251  ' (Theta_m) at time ',g12.5,' ---',2/)
252  2500 FORMAT(1x,a1,/5x,'--- Scalar Field-',i2, ' (Scalar) at time ',g12.5,' ---',2/)
253  2600 FORMAT(1x,a1,/5x,'--- Turbulence Field-', ' (K-Epsilon) at time ',g12.5,' ---',2/)
254  END SUBROUTINE write_out1
double precision, dimension(:,:), allocatable v_s
Definition: fldvar_mod.f:105
subroutine write_out1
Definition: write_out1.f:25
double precision, dimension(:), allocatable ep_g
Definition: fldvar_mod.f:15
double precision, dimension(:), allocatable k_turb_g
Definition: fldvar_mod.f:161
integer, parameter unit_out
Definition: funits_mod.f:18
double precision, dimension(:,:), allocatable w_s
Definition: fldvar_mod.f:117
Definition: rxns_mod.f:1
logical, dimension(0:dim_m) species_eq
Definition: run_mod.f:115
double precision, dimension(:), allocatable t_g
Definition: fldvar_mod.f:63
double precision, dimension(:,:), allocatable scalar
Definition: fldvar_mod.f:155
double precision, dimension(:), allocatable p_g
Definition: fldvar_mod.f:26
double precision, dimension(:,:), allocatable err_array
Definition: fldvar_mod.f:171
double precision, dimension(:,:), allocatable u_s
Definition: fldvar_mod.f:93
subroutine usr_write_out1
integer pe_io
Definition: compar_mod.f:30
integer mmax
Definition: physprop_mod.f:19
double precision, dimension(:,:,:), allocatable x_s
Definition: fldvar_mod.f:78
double precision, dimension(:,:), allocatable t_s
Definition: fldvar_mod.f:66
double precision, dimension(:,:), allocatable x_g
Definition: fldvar_mod.f:75
integer root
Definition: compar_mod.f:41
double precision, dimension(:,:), allocatable theta_m
Definition: fldvar_mod.f:149
double precision, dimension(:), allocatable v_g
Definition: fldvar_mod.f:99
double precision, dimension(:), allocatable w_g
Definition: fldvar_mod.f:111
Definition: run_mod.f:13
integer nrr
Definition: rxns_mod.f:10
Definition: param_mod.f:2
double precision, dimension(:,:), allocatable ro_s
Definition: fldvar_mod.f:45
integer, dimension(0:dim_m) nmax
Definition: physprop_mod.f:119
logical k_epsilon
Definition: run_mod.f:97
integer mype
Definition: compar_mod.f:24
double precision, dimension(:,:), allocatable reactionrates
Definition: rxns_mod.f:7
double precision, dimension(:), allocatable p_star
Definition: fldvar_mod.f:142
subroutine out_array(ARRAY, MESSAGE)
Definition: out_array.f:25
double precision, dimension(:), allocatable u_g
Definition: fldvar_mod.f:87
integer nscalar
Definition: scalars_mod.f:7
double precision, dimension(:,:), allocatable rop_s
Definition: fldvar_mod.f:51
double precision time
Definition: run_mod.f:45
double precision, dimension(:), allocatable e_turb_g
Definition: fldvar_mod.f:162
double precision, dimension(:), allocatable ro_g
Definition: fldvar_mod.f:32
logical call_usr
Definition: run_mod.f:121