37 INTEGER,
intent(inout) :: IER
38 INTEGER,
intent(in) :: LEVEL
47 INTEGER :: Err_l(0:
numpes-1)
48 INTEGER :: Err_g(0:
numpes-1)
66 elseif(level == 1)
then 77 elseif(level == 2)
then 98 IF(ier == 901 .OR. ier == 902)
then 109 2000
FORMAT(/1x,70(
'*')/
' From: PHYSICAL_PROP',/
' Fatal Error 2000:', &
110 ' calc_CpoR reported an invalid temperature: 0x0', i3/, &
111 'See Cp.log for details. Calling MFIX_EXIT.',/1x,70(
'*')/)
160 DOUBLE PRECISION :: MW
173 CALL calc_usr_prop(gas_density,lm=0,lerr=err_l)
181 IF(wall_at(ijk)) cycle ijk_lp
188 ro_g(ijk) =
eosg(mw,p_g(ijk),t_g(ijk))
189 rop_g(ijk) = ro_g(ijk)*ep_g(ijk)
192 rop_g(ijk) = ro_g(ijk)*ep_g(ijk)
251 INTEGER,
INTENT(IN) :: M
262 DOUBLE PRECISION :: minROPs
267 CALL calc_usr_prop(solids_density,lm=m,lerr=err_l)
275 iis = inert_species(m)
281 IF(wall_at(ijk)) cycle ijk_lp
282 IF(
rop_s(ijk,m) > minrops)
THEN 283 ro_s(ijk,m) =
eoss(ro_s0(m), x_s0(m,iis), &
287 ro_s(ijk,m) =
eoss(ro_s0(m), x_s0(m,iis), &
337 USE usr_prop, only: gas_specificheat
343 DOUBLE PRECISION :: lCp
359 CALL calc_usr_prop(gas_specificheat,lm=0,lerr=err_l)
368 IF(wall_at(ijk)) cycle ijk_lp
375 gcp_err = max(gcp_err, lcp_err)
376 c_pg(ijk) =
c_pg(ijk) + x_g(ijk,nn) * lcp * rgas /
mw_g(nn)
392 IF(
units ==
'SI')
THEN 399 IF(gcp_err /= 0) err_l(mype) = 800 + gcp_err
436 USE usr_prop, only: solids_specificheat
442 INTEGER,
INTENT(IN) :: M
447 DOUBLE PRECISION :: lCp
463 CALL calc_usr_prop(solids_specificheat,lm=m,lerr=err_l)
472 IF(wall_at(ijk)) cycle ijk_lp
479 gcp_err = max(gcp_err, lcp_err)
481 (lcp * rgas /
mw_s(m,nn))
497 IF(
units ==
'SI')
THEN 499 c_ps(ijk,m) = 4.183925d3 *
c_ps(ijk,m)
504 IF(gcp_err /= 0) err_l(mype) = 800 + gcp_err
534 INTEGER,
INTENT(IN) :: M
549 IF(wall_at(ijk)) cycle ijk_lp
591 INTEGER,
intent(in) :: IJK
592 LOGICAL,
intent(inout) :: tHeader
597 CHARACTER(LEN=255) :: lFile
598 INTEGER,
parameter :: lUnit = 4868
599 LOGICAL,
save :: fHeader = .true.
604 write(lfile,
"('ROgErr_',I4.4,'.log')")
mype 606 write(lfile,
"('ROgErr.log')")
608 inquire(file=trim(lfile),exist=lexists)
610 open(lunit,file=trim(adjustl(lfile)), &
611 status=
'old', position=
'append', convert=
'big_endian')
613 open(lunit,file=trim(adjustl(lfile)), status=
'new',&
614 convert=
'big_endian')
623 write(lunit,
"(/2x,'Simulation time: ',g12.5)")
time 628 write(lunit,
"(6x,A,1X,g12.5)",advance=
'NO')
'RO_g:', ro_g(ijk)
629 write(lunit,
"(2x,A,1X,g12.5)",advance=
'NO')
'P_g:',
p_g(ijk)
630 write(lunit,
"(2x,A,1X,g12.5)")
'T_g:', t_g(ijk)
631 if(cartesian_grid)
then 632 write(lunit,
"(6x,A,1X,L1)",advance=
'NO')
'Cut Cell:', cut_cell_at
633 write(lunit,
"(6x,A,1X,L1)")
'Small Cell:', small_cell_at(ijk)
634 write(lunit,
"(6x,'Coordinates (E/N/T): ',1X,3(2x, g17.8))") &
642 1000
FORMAT(2x,
'One or more cells have reported a negative/NaN gas', &
643 ' density (RO_g(IJK)). If',/2x,
'this is a persistent issue,', &
644 ' lower UR_FAC(1) in mfix.dat.')
646 1001
FORMAT(/4x,
'IJK: ',i8,7x,
'I: ',i4,
' J: ',i4,
' K: ',i4)
688 INTEGER,
intent(in) :: IJK, M
690 LOGICAL,
intent(inout) :: tHeader
698 CHARACTER(LEN=255) :: lFile
699 INTEGER,
parameter :: lUnit = 4868
700 LOGICAL,
save :: fHeader = .true.
705 write(lfile,
"('ROsErr_',I4.4,'.log')")
mype 707 write(lfile,
"('ROsErr.log')")
709 inquire(file=trim(lfile),exist=lexists)
711 open(lunit,file=trim(adjustl(lfile)), &
712 status=
'old', position=
'append',convert=
'big_endian')
714 open(lunit,file=trim(adjustl(lfile)), status=
'new',&
715 convert=
'big_endian')
724 write(lunit,
"(/2x,'Simulation time: ',g12.5,' Phase: ',I2)")&
731 write(lunit,
"(6x,A,1X,g12.5)",advance=
'no')
'RO_s:',
ro_s(ijk,m)
732 write(lunit,
"(2x,A,1X,g12.5)",advance=
'no')
'Base:', ro_s0(m)
733 write(lunit,
"(2x,A,1X,g12.5)",advance=
'no')
'X_s0:', x_s0(m,nn)
734 write(lunit,
"(2x,A,1X,g12.5)")
'X_s:', x_s(ijk,m,nn)
736 if(cartesian_grid)
then 737 write(lunit,
"(6x,A,1X,L1)",advance=
'NO')
'Cut Cell:', cut_cell_at
738 write(lunit,
"(6x,A,1X,L1)")
'Small Cell:', small_cell_at(ijk)
739 write(lunit,
"(6x,'Coordinates (E/N/T): ',1X,3(2x, g17.8))") &
747 1000
FORMAT(2x,
'One or more cells have reported a negative solids', &
748 ' density (RO_s(IJK)).')
750 1001
FORMAT( 4x,
'IJK: ',i8,7x,
'I: ',i4,
' J: ',i4,
' K: ',i4)
786 INTEGER,
intent(in) :: IJK
788 LOGICAL,
intent(inout) :: tHeader
796 CHARACTER(LEN=255) :: lFile
797 INTEGER,
parameter :: lUnit = 4868
798 LOGICAL,
save :: fHeader = .true.
799 CHARACTER(LEN=7) :: X_gN
804 write(lfile,
"('CPgErr_',I4.4,'.log')")
mype 806 write(lfile,
"('CPgErr.log')")
808 inquire(file=trim(lfile),exist=lexists)
810 open(lunit,file=trim(adjustl(lfile)), &
811 status=
'old', position=
'append',convert=
'big_endian')
813 open(lunit,file=trim(adjustl(lfile)), status=
'new',&
814 convert=
'big_endian')
823 write(lunit,
"(/2x,'Simulation time: ',g12.5)")
time 828 write(lunit,
"(6x,A,1X,g12.5)",advance=
'no')
'C_PG:',
c_pg(ijk)
829 write(lunit,
"(2x,A,1X,g12.5)",advance=
'no')
'EP_G:', ep_g(ijk)
830 write(lunit,
"(2x,A,1X,g12.5)")
'T_G:', t_g(ijk)
831 write(lunit,
"(6x,A,1X)",advance=
'no')
'X_gN:' 833 write(lunit,
"(g12.5,2X)",advance=
'no') x_g(ijk,nn)
835 write(lunit,fmt=
'(/)')
837 if(cartesian_grid)
then 838 write(lunit,
"(6x,A,1X,L1)",advance=
'NO')
'Cut Cell:', cut_cell_at
839 write(lunit,
"(6x,A,1X,L1)")
'Small Cell:', small_cell_at(ijk)
840 write(lunit,
"(6x,'Coordinates (E/N/T): ',1X,3(2x, g17.8))") &
848 1000
FORMAT(2x,
'One or more cells have reported a negative or zero',&
849 ' gas specific',/2x,
'heat (C_pg(IJK)).')
851 1001
FORMAT( 4x,
'IJK: ',i8,7x,
'I: ',i4,
' J: ',i4,
' K: ',i4)
887 INTEGER,
intent(in) :: IJK, M
889 LOGICAL,
intent(inout) :: tHeader
897 CHARACTER(LEN=255) :: lFile
898 INTEGER,
parameter :: lUnit = 4868
899 LOGICAL,
save :: fHeader = .true.
900 CHARACTER(LEN=7) :: X_sN
905 write(lfile,
"('CPsErr_',I4.4,'.log')")
mype 907 write(lfile,
"('CPsErr.log')")
909 inquire(file=trim(lfile),exist=lexists)
911 open(lunit,file=trim(adjustl(lfile)), &
912 status=
'old', position=
'append',convert=
'big_endian')
914 open(lunit,file=trim(adjustl(lfile)), status=
'new',&
915 convert=
'big_endian')
924 write(lunit,
"(/2x,'Simulation time: ',g12.5,' Phase: ',I2)")&
930 write(lunit,
"(6x,A,1X,g12.5)",advance=
'no')
'C_PS:',
c_ps(ijk,m)
931 write(lunit,
"(2x,A,1X,g12.5)",advance=
'no')
'EP_S:', ep_s(ijk,m)
932 write(lunit,
"(2x,A,1X,g12.5)")
'T_S:', t_s(ijk,m)
933 write(lunit,
"(6x,A,1X)",advance=
'no')
'X_sN:' 935 write(lunit,
"(g12.5,2X)",advance=
'no') x_s(ijk,m,nn)
937 write(lunit,fmt=
'(/)')
939 if(cartesian_grid)
then 940 write(lunit,
"(6x,A,1X,L1)",advance=
'NO')
'Cut Cell:', cut_cell_at
941 write(lunit,
"(6x,A,1X,L1)")
'Small Cell:', small_cell_at(ijk)
942 write(lunit,
"(6x,'Coordinates (E/N/T): ',1X,3(2x, g17.8))") &
950 1000
FORMAT(2x,
'One or more cells have reported a negative or zero',&
951 ' solids specific',/2x,
'heat (C_ps(IJK)).')
953 1001
FORMAT( 4x,
'IJK: ',i8,7x,
'I: ',i4,
' J: ',i4,
' K: ',i4)
logical, dimension(dim_m) usr_ros
double precision, dimension(:,:), allocatable c_ps
subroutine physical_prop_cps(M)
integer, dimension(:), allocatable i_of
subroutine cpserr_log(IJK, M, tHeader)
double precision, dimension(:), allocatable yg_n
double precision, dimension(:), allocatable ep_g
subroutine rogerr_log(IJK, tHeader)
double precision, parameter one
double precision, dimension(:), allocatable xg_e
subroutine physical_prop_dp(M)
double precision, parameter omw_max
double precision, dimension(:), allocatable t_g
logical, dimension(:), allocatable small_cell_at
logical, dimension(dim_m) solve_ros
subroutine cpgerr_log(IJK, tHeader)
double precision, dimension(:,:), allocatable scalar
double precision, dimension(:), allocatable p_g
double precision, dimension(dim_m, dim_n_s) x_s0
double precision, parameter undefined
double precision, dimension(dim_n_g) mw_g
subroutine calc_usr_prop(lprop, lM, lL, lerr)
logical, dimension(:), allocatable density
integer, dimension(:), allocatable k_of
double precision, dimension(:,:), allocatable d_p
double precision function eosg(MW, PG, TG)
subroutine mfix_exit(myID, normal_termination)
subroutine physical_prop(IER, LEVEL)
double precision, dimension(:,:,:), allocatable x_s
integer, dimension(:), allocatable j_of
double precision function eoss(pBase, Xs0_INERT, Xs_INERT)
double precision, parameter small_number
double precision, dimension(:,:), allocatable t_s
double precision, dimension(:,:), allocatable x_g
logical, dimension(:), allocatable psize
integer, dimension(dim_m) inert_species
double precision, dimension(dim_m) dil_inert_x_vsd
pure double precision function calc_cpor(T, M, N)
subroutine read_database0()
integer, parameter unit_log
double precision, parameter dil_ep_s
subroutine physical_prop_rog
double precision, dimension(:,:), allocatable ro_s
double precision, dimension(:), allocatable mw_mix_g
integer, dimension(0:dim_m) nmax
logical, dimension(:), allocatable cut_cell_at
subroutine roserr_log(IJK, M, tHeader)
double precision, dimension(dim_m, dim_n_s) mw_s
double precision function ep_s(IJK, xxM)
subroutine physical_prop_ros(M)
logical function mfix_isnan(x)
double precision, dimension(:,:), allocatable rop_s
double precision, dimension(dim_m) ro_s0
logical report_neg_density
integer, dimension(1:dim_scalar) phase4scalar
double precision, dimension(:), allocatable zg_t
subroutine physical_prop_cpg
logical, dimension(:), allocatable sp_heat
double precision, dimension(:), allocatable ro_g
double precision, dimension(:), allocatable rop_g
double precision, parameter gas_const_cal
double precision, parameter zero
logical, dimension(dim_m) usr_cps
double precision, dimension(:), allocatable c_pg
double precision dil_factor_vsd
logical report_neg_specificheat