I tried to use zone.field.name but it is not working. See the error message attached.
zone.field.name is a FISH function. You are using it as a command. If you are referring to the example under Zone Field Data names,
this is just a FISH fragment, you need to put these lines in a FISH function and call it.
I am still unable to create a plot. Please what am I doing wrong? The goal is to be able to create plots at different depths. Say, for example, plots of stress vs displacement at different depths.
I am not sure if I follow - you want an xy plot at different depths? Perhaps, someone else has more insight, but I guess in this case I would contour two vertical lines with one as stress and the other displacement. Something like,
- Create two vertical line geometry objects
- Paint one with geometry paint-extra displacement-z and the other with geometry paint-extra stress-zz
This forgoes the need to define the zone field data in you FISH function. See geometry paint-extra command — Itasca Software 9.2 documentation.
Thank you! Will I need to still use paint if I want to plot only displacement vs depths?
If you just want a plot of displacement versus depth then I’d populate a table with x and y values as displacement and depth, or visa-versa, which ever you prefer. Table information can be found here - Table — Itasca Software 9.2 documentation
Then you can plot a table chart just like a history chart.
Please @dblanksma I would appreciate it if you could provide an example of a line of code for this plotting. I am yet to figure it out. The table link you share isn’t helping me. I read the documentation under table and history but could not do it.
Let’s say you want to plot displacement vs. depth of a 3D model at (5,5,10), (5,5,9), until (5,5,1). How would you use a table to get those data and plot them? Similarly, say you want to get stress vs displacement at (5,5,10), (5,5,9), until (5,5,1).
Thank you!
Hello @Adams,
Here is one way I can think of:
[poslist = list.sequence(vector(5,5,10),vector(5,5,9),vector(5,5,8))] ;7, 6, 5 ... etc
[depthlist = poslist->z]
[gplist = gp.near(::poslist)]
[displacementMagList = math.mag(::gp.disp(::gplist))]
[combine = vector(::displacementMagList,::depthlist)]
[tr = table.create('mytable')]
[table.as.list(tr) = combine]
Then create a table chart in a plot.
You could also using FISH loops to iterate if you prefer that method. Also you could do this in Python (probably with less code)
Thank you @dblanksma
Sorry for bothering you.
What if I want to export the table?
I was going through the FLAC library and observed no command for gp.stress. I was hoping I could update your code to get stress into the table. I guess is because stress does not act on gridpoints but on zones or faces. Any suggestion of how to do a similar thing for stress?
Hello @Adams,
That is correct, stress is a zone value. You can zone.stress() to get the stress tensor. In the context of my code you would just need to get zones (zone.near()) instead of gridpoints.
Thank you! @dblanksma
You did not answer the export the table question. Please I would appreciate your response.
table export command
I have tried it before I asked, but it didn’t work.
table export ‘mytable’
Could it be because the table is in fish function? Do I need to put the table export in the fish function too?
table ‘mytable’ export
The command needs a filename:
table ‘mytable’ export <provide_name_here>
The [ ] characters are for inline FISH. This is a command. Don’t use [ ].
And write an actual filename, like ‘mydata’
Please read through the FISH scripting section - FISH Scripting Reference — Itasca Software 9.0 documentation
Thank you for your help!