Until now, only VTK objects are involved ( VTKPythonAlgorithmBase is in fact defined by VTK). In this case, as a generic mesh format reader, no inputs are required (so you do not need to select an existing object in ParaView before using this plugin to open a file), and it only returns 1 object as a vtkUnstructuredGrid, an unstructured mesh defined by points coordinates and cell connectivities (as meshio reads and writes).
This input / output meta-informaton is needed to initialize the class. Take an or several inputs but do not produce additional data a “filter” performs some operation to inputs and generates the results. A “source” or “reader” do not require inputs, but produce some outputs a “writer” Each operation can be characterized by the number of inputs and the number of outputs. If you are familiar with ParaView or VTK, you know that post-processing of the input data is organized through pipeline. _init_ ( self, nInputPorts = 0, nOutputPorts = 1, outputType = "vtkUnstructuredGrid" ). For reading or writing a mesh file foo, simply useįrom import VTKPythonAlgorithmBase class meshioReader ( VTKPythonAlgorithmBase ): def _init_ ( self ): VTKPythonAlgorithmBase. Directly Python processing is also possible without the use of salome environment. With the MED interface of meshio, these results files can now be converted to a more generic format readable directly by ParaView, like XDMF or VTU. The finite element result produced by code_aster is a MED file and in general requires the rather fatty salome platform for visualization and post-processing. Meshio is a Python library that reads and writes various frequently-used mesh formats: XDMF, VTK, gmsh, Abaqus…Personnally since 2018 I’m actively involved in this project especially for the MED format.
#ABAQUS PARAVIEW CODE#
The code source of this plugin is available on Github. In this post, I will illustrate the development of such Python plugins via the example of a generic mesh format reader, with the help of meshio. With the newly introduced native VTKPythonAlgorithmBase interface, it is no longer necessary. For generating such XML files, I used a Python package pvpyfilter. Previously before 5.6 only plugins defined by a XML file (or compiled library files) can be loaded. These plugins can then be loaded through Tools / Manage Plugins / Load New under ParaView and can be served as custom sources, readers, writers and filters. Recently I discoved the Python VTKPythonAlgorithmBase interface introduced in the ParaView 5.6 version for defining user plugins with pure Python files. Logging.basicConfig(level=logging.INFO, format=’%(levelname)s: %(message)s’)Ĭ = ccx2paraview.Generic mesh readers under ParaView via the new Python interface #convert output to VTK (vtu) format so paraview can use it # set the processor number to 8 … ignore this part, its for CCX #imports for running CCX and output file conversion Here is the code I use to basically “bank” PrePoMax results to vtu files: - coding: utf-8. X has a steep curve, but its incredible lightweight, which is important for very big models or when computer resources are limited. I do this when I need more detailed postprocessing images. Generates Mises and Principal components for stress and strain tensors. Converts CalculiX FRD file to view and postprocess analysis results in Paraview. My other option is to transform the FRD to Paraview with GitHub - calculix/ccx2paraview: CalculiX to Paraview converter (frd to vtk/vtu). Nonetheless its blazing fast and has also Abaqus syntax support.ĬGX has a steep curve, but its incredible lightweight, which is important for very big models or when computer resources are limited. If you want to open really BIG input decks, use Gvim, it has already integrated abaqus syntax, including card folding, which is super handy to overview an input deck.Īnother very nice options is Sublime Text, my favorite text editor, but it is not free. That PrePoMax looks quite interesting! Shame I cant run it in Linux.įor editing the input files, I use VS Code with the abaqus plugin.