36 INTEGER :: I, J, K, IJK, &
38 INTEGER :: I1, I2, J1, J2, K1, K2
43 INTEGER :: IW, IE, JS, JN, KB, KTP
46 INTEGER,
DIMENSION(3):: PCELL
53 DOUBLE PRECISION :: AVG_FACTOR
59 DOUBLE PRECISION :: WTP
61 DOUBLE PRECISION :: MASS_SOL1, MASS_SOL2
63 DOUBLE PRECISION :: MASS_SOL1_ALL, MASS_SOL2_ALL
65 DOUBLE PRECISION :: TEMP1, TEMP2
67 DOUBLE PRECISION,
DIMENSION(3) :: DES_VEL_DENSITY
68 DOUBLE PRECISION :: DES_ROP_DENSITY
70 INTEGER :: COUNT_NODES_OUTSIDE, COUNT_NODES_INSIDE, &
71 COUNT_NODES_INSIDE_MAX
75 DOUBLE PRECISION :: NORM_FACTOR
78 DOUBLE PRECISION,
DIMENSION(2,2,2,3) :: gst_tmp
79 DOUBLE PRECISION,
DIMENSION(2,2,2) :: weight_ft
91 avg_factor = merge(0.5d0, 0.25d0,
no_k)
94 count_nodes_inside_max = merge(4, 8,
no_k)
96 mmax_tot = des_mmax+
mmax 122 IF(.NOT.fluid_at(ijk)) cycle
123 IF( pinc(ijk) == 0) cycle
125 pcell(1) =
i_of(ijk)-1
126 pcell(2) =
j_of(ijk)-1
127 pcell(3) = merge(
k_of(ijk)-1, 1,
do_k)
132 interp_scheme, dimn, ordernew=onew)
134 count_nodes_outside = 0
136 DO k=1, merge(1, onew,
no_k)
142 cur_ijk = funijk_map_c(ii,jj,kk)
143 gst_tmp(i,j,k,1) = xe(ii)
144 gst_tmp(i,j,k,2) = yn(jj)
145 gst_tmp(i,j,k,3) = merge(dz(1), zt(kk),
no_k)
148 count_nodes_outside = count_nodes_outside + 1
159 DO nindx=1, pinc(ijk)
160 np =
pic(ijk)%P(nindx)
167 mass_sol1 = mass_sol1 + pmass(np)*wtp
168 temp2 = pmass(np)*wtp
169 DO k = 1, merge(1, onew,
no_k)
176 cur_ijk = funijk_map_c(ii,jj,kk)
177 temp1 = weight_ft(i,j,k)*temp2
179 des_rops_node(cur_ijk,m) = des_rops_node(cur_ijk,m) + &
181 des_vel_node(cur_ijk,:,m) = des_vel_node(cur_ijk,:,m) + &
182 temp1*des_vel_new(np,:)
202 count_nodes_inside = count_nodes_inside_max - &
205 IF(count_nodes_inside.LT.count_nodes_inside_max)
THEN 222 k1 = merge(k, k-1,
no_k)
230 ijk2 = funijk(ii, jj, kk)
232 DO m =
mmax+1,mmax_tot
233 resid_rops(m) = resid_rops(m) + &
234 des_rops_node(ijk2,m)
235 des_rops_node(ijk2,m) =
zero 237 DO idim = 1, merge(2,3,
no_k)
238 resid_vel(idim,m) = resid_vel(idim, m) + &
239 des_vel_node(ijk2,idim, m)
240 des_vel_node(ijk2,idim, m) =
zero 249 norm_factor =
one/
REAL(count_nodes_inside)
253 ijk2 = funijk(ii, jj, kk)
255 DO m =
mmax+1,mmax_tot
256 des_rops_node(ijk2,m) = &
257 des_rops_node(ijk2,m) + &
258 resid_rops(m)*norm_factor
259 DO idim = 1, merge(2,3,
no_k)
260 des_vel_node(ijk2,idim, m) = &
261 des_vel_node(ijk2,idim, m) + &
262 resid_vel(idim, m)*norm_factor
321 DO m =
mmax+1, mmax_tot
322 des_rop_density = des_rops_node(ijk, m)/
vol_surr(ijk)
323 des_vel_density(:) = des_vel_node(ijk, :, m)/
vol_surr(ijk)
325 DO kk = k, merge(k+1, k,
do_k)
330 ijk2 = funijk_map_c(ii, jj, kk)
331 IF(fluid_at(ijk2).and.(is_on_mype_wobnd(ii, jj, kk)))
THEN 339 IF(
do_k)
w_s(ijk2, m) =
w_s(ijk2, m) + des_vel_density
356 IF(.NOT.fluid_at(ijk)) cycle
357 DO m =
mmax+1, mmax_tot
401 IF(.NOT.fluid_at(ijk)) cycle
406 IF(is_on_mype_wobnd(i,j,k))
THEN 408 mass_sol2 = mass_sol2 + &
416 WRITE(*,
'(/,5x,A,4(2x,g17.8),/)') &
417 'SOLIDS MASS DISCRETE AND CONTINUUM = ', &
418 mass_sol1_all, mass_sol2_all
443 DOUBLE PRECISION,
DIMENSION(2,2,2,3),
INTENT(IN):: GSTEN
444 DOUBLE PRECISION,
DIMENSION(3),
INTENT(IN):: DESPOS
445 DOUBLE PRECISION,
DIMENSION(2,2,2),
INTENT(OUT) :: WEIGHTFACTOR
446 INTEGER :: II, JJ, KK
448 DOUBLE PRECISION,
DIMENSION(2) :: XXVAL, YYVAL, ZZVAL
449 DOUBLE PRECISION :: DXX, DYY, DZZ
450 DOUBLE PRECISION,
DIMENSION(3) :: ZETAA
452 dxx = gsten(2,1,1,1) - gsten(1,1,1,1)
453 dyy = gsten(1,2,1,2) - gsten(1,1,1,2)
455 zetaa(1:2) = despos(1:2) - gsten(1,1,1,1:2)
457 zetaa(1) = zetaa(1)/dxx
458 zetaa(2) = zetaa(2)/dyy
468 weightfactor(ii,jj,1) = xxval(ii)*yyval(jj)
472 dzz = gsten(1,1,2,3) - gsten(1,1,1,3)
473 zetaa(3) = despos(3) - gsten(1,1,1,3)
474 zetaa(3) = zetaa(3)/dzz
480 weightfactor(ii,jj,kk) = xxval(ii)*yyval(jj)*zzval(kk
double precision, dimension(:,:), allocatable v_s
double precision, dimension(:), allocatable vol_surr
integer, dimension(:), allocatable i_of
subroutine des_addnodevalues_mean_fields()
double precision, parameter one
double precision, dimension(:,:), allocatable w_s
subroutine, public set_interpolation_stencil(PC, IW, IE, JS, JN, KB, KTP, isch, dimprob, ordernew)
character(len=3), dimension(dim_m) solids_model
subroutine comp_mean_fields0
double precision, dimension(:,:), allocatable u_s
logical des_report_mass_interp
subroutine drag_weightfactor(GSTEN, DESPOS, WEIGHTFACTOR)
integer, dimension(:), allocatable k_of
logical, dimension(:,:,:), allocatable dead_cell_at
integer, dimension(:), allocatable j_of
subroutine mppic_comp_eulerian_vels_non_cg
subroutine mppic_comp_eulerian_vels_cg
subroutine, public set_interpolation_scheme(choice)
logical, dimension(:), allocatable scalar_node_atwall
double precision, dimension(:,:), allocatable rop_s
type(iap1), dimension(:), allocatable pic
double precision, dimension(:), allocatable vol
double precision, dimension(:), allocatable des_stat_wt
double precision, parameter zero