-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new tutorial (packingPolydisperse) added.
- Loading branch information
1 parent
ff3d2af
commit 123841d
Showing
8 changed files
with
231 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,5 +30,6 @@ function User_Mark( id, flag, ptype, dpos ) result (mark) | |
|
||
|
||
return | ||
|
||
|
||
|
||
end function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
!-------------- cemfDEM code: a dem simulation code ---------------------------- | ||
! D C enter of | ||
! D M E ngineering and | ||
! D M M ultiscale modeling of | ||
! D M F luid flow | ||
! EEEEEEEEM .ir | ||
!------------------------------------------------------------------------------ | ||
! Copyright (C): cemf | ||
! website: www.cemf.ir | ||
!------------------------------------------------------------------------------ | ||
! This file is part of cemfDEM code. It is a free software for simulating | ||
! granular flow. You can redistribute it and/or modify it under the terms of | ||
! GNU General Public License version 3 or any other later versions. | ||
! | ||
! cemfDEM code is distributed to help others in their research in the field | ||
! of granular flow, but WITHOUT ANY WARRANTY; without even the implied | ||
! warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
!------------------------------------------------------------------------------ | ||
|
||
subroutine ProgramDefinedGeometry( Geom ) | ||
use g_Geometry | ||
use g_Line | ||
implicit none | ||
class(Geometry),intent(in):: Geom | ||
|
||
!// locals | ||
type(real3) p1, p2, p3, p4 | ||
type(PlaneWall) plane | ||
type(CylinderWall) cyl | ||
logical res | ||
|
||
! Creates a cylindrical shell with radius 7.5 cm and length 20 cm whose main axis is y-axis. | ||
! the property type is 1 | ||
! the user_id of this shell wall is 1 | ||
res = cyl%CreateCylinder( 0.075_RK, 0.075_RK, p_line( real3(0.0, 0.0, 0.0), real3(0.0,0.2,0.0) ),24, 1, 1 ) | ||
call Geom%add_Cylinder( cyl ) | ||
|
||
|
||
! a plane with width of 15 cm with normal vector of (0,1,0). | ||
! this plane is placed at the bottom of the cylinder shell. | ||
! the property type is 1 | ||
! the user_id of this plane is 1 | ||
p1 = real3( -0.075, 0, -0.075) | ||
p2 = real3( -0.075, 0, 0.075) | ||
p3 = real3( 0.075, 0, 0.075) | ||
p4 = real3( 0.075, 0, -0.075) | ||
call Geom%add_PlaneWall( p1, p2, p3, p4, 1, 1 ) | ||
|
||
|
||
end subroutine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
!-------------- cemfDEM code: a dem simulation code ---------------------------- | ||
! D C enter of | ||
! D M E ngineering and | ||
! D M M ultiscale modeling of | ||
! D M F luid flow | ||
! EEEEEEEEM .ir | ||
!------------------------------------------------------------------------------ | ||
! Copyright (C): cemf | ||
! website: www.cemf.ir | ||
!------------------------------------------------------------------------------ | ||
! This file is part of cemfDEM code. It is a free software for simulating | ||
! granular flow. You can redistribute it and/or modify it under the terms of | ||
! GNU General Public License version 3 or any other later versions. | ||
! | ||
! cemfDEM code is distributed to help others in their research in the field | ||
! of granular flow, but WITHOUT ANY WARRANTY; without even the implied | ||
! warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
!------------------------------------------------------------------------------ | ||
|
||
function User_Mark( id, flag, ptype, dpos ) result (mark) | ||
use g_TypeDef | ||
implicit none | ||
|
||
integer(IK),intent(in):: id, flag, ptype | ||
type(real4),intent(in):: dpos | ||
integer(IK) mark | ||
|
||
|
||
mark = 1 | ||
|
||
|
||
return | ||
|
||
|
||
end function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
!-------------- cemfDEM code: a dem simulation code ---------------------------- | ||
! D C enter of | ||
! D M E ngineering and | ||
! D M M ultiscale modeling of | ||
! D M F luid flow | ||
! EEEEEEEEM .ir | ||
!------------------------------------------------------------------------------ | ||
! Copyright (C): cemf | ||
! website: www.cemf.ir | ||
!------------------------------------------------------------------------------ | ||
! This file is part of cemfDEM code. It is a free software for simulating | ||
! granular flow. You can redistribute it and/or modify it under the terms of | ||
! GNU General Public License version 3 or any other later versions. | ||
! | ||
! cemfDEM code is distributed to help others in their research in the field | ||
! of granular flow, but WITHOUT ANY WARRANTY; without even the implied | ||
! warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
!------------------------------------------------------------------------------ | ||
|
||
program main | ||
|
||
use g_DEMSystem | ||
use g_stl_reader | ||
use g_Prtcl_PureProperty | ||
implicit none | ||
|
||
integer(IK) i | ||
real(RK) Y, pr, G | ||
logical res | ||
type(real3) minDomain, maxDomain | ||
type(PS_Distribution), pointer:: PSD | ||
type(PSD_Property), pointer:: PSDP | ||
class(PhysicalProperty),pointer:: Property | ||
class(Geometry), pointer:: geom | ||
type(real3) p1, p2, p3, p4 | ||
type(PlaneWall) insPlane | ||
type(PureProperty) prop | ||
type(DEMS_Options) DEM_opt | ||
type(DEMSystem) DEM | ||
|
||
!//// Initial settings | ||
|
||
! options and settings for DEM simulation | ||
DEM_opt%gravity = real3( 0.0, -9.8 , 0.0 ) | ||
DEM_opt%SaveFreq = 1000 | ||
DEM_opt%RunName = "PackingBinary" | ||
DEM_opt%Res_Dir = "./Results/" | ||
DEM_opt%OutputFileType = OP_Type_VTK !+ OP_Type_Tec | ||
DEM_opt%CT_model = CTM_ConstantTorque | ||
DEM_opt%CF_Type = CFT_LSD_l | ||
DEM_opt%CS_Method = CSM_NBS_Munjiza_Hrchl ! for a system with size distribution | ||
DEM_opt%PI_Method = PIM_AB3AM4 | ||
DEM_opt%PRI_Method= PIM_AB3AM4 | ||
|
||
!//// properties of particles and walls | ||
Y = 1000000.0_RK ! Young's modulus | ||
pr = 0.23_RK ! Poisson's ratio | ||
G = Y/(2*(1+pr)) ! shear modulus | ||
call prop%set_prop(2500.0_RK, Y , G , pr , 0.0_RK) | ||
|
||
!//// particles | ||
allocate(PSD) | ||
|
||
! bimodal particles with d1 = 7 mm and d2 = 3.5 mm | ||
! total number of particles is (7+8)*1000 = 15K | ||
!PSD = (PS_Distribution( 7 , PSD_Uniform, 1 , 0.007_RK, 0.007_RK ) + & | ||
! PS_Distribution( 8 , PSD_Uniform, 1 , 0.0035_RK, 0.0035_RK ) ) * 1000 | ||
|
||
!particles with uniform size distribution | ||
!Size range of particles is between 3 and 7.5 mm which are classified into 5 bins | ||
PSD = PS_Distribution( 15000 , PSD_Uniform, 5 , 0.003_RK, 0.0075_RK ) | ||
|
||
! associates particle size distribution with a property set | ||
allocate(PSDP) | ||
PSDP = PSD_Property( PSD , prop ) | ||
deallocate(PSD) | ||
|
||
!// main components of DEM system | ||
!//// geometry | ||
allocate(geom) | ||
call ProgramDefinedGeometry(geom) | ||
|
||
!//// Property | ||
allocate( Property ) | ||
call Property%ParticleProperty( PSDP ) ! particles | ||
call Property%WallProperty(1 , (/prop/) ) ! walls | ||
call Property%PP_BinaryProp(DEM_opt, 0.2_RK, 0.1_RK, 0.8_RK, 0.8_RK) ! binary pp | ||
call Property%PW_BinaryProp(DEM_opt, 0.3_RK, 0.1_RK, 0.8_RK, 0.8_RK) ! binary pw | ||
|
||
!//// DEM system with particle insertion | ||
! simulation domain | ||
minDomain = real3(-0.077, -0.01, -0.077) | ||
maxDomain = real3( 0.077 , 0.21 , 0.077) | ||
|
||
! insertion plane | ||
p1 = real3(-0.05, 0.18, -0.05) | ||
p2 = real3(-0.05, 0.18, 0.05) | ||
p3 = real3( 0.05, 0.18, 0.05) | ||
p4 = real3( 0.05, 0.18, -0.05) | ||
res = insPlane%CreateWall_nv(p4,p3,p2,p1) | ||
|
||
! initializes DEM system, dt = 0.00001 sec, particles are inserted in 150k iterations with initial velocity of 0.3 m | ||
call DEM%Initialize( 0.00001_RK, PSDP, insPlane, 150000 , 0.3_RK ,geom, Property, minDomain, maxDomain, DEM_opt ) | ||
|
||
|
||
!//// iteration loop for 2.5 seconds | ||
call DEM%iterate(250000) | ||
|
||
|
||
end program |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.