2-DEM UDEC Course-Examples PDF
2-DEM UDEC Course-Examples PDF
EXAMPLES - 1
2 16
return
tunnel 0,0
round 0.1
new
; File: Geom_2.dat
File Geom_2.dat
return
;print blocks
;print contact
;print max
round 0.1
new
; File: Geom_1.dat
File Geom_1.dat
EXAMPLES - 2
...
table 5 (-2,0) &
(-2,5) &
(-1.848,5.765) &
(-1.414,6.414) &
(-0.765,6.848) &
(0.0,7.0) &
(0.765,6.848) &
(1.414,6.414) &
(1.848,5.765) &
(2,5) &
(2,0) &
(-2,0)
; File: Geom_3a.dat
new
round 0.01
return
return
;print max
;delete area 1e-2
plot block hold
0 0 50 0 0 0 3 0
90 0 50 0 0 0 3.5 0
30 0 50 0 0 0 4 0
50 0 50 0 0 0 6 0
jset
jset
jset
jset
;print max
;delete area 3e-2
block 0 0 0 20 20 20 20 0
round 0.1
block 0,0 0,10 10,10 10,0
; File: Geom_5.dat
new
; File: Geom_4.dat
new
File Geom_5.dat
File Geom_4.dat
...
return
round 0.1
File Geom_3b.dat
File Geom_3a.dat
EXAMPLES - 3
return
-2,0 -2,5
-2,0 2,0
2,0 2,5
-5,15 5,-10
return
crack
crack
crack
crack
round 0.01
block -10,-10 -10,15 10,15 10,-10
; File: Geom_9.dat
new
; File: Geom_8.dat
new
round 0.01
File Geom_9.dat
return
File Geom_8.dat
return
jset 0 0 3 1 .25 .2 .5 .2
jset 70 0 3 1 .25 .2 .5 .2
round .01
block cir 0 0 5 40
round 0.1
; File: Geom_7.dat
new
; File: Geom_6.dat
new
File Geom_7.dat
File Geom_6.dat
EXAMPLES - 4
-2,0 -2,5
-2,0 2,0
2,0 2,5
-5,15 5,-10
return
;print max
;print zone
;print grid
crack
crack
crack
crack
round 0.01
block -10,-10 -10,15 10,15 10,-10
new
; File: Geom_12.dat
File Geom_12.dat
return
-2,0 -2,5
-2,0 2,0
2,0 2,5
-5,15 5,-10
Geom_13.dat is similar to Geom_12.dat, this time the command gen quad... is issued
to attempt to produce a quadrilateral (mapped) mesh. The meshing process fails for
some regions.
...
crack
crack
crack
crack
...
File Geom_13.dat
;print max
;print zone
;print grid
;print max
;print zone
;print grid
round 0.01
block 0,0 0,10 25,10 25,0
round 0.01
; File: Geom_11.dat
new
; File: Geom_10.dat
new
File Geom_11.dat
File Geom_10.dat
EXAMPLES - 5
36
tunnel 0,0
...
round 0.01
return
...
gen edge 0.5 range -12,12 -12,12
gen edge 1.0
; File: Geom_Tunnel.dat
new
File Geom_Tunnel.dat
EXAMPLES - 6
...
round 0.01
return
...
gen edge 2.0 range -50,50 -12,12
gen edge 4.0
; File: Geom_Slope.dat
new
File Geom_Slope.dat
EXAMPLES - 7
mat
mat
mat
mat
6
6
6
6
dens 2600
shear 0.80e9 bulk 1.33e9
cohe 1e6 fric 35.0
tens 0.1e6 dil 17.5
...
prop
prop
prop
prop
...
File Mat_1.dat
EXAMPLES - 8
jmat
jmat
jmat
jmat
jmat
2
2
2
2
2
...
prop
prop
prop
prop
prop
change jmat 1
change jmat 2 range angle -69.2,-67.2
change jcons 2
change jcons 5 range angle -69.2,-67.2
...
File Mat_2.dat
EXAMPLES - 9
return
...
jmat
jmat
jmat
jmat
1
2 range angle -69.2,-67.2
3 range id 10
4 range id 20
...
change
change
change
change
change jcons 2
round 0.01
block -10,-10 -10,15 10,15 10,-10
new
; File: Mat_3.dat
EXAMPLES - 10
EXAMPLES - 11
return
;print zone
;print grid
round 0.01
new
; File: Bound_1.dat
File Bound_2.dat
File Bound_1.dat
EXAMPLES - 12
return
print blocks
print rigid
round 0.01
new
; File: Bound_3.dat
return
;print zone
;print grid
round 0.01
new
; File: Bound_2.dat
File Bound_4.dat
File Bound_3.dat
EXAMPLES - 13
return
print blocks
print rigid
round 0.01
new
; File: Bound_4.dat
EXAMPLES - 14
xvel
xvel
yvel
yvel
0.0
0.0
0.0
0.0
range
range
range
range
xrange
xrange
yrange
yrange
-10.01,-9.99
9.99,10.01
-10.01,-9.99
14.99,15.01
return
plot block sxx fill bou xcond bou ycond block hold
;plot block syy fill block zone yellow hold
;plot stress hold
bound
bound
bound
bound
...
round 0.01
block -10,-10 -10,15 10,15 10,-10
new
; File: Init_1.dat
Initialization of stresses
File Init_2.dat
File Init_1.dat
EXAMPLES - 15
info
zone stress
zone principal
contact stress
...
plot block sxx fill bou xcond bou ycond block hold
;plot block syy fill block zone yellow hold
;plot stress hold
;print
;print
;print
;print
...
EXAMPLES - 16
File Comp_1.dat
EXAMPLES - 17
...
his ncyc 1
change mat 1
prop mat 1 dens 2000 bulk 0.667e9 shear 0.4e9
change cons 1
round 0.01
block zone block mag 100 red disp yellow his hold
his 1 hold
his 2 hold
his 3 hold
return
;his write 1
;his write 2 history_2.his
;his write 3 history_3.his
plot
plot
plot
plot
solve
;cycle 500
;step 500
label hist 2
** Y displacement **
...
label hist 1
** Unbalanced force **
new
title
Analysis of sample model
; File: Comp_1.dat
EXAMPLES - 18
Loading of blocks.
Validation of constitutive material models.
...
round 0.01
new
; File: Model_A1.dat
File Model_A1.dat
EXAMPLES - 19
solve
return
plot
plot
plot
plot
File Model_A3.dat
Model_A2.dat is similar to Model_A1.dat, this time a Mohr-Coulomb material with zero cohesion
is assigned to the block, as a result the zones in the block undergo plastic failure and no
equilibrium state is possible.
...
round 0.01
; File: Model_A2.dat
new
ncyc 1
unbal
ydisp 0.5,1.0
syy 0.25,0.6
...
File Model_A2.dat
his
his
his
his
EXAMPLES - 20
File Model_A4.dat
DEF _mech_variables
;
_dens = 2000.0
_young = 1e9
_poiss = 0.25
;
_bulk = _young/3.0/(1.0-2.0*_poiss)
_shear = _young/2.0/(1.0+_poiss)
;
END
_mech_variables
new
ncyc 1
unbal
ydisp 0.5,1.0
syy 0.25,0.6
...
cycle nsteps_to_run
his
his
his
his
DEF _compute_applied_velocity
nsteps_to_run = 2000
_time_step = tdel ; <-- tdel is the 'time-step' internal variable
_desired_ydisp = 0.01
_applied_yvel = -_desired_ydisp/float(nsteps_to_run*_time_step)
END
_compute_applied_velocity
...
step 0
; File: Model_A3.dat
round 0.01
EXAMPLES - 21
his 1 hold
syy fill zone disp hold
ydisp fill zone disp hold
syy grid 100,100 fill int 0.25e3 zone disp hold
...
...
DEF _numerical_solution
loop i (1,8)
_depth = 1.0-(0.125*0.5+(i-1)*0.125)
_y_target = 1.0-_depth
_pnt = z_near(0.0,_y_target)
_z_y = z_y(_pnt)
_z_syy = z_syy(_pnt)
_z_sxx = z_sxx(_pnt)
ytable(61,i) = -(1.0-_z_y)
xtable(61,i) = -_z_syy
ytable(62,i) = -(1.0-_z_y)
xtable(62,i) = -_z_sxx
end_loop
loop i (1,9)
_depth = 1.0-(i-1)*0.125
_y_target = 1.0-_depth
_pnt = gp_near(0.0,_y_target)
_gp_y = gp_y(_pnt)
_gp_ydis = gp_ydis(_pnt)
ytable(63,i) = -(1.0-_gp_y)
xtable(63,i) = -_gp_ydis
end_loop
END
_numerical_solution
DEF _analytical_solution
_npts = 200
loop i (1,_npts)
_depth = 1.0-float(i-1)/float(_npts-1)
_syy = _gamma*_depth
_sxx = _syy*(_nu)/(1-_nu)
_uy = 0.5*(1+_nu)*(1-2*_nu)/(1-_nu)/_young*_gamma*(1-_depth^2)
ytable(51,i) = -_depth
xtable(51,i) = _syy
ytable(52,i) = -_depth
xtable(52,i) = _sxx
ytable(53,i) = -_depth
xtable(53,i) = _uy
end_loop
END
_analytical_solution
...
...
...
plot
plot
plot
plot
solve
his ncyc 1
his unbal
DEF _mech_variables
_dens = 2000.0
_young = 1e9
_nu = 0.25
_bulk = _young/3.0/(1.0-2.0*_nu)
_shear = _young/2.0/(1.0+_nu)
_grav = 10.0
_grav_NEG = -_grav
_gamma = _grav*_dens
;
END
_mech_variables
...
change mat 1 ; <-- material number for block
prop mat 1 dens _dens bulk _bulk shear _shear
; File: Model_A4.dat
new
round 0.01
block 0,0 0,1 1,1 1,0
EXAMPLES - 22
File Model_A6.dat
return
...
ygrad (10000.0,0,20000.0)
Model_A5.dat is similar to Model_A4.dat, this time the vertical stress is initialized to the
lithostatic stress; as a result, the model is already in equilibrium and when the solve
command is issued, UDEC performs 2 cycles, and exits the computation loop, reporting that
the unbalanced force is below the admissible limit (for equilibrium).
...
solve
his ncyc 1
his unbal
...
File Model_A5.dat
EXAMPLES - 23
change cons 1
change mat 1
File Model_A7.dat
...
change jcons 2
change jmat 1
prop jmat 1 jkn 0.1e9 jks 0.01e9 jfric 30 jcohe 1e20
plot
plot
plot
plot
return
round 0.001
set ovtol 0.1
...
solve
; File: Model_A6.dat
new
EXAMPLES - 24
...
his
his
his
his
his
his ncyc 1
DEF _eps_vol
_eps_vol = _eps_lateral + _eps_axial
END
DEF _eps_lateral
_eps_lateral = ( gp_xdis(_pnt_gp_RIGHT) - gp_xdis(_pnt_gp_LEFT) ) / 1.0
END
DEF _eps_axial
_eps_axial = gp_ydis(_pnt_gp_TOP) / 1.0
END
...
return
plot
plot
plot
plot
...
...
DEF _sig_axial
_sig_axial = z_syy(_pnt_zone_TOP)
END
ygrad (0,0,0)
round 0.01
new
; File: Model_A7.dat
EXAMPLES - 25
ncyc 1
unbal
ydisp 0.5,1.0
syy 0.25,0.6
...
cycle nsteps_load
his
his
his
his
...
plot block zone yellow zone_pp fill disp hold
plot block zone yellow plast disp hold
plot his -3 vs -2 hold
DEF _compute_applied_velocity
command
step 0
end_command
nsteps_load = 1000
nsteps_unload = 500
_time_step = tdel ; <-- tdel is the 'time-step' internal variable
_target_ydisp_load = -4.5e-3
_target_ydisp_unload = 2.25e-3
_yvel_load = _target_ydisp_load/float(nsteps_load*_time_step)
_yvel_unload = _target_ydisp_unload/float(nsteps_unload*_time_step)
END
_compute_applied_velocity
return
print zone pp
...
...
round 0.01
new
; File: Model_A8.dat
File Model_A8.dat
EXAMPLES - 26
File Model_A9.dat
change jcons 2
change jmat 1 range yrange -0.01,0.01
prop jmat 1 jkn 100e6 jks 100e6 jfric 30 jcohe 0.05e6 jdil 15
...
change cons 1
prop mat 1 dens 2000 bulk 6.67e9 shear 4e9
block
crack
crack
crack
round 0.001
set ovtol 0.1
new
; File: Model_A9.dat
EXAMPLES - 27
1
2
3
4
reset his
his ncyc 1
his ndis 0.25,0
his sdis 0.25,0
his nstr 0.25,0
his sstr 0.25,0
;
;
;
;
<-<-<-<-his
his
his
his
1
2
3
4
...
return
his
his
his
his
DEF _compute_applied_velocity
nsteps_shear = 10000
command
step 0
end_command
_time_step = tdel ; <-- tdel is the 'time-step' internal variable
_target_xdisp = 4e-3
_xvel_shear = _target_xdisp/float(nsteps_shear*_time_step)
END
_compute_applied_velocity
<-<-<-<-cycle nsteps_shear
;
;
;
;
plot block zone bou xcond bou ycond zone disp yellow hold
1
0.25,0
0.25,0
0.25,0
0.25,0
step 5000
ncyc
ndis
sdis
nstr
sstr
...
plot block zone bou xcond bou ycond zone disp yellow hold
his
his
his
his
his
...
EXAMPLES - 28
File Model_B_a3.dat
EXAMPLES - 29
File Model_B_b1.dat
File Model_B_b3.dat
File Model_B_b2.dat
EXAMPLES - 30
File Model_B_b4.dat
EXAMPLES - 31
1. Slope Problem
1:
2:
3:
4:
-Stage
-Stage
-Stage
-Stage
EXAMPLES - 32
2. Tunnel Problem A
The problem involves excavation of deep tunnel (i.e., gradient of initial stresses due to
gravity is neglected) in a jointed medium. No support is considered for the tunnel.
EXAMPLES - 33
3. Tunnel Problem B
3. Tunnel Problem B
The problem is similar to the 2. Tunnel Problem A, this time the tunnel has a horseshoe shape (geometry has been defined in an AutoCad .dxf file) and the blocks are
considered to be deformable and to obey a Mohr-Coulomb elasto-plastic model.
The initial stresses correspond to a system of principal stresses rotated 20 degrees
with respect to the horizontal.
EXAMPLES - 34
The problem is similar to 3. Tunnel Problem B. This time rockbolts (or cables) and
shotcrete are considered as reinforcement and support respectively.
In this problem cables and shotcrete are installed just after excavation (i.e., no
relaxation of the rock mass that accounts for the presence of the tunnel front
is considered)
EXAMPLES - 35
The problem is similar to 3. Tunnel Problem B. This time the medium is saturated
with a water pore-pressure value of 10 MPa. The excavation is assumed to be underwater (water is not pumped out from the tunnel during excavation).
The problem is similar to 4. Tunnel with Support. This time the initial stresses are
allowed to relax 30% of their initial values before installation of the cables and
shotcrete. This simulates the beneficial effect of the presence of the tunnel front at the
time of installation of the support. The FISH function zonk.fis provided and
documented in the section Library of FISH Functions of the FISH IN UDEC volume is
used to relax the initial stresses.
EXAMPLES - 36
The problem is similar to 3. Tunnel Problem B. This time the blocks in the medium
are assumed to obey the Hoek-Brown failure criterion for intact rock. The FISH
function hoek.fis provided and documented in the section Library of FISH Functions
of the FISH IN UDEC volume is used to implement the Hoek-Brown failure criterion in
UDEC.
EXAMPLES - 37
return
pause
set _a = 30
set _b = 60
_example_function
print fish
set _a = 10
set _b = 20
_example_function
print fish
pause
DEF _variables_block
;
_x0 = 5.0
_x1 = 19.0
_y0 = 5.0
_y1 = 15.0
;
END
_variables_block
DEF _example_function
_c = _a + _b
END
print fish
; File: Fish_A_a3.dat
new
; File: Fish_A_a2.dat
new
File FISH_A_a3.dat
return
print fish
_example_function
pause
print fish
DEF _example_function
_a = 10
_b = 20
_c = _a + _b
END
File FISH_A_a2.dat
new
; File: Fish_A_a1.dat
File FISH_A_a1.dat
EXAMPLES - 38
return
print _size_table_11
print table 10
print table 11
...
; ------------------------------round 0.01
block 0,0 0,1 1,1 1,0
gen quad 0.5001
change cons 1
change mat 1
prop mat 1 dens 2000 bulk 0.667e9 shear 0.4e9
bound yvel 0.0 range yrange -0.01,0.01
bound stress 0,0,-1e6 range yrange 0.99,1.01
his ncyc 1
his unbal
his ydisp 0.5,1.0
his syy 0.25,0.6
solve
; -------------------------------
; File: Fish_A_b1.dat
new
File FISH_A_b1.dat
...
...
DEF _fill_table_11
;
loop i (1,5)
_xvalue = float(i) - 1.0
_yvalue = _xvalue^2
xtable(11,i) = _xvalue
ytable(11,i) = _yvalue
end_loop
;
_size_table_11 = table_size(11)
;
END
_fill_table_11
table 10 &
(0,0) &
(1,1) &
(2,4) &
(3,9) &
(4,16)
new
; File: Fish_A_a5.dat
File FISH_A_a5.dat
return
DEF _create_block
;
_x0 = 5.0
_x1 = 19.0
_y0 = 5.0
_y1 = 15.0
;
command
block _x0,_y0 _x0,_y1 _x1,_y1 _x1,_y0
round 0.01
end_command
;
END
_create_block
new
; File: Fish_A_a4.dat
File FISH_A_a4.dat
EXAMPLES - 39
_id
_sxx
_sxy
_syy
_szz
_xcen
_ycen
return
print
print
print
print
print
print
print
...
return
step 0
print _tdel
print _step
...
DEF _gridpoint_variables
;
_pnt_gp = gp_near(0.75,0.75)
;
_id = _pnt_gp
_x = gp_x(_pnt_gp)
_y = gp_y(_pnt_gp)
_xvel = gp_xvel(_pnt_gp)
_yvel = gp_yvel(_pnt_gp)
_xdis = gp_xdis(_pnt_gp)
_ydis = gp_ydis(_pnt_gp)
;
END
_gridpoint_variables
; ------------------------------round 0.01
block 0,0 0,1 1,1 1,0
...
solve
; -------------------------------
new
; File: Fish_A_b3.dat
File FISH_A_b3.dat
...
DEF _zone_variables
;
_pnt_zone = z_near(0.8,0.6)
;
_id = _pnt_zone
_sxx = z_sxx(_pnt_zone)
_sxy = z_sxy(_pnt_zone)
_syy = z_syy(_pnt_zone)
_szz = z_szz(_pnt_zone)
_xcen = z_x(_pnt_zone)
_ycen = z_y(_pnt_zone)
;
END
_zone_variables
; ------------------------------round 0.01
block 0,0 0,1 1,1 1,0
...
solve
; -------------------------------
; File: Fish_A_b2.dat
new
...
File FISH_A_b2.dat
DEF _scalar_variables
;
_tdel = tdel
_step = step
;
END
_scalar_variables
EXAMPLES - 40
_id
_x
_y
_xvel
_yvel
_xdis
_ydis
return
print
print
print
print
print
print
print
...
These files are documented in the FISH REFERENCE volume, Section 3, Library of
FISH functions.