70 IF(dem_solids.OR.pic_solids) &
131 INTEGER :: I_w, I_e, J_s, J_n, K_b, K_t
141 ic_defined(icv) = .false.
142 IF (ic_x_w(icv) /=
undefined) ic_defined(icv) = .true.
143 IF (ic_x_e(icv) /=
undefined) ic_defined(icv) = .true.
144 IF (ic_y_s(icv) /=
undefined) ic_defined(icv) = .true.
145 IF (ic_y_n(icv) /=
undefined) ic_defined(icv) = .true.
148 IF (ic_i_w(icv) /=
undefined_i) ic_defined(icv) = .true.
149 IF (ic_i_e(icv) /=
undefined_i) ic_defined(icv) = .true.
150 IF (ic_j_s(icv) /=
undefined_i) ic_defined(icv) = .true.
151 IF (ic_j_n(icv) /=
undefined_i) ic_defined(icv) = .true.
156 IF(run_type /=
'NEW' .AND. ic_type(icv) /=
'PATCH') &
157 ic_defined(icv) = .false.
161 IF(run_type ==
'NEW' .AND. ic_type(icv) ==
'PATCH') &
162 ic_defined(icv) = .false.
167 IF(.NOT.ic_defined(icv)) cycle
173 WRITE(
err_msg, 1100) icv,
'IC_X_w and IC_I_w' 180 ic_x_e(icv) = xlength
182 WRITE(
err_msg, 1100) icv,
'IC_X_e and IC_I_e' 191 WRITE(
err_msg, 1100) icv,
'IC_Y_s and IC_J_s' 198 ic_y_n(icv) = ylength
200 WRITE(
err_msg, 1100) icv,
'IC_Y_n and IC_J_n' 209 WRITE(
err_msg, 1100) icv,
'IC_Z_b and IC_K_b' 218 WRITE(
err_msg, 1100) icv,
'IC_Z_t and IC_K_t' 225 1100
FORMAT(
'Error 1100: Initial condition region ',i3,
' is ill-', &
226 'defined.',/
' > ',a,
' are not specified.',/
'Please correct ', &
227 'the mfix.dat file.')
233 IF(.NOT.ic_defined(icv)) cycle
240 CALL calc_cell (xmin, ic_x_w(icv), dx, imax, i_w)
242 CALL calc_cell (xmin, ic_x_e(icv), dx, imax, i_e)
254 IF(ic_i_w(icv) > ic_i_e(icv))
THEN 255 WRITE(
err_msg, 1101) icv,
'IC_I_W > IC_I_E' 256 write(*,*)
' dump:',ic_i_w(icv),ic_i_e(icv)
258 ELSEIF(ic_i_w(icv) < imin1)
THEN 259 WRITE(
err_msg, 1101) icv,
'IC_I_W < IMIN1' 261 ELSEIF(ic_i_w(icv) > imax1)
THEN 262 WRITE(
err_msg, 1101) icv,
'IC_I_W > IMAX1' 264 ELSEIF(ic_i_e(icv) < imin1)
THEN 265 WRITE(
err_msg, 1101) icv,
'IC_I_E < IMIN1' 267 ELSEIF(ic_i_e(icv) > imax1)
THEN 268 WRITE(
err_msg, 1101) icv,
'IC_Z_t and IC_K_t' 290 IF(ic_j_s(icv) > ic_j_n(icv))
THEN 291 WRITE(
err_msg, 1101) icv,
'IC_J_S > IC_J_N' 293 ELSEIF(ic_j_s(icv)<jmin1)
THEN 294 WRITE(
err_msg, 1101) icv,
'IC_J_S < JMIN1' 296 ELSEIF(ic_j_s(icv)>jmax1)
THEN 297 WRITE(
err_msg, 1101) icv,
'IC_J_S > JMAX1' 299 ELSEIF(ic_j_n(icv)<jmin1)
THEN 300 WRITE(
err_msg, 1101) icv,
'IC_J_N < JMIN1' 302 ELSEIF(ic_j_n(icv)>jmax1)
THEN 303 WRITE(
err_msg, 1101) icv,
'IC_J_N > JMAX1' 327 WRITE(
err_msg, 1101) icv,
'IC_K_B > IC_K_T' 330 WRITE(
err_msg, 1101) icv,
'IC_K_B < KMIN1' 333 WRITE(
err_msg, 1101) icv,
'IC_K_B > KMAX1' 336 WRITE(
err_msg, 1101) icv,
'IC_K_T < KMIN1' 339 WRITE(
err_msg, 1101) icv,
'IC_K_T > KMAX1' 344 1101
FORMAT(
'Error 1101: Initial condition region ',i2,
' is ill-', &
345 'defined.',/3x,a,/
'Please correct the mfix.dat file.')
415 INTEGER,
INTENT(IN) :: ICV
422 DOUBLE PRECISION :: SUM
431 basic_ic = (
ic_type(icv) /=
'PATCH')
466 IF(ic_ep_g(icv) ==
undefined .AND. basic_ic)
THEN 481 1100
FORMAT(
'Error 1100: Pressure must be greater than 0.0 for ', &
482 'compressible flow',/
'Illegal value: ',a,
' = ',a,/
'Please ', &
483 'correct the mfix.dat file.')
496 IF (ic_gama_rg(icv) <
zero)
THEN 497 WRITE(
err_msg, 1001) trim(
ivar(
'IC_GAMA_Rg',icv)), &
498 ival(ic_gama_rg(icv))
500 ELSEIF (ic_gama_rg(icv) >
zero)
THEN 513 sum = sum + ic_x_g(icv,n)
514 ELSEIF(basic_ic)
THEN 527 ELSEIF(species_eq(0))
THEN 531 1110
FORMAT(
'Error 1110: IC_X_g(',i3,
',:) do NOT sum to ONE and the ',&
532 'gas phase',/
'species equations are solved. Please correct ', &
533 'the mfix.dat file.')
540 1111
FORMAT(
'Error 1111: IC_X_g(',i3,
',:) do NOT sum to ONE and the ',&
541 'gas phase',/
'is compressible and MW_AVG is UNDEFINED.',/ &
542 'Please correct the mfix.dat file.')
548 1112
FORMAT(
'Error 1112: IC_X_g(',i3,
',:) do not sum to ONE or ZERO ',&
549 'and they',/
'are not needed. Please correct the mfix.dat ', &
569 1113
FORMAT(
'Error 1113: IC_L_SCALE(',i3,
',:) is defined but L_SCALE0 ' 570 'is equal',/,
'to zero. A non-zero value must be specified to ',
571 'activate this model.',/,
'Please correct the mfix.dat file.')
577 IF (ic_l_scale(icv) <
zero)
THEN 579 ival(ic_l_scale(icv))
601 1000
FORMAT(
'Error 1000: Required input not specified: ',a,/
'Please ',&
602 'correct the mfix.dat file.')
604 1001
FORMAT(
'Error 1001: Illegal or unknown input: ',a,
' = ',a,/ &
605 'Please correct the mfix.dat file.')
654 use discretelement
, only: des_mmax
678 INTEGER,
INTENT(IN) :: ICV
682 DOUBLE PRECISION SUM, SUM_EP
684 DOUBLE PRECISION :: IC_ROs(1:
dim_m)
688 LOGICAL :: SKIP(1:
dim_m)
699 basic_ic = (
ic_type(icv) /=
'PATCH')
702 mmax_tot =
smax + des_mmax
705 IF(mmax_tot == 1 .AND. ic_ep_s(icv,1) ==
undefined)
THEN 706 IF(ic_ep_g(icv) /=
undefined) ic_ep_s(icv,1) =
one-ic_ep_g(icv)
711 IF(mmax_tot > 1 .AND. .NOT.
compare(ic_ep_g(icv),
one))
THEN 717 WRITE(
err_msg, 1400) m, icv,
'IC_ROP_s and IC_EP_s' 727 WRITE(
err_msg, 1400) m, icv,
'IC_ROP_s and IC_EP_s' 734 1400
FORMAT(
'Error 1400: Insufficient solids phase ',i2,
' ', &
735 'information for IC',/
'region ',i3,
'. ',a,
' not specified.',/ &
736 'Please correct the mfix.dat file.')
740 skip(m)=(ic_rop_s(icv,m)==
undefined.OR.ic_rop_s(icv,m)==
zero) &
744 IF(mmax_tot == 1 .AND. ic_ep_g(icv)/=
one) skip(1) = .false.
751 IF (skip(m) .OR.
no_i)
THEN 760 IF(skip(m) .OR.
no_j)
THEN 769 IF(skip(m) .OR.
no_k)
THEN 777 IF(energy_eq .AND. ic_t_s(icv,m)==
undefined)
THEN 779 ic_t_s(icv,m) = ic_t_g(icv)
786 IF(granular_energy .AND. ic_theta_m(icv,m)==
undefined)
THEN 788 ic_theta_m(icv,m) =
zero 796 IF(ic_gama_rs(icv,m) <
zero)
THEN 797 WRITE(
err_msg, 1001)trim(
ivar(
'IC_GAMA_Rs',icv,m)), &
798 ival(ic_gama_rs(icv,m))
800 ELSEIF (ic_gama_rs(icv,m) >
zero)
THEN 814 sum = sum + ic_x_s(icv,m,n)
815 ELSEIF(basic_ic)
THEN 816 ic_x_s(icv,m,n) =
zero 826 ELSEIF(species_eq(m) .AND. .NOT.skip(m))
THEN 830 1402
FORMAT(
'Error 1402: IC_X_s(',i3,
',',i2,
',:) do NOT sum to ONE ', &
831 'and the solids phase',/
'species equations are solved. ', &
832 'Please correct the mfix.dat file.')
834 ELSEIF(
solve_ros(m) .AND. .NOT.skip(m))
THEN 838 1403
FORMAT(
'Error 1403: IC_X_s(',i3,
',',i2,
':) do NOT sum to ONE ', &
839 'and the solids phase',/
'density is calculated. Please ', &
840 'correct the mfix.dat file.')
846 1404
FORMAT(
'Error 1404: IC_X_s(',i3,
',',i2,
':) do NOT sum to ONE ', &
847 'or ZERO and',/
'they are not needed. Please correct the ', &
851 ic_x_s(icv,m,:) =
zero 852 ic_x_s(icv,m,1) =
one 858 ic_ros(m) = merge(ro_s0(m), ro_s0(m),
solve_ros(m))
866 inert = inert_species(m)
867 IF(ic_x_s(icv,m,inert) ==
zero)
THEN 872 1405
FORMAT(
'Error 1405: No inert species for phase ',i2,
' in IC ', &
873 'region ',i3,
'.',/
'Unable to calculate solids phase density. ',
874 'Please refer to the Readme',/
' file for required variable ', &
875 'solids density model input parameters and',/
' make the ', &
876 'necessary corrections to the data file.')
879 ic_ros(m) =
eoss(ro_s0(m), x_s0(m,inert), &
887 sum_ep = ic_ep_g(icv)
892 IF(basic_ic .AND. skip(m))
THEN 893 ic_ep_s(icv,m) =
zero 894 ic_rop_s(icv,m) =
zero 897 ELSEIF(.NOT.basic_ic .AND. (ic_rop_s(icv,m) ==
undefined &
901 ELSEIF(ic_rop_s(icv,m) /=
undefined .AND. &
904 IF(.NOT.
compare(ic_ep_s(icv,m)*ic_ros(m), &
905 ic_rop_s(icv,m)))
THEN 914 1406
FORMAT(
'Error 1406: IC_EP_s and IC_ROP_s are inconsistent for ',&
915 'phase ',i2,/,
'in IC region ', i3,
'. Please correct the ',&
925 WRITE(
err_msg,1407) trim(
ivar(
'IC_ROP_s',icv,m)), &
926 trim(
ival(ic_rop_s(icv,m))), trim(
ivar(
'IC_EP_s',&
927 icv,m)), trim(
ival(ic_ep_s(icv,m)))
930 1407
FORMAT(
'Warning 1407: IC_EP_s and IC_ROP_s are inconsistent:', &
931 2(/3x,a,
' = ',a),/
'Deferring to IC_EP_s to overcome conflict.')
933 ic_rop_s(icv,m) = ic_ep_s(icv,m)*ic_ros(m)
941 ic_ep_s(icv,m) = ic_rop_s(icv,m) / ic_ros(m)
944 ELSEIF(ic_rop_s(icv,m) ==
undefined)
THEN 945 ic_rop_s(icv,m) = ic_ep_s(icv,m) * ic_ros(m)
951 sum_ep = sum_ep + ic_ep_s(icv,m)
955 IF(basic_ic .AND. .NOT.
compare(sum_ep,
one))
THEN 960 1410
FORMAT(
'Error 1410: Illegal initial condition region : ',i3,/ &
961 'Sum of volume fractions does NOT equal ONE. Please correct',/&
962 'the mfix.dat file.')
970 1000
FORMAT(
'Error 1000: Required input not specified: ',a,/
'Please ',&
971 'correct the mfix.dat file.')
973 1001
FORMAT(
'Error 1001: Illegal or unknown input: ',a,
' = ',a,/ &
974 'Please correct the mfix.dat file.')
976 1002
FORMAT(
'Error 1002: Illegal data in initial condition region ', &
977 i3,/a,
' defined for unknown solids phase ',i2,
'.',/ &
978 'Please correct the mfix.dat file.')
1036 INTEGER,
INTENT(IN) :: ICV
1044 IF (
ic_type(icv) ==
'PATCH')
RETURN 1069 ELSEIF(ic_k_turb_g(icv) /=
undefined)
THEN 1070 WRITE(
err_msg, 1010) trim(
ivar(
'IC_K_Turb_G',icv))
1072 ELSEIF(ic_e_turb_g(icv) /=
undefined)
THEN 1073 WRITE(
err_msg, 1010) trim(
ivar(
'IC_E_Turb_G',icv))
1082 DO n = 1, dim_scalar
1109 ELSEIF(ic_t_rs(icv,m) /=
undefined)
THEN 1125 1010
FORMAT(
'Error 1010: ',a,
' specified in an undefined IC region')
double precision l_scale0
double precision, dimension(dimension_ic) ic_e_turb_g
integer, parameter dim_n_g
integer, parameter dimension_ic
double precision, dimension(dimension_ic) ic_l_scale
subroutine calc_cell(RMIN, REACTOR_LOC, D_DIR, N_DIR, CELL_LOC)
double precision, dimension(dimension_ic, dim_m) ic_rop_s
character(len=32) function ivar(VAR, i1, i2, i3)
double precision, dimension(dimension_ic) ic_t_g
subroutine check_ic_overflow(ICV)
logical function compare(V1, V2)
integer, dimension(dimension_ic) ic_j_s
double precision, dimension(dimension_ic, dim_m) ic_theta_m
subroutine check_ic_mppic
double precision, parameter one
subroutine check_ic_common_discrete
double precision, dimension(dimension_ic, dim_scalar) ic_scalar
logical, dimension(0:dim_m) species_eq
integer, dimension(dimension_ic) ic_j_n
integer, parameter dim_scalar
logical, dimension(dim_m) solve_ros
double precision, dimension(0:dim_j) dy
logical, dimension(dimension_ic) ic_defined
double precision, dimension(dimension_ic) ic_z_b
double precision, dimension(dim_m, dim_n_s) x_s0
double precision, dimension(dimension_ic) ic_x_w
double precision, parameter undefined
character(len=16), dimension(dimension_ic) ic_type
double precision, dimension(dimension_ic, dim_m) ic_gama_rs
double precision, dimension(0:dim_k) dz
subroutine check_ic_geometry
double precision, dimension(dimension_ic) ic_u_g
subroutine init_err_msg(CALLER)
double precision, dimension(dimension_ic) ic_z_t
double precision, dimension(dimension_ic) ic_k_turb_g
double precision, dimension(dimension_ic, dim_m) ic_w_s
integer, dimension(dimension_ic) ic_i_w
double precision function eoss(pBase, Xs0_INERT, Xs_INERT)
integer, dimension(dimension_ic) ic_i_e
double precision, dimension(dimension_ic) ic_v_g
integer, dimension(dimension_ic) ic_k_b
integer, dimension(dim_m) inert_species
character(len=16) run_type
double precision, dimension(dimension_ic) ic_y_n
double precision, dimension(dimension_ic, dim_m, dim_n_s) ic_x_s
double precision, dimension(dimension_ic) ic_w_g
double precision, dimension(0:dim_i) dx
double precision, dimension(dimension_ic) ic_gama_rg
integer, dimension(dimension_ic) ic_k_t
double precision, dimension(dimension_ic, dim_m) ic_v_s
subroutine location_check(CELL_SPECIFIED, CELL_CALCULATED, COUNTER, MESSAGE)
subroutine check_initial_conditions
integer, dimension(0:dim_m) nmax
double precision, dimension(dimension_ic) ic_p_g
double precision, dimension(dimension_ic) ic_x_e
subroutine check_ic_gas_phase(ICV)
integer, parameter undefined_i
character(len=line_length), dimension(line_count) err_msg
integer, parameter dim_n_s
double precision, dimension(dimension_ic, dim_m) ic_u_s
subroutine check_ic_solids_phases(ICV)
double precision, dimension(dimension_ic, dim_n_g) ic_x_g
double precision, dimension(dimension_ic) ic_ep_g
double precision, dimension(dim_m) ro_s0
double precision, dimension(dimension_ic) ic_y_s
double precision, dimension(dimension_ic) ic_t_rg
double precision, dimension(dimension_ic, dim_m) ic_t_s
double precision, dimension(dimension_ic, dim_m) ic_ep_s
double precision, parameter zero
subroutine flush_err_msg(DEBUG, HEADER, FOOTER, ABORT, LOG, CALL_TREE)
double precision, dimension(dimension_ic, dim_m) ic_t_rs