Hello researchers. How can I view the code of the coarse-grained model?
The calculations are not in a single place, they are spread throughout the code. Although we use the term “CGP” in the documentation and the user interface, inside the MFiX solver it is referred to as “CGDEM”. So doing grep -ir CGDEM
results in this:
model/cartesian_grid/cartesian_grid_init_namelist.f:! <description>Write Lagrangian (DEM, CGDEM, PIC) reaction rates in region. Particle/parcel data is
model/cartesian_grid/cartesian_grid_init_namelist.f:! <description>Write particle/parcel (DEM, CGDEM, PIC) reaction rates in region.</description>
model/cartesian_grid/vtk_mod.f:! Particle diameter (Parcel diameter for PIC, Coarse grain diameter for CGDEM)
model/cartesian_grid/vtk_mod.f:! Particle physical diameter for CGDEM
model/cartesian_grid/vtk_mod.f:! Particle statistical weight for CGDEM
model/check_data/check_bc_dem.f: use discretelement, only: CGDEM,CGP_STAT_WT,CGP_SCALING_METHOD
model/check_data/check_bc_dem.f: use discretelement, only: CGDEM,CGP_STAT_WT,CGP_SCALING_METHOD
model/check_data/check_bc_dem.f:! Resizing the PSD for CGDEM
model/check_data/check_bc_dem.f: IF(CGDEM .and. .not. MPPIC.and.TRIM(BC_PSD_TYPE(BCV,M))/='MONO') THEN
model/check_data/check_boundary_conditions.f: use discretelement, only: DISCRETE_ELEMENT, CGDEM
model/check_data/check_boundary_conditions.f: IF(DISCRETE_ELEMENT.OR.CGDEM) THEN
model/check_data/check_boundary_conditions.f: IF(DISCRETE_ELEMENT.OR.CGDEM) THEN
model/check_data/check_output_control.f:! Particle data (DEM, CGDEM, PIC): each particle store its own rates.
model/check_data/check_solids_common_discrete.f:! for CGDEM CHECK
model/check_data/check_solids_common_discrete.f: use discretelement, only: CGDEM, cgp_stat_wt,cgp_d_p0, cgp_scaling_method
model/check_data/check_solids_common_discrete.f: IF(CGDEM .and. .not. MPPIC) THEN
model/check_data/check_solids_common_discrete.f:! Resizing the PSD for CGDEM
model/check_data/check_solids_common_discrete.f: IF(CGDEM .and. .not. MPPIC.and.TRIM(IC_PSD_TYPE(ICV,M))/='MONO'.and.CGP_SCALING_METHOD(M)==1) THEN
model/check_data/check_solids_model_prereqs.f:! Flag: Use CGDEM E-L model
model/check_data/check_solids_model_prereqs.f: use discretelement, only: CGDEM
model/check_data/check_solids_model_prereqs.f:! Set the CGDEM runtime flag.
model/check_data/check_solids_model_prereqs.f: CGDEM = CGP_SOLIDS
model/chem/stiff_chem_dpm.f90: use discretelement, only: CGDEM, DES_CGP_RPR, DES_CGP_STW
model/chem/stiff_chem_dpm.f90: if(CGDEM) DES_CGP_RPR(pid) = rad_p(pid) / DES_CGP_STW(pid)**third
model/des/calc_gamma_des.f: if(CGDEM) then
model/des/des_allocate_mod.f: IF (CGDEM) Allocate( DES_CGP_STW (MAX_PIP) )
model/des/des_allocate_mod.f: IF (CGDEM) Allocate( DES_CGP_RPR (MAX_PIP) )
model/des/des_allocate_mod.f: IF(CGDEM) call real_grow(des_cgp_stw,new_size)
model/des/des_allocate_mod.f: IF(CGDEM) call real_grow(des_cgp_rpr,new_size)
model/des/des_psd_mod.f:! CGDEM
model/des/des_psd_mod.f: use discretelement, only: CGDEM, cgp_stat_wt, cgp_scaling_method, SuperDEM, sqp_vol
model/des/des_psd_mod.f:! Resizing the PSD for CGDEM
model/des/des_psd_mod.f: IF(CGDEM .and. .not. MPPIC) THEN
model/des/des_reaction_model.f: USE discretelement, only: CGDEM, DES_CGP_RPR, DES_CGP_STW
model/des/des_reaction_model.f: if(CGDEM) DES_CGP_RPR(NN) = DES_RADIUS(NN) / DES_CGP_STW(NN)**o3
model/des/des_thermo_cond_mod.f: if(CGDEM) Q_pfp = Q_pfp*DES_RADIUS(I)/DES_CGP_RPR(I)
model/des/des_thermo_cond_mod.f: if(CGDEM) Q_pp = Q_pp * DES_CGP_STW(I)**(17.0D0/12.0D0)
model/des/des_thermo_cond_mod.f: if(CGDEM) Q_pfw = Q_pfw*DES_RADIUS(I)/DES_CGP_RPR(I)
model/des/des_thermo_cond_mod.f: if(CGDEM) Q_pw = Q_pw * DES_CGP_STW(I)**(17.0D0/12.0D0)
model/des/des_thermo_conv.f: if(CGDEM) then
model/des/des_thermo_conv.f: Use discretelement, only: DES_RADIUS, DES_CGP_RPR, DES_CGP_STW, CGDEM
model/des/des_thermo_conv.f: if (CGDEM) then
model/des/discretelement_mod.f: LOGICAL :: CGDEM = .FALSE.
model/des/drag_gp_des.f: IF(CGDEM) DPM = 2.0d0*DES_CGP_RPR(NP)
model/des/generate_particles_mod.f: elseif(CGDEM.and.cgp_scaling_method(m)==2) then
model/des/generate_particles_mod.f: if(CGDEM.and.cgp_scaling_method(m)==2) phase_max_dia = cgp_d_p0(m)
model/des/generate_particles_mod.f: IF(CGDEM) THEN
model/des/generate_particles_mod.f: use discretelement, only: cgdem, des_cgp_stw, des_cgp_rpr
model/des/generate_particles_mod.f: IF(CGDEM) THEN
model/des/mass_inflow_dem.f: if(CGDEM) then
model/des/mpi_init_des_mod.f: IF(CGDEM) THEN
model/des/mpi_init_des_mod.f:! set the packet size for transfer, pos/vel + density/radius + statwt + real_particle_radius (if CGDEM)
model/des/mpi_init_des_mod.f: if(CGDEM) lpacketsize = lpacketsize + 2
model/des/mpi_init_des_mod.f: if(CGDEM) then
model/des/mpi_init_des_mod.f: if(CGDEM) then
model/des/mpi_pack_des_mod.f: IF(CGDEM) &
model/des/mpi_pack_des_mod.f: IF(CGDEM) &
model/des/mpi_pack_des_mod.f: IF(CGDEM) &
model/des/mpi_pack_des_mod.f: IF(CGDEM) &
model/des/mpi_unpack_des_mod.f: IF(CGDEM) &
model/des/mpi_unpack_des_mod.f: IF(CGDEM) &
model/des/mpi_unpack_des_mod.f: IF(CGDEM) &
model/des/mpi_unpack_des_mod.f: IF(CGDEM) &
model/des/mpi_unpack_des_mod.f: IF(CGDEM) call unpack_dbuf(lbuf,des_cgp_stw(llocpar),pface)
model/des/mpi_unpack_des_mod.f: IF(CGDEM) call unpack_dbuf(lbuf,des_cgp_rpr(llocpar),pface)
model/des/read_particle_input.f:! Statistical weight, radius and physical radius (CGDEM only)
model/des/read_particle_input.f: if(CGDEM) then
model/des/read_particle_input.f:! Statistical weight, radius and physical radius (CGDEM only)
model/des/read_particle_input.f: if(CGDEM) then
model/des/read_particle_input.f:! Statistical weight, radius and physical radius (CGDEM only)
model/des/read_particle_input.f: if(CGDEM) then
model/des/read_particle_input.f: ! CGDEM specific variables
model/des/read_particle_input.f: IF(CGDEM) THEN
model/des/read_particle_input.f: ! CGDEM model specific variable --> cgp statistical weight
model/des/read_particle_input.f:! For CGDEM, look for cgp_stat_wt
model/des/read_particle_input.f: ELSE IF(index(TRIM(header_array(i)), 'cgp_stat_wt') /= 0 .AND. CGDEM) THEN
model/des/read_particle_input.f: IF(CGDEM) no_found_columns = 9 + 1 + dimension_n_s + des_usr_var_size + 1 - expect_n_vars
model/des/read_particle_input.f: IF(.NOT. found_cgp_stat_wt .and. CGDEM) THEN
model/des/read_particle_input.f: IF(CGDEM) THEN
model/des/read_particle_input.f: ! for CGDEM, this value is used to replace D_P0, not CG_D_P0
model/des/read_particle_input.f:! Statistical weight, radius and physical radius (CGDEM only)
model/des/read_particle_input.f: IF(CGDEM) THEN
model/des/read_particle_input.f:! CGDEM specific
model/des/read_particle_input.f: IF(CGDEM) THEN
model/des/read_res0_des.f: IF(CGDEM) CALL READ_RES_pARRAY(lNEXT_REC, DES_CGP_STW)
model/des/read_res0_des.f: IF(CGDEM) CALL READ_RES_pARRAY(lNEXT_REC, DES_CGP_RPR)
model/des/set_bc_dem_mi.f: if(CGDEM.and.cgp_scaling_method(m)==2) max_dia = max(max_dia,cgp_d_p0(m))
model/des/set_bc_dem_mi.f: elseif(CGDEM.and.cgp_scaling_method(m)==2) then
model/des/set_phase_index.f: use discretelement, only: CGDEM, cgp_stat_wt, GluedSphereDEM, GENER_PART_CONFIG
model/des/set_phase_index.f:! Correction for CGDEM particle size
model/des/set_phase_index.f: IF(CGDEM) THEN
model/des/vtp_mod.f: USE discretelement, only: CGDEM, DES_CGP_RPR, DES_CGP_STW
model/des/vtp_mod.f: IF(CGDEM) THEN
model/des/vtp_mod.f: IF(CGDEM) THEN
model/des/write_des_data.f: use discretelement, only: CGDEM, DES_CGP_RPR, DES_CGP_STW
model/des/write_des_data.f: IF(CGDEM) THEN
model/des/write_res0_des.f: IF(CGDEM) THEN
model/mfix.f: IF(CGDEM) CALL UPDATE_TIME_STEP_INFO_FLOAT(13,ELAPSED_WALLTIME)
model/mfix.f: CASE('CGDEM')
model/output_manager.f:! Wall time Fluid(10), DEM(11), PIC(12), CGDEM(13)
model/output_manager.f:! 13 = CGDEM loop Wall time
model/output_manager.f: TSSH(13) = ' CGDEM '
model/output_manager.f:! 15 = DEM/PIC/CGDEM/SQP iterations