Anybody knows how to export an Ansys structural data file to ParaView?
It is read that ParaView has an Ansys reader, but it does not work. Errors always come up when loading the *.inp file.
Is there any script to convert .inp files to .vtk?
Thanks
Based on the video from Czech-based SVS FEM s.r.o., I wrote an input file for Ansys Mechanical APDL, that creates a VTK file, which can be opened in ParaView.
In the input file vtk.inp, the user has to specify the argument arg1, for which the nodal values are to be written to the vtk file via the command *get,my_results(j),NODE,n_j,..., p.e.
arg1='S,EQV' ! for equivalent stress or
arg1='TEMP' ! for temperature
For further nodal results, refer to the specifications of the *GET command in the Ansys Commands Reference.
The vtk.inp file should be placed in the current working directory. It is called with the APDL command /input,vtk,inp. In Ansys Mechanical, this command can directly be inserted in the command line. In Ansys Workbench, the command can be pasted in the feature Commands (APDL) under Solution.
The output file output.vtk is written in the same location as the input file.
The code was tested with a structural analysis in Ansys Mechanical APDL 17.2 and Ansys Workbench 17.2. The vtk file was tested with ParaView 5.4.1.
Explanation:
The array e_types_Ansys_to_VTK maps the Ansys element types (p. e. SOLID186) to VTK cell types (see also Ansys Element Types).
Limitations:
The input file is yet limited to write only one scalar parameter result in the vtk file, but it can easily be extended for vector or tensor results as well as for multiple results in one vtk file, following the VTK File Format Specification.
Since Ansys stores nodal results only in the corner nodes, only linear VTK elements are used. There could still be some minor mistakes in the e_types_Ansys_to_VTK map, since I could only test some element types. Please feel free to report any corrections or extensions to the code in the comments.
Here is the link to the source code. Use at your own risk.
In case you would like to export a vtk file directly from Ansys Workbench, a Python result converter was introduced in a Youtube video here. Unfortunately, the source code only appears in the video and is explained in Czech language.
Thus, I typewrote the code from screenshots and made some minor improvements.
You will need two files to install the macro as an Ansys ACT extension:
main.py and vtk.xml.
Place the file vtk.xml in the folder C:\Program Files\ANSYS Inc\v###\Addins\ACT\extensions, where ### is your Ansys version, p.e. 172
Create a new folder vtk in C:\Program Files\ANSYS Inc\v###\Addins\ACT\extensions.
Place the file main.py in the created folder.
Start Ansys Workbench.
Register the path C:\Program Files\ANSYS Inc\v###\Addins\ACT\extensions as additional extension path under Tools > Options > Extensions.
Restart Ansys Workbench, go to Extensions > ACT start page > Extension manager > VTK and load the extension.
In a structural analysis, go to Results, right-click and insert My results. Three inputs have to made by the user:
Under *get,my_results(j),NODE,N,..., , give the desired nodal result according to the Ansys Commands Reference, p.e. S,EQV for equivalent stress.
Under VTF file name, give the full path to the vtk output file to be created, p.e. C:\temp\output.vtk
Under Load step, give the load step number (p.e. 1 for last load step unless not stated otherwise).
For larger models, I experienced that the automatically generated file makeresult.mac is not instantly transferred from the project_pending folder to the actual working directory, thus, causing the macro to throw an error. Maybe, anyone can make a suggestion on how to fix this?
ParaView cannot read .inp structure files (I guess this is the Abaqus file format). You could try to export your files as Nastran (.nas) files, since ParaView has a Nastran reader.
Is there a way to reset a DESFire card to its original state? Any command to format and remove all content?
I've read that DeleteApplication apdu command removes the application and its files but the space remains unusable.
thank you.
There is the FormatPICC command.
It deletes all Applications and Files and frees the eeprom space.
Command byte is 0xFC, you need prior PICC Masterkey Authentication always.
The usage of this command can be irreversibly disabled by the SetConfiguration command.
If you use taplinx you can easily format your card by this code
desFireEV1.format();
On this page I found an interesting implementation for fingerprinting of digital pictures. It is written in MATLAB, therefore I downloaded GNU Octave and tried to run the example.
But I get the error
'mdwt' undefined near line 47 column 14
error: called from 'NoiseExtract' in file C:/Users/......../CameraFingerprint/Functions\NoiseExtract.m
near line 47, column 12
There is a hint on the webpage above:
Q: Do I need any additional packages or libraries?
A: You need discrete wavelet transforms such as those included in
\Filter directory as dll (developed by Markus Lang from Rice
University). These .dll run under 32-bit Windows only. You may need to
recompile them uder your operating system if different.
So I got the .dll-Files, but how do I use them and the functions inside?
I am interested in opening a capture file in wireshark and then exporting the data in "C arrays" format [Wireshark provides that option in its GUI. One can do it by following "File->Export->as C arrays file" from the main menu.My question is how can I do this in perl? Can someone help me with a script for this?
I Would like to parse each and every packet of the wireshark capture. So I thought, I will first convert each packet to an array and then parse it. Do you have any suggestions on this? My capture consists of all IEEE 802.11 frames.
If you want to do all the parsing yourself, i.e. look at the raw packet data, I would suggest writing your own program using libpcap to read pcap-format capture files (on UN*X, libpcap 1.1.0 and later can also read pcap-ng-format capture files, which is what Wireshark 1.8.0 and later write by default). No need to write stuff out as C arrays.
It appears that PDF::API2 does not support PDF 1.5 (and later) compression of the xref table. This type of file is more common since Acrobat 9 & 10 write them by default. The other compression scheme is compressed object streams.
I get the following error:
Malformed xref in PDF file at /opt/local/lib/perl5/site_perl/5.12.3/PDF/API2/Basic/PDF/File.pm line 1140.
Do any of the Perl PDF modules support reading a PDF with a compressed XRef?
CAM::PDF can read a compressed XRef. The documentation says:
The file format through PDF 1.5 is well-supported, with the exception
of the "linearized" or "optimized" output format, which this module
can read but not write.
I haven't worked with CAM::PDF. But I looked it over and the api feels strange after coming from PDF::API2. It is more low level or something. There are advantages and disadvantages to both libraries though.
We use PDF::API2 at work and ask our designers to save as PDF v1.4 when they give us stuff. You can also use ghostscript to convert them to PDF 1.4 which is supported by PDF::API2.
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -o out.pdf in.pdf