@@ -49,15 +49,16 @@ def run_sample(
4949 ops .model ('basic' , '-ndm' , 1 , '-ndf' , 1 )
5050
5151 # the material (units = N, mm)
52- E = 30000.0
53- v = 0.2
52+ E = 30000.0
53+ v = 0.2
5454 fc = 30.0
5555 ft = fc / 10.0
5656 ec = 2.0 * fc / E
57- Gt = 0.073 * fc ** 0.18 # warning : this equation assumed fc in MPa!
57+ Gt = 0.073 * fc ** 0.18 # NOTE : this equation assumes Fc in MPa!
5858 Gc = 2.0 * Gt * (fc / ft )** 2
5959 # create tensile and uniaxial laws from the make_concrete function.
6060 Te , Ts , Td , Ce , Cs , Cd , lch_ref = make_concrete (E , ft , fc , ec , Gt , Gc )
61+
6162 # damage variables are computed for normal strength concrete.
6263 # however you can change them to see their effect on the cyclic response
6364 # damage variables range from 0 (pure plasticity) to 1 (pure damage)
@@ -233,28 +234,29 @@ def run_sample(
233234 images [0 ].save ('{}.gif' .format (title ), save_all = True , append_images = images [1 :], loop = 0 , duration = 100 )
234235 images [- 1 ].save ('{}-still.png' .format (title ))
235236
236- run_sample (title = 'Mixed-Plastic-Damage(rate-independent)' ,
237- eta = 0.0 ,
238- pd_pos_override = _pd_settings .PLASTIC_DAMAGE ,
239- pd_neg_override = _pd_settings .PLASTIC_DAMAGE
240- )
241- run_sample (title = 'Mixed-Plastic-Damage(rate-dependent)' ,
242- eta = 0.001 ,
243- pd_pos_override = _pd_settings .PLASTIC_DAMAGE ,
244- pd_neg_override = _pd_settings .PLASTIC_DAMAGE
245- )
246- run_sample (title = 'Pure-Damage' ,
247- eta = 0.0 ,
248- pd_pos_override = _pd_settings .PURE_DAMAGE ,
249- pd_neg_override = _pd_settings .PURE_DAMAGE
250- )
251- run_sample (title = 'Pure-Plasticity' ,
252- eta = 0.0 ,
253- pd_pos_override = _pd_settings .PURE_PLASTICITY ,
254- pd_neg_override = _pd_settings .PURE_PLASTICITY
255- )
256- run_sample (title = 'Mixed-Plastic-Damage(compression)-Pure-Damage(tension)' ,
257- eta = 0.0 ,
258- pd_pos_override = _pd_settings .PURE_DAMAGE ,
259- pd_neg_override = _pd_settings .PLASTIC_DAMAGE
260- )
237+ if __name__ == "__main__" :
238+ run_sample (title = 'Mixed-Plastic-Damage(rate-independent)' ,
239+ eta = 0.0 ,
240+ pd_pos_override = _pd_settings .PLASTIC_DAMAGE ,
241+ pd_neg_override = _pd_settings .PLASTIC_DAMAGE
242+ )
243+ run_sample (title = 'Mixed-Plastic-Damage(rate-dependent)' ,
244+ eta = 0.001 ,
245+ pd_pos_override = _pd_settings .PLASTIC_DAMAGE ,
246+ pd_neg_override = _pd_settings .PLASTIC_DAMAGE
247+ )
248+ run_sample (title = 'Pure-Damage' ,
249+ eta = 0.0 ,
250+ pd_pos_override = _pd_settings .PURE_DAMAGE ,
251+ pd_neg_override = _pd_settings .PURE_DAMAGE
252+ )
253+ run_sample (title = 'Pure-Plasticity' ,
254+ eta = 0.0 ,
255+ pd_pos_override = _pd_settings .PURE_PLASTICITY ,
256+ pd_neg_override = _pd_settings .PURE_PLASTICITY
257+ )
258+ run_sample (title = 'Mixed-Plastic-Damage(compression)-Pure-Damage(tension)' ,
259+ eta = 0.0 ,
260+ pd_pos_override = _pd_settings .PURE_DAMAGE ,
261+ pd_neg_override = _pd_settings .PLASTIC_DAMAGE
262+ )
0 commit comments