zone.state.restore
Syntax
- i = zone.state.restore(z)
Restores all zone state information from the currently open FISH file. See the
file.open
andfile.read
intrinsics.
Usage Example
The following example illustrates how zone.state.restore
can be used.
model new
model large-strain off
;
zone create brick size 5 5 5
zone face skin
zone cmodel assign elastic
zone property density 2000 bulk 1e8 shear 0.3e8
;
model gravity 0 0 -10
;
zone face apply velocity-x 0 range group "west" or "east"
zone face apply velocity-y 0 range group "north" or "south"
zone face apply velocity-z 0 range group "bottom"
;
model solve
;
def saveInfo
file.open('dataGp.txt','write','fish')
loop foreach local gPnt gp.list
gp.state.save(gPnt)
endloop
file.close
file.open('dataZp.txt','write','fish')
loop foreach local zPnt zone.list
zone.state.save(zPnt)
endloop
file.close
end
[saveInfo]
;
zone cmodel assign null
;
def restoreInfo
file.open('dataGp.txt','read','fish')
loop foreach local gPnt gp.list
gp.state.restore(gPnt)
endloop
file.close
file.open('dataZp.txt','read','fish')
loop foreach local zPnt zone.list
zone.state.restore(zPnt)
endloop
file.close
end
[restoreInfo]
;
return
Was this helpful? ... | Itasca Software © 2024, Itasca | Updated: Nov 20, 2024 |