Comments (12)
OK , I get it. Thinks
from pymapdl.
Hello,
Yes, I can do that. I'm a bit swamped with work with other projects, but if you provide an example file and expected ANSYS results, I can put something together. Please make the example file small (<1 MB) so I'll be able to include this in the test files.
from pymapdl.
Hi,
thanks for your answer! I will generate such .rst.
from pymapdl.
Hi,
here is the sample .rst I created. It is a brick with temperatures applied. Only one load step in file.
file.rst.gz
from pymapdl.
Sorry, took about a year to get around to this! Suppose better late than never:
You can as of d742ea1 and pyansys=0.39.7
(to be uploaded to PyPi shortly.
import pyansys
# load result and grab the nodal tempatures
result = pyansys.read_binary('file.rst')
nnum, ndata = result.nodal_temperature(0)
# print the first 10 values
for i, temp in enumerate(ndata[:10]):
print('%5d %.2f' % (nnum[i], temp))
1 60.00
2 60.00
3 60.00
4 60.00
5 60.00
6 60.00
7 60.00
8 60.00
9 60.00
10 60.00
from pymapdl.
You can plot it too!
import pyansys
# load result and grab the nodal tempatures
result = pyansys.read_binary('file.rst')
# plot and take a screenshot
result.plot_nodal_temperature(0, show_edges=True, screenshot='screenshot.png')
from pymapdl.
@akaszynski
nnum, ndata = result.nodal_temperature(0)
It means that temperature(0) return node numbers list (nnum) and corresponding node temperatures list(ndata) ?
By the way what's the different meaning about the index in result.nodal_temperature(index) ?
from pymapdl.
It means that temperature(0) return node numbers list (nnum) and corresponding node temperatures list(ndata) ?
Correct, exceptndata
is an array.
By the way what's the different meaning about the index in result.nodal_temperature(index) ?
Theindex
variable is the 0 indexed result number corresponding to the index of the result inrst.time_values
from pymapdl.
@akaszynski
The index variable is the 0 meaning that the temperature is the first step result? The index means the step number ?
from pymapdl.
Index corresponds to the cumulative result number. I should have provided a better interface for this, but the table can be obtained nonetheless via:
>>> from ansys.mapdl.reader import examples
>>> from ansys.mapdl import reader as pymapdl_reader
>>> rst = examples.download_academic_rotor_result()
>>> rst._resultheader['ls_table']
array([[ 1, 1, 1],
[ 1, 2, 2],
[ 2, 1, 3],
[ 2, 2, 4],
[ 3, 1, 5],
[ 3, 2, 6],
[ 4, 1, 7],
[ 4, 2, 8],
[ 5, 1, 9],
[ 5, 2, 10],
[ 6, 1, 11],
[ 6, 2, 12],
[ 7, 1, 13],
[ 7, 2, 14],
[ 8, 1, 15],
[ 8, 2, 16],
[ 9, 1, 17],
[ 9, 2, 18],
[10, 1, 19],
[10, 2, 20],
[11, 1, 21],
[11, 2, 22],
[12, 1, 23],
[12, 2, 24],
[13, 1, 25],
[13, 2, 26]], dtype=int32)
Where the columns are [loadstep, substep, cumulative number].
from pymapdl.
Does pyansys replace by the following modulus ?
from ansys.mapdl import reader as pymapdl_reader
resultfile = os.path.join(mapdl.path, '%s.rst' % mapdl.jobname)
result = pymapdl_reader.read_binary(result file)
from pymapdl.
Does pyansys replace by the following modulus ?
Yes. We've split up the modules such that ansys-mapdl-core
is the interface for MAPDL and ansys-mapdl-reader
is an interface to the files.
from pymapdl.
Related Issues (20)
- 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 15
- 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.
- Revise project metadata to align with PyAnsys standards HOT 1
- Add ML course link to docs
- Node numbering is inconsistent HOT 2
- No dynamic visualization HOT 10
- Using HPC licenses with `MapdlPool`
- PyMAPDL should fail if not instances have been launched in MapdlPool
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.