Open germa89 opened 1 year ago
Interesting...
After a while it doesn't seem to do the splines properly:
However, the MAPDL figure does show correct geometry:
Hence I believe the interpolation thing it is more an mapdl-pyvista mapping issue. I will open another issue about this.
Sometimes I get weird lines:
I'm using a slightly modified version of OP's code:
I get the same error as OP:
---------------------------------------------------------------------------
MapdlExitedError Traceback (most recent call last)
c:\ansys_jobs\aplot_failing\Issue.py in <module>
138 geo = Geometry(curve = line.tolist())
139 mat = Material()
--> 140 get_Ue(mat, geo)
141
142
c:\ansys_jobs\aplot_failing\Issue.py in get_Ue(mat, geo, c_r, force, disp, AESIZE, refine_lvl, detach_step)
124 mapdl.aplot(vtk=False)
125 except:
--> 126 mapdl.lplot('ALL',cpos="xy")
127 else:
128 mapdl.rectng(0, geo.diameter/2, 0, geo.height)
~\Others_pymapdls\pymapdl_1\pymapdl\src\ansys\mapdl\core\mapdl.py in lplot(self, nl1, nl2, ninc, vtk, show_line_numbering, show_keypoint_numbering, color_lines, **kwargs)
1726 kwargs.setdefault("show_scalar_bar", False)
1727 kwargs.setdefault("title", "MAPDL Line Plot")
-> 1728 if not self.geometry.n_line:
1729 warnings.warn(
1730 "Either no lines have been selected or there is nothing to plot."
~\Others_pymapdls\pymapdl_1\pymapdl\src\ansys\mapdl\core\mapdl_geometry.py in n_line(self)
363 1
364 """
--> 365 return self._item_count("LINE")
366
367 @property
~\Others_pymapdls\pymapdl_1\pymapdl\src\ansys\mapdl\core\misc.py in wrapper(*args, **kwargs)
373 mapdl._set_log_level("CRITICAL")
374
--> 375 out = func(*args, **kwargs)
376
377 if prior_log_level != "CRITICAL":
~\Others_pymapdls\pymapdl_1\pymapdl\src\ansys\mapdl\core\mapdl_geometry.py in _item_count(self, entity)
380 def _item_count(self, entity):
381 """Return item count for a given entity."""
--> 382 return int(self._mapdl.get(entity=entity, item1="COUNT"))
383
384 @property
~\Others_pymapdls\pymapdl_1\pymapdl\src\ansys\mapdl\core\mapdl.py in get(self, par, entity, entnum, item1, it1num, item2, it2num, item3, **kwargs)
2240 # Checking printout is not suppressed by checking "wrinqr" flag.
2241 flag = 0
-> 2242 if self.wrinqr(1) != 1: # using wrinqr is more reliable than *get
2243 flag = 1
2244 self._run("/gopr")
~\Others_pymapdls\pymapdl_1\pymapdl\src\ansys\mapdl\core\mapdl_grpc.py in wrinqr(self, key, **kwargs)
2513 def wrinqr(self, key, **kwargs):
2514 """Wrap the ``wrinqr`` method to take advantage of the gRPC methods."""
-> 2515 super().wrinqr(key, pname=TMP_VAR, mute=True, **kwargs)
2516 return self.scalar_param(TMP_VAR)
2517
~\Others_pymapdls\pymapdl_1\pymapdl\src\ansys\mapdl\core\_commands\inq_func.py in wrinqr(self, key, pname, **kwargs)
1404
1405 """
-> 1406 return self.run(f"{pname} = wrinqr({key})", **kwargs)
~\Others_pymapdls\pymapdl_1\pymapdl\src\ansys\mapdl\core\mapdl.py in run(self, command, write_to_log, mute, **kwargs)
2694
2695 verbose = kwargs.get("verbose", False)
-> 2696 text = self._run(command, verbose=verbose, mute=mute)
2697
2698 if mute:
~\Others_pymapdls\pymapdl_1\pymapdl\src\ansys\mapdl\core\mapdl_grpc.py in _run(self, cmd, verbose, mute)
744 response = self._send_command_stream(cmd, True)
745 else:
--> 746 response = self._send_command(cmd, mute=mute)
747 self._busy = False
748
~\Others_pymapdls\pymapdl_1\pymapdl\src\ansys\mapdl\core\errors.py in wrapper(*args, **kwargs)
143 # Must close unfinished processes
144 mapdl._close_process()
--> 145 raise MapdlExitedError("MAPDL server connection terminated") from None
146
147 if threading.current_thread().__class__.__name__ == "_MainThread":
MapdlExitedError: MAPDL server connection terminated
And there is no generated ANS_DEBUG_CRASH
file.
The fundamental issue is we're not transferring the underlying tessellated geometry from MAPDL to Python, but rather we have to generate a faux FEA mesh overlaid on top of the existing areas. This has always been a stopgap, waiting for an API to directly transfer the tessellated faces generated with the underlying APLOT
command.
Whether or not we do this depends on how long we plan on using the internal MAPDL geometry kernel. Since we have nothing to replace it with, I think we should still support it.
Whether or not we do this depends on how long we plan on using the internal MAPDL geometry kernel. Since we have nothing to replace it with, I think we should still support it.
I agree on this.
I cannot understand though how the crash is happening in the current implementation. The geometry kernel should be stable enough to support create, export and delete a faux FEA mesh.
I will propose then to leave this on hold until more progress is made on the gRPC implementation.
I recheck this issue on the latest PyMAPDL version and 222, I still get the same MAPDL crash.
Discussed in https://github.com/pyansys/pymapdl/discussions/1411