Name | ccx2paraview JSON |
Version |
3.2.0
JSON |
| download |
home_page | None |
Summary | CalculiX to Paraview converter (frd to vtk/vtu). Makes it possible to view and postprocess CalculiX analysis results in Paraview. Generates Mises and Principal components for stress and strain tensors. |
upload_time | 2024-12-19 21:17:20 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | GPL-3.0 |
keywords |
converter
vtk
vtu
paraview
calculix
frd
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
© Ihor Mirzov, 2019-2024
Distributed under GNU General Public License v3.0
[![PyPi](https://badgen.net/badge/icon/pypi?icon=pypi&label)](https://pypi.org/project/ccx2paraview)
[![PyPi downloads](https://img.shields.io/pypi/dm/ccx2paraview.svg)](https://pypistats.org/packages/ccx2paraview)
[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com/calculix/ccx2paraview)
[![Github All Releases](https://img.shields.io/github/downloads/calculix/ccx2paraview/total.svg)](https://github.com/calculix/ccx2paraview/releases)
<br/><br/>
---
[Downloads](https://github.com/calculix/ccx2paraview/releases) |
[How to use](#how-to-use) |
[Screenshots](#screenshots) |
[Your help](#your-help) |
[For developers](#for-developers) |
[TODO](#todo)
---
<br/><br/>
# CalculiX to Paraview converter (frd to vtk/vtu)
Converts [CalculiX](http://www.dhondt.de/) ASCII .frd-file to view and postprocess analysis results in [Paraview](https://www.paraview.org/). Generates von Mises and principal components for stress and strain tensors.
Creates separate file for each output interval - it makes possible to animate time history.
**Caution!** If you have 300 time steps in the FRD, there will be 300 Paraview files. If you need one file - write output only for one step in your CalculiX model.
**Hint!** If you want/need to only have one file including all of the timesteps, you can easily save everything into one vtkhdf-file in ParaView - either manually in ParaView after loading the .pvd-file or in Python by using ParaView's paraview Package (See section: [Create vtkhdf-file](#create-vtkhdf-file-using-paraviews-simple-module)).
Converter is tested on [CalculiX examples](https://github.com/calculix/examples). Here is how some [test log](https://github.com/calculix/ccx2paraview/blob/master/tests/test.log) looks like.
FRD reader is tested to reduce processing time as much as possible. Now it's quite optimized and fast, but Python itself is slower than C/C++. Here we can do nothing, so, for example, [Calmed converter](https://calculix.discourse.group/t/exporting-mode-shapes/182/7) must be faster - another question is if it's able to read and convert any CalculiX results.
<br/><br/>
# How to use
## Release Version
### Installation
#### Installation with pip or pipx
To install and run the latest release (version 3.2.0) of of this converter you'll need [Python 3](https://www.python.org/downloads/) (Python >= 3.9).
# install via pip:
pip install ccx2paraview
VTK needs to be available on your system for ccx2paraview to run, either directly or from ParaView's python package. When you have neither, install VTK as an optional dependency alongside (works also with [pipx](https://pipx.pypa.io/stable/installation/) to install [apps](#usage), which are exposed on your $PATH and will be run in an isolated environment):
# install via pip:
pip install 'ccx2paraview[VTK]'
# or, with pipx:
pipx install 'ccx2paraview[VTK]'
**Attention!** Using vtk and numpy concurrently seems broken in python 3.13. When using pipx on a computer with Python 3.13, install ccx2paraview with a python version < 3.13, e.g.:
pipx install 'ccx2paraview[VTK]' --python 3.12
#### Installation with a conda environment
You can also use a [conda](https://docs.anaconda.com/miniconda/miniconda-install/) environment to install ccx2paraview:
# Install to a new conda environment:
conda create -n ccx2paraview_env numpy paraview ccx2paraview
**Hint!** Don't forget to activate the conda environment before trying to use ccx2paraview:
conda activate ccx2paraview_env
**Hint!** Installing paraview and ccx2paraview from the conda-forge channel can be achieved by adding conda-forge to your channels with:
conda config --add channels conda-forge
conda config --set channel_priority strict
### Usage
Having installed ccx2paraview, run the converter with command (both in Linux and in Windows):
ccx2paraview yourjobname.frd vtk
ccx2paraview yourjobname.frd vtu
Also you can pass both formats to convert .frd to .vtk and .vtu at once.
There are also the following aliases for converting files to a fixed format
ccxToVTK yourjobname.frd
ccxToVTU yourjobname.frd
#### Using ccx2paraview in your python code
To use the current release of ccx2paraview in your python code (having installed with pip or into a conda environment):
```Python
import logging
from ccx2paraview import Converter
logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')
c = Converter(frd_file_name, ['vtu'])
c.run()
```
#### Create vtkhdf-file using ParaView's simple Module
While ccx2paraview cannot convert to vtkhdf directly (yet), you can create such a single file bundling all of the timesteps into one by using ParaView's [simple Module](https://www.paraview.org/paraview-docs/latest/python/paraview.simple.html).
When you are using a [conda environment](#installation) with ParaView, a working version of ParaView's simple Module should be available in the environment.
```Python
# use ccx2paraview to convert the file '/Users/ccx/ball.frd'
# into vtu-files ('/Users/ccx/ball.x.vtu') and write a pvd-file
from ccx2paraview import Converter
c = Converter('/Users/ccx/ball.frd', ['vtu'])
c.run()
# Convert all vtu-files into one vtkhdf file
# - the .vtkhdf-extension is mandatory for ParaView to write the correct output
# - The Compression level (0-9) is set to 4 here, making the vtkhdf-file
# roughly the same size as the input vtus toghether
from paraview.simple import (SaveData, PVDReader)
pvd_proxy = PVDReader(registrationName='ball', FileName='/Users/ccx/ball.pvd')
SaveData('/Users/ccx/ball.vtkhdf', proxy=pvd_proxy, WriteAllTimeSteps=1, CompressionLevel=4)
```
### General Remarks
Please, pay attention that .frd-file type should be ASCII, not binary! Use keywords *NODE FILE, *EL FILE and *CONTACT FILE in your INP model to get results in ASCII format.
It is recommended to convert .frd to modern XML .vtu format - it's contents are compressed. If you have more than one time step there will be additional XML file created - [the PVD file](https://www.paraview.org/Wiki/ParaView/Data_formats#PVD_File_Format). Open it in Paraview to read data from all time steps (all VTU files) at once.
Starting from ccx2paraview v3.0.0 legacy .vtk format is also fully supported - previously there were problems with component names.
**Attention!** While developing this converter I'm using latest Python3, latest VTK and latest ParaView. If you have problems with opening conversion results in ParaView - update it.
**Hint!** When using the [conda environment](#installation), a working version of ParaView should be available in the environment already.
#### Python Compatibility
Installation of the latest release via pip was tested with a fresh install of vtk and numpy and:
* Python 3.9: works!
* Python 3.10: works!
* Python 3.11: works!
* Python 3.12: works!
* Python 3.13: ERROR: No matching distribution found for vtk
Using a conda-environment (with numpy and paraview):
* Python 3.9: works!
* Python 3.10: works!
* Python 3.11: works!
* Python 3.12: works!
* Python 3.13: works!
### Paraview **programmable filter**
A snippet for Paraview **programmable filter** to convert 6 components data array to full tensor:
```Python
import numpy as np
res = np.array([])
pd = inputs[0].PointData['S']
for xx,yy,zz,xy,yz,xz in pd:
t = np.array([[xx,xy,xz],[xy,yy,yz],[xz,yz,zz]])
res = np.append(res, t)
tensor = dsa.VTKArray(res)
tensor.shape = (len(pd), 3, 3)
output.PointData.append(tensor, 'S_tensor')
```
A snippet for Paraview **programmable filter** to calculate eigenvalues and eigenvectors:
```Python
import numpy as np
eigenvalues = np.array([])
eigenvectors = np.array([])
pd = inputs[0].PointData['S']
for xx,yy,zz,xy,yz,xz in pd:
t = np.array([[xx,xy,xz],[xy,yy,yz],[xz,yz,zz]])
w, v = np.linalg.eig(t)
w_ = np.absolute(w).tolist()
i = w_.index(max(w_))
eigenvalues = np.append(eigenvalues, w[i]) # max abs eigenvalue
eigenvectors = np.append(eigenvectors, v[i]) # max principal vector
eigenvectors = dsa.VTKArray(eigenvectors)
eigenvalues = dsa.VTKArray(eigenvalues)
eigenvectors.shape = (len(pd), 3)
eigenvalues.shape = (len(pd), 1)
output.PointData.append(eigenvectors, 'S_max_principal_vectors')
output.PointData.append(eigenvalues, 'S_max_eigenvalues')
```
<br/><br/>
## Development Version
### Installation from github
To install this converter from github you'll need [Python 3](https://www.python.org/downloads/) and optionally [conda](https://docs.anaconda.com/miniconda/miniconda-install/):
# install vtk first
pip install vtk
pip install git+https://github.com/calculix/ccx2paraview.git
# or, with conda (paraview has vtk, so no need to install it seperately):
conda create -n ccx2paraview_devel python numpy paraview
conda activate ccx2paraview_devel
pip install git+https://github.com/calculix/ccx2paraview.git
**Attention!** Currently, installing vtk via pip seems to break ParaView's pvpython. When using the conda environment, ParaView's included vtk will be used (alongside having a working ParaView in the environment).
<br/><br/>
# Screenshots
Converted von Mises stress field with Turbo colormap:
![baffle](https://github.com/calculix/ccx2paraview/blob/master/img_baffle.png "baffle")
Converted translations field with Viridis colormap:
![blades](https://github.com/calculix/ccx2paraview/blob/master/img_blades.png "blades")
<br/><br/>
# Your help
Please, you may:
- Star this project.
- Simply use this software and ask questions.
- Share your models and screenshots.
- Report problems by [posting issues](https://github.com/calculix/ccx2paraview/issues).
- Do something from the [TODO-list](#TODO) as a developer.
- Or even [become a sponsor to me](https://github.com/sponsors/imirzov).
<br/><br/>
# For developers
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/ccx2paraview.svg)](https://www.python.org/downloads/)
[![Visual Studio Code](https://img.shields.io/badge/--007ACC?logo=visual%20studio%20code&logoColor=ffffff)](https://code.visualstudio.com/)
[![CalculiX-to-Paraview Converter](https://markdown-videos.deta.dev/youtube/KofE0x0csZE)](https://youtu.be/KofE0x0csZE "CalculiX-to-Paraview Converter")
To install and use ccx2paraview-package: see [above](#installation-from-github).
To test ccx2paraview from local sources after cloning from github, you'll find yaml-files in the ./tests-folder. Using the VSCode extension [Conda Wingman](https://marketplace.visualstudio.com/items?itemName=DJSaunders1997.conda-wingman) they can easily be built and activated from within VSCode.
The binaries are created automatically when installing with pip from github via the project scripts in [pyproject.toml](https://github.com/calculix/ccx2paraview/blob/master/pyproject.toml):
[project.scripts]
ccx2paraview = "ccx2paraview.cli:main"
ccxToVTK = "ccx2paraview.cli:ccx_to_vtk"
ccxToVTU = "ccx2paraview.cli:ccx_to_vtu"
If you have Python version >= 3.8 create binary with [nuitka](https://nuitka.net/):
pip3 install nuitka
In Windows:
set CC=C:\\MinGW64\\mingw64\\bin\\gcc.exe
python3 -m nuitka --follow-imports --python-flags=-m ccx2paraview
In Linux:
python3 -m nuitka --follow-imports --python-flags=-m ccx2paraview
If you have Python version < 3.8 create binary with [pyinstaller](https://www.pyinstaller.org/):
pip3 install pyinstaller
pyinstaller __init__.py --onefile
Read [how to create packages](https://packaging.python.org/tutorials/packaging-projects/) for [pypi.org](https://pypi.org/):
python3 -m pip install --upgrade build twine
python3 -m build
python3 -m twine upload dist/*
Read about VTK [file formats](https://vtk.org/wp-content/uploads/2015/04/file-formats.pdf) and VTK [unstructured grid](https://kitware.github.io/vtk-examples/site/VTKFileFormats/#unstructuredgrid). Remember that FRD file is node based, so element results are also stored at nodes after extrapolation from the integration points.
<br/><br/>
# TODO
Test CALMED binary.
Log memory consumption.
Read binary .frd files: https://github.com/wr1/frd2vtu
Read DAT files: it would be a killer feature if Paraview could visualize results in Gauss points. Use [CCXStressReader](https://github.com/Mote3D/CCXStressReader).
Contribute to meshio. FRD writer. Use meshio XDMF writer: https://github.com/calculix/ccx2paraview/issues/6
Add element’s material tangent stiffness tensor. Easiest for the paraview user would be to provide it in the (deflected) global cartesian frame. This dataset is useful for checking input data for anisotropic materials, as well as for the stuff with inverse design of fields of this tensor. But it’s a lot more work to produce, especially with nonlinear materials. It’s almost as useful to see the highest principal value of the stiffness, as a scalar or a vector. (but for the vector you need to do the transformation)
Raw data
{
"_id": null,
"home_page": null,
"name": "ccx2paraview",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "Ihor Mirzov <imirzov@gmail.com>",
"keywords": "converter, vtk, vtu, paraview, calculix, frd",
"author": null,
"author_email": "Ihor Mirzov <imirzov@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/68/80/2d3f15215a6ef3029bc4a5a58365cd6979a8d9dd2ca7b97e7ef929381522/ccx2paraview-3.2.0.tar.gz",
"platform": null,
"description": "\u00a9 Ihor Mirzov, 2019-2024 \nDistributed under GNU General Public License v3.0\n\n[![PyPi](https://badgen.net/badge/icon/pypi?icon=pypi&label)](https://pypi.org/project/ccx2paraview)\n[![PyPi downloads](https://img.shields.io/pypi/dm/ccx2paraview.svg)](https://pypistats.org/packages/ccx2paraview) \n[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com/calculix/ccx2paraview)\n[![Github All Releases](https://img.shields.io/github/downloads/calculix/ccx2paraview/total.svg)](https://github.com/calculix/ccx2paraview/releases)\n\n<br/><br/>\n\n---\n\n[Downloads](https://github.com/calculix/ccx2paraview/releases) |\n[How to use](#how-to-use) |\n[Screenshots](#screenshots) |\n[Your help](#your-help) |\n[For developers](#for-developers) |\n[TODO](#todo)\n\n---\n\n<br/><br/>\n\n# CalculiX to Paraview converter (frd to vtk/vtu)\n\nConverts [CalculiX](http://www.dhondt.de/) ASCII .frd-file to view and postprocess analysis results in [Paraview](https://www.paraview.org/). Generates von Mises and principal components for stress and strain tensors.\n\nCreates separate file for each output interval - it makes possible to animate time history. \n\n**Caution!** If you have 300 time steps in the FRD, there will be 300 Paraview files. If you need one file - write output only for one step in your CalculiX model.\n\n**Hint!** If you want/need to only have one file including all of the timesteps, you can easily save everything into one vtkhdf-file in ParaView - either manually in ParaView after loading the .pvd-file or in Python by using ParaView's paraview Package (See section: [Create vtkhdf-file](#create-vtkhdf-file-using-paraviews-simple-module)).\n\nConverter is tested on [CalculiX examples](https://github.com/calculix/examples). Here is how some [test log](https://github.com/calculix/ccx2paraview/blob/master/tests/test.log) looks like.\n\nFRD reader is tested to reduce processing time as much as possible. Now it's quite optimized and fast, but Python itself is slower than C/C++. Here we can do nothing, so, for example, [Calmed converter](https://calculix.discourse.group/t/exporting-mode-shapes/182/7) must be faster - another question is if it's able to read and convert any CalculiX results.\n\n<br/><br/>\n\n# How to use\n\n## Release Version\n\n### Installation\n\n#### Installation with pip or pipx\n\nTo install and run the latest release (version 3.2.0) of of this converter you'll need [Python 3](https://www.python.org/downloads/) (Python >= 3.9). \n\n # install via pip:\n pip install ccx2paraview\n\nVTK needs to be available on your system for ccx2paraview to run, either directly or from ParaView's python package. When you have neither, install VTK as an optional dependency alongside (works also with [pipx](https://pipx.pypa.io/stable/installation/) to install [apps](#usage), which are exposed on your $PATH and will be run in an isolated environment): \n\n # install via pip:\n pip install 'ccx2paraview[VTK]'\n # or, with pipx:\n pipx install 'ccx2paraview[VTK]' \n\n**Attention!** Using vtk and numpy concurrently seems broken in python 3.13. When using pipx on a computer with Python 3.13, install ccx2paraview with a python version < 3.13, e.g.:\n\n pipx install 'ccx2paraview[VTK]' --python 3.12\n\n#### Installation with a conda environment\n\nYou can also use a [conda](https://docs.anaconda.com/miniconda/miniconda-install/) environment to install ccx2paraview:\n\n # Install to a new conda environment: \n conda create -n ccx2paraview_env numpy paraview ccx2paraview\n\n**Hint!** Don't forget to activate the conda environment before trying to use ccx2paraview:\n\n conda activate ccx2paraview_env\n\n**Hint!** Installing paraview and ccx2paraview from the conda-forge channel can be achieved by adding conda-forge to your channels with:\n\n conda config --add channels conda-forge\n conda config --set channel_priority strict\n\n\n### Usage \n\nHaving installed ccx2paraview, run the converter with command (both in Linux and in Windows):\n\n ccx2paraview yourjobname.frd vtk\n ccx2paraview yourjobname.frd vtu\n\nAlso you can pass both formats to convert .frd to .vtk and .vtu at once.\n\nThere are also the following aliases for converting files to a fixed format\n\n ccxToVTK yourjobname.frd\n ccxToVTU yourjobname.frd\n\n#### Using ccx2paraview in your python code\n\nTo use the current release of ccx2paraview in your python code (having installed with pip or into a conda environment):\n\n```Python\nimport logging\nfrom ccx2paraview import Converter\nlogging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')\nc = Converter(frd_file_name, ['vtu'])\nc.run()\n```\n\n#### Create vtkhdf-file using ParaView's simple Module\n\nWhile ccx2paraview cannot convert to vtkhdf directly (yet), you can create such a single file bundling all of the timesteps into one by using ParaView's [simple Module](https://www.paraview.org/paraview-docs/latest/python/paraview.simple.html).\nWhen you are using a [conda environment](#installation) with ParaView, a working version of ParaView's simple Module should be available in the environment. \n\n```Python\n# use ccx2paraview to convert the file '/Users/ccx/ball.frd' \n# into vtu-files ('/Users/ccx/ball.x.vtu') and write a pvd-file\nfrom ccx2paraview import Converter\nc = Converter('/Users/ccx/ball.frd', ['vtu'])\nc.run()\n\n# Convert all vtu-files into one vtkhdf file \n# - the .vtkhdf-extension is mandatory for ParaView to write the correct output\n# - The Compression level (0-9) is set to 4 here, making the vtkhdf-file \n# roughly the same size as the input vtus toghether\nfrom paraview.simple import (SaveData, PVDReader)\npvd_proxy = PVDReader(registrationName='ball', FileName='/Users/ccx/ball.pvd')\nSaveData('/Users/ccx/ball.vtkhdf', proxy=pvd_proxy, WriteAllTimeSteps=1, CompressionLevel=4)\n```\n\n### General Remarks\n\nPlease, pay attention that .frd-file type should be ASCII, not binary! Use keywords *NODE FILE, *EL FILE and *CONTACT FILE in your INP model to get results in ASCII format.\n\nIt is recommended to convert .frd to modern XML .vtu format - it's contents are compressed. If you have more than one time step there will be additional XML file created - [the PVD file](https://www.paraview.org/Wiki/ParaView/Data_formats#PVD_File_Format). Open it in Paraview to read data from all time steps (all VTU files) at once.\n\nStarting from ccx2paraview v3.0.0 legacy .vtk format is also fully supported - previously there were problems with component names.\n\n**Attention!** While developing this converter I'm using latest Python3, latest VTK and latest ParaView. If you have problems with opening conversion results in ParaView - update it.\n\n**Hint!** When using the [conda environment](#installation), a working version of ParaView should be available in the environment already. \n\n#### Python Compatibility\n\nInstallation of the latest release via pip was tested with a fresh install of vtk and numpy and:\n\n* Python 3.9: works!\n* Python 3.10: works!\n* Python 3.11: works!\n* Python 3.12: works!\n* Python 3.13: ERROR: No matching distribution found for vtk\n\nUsing a conda-environment (with numpy and paraview):\n\n* Python 3.9: works!\n* Python 3.10: works!\n* Python 3.11: works!\n* Python 3.12: works!\n* Python 3.13: works!\n\n### Paraview **programmable filter**\n\nA snippet for Paraview **programmable filter** to convert 6 components data array to full tensor:\n\n```Python\nimport numpy as np \nres = np.array([])\npd = inputs[0].PointData['S']\nfor xx,yy,zz,xy,yz,xz in pd:\n t = np.array([[xx,xy,xz],[xy,yy,yz],[xz,yz,zz]])\n res = np.append(res, t)\ntensor = dsa.VTKArray(res)\ntensor.shape = (len(pd), 3, 3)\noutput.PointData.append(tensor, 'S_tensor')\n```\n\nA snippet for Paraview **programmable filter** to calculate eigenvalues and eigenvectors:\n\n```Python\nimport numpy as np\neigenvalues = np.array([])\neigenvectors = np.array([])\npd = inputs[0].PointData['S']\nfor xx,yy,zz,xy,yz,xz in pd:\n t = np.array([[xx,xy,xz],[xy,yy,yz],[xz,yz,zz]])\n w, v = np.linalg.eig(t)\n w_ = np.absolute(w).tolist()\n i = w_.index(max(w_))\n eigenvalues = np.append(eigenvalues, w[i]) # max abs eigenvalue\n eigenvectors = np.append(eigenvectors, v[i]) # max principal vector\neigenvectors = dsa.VTKArray(eigenvectors)\neigenvalues = dsa.VTKArray(eigenvalues)\neigenvectors.shape = (len(pd), 3)\neigenvalues.shape = (len(pd), 1)\noutput.PointData.append(eigenvectors, 'S_max_principal_vectors')\noutput.PointData.append(eigenvalues, 'S_max_eigenvalues')\n```\n\n<br/><br/>\n\n## Development Version\n\n### Installation from github\n\nTo install this converter from github you'll need [Python 3](https://www.python.org/downloads/) and optionally [conda](https://docs.anaconda.com/miniconda/miniconda-install/):\n\n # install vtk first\n pip install vtk\n pip install git+https://github.com/calculix/ccx2paraview.git\n\n # or, with conda (paraview has vtk, so no need to install it seperately):\n conda create -n ccx2paraview_devel python numpy paraview\n conda activate ccx2paraview_devel\n pip install git+https://github.com/calculix/ccx2paraview.git\n\n**Attention!** Currently, installing vtk via pip seems to break ParaView's pvpython. When using the conda environment, ParaView's included vtk will be used (alongside having a working ParaView in the environment).\n\n\n<br/><br/>\n\n# Screenshots\n\nConverted von Mises stress field with Turbo colormap: \n![baffle](https://github.com/calculix/ccx2paraview/blob/master/img_baffle.png \"baffle\")\n\nConverted translations field with Viridis colormap: \n![blades](https://github.com/calculix/ccx2paraview/blob/master/img_blades.png \"blades\")\n\n<br/><br/>\n\n# Your help\n\nPlease, you may:\n\n- Star this project.\n- Simply use this software and ask questions.\n- Share your models and screenshots.\n- Report problems by [posting issues](https://github.com/calculix/ccx2paraview/issues).\n- Do something from the [TODO-list](#TODO) as a developer.\n- Or even [become a sponsor to me](https://github.com/sponsors/imirzov).\n\n<br/><br/>\n\n# For developers\n\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/ccx2paraview.svg)](https://www.python.org/downloads/)\n[![Visual Studio Code](https://img.shields.io/badge/--007ACC?logo=visual%20studio%20code&logoColor=ffffff)](https://code.visualstudio.com/)\n\n[![CalculiX-to-Paraview Converter](https://markdown-videos.deta.dev/youtube/KofE0x0csZE)](https://youtu.be/KofE0x0csZE \"CalculiX-to-Paraview Converter\")\n\nTo install and use ccx2paraview-package: see [above](#installation-from-github).\n\nTo test ccx2paraview from local sources after cloning from github, you'll find yaml-files in the ./tests-folder. Using the VSCode extension [Conda Wingman](https://marketplace.visualstudio.com/items?itemName=DJSaunders1997.conda-wingman) they can easily be built and activated from within VSCode.\n\nThe binaries are created automatically when installing with pip from github via the project scripts in [pyproject.toml](https://github.com/calculix/ccx2paraview/blob/master/pyproject.toml): \n\n [project.scripts]\n ccx2paraview = \"ccx2paraview.cli:main\"\n ccxToVTK = \"ccx2paraview.cli:ccx_to_vtk\"\n ccxToVTU = \"ccx2paraview.cli:ccx_to_vtu\"\n\nIf you have Python version >= 3.8 create binary with [nuitka](https://nuitka.net/):\n\n pip3 install nuitka\n \n In Windows:\n set CC=C:\\\\MinGW64\\\\mingw64\\\\bin\\\\gcc.exe\n python3 -m nuitka --follow-imports --python-flags=-m ccx2paraview\n\n In Linux:\n python3 -m nuitka --follow-imports --python-flags=-m ccx2paraview\n\nIf you have Python version < 3.8 create binary with [pyinstaller](https://www.pyinstaller.org/):\n\n pip3 install pyinstaller\n pyinstaller __init__.py --onefile\n\nRead [how to create packages](https://packaging.python.org/tutorials/packaging-projects/) for [pypi.org](https://pypi.org/):\n\n python3 -m pip install --upgrade build twine\n python3 -m build\n python3 -m twine upload dist/*\n\nRead about VTK [file formats](https://vtk.org/wp-content/uploads/2015/04/file-formats.pdf) and VTK [unstructured grid](https://kitware.github.io/vtk-examples/site/VTKFileFormats/#unstructuredgrid). Remember that FRD file is node based, so element results are also stored at nodes after extrapolation from the integration points.\n\n<br/><br/>\n\n# TODO\n\nTest CALMED binary.\n\nLog memory consumption.\n\nRead binary .frd files: https://github.com/wr1/frd2vtu\n\nRead DAT files: it would be a killer feature if Paraview could visualize results in Gauss points. Use [CCXStressReader](https://github.com/Mote3D/CCXStressReader).\n\nContribute to meshio. FRD writer. Use meshio XDMF writer: https://github.com/calculix/ccx2paraview/issues/6\n\nAdd element\u2019s material tangent stiffness tensor. Easiest for the paraview user would be to provide it in the (deflected) global cartesian frame. This dataset is useful for checking input data for anisotropic materials, as well as for the stuff with inverse design of fields of this tensor. But it\u2019s a lot more work to produce, especially with nonlinear materials. It\u2019s almost as useful to see the highest principal value of the stiffness, as a scalar or a vector. (but for the vector you need to do the transformation)\n",
"bugtrack_url": null,
"license": "GPL-3.0",
"summary": "CalculiX to Paraview converter (frd to vtk/vtu). Makes it possible to view and postprocess CalculiX analysis results in Paraview. Generates Mises and Principal components for stress and strain tensors.",
"version": "3.2.0",
"project_urls": {
"Bug Tracker": "https://github.com/calculix/ccx2paraview/issues",
"Documentation": "https://github.com/calculix/ccx2paraview",
"Homepage": "https://github.com/calculix/ccx2paraview",
"Repository": "https://github.com/calculix/ccx2paraview"
},
"split_keywords": [
"converter",
" vtk",
" vtu",
" paraview",
" calculix",
" frd"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "81da46b9c79188084d4c650144ce8341b78ecfe3a790bcdd585de9a3a5ae9798",
"md5": "352906bd20c0563f08360d652f6745dc",
"sha256": "814520a138c4ac345809b16f6242b43e2f16bb926215bec069398a0672e887a9"
},
"downloads": -1,
"filename": "ccx2paraview-3.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "352906bd20c0563f08360d652f6745dc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 29352,
"upload_time": "2024-12-19T21:17:18",
"upload_time_iso_8601": "2024-12-19T21:17:18.532672Z",
"url": "https://files.pythonhosted.org/packages/81/da/46b9c79188084d4c650144ce8341b78ecfe3a790bcdd585de9a3a5ae9798/ccx2paraview-3.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "68802d3f15215a6ef3029bc4a5a58365cd6979a8d9dd2ca7b97e7ef929381522",
"md5": "fae4e14b559fe70d0cfc80874f75c00a",
"sha256": "c9f0c8d0fadd7de9a30be1b38ff53ecede49a87659e32b67ba32230d9dafd600"
},
"downloads": -1,
"filename": "ccx2paraview-3.2.0.tar.gz",
"has_sig": false,
"md5_digest": "fae4e14b559fe70d0cfc80874f75c00a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 36243,
"upload_time": "2024-12-19T21:17:20",
"upload_time_iso_8601": "2024-12-19T21:17:20.762219Z",
"url": "https://files.pythonhosted.org/packages/68/80/2d3f15215a6ef3029bc4a5a58365cd6979a8d9dd2ca7b97e7ef929381522/ccx2paraview-3.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-19 21:17:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "calculix",
"github_project": "ccx2paraview",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ccx2paraview"
}