ansys / pymapdl

Pythonic interface to MAPDL
https://mapdl.docs.pyansys.com
MIT License
423 stars 120 forks source link

Certain ANSYS commands do not work i current version #41

Closed finngl closed 4 years ago

finngl commented 6 years ago

After upgrading PyAnsys from version 0.29.0 to 0.31.2, certain APDL commands now fails; f. ex. SECBLOCK.

Error message says 'APDL command not supported in aaS'

akaszynski commented 6 years ago

Using Linux? ANSYS corba is a bit more limited than using pexpect. You can get around this by setting prefer_pexpect=True when initializing ansys:

import pyansys

ansys = pyansys.ANSYS(prefer_pexpect=True)

I'll add something in the docs about this error.

finngl commented 6 years ago

No, I'm on Windows. And I already tried to use prefer_pexpect=True, with no success...

akaszynski commented 6 years ago

I changed the error reporting to raise an exception when commands couldn't run through CORBA. Before they were just warnings in the logger.

If possible, please send me the input file that you're using and I'll take a look at it. It might be necessary to run this command non-interactively. See the documentation for how to do that.

finngl commented 6 years ago

Ah, I see. So ANSYS does not support all commands through CORBA? I've tried to search for a list of what commands that are or are not supported this way - haven't been able to finde one....

finngl commented 6 years ago

I've tried to use ansys.non-interactive as described in the documentation. Unfortunately, I keep getting 'permission denied' errors when attempting to write to tmp.inp. It doesn't help to delete the file first or uncheck its read-only flag. Have you tested this on Windows?

akaszynski commented 6 years ago

CORBA documentation has been lacking from ANSYS, which makes writing a python module to support it quite difficult. There's a few thousand APDL commands and I have not yet tested all of them. Conversion of the verification files is an ongoing process.

I'll have to test the non_interactive feature in Windows. I honestly can't test it fully each time on both Linux and Windows for each release, especially as I can't get a copy of ANSYS on Travis CI and Appveyor. Functional testing ends up being local and only on major releases.

Either way, I'll have to debug this, make list of non-supported CORBA commands, and then raise a meaningful exception when it does so people know how to deal with them.

finngl commented 6 years ago

There's no rush. I might take a look at the code myself and see how I can get around it.

mahes2312 commented 5 years ago

is it possible to start ansys gui and send the command to it

akaszynski commented 5 years ago

Yes, use open_gui.

mahes2312 commented 5 years ago

can we send all the commands in GUI or some exceptions are there.

akaszynski commented 5 years ago

Not all commands are available in the GUI. This is noted in ANSYS help see: APDL Commands

akaszynski commented 4 years ago

Closing due to inactivity. Please open again with specific commands that should be available within pyansys but are not GUI only commands.