Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge case in plotting deformations #14

Open
ccaprani opened this issue Apr 1, 2022 · 1 comment
Open

Edge case in plotting deformations #14

ccaprani opened this issue Apr 1, 2022 · 1 comment

Comments

@ccaprani
Copy link

ccaprani commented Apr 1, 2022

Hi @sewkokot !

I'm using opsvis as the back end visualization for https://github.com/ccaprani/ospgrid . A grid is a plane 3D structure, and some grids only experience joint rotation without translation, e.g.:
image

Manually setting the scale to 1000 gives the very nice:
image

However, the automatic scale finding only parses joint translations, and so without manually setting the scale factor we end up with an inf scale factor. It seems that the automatic scale factor calculation in

def plot_defo(sfac=False, nep=17, unDefoFlag=1, fmt_defo=fmt_defo,
should actually parse the member interpolated displacements too. If the code in the loop starting
for i, ele_tag in enumerate(ele_tags):
was extracted to a function, this might work easily.

Anyway, MWE using ospgrid you can run:

import ospgrid as ospg
import ospvis as ospv
gs = "AY-5:0,BN0:0,CY5:0,DF0:-5,EF0:5_B0:-50:0_AB,BC,DB,BE" 
grid = ospg.make_grid(gs)
grid.analyze()
ospv.plot_defo(sfac=False, endDispFlag=1)

I'm happy to give this a go, but since it's going to bash around your code architecture to solve, I'd prefer to ask your thoughts first.

@sewkokot
Copy link
Owner

sewkokot commented Apr 6, 2022

@ccaprani Thank you for this feature request. Hopefully I have implemented this feature in the updated PyPi version. Please test and let me know if it works.

Anyway I'm preparing a larger refactored version of opsvis. However, after the source files reorganization, the readthedocs documentation generation does not work, so as soon as I solve this issue I will upload the refactored package with new features (e.g. stress plots of 3d elements using pyvista and paraview). More details will come soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants