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

Mesh.grid seems to result in losing the gRPC connection to MAPDL aaS when a non-trivial number of mixed uP elements are present. #2933

Open
4 tasks done
mikerife opened this issue Mar 25, 2024 · 2 comments

Comments

@mikerife
Copy link

🤓 Before submitting the issue

🔍 Description of the bug

After a solution with mixed uP elements present and after reading the last set of results mapdl.mesh.grid seems to result in a lost connection to the MAPDL aaS instance.

🕵️ Steps To Reproduce

from ansys.mapdl.core import launch_mapdl
import matplotlib.pyplot as plt
import pyvista as pv
import math
mapdl = launch_mapdl(port=50056, additional_switches='-smp')
mapdl.clear()

mapdl.units('mpa')
# material
C1 = 0.293
C2 = 0.177
NU1 = 0.49967
D1 = (1-2*NU1)/(C1+C2)

mapdl.prep7()

# 3D 8NODE STRUCTURAL SOLID mixed uP formulation
mapdl.et(1, "SOLID185")
mapdl.keyopt(1, 6, 1)

# mooney-rivlin material model
mapdl.tb("HYPER", 1, 1, 2, "MOONEY")
mapdl.tbdata(1, C1, C2, D1)

mapdl.block(0, 1, 0, 1, 0, 1)

mapdl.esize("", 10)
mapdl.smrtsize("off")
mapdl.type(1)
mapdl.vmesh("ALL")

mapdl.nsel("S", "LOC", "X", 0)
mapdl.d("ALL", "UX")
mapdl.nsel("S", "LOC", "Z", 0)
mapdl.d('all', 'uz', 0)
mapdl.nsel("S", "LOC", "Y", 0)
mapdl.d('ALL', "UY", 0)
mapdl.nsel("ALL")

mapdl.shpp('off')
mapdl.finish()

mapdl.slashsolu()

mapdl.antype("STATIC")
mapdl.nlgeom("ON")
mapdl.time(1)
mapdl.autots('off')
mapdl.nsubst(10)

# apply displacement
mapdl.nsel('s', 'loc', 'y', 1)
mapdl.d('all', "UY", -.1)
mapdl.allsel()
# write results to result file at every sub step
mapdl.outres("", 1)

mapdl.solve()
mapdl.finish()

mapdl.post1()
mapdl.set('last')
mesh1 = mapdl.mesh.grid

# am gathering undeformed and deformed mesh for PyVista plotting so next commands would be
# mapdl.upcoord(1)
# mesh1 = mapdl.mesh.grid
# mapdl.upcoord(-1)

💻 Which Operating System are you using?

Windows

🐍 Which Python version are you using?

3.10

📝 PyMAPDL Report

Show the Report!

# PASTE HERE THE OUTPUT OF `python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())"` here

📝 Installed packages

Show the installed packages!

# PASTE HERE THE OUTPUT OF `python -m pip freeze` here

📝 Logger output file

Show the logger output file.

# PASTE HERE THE CONTENT OF THE LOGGER OUTPUT FILE.

@germa89
Copy link
Collaborator

germa89 commented Apr 1, 2024

Interestingly, I'm getting segmentation fault:

(.venv_macos) pymapdl git:(main) $ python ./tmp/main.py
[1]    4460 segmentation fault  python ./tmp/main.py

All because of the last uncommented line:

mesh1 = mapdl.mesh.grid

I do not understand why having complex material models would make retrieving the meshing to fail... retrieving the meshing only depends on the type of element, solid186 in this case, which is fairly tested.

@mikerife
Copy link
Author

mikerife commented Apr 1, 2024

@germa89 the element formulation has an 'internal' node with DOF of pressure. If you change the esize to 1 and retry, the mesh.grid will work. Staring at this I am not sure why it does not work at first (1000 elements) but also not sure why it works with 1 element.

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