其实在FLAC3D6.0和7.0中都有python
6.0用得是Python2.7,7.0用得是3.6.主要是考虑到7.0用的是python3.6,资料多,更加容易学会。 import itasca as it
it.command("python-reset-state false")
it.command("""
program load module 'zone'
program load guimodule 'zone'
program load module 'body'
program load guimodule 'body'
program load module 'extruder'
program load guimodule 'extruder'
program load module 'sel'
program load module 'zonesel'
program load module 'selpython'
program load module 'wallsel'
program load guimodule 'sel'
program load module 'pfcsel'
program load module 'rblocksel'
program load module 'dfnzone'
program load module 'ballzone'
program load module 'zonepython'
program load module 'wallzone'
""")
it.command("python-reset-state false")
model new之后就不会清除python的变量
it.command("""
model new
model large-strain off
zone create brick size 10 10 10
zone cmodel assign elastic
zone property density 2950 young 12e9 poisson 0.25
cycle 1
""")
z = it.zone.find(1)
print(z)