Visualization with Shear Center #56
-
What's the simplest way to visualize VABS outputs - shear center, tension center, CG, principle inertial and structural axes - in context with cross section geometry? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
You can try the SGIO python package: https://pypi.org/project/sgio/. To install: Then use the following script to create a plot: import matplotlib.pyplot as plt
import sgio
from sgio.utils.plot import plot_sg_2d
fn = 'cs.dat' # Your VABS input file name, relative path to this script or absolute path
cs = sgio.read(fn, 'vabs') # Read VABS input
model = sgio.readOutputModel(f'{fn}.k', 'vabs', sg=cs) # Read VABS output
fig, ax = plt.subplots()
plot_sg_2d(cs, model, ax)
plt.show() This should show a plot like this: This is the default plot. You can add more model elements manually (using the |
Beta Was this translation helpful? Give feedback.
-
Thank you - this is helpful! The plot is exactly what I had hoped for. However, I have identified some opportunities for improvement... |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Be advised: the sgio utility produces incorrect results when Vlasov is on. This can be demonstrated using isorect from the VABS install examples, and applying some basic transformations. isorect_rotated_15degccw.sg.txt |
Beta Was this translation helpful? Give feedback.
You can try the SGIO python package: https://pypi.org/project/sgio/. To install:
pip install -U sgio
.Then use the following script to create a plot:
This should show a plot like this:
This is the default plot. You can add more model elements manually (using the
ax
object and properties stored inmodel
).