zone.state.save
Syntax
- i = zone.state.save(z)
Saves all zone state information to the currently open FISH file. See the
file.open
andfile.write
intrinsics.Returns: i - returns 0 upon success; otherwise, returns a FISH file error code Arguments: z - a zone pointer
Usage Example
The following example illustrates how zone.state.save
can be used.
model new
model large-strain off
;
zone create brick size 5 5 5
zone face skin
zone cmodel assign elastic
zone prop dens 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? ... | FLAC3D © 2019, Itasca | Updated: Feb 25, 2024 |