Problem with parallel computing when employing two solids

I am doing CFD-DEM simulations of a fluidized bed with water and two different kinds of solid particles (same size but different density). I have recently started using WSL to do parallel simulations and in general it works. The only case in which it does not work is when I employ two kinds of solids AND the Hertzian contact model. I get this error right at the beginning of the simulation:

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

If I either build the solver without the --smp option or use the Hookean contact model or use only one kind of particles the simulation works fine.

I am attaching an example which, for me, works fine if all the particles have a density of 2500 kg/m3, but stops working if I change the density of even only a couple of them to 10800 (which is how they are in the attached particle_input.dat file). However, I get the same error even if I try to feed the particles in other ways, such as from the top through a boundary condition.

fb-mono_2021-03-12T183828.854182.zip (5.1 MB)

Thanks in advance!
Filippo

I actually came across the same issue a few days ago and I fixed the bug. This will be available in the next 21.1 release towards the end of March. If you can’t wait for the release, you can make the change locally:
1)Edit model/des/calc_force_des.f and locate the omp directives starting line 99.
2)Remove hert_kn and hert_kt form the list of private variables and add then to the list of shared variables.
3) Make sure you build and run with the custom solver, not the default solver.

20.4 version:

!$omp parallel default(none) private(pos,rad,cc,cc_start,cc_end,ll,i, &
!$omp overlap_n,vrel_t,v_rel_trans_norm,sqrt_overlap,dist,r_lm, &
!$omp kn_des,kt_des,hert_kn,hert_kt,phasell,phasei,etan_des, &
!$omp etat_des,fn,ft,overlap_t,tangent,mag_overlap_t, &
!$omp eq_radius,distapart,force_coh,dist_mag,NORMAL,ftmd,fnmd, &
!$omp dist_cl, dist_ci, fc_tmp, tow_tmp, tow_force, qq_tmp) &
!$omp shared(max_pip,neighbors,neighbor_index,des_pos_new,des_radius, &
!$omp des_coll_model_enum,kn,kt,pft_neighbor,pijk, &
!$omp des_etan,des_etat,mew,use_cohesion, calc_cond_des, dtsolid, &
!$omp van_der_waals,vdw_outer_cutoff,vdw_inner_cutoff, &
!$omp hamaker_constant,asperities,surface_energy, optflag1, &
!$omp start_index, end_index, &

Bug fix:

!$omp parallel default(none) private(pos,rad,cc,cc_start,cc_end,ll,i, &
!$omp overlap_n,vrel_t,v_rel_trans_norm,sqrt_overlap,dist,r_lm, &
!$omp kn_des,kt_des,phasell,phasei,etan_des, &
!$omp etat_des,fn,ft,overlap_t,tangent,mag_overlap_t, &
!$omp eq_radius,distapart,force_coh,dist_mag,NORMAL,ftmd,fnmd, &
!$omp dist_cl, dist_ci, fc_tmp, tow_tmp, tow_force, qq_tmp) &
!$omp shared(max_pip,neighbors,neighbor_index,des_pos_new,des_radius, &
!$omp des_coll_model_enum,kn,kt,pft_neighbor,pijk,hert_kn,hert_kt, &
!$omp des_etan,des_etat,mew,use_cohesion, calc_cond_des, dtsolid, &
!$omp van_der_waals,vdw_outer_cutoff,vdw_inner_cutoff, &
!$omp hamaker_constant,asperities,surface_energy, optflag1, &
!$omp start_index, end_index, &

2 Likes

Thanks a lot Jeff! I can confirm this solved the problem.

Where can I find that variable list and documentation about it?
I need to implement for TFM 2D and 3D approach.