Comments (24)
from pymapdl.
Thank you very much! But I'd rather need to learn how to display/extract the stresses and other results myself as I will need to do that more frequently with various ANSYS models.
I am developing a predictive probabilistic tool that evaluates thermal fields, plastic strains, von Mieses stresses etc. and transforms these into probabilities of failure, lifetimes etc.
Don't you plan to write PlotStress and PlotStrain methods similiar to the PlotDisplacement one?
Thank you
from pymapdl.
from pymapdl.
from pymapdl.
OK, here is a simple example. Thank you!
from pymapdl.
The sample runs with the following code
from pyansys import Reader
result = Reader.ResultReader('test_pyansys.rst')
result.LoadCDB('test_pyansys.cdb')
result.GetTimeValues()
result.GetResult(0)
result.PlotDisplacement(0)
Aside from renaming PlotDisplacement
to PlotResult
, is there anything else that needs to be done? Were there more results in the result file?
from pymapdl.
Hi! Thanks for a very useful script! Do you know how to extract element solution data? How to get a pointer similar to ptrNSLl, but to the element solution? Many thanks!
from pymapdl.
I'll take a look at tonight and add a way to extract element solution data.
from pymapdl.
Just found it - it is the next pointer after nodal results, ptrESL :)
from pymapdl.
Good find! Would you like to contribute your code?
from pymapdl.
Thank you very much for this sript. I have a problem to read displacement solution data with a rst file containing a large number of sets--> the Reader give an error of overflow.
I put the error below:
Warning (from warnings module):
File "C:\Python27\lib\site-packages\pyansys\Reader.py", line 352
f.seek(((self.rpointers[rnum] + 12)*4)) # item 12
RuntimeWarning: overflow encountered in int_scalars
Traceback (most recent call last):
File "C:\Users\jbrunel\Downloads\Bureau_24032016\TEI\2Faces\tempe.py", line 29, in
fobj.PlotDisplacement(300)
File "C:\Python27\lib\site-packages\pyansys\Reader.py", line 246, in PlotDisplacement
result = self.GetResult(rnum, True)
File "C:\Python27\lib\site-packages\pyansys\Reader.py", line 352, in GetResult
f.seek(((self.rpointers[rnum] + 12)*4)) # item 12
IOError: [Errno 22] Invalid argument
(fobj.rpointers[300]+12)*4
Warning (from warnings module):
File "C:\Users\jbrunel\Downloads\Bureau_24032016\TEI\2Faces\tempe.py", line 2
"""
RuntimeWarning: overflow encountered in int_scalars
Some ideas?
Thanks!!
from pymapdl.
from pymapdl.
You can find the rst file at the link : www.transfernow.net/296e01e09pgu
Sorry for the size of the file (2Gb)!!!)
the '.py' file:
# Load the reader from pyansys
from pyansys import Reader
from ANSYScdb import CDB_Reader
from ANSYScdb import PythonReader
# Create result reader object
fobj = Reader.ResultReader('disc.rth')
temp = fobj.GetResult(300)
If you modify the rnum at 299 is ok, the problem occurs when rnum is greater than 300!
from pymapdl.
from pymapdl.
from pymapdl.
I'm ready to work on this project again, but I can't seem to find the database I downloaded. Could you please upload it again?
from pymapdl.
rostar,
I've added stress and geometry loading to release 0.16 and see the new documentation.
Let me know if it works out. It's not on PyPi yet, so you'll have to download and install from source here from GitHub. Let me know if it works out.
from pymapdl.
Hi akazynski,
if I run
python setup.py install
the process stops with the following error:
c1 : fatal error C1083: Cannot open source file: 'pyansys/cython/reader.c': No such file or directory
If I clone from git, I get this on import
from pyansys import _parsefull
ImportError: cannot import name _parsefull
Very much appreciate your help!
from pymapdl.
Forgot to include reader.c, sorry about that!
I've just added it and tested the install on python 2.7 on Linux by cloning to a virtual environment and testing it there, so it will work from GitHub.
from pymapdl.
Thank you.
Unfortunately, python now crashes on calling
pyansys.ResultReader(rstfile)
"python.exe has stopped working"
... no futher relevant details ...
I am using Windows 10 but I will install Ubuntu 16 in virtualbox to check whether its platform dependent.
R
from pymapdl.
... with python 2.7 from Anaconda
from pymapdl.
Just ran it on windows 7 and it's indeed a problem. I'll fix it and post the updated code. Thanks for testing this out.
from pymapdl.
Fixed Windows bugs with Python 2 and 3 and uploaded it to PyPi.
from pymapdl.
Great! Works perfectly.
Thank you very much.
from pymapdl.
Related Issues (20)
- Problems whith trying to use two different instances of mapdl in the new version of ansys-mapdl-core HOT 2
- Black MAPDL window opens when compiling a program with PyMAPDL HOT 9
- MAPDL server connection terminated when using parameters HOT 6
- RDEC and VFQUERY need updating. HOT 2
- Bug located in element_values of JT, SUM in that it changes the set of selected elements after. HOT 1
- Version/Command mismatch on doc page
- Bug located in MPCOPY and other commands which has unused field HOT 5
- Add /CYCEXPAND APDL command.
- MAPDL commands do not match API HOT 1
- Large files in the final python package HOT 1
- `sphinx-build` configuration is not being catched
- Failed scheduled build HOT 13
- post_processing.plot_nodal_pressure() fails for CPT element type though data is there.
- On the MSTOLE the two fields with component names seem to require the names be enclosed in single quotes by MAPDL aaS.
- MAPDL server connection terminated when running on linux container HOT 1
- Hello, is there any method to calculate
- In `mapdl.input_strings(cmd)`, if cmd is very long command, it fails with `MapdlExitedError` HOT 2
- Add support for EEMBED and SFCONTROL
- Add support for Solid293
- Add support for new commands for multistage cyclic symmetry and harmonic balance method.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymapdl.