Skip to content

Salome universal to CalculiX converter. Converts UNV mesh to the CalculiX INP format.

License

Notifications You must be signed in to change notification settings

calculix/unv2ccx

Repository files navigation

© Ihor Mirzov, 2019-2023
Distributed under GNU General Public License v3.0

PyPi PyPi downloads
GitHub Github All Releases




Downloads | How to use | Screenshots | Your help | For developers | TODO




Salome to CalculiX converter (unv to inp)

Converts Salome .unv file to CalculiX .inp format.

This converter is based on Joël's Cugnoni UNV parser available with CalculiX Launcher distribution. I allowed myself to slightely improve it and translate into Python 3. INPWriter's methods are fully refactored and now allow to convert beams. See folder examples for list of tested UNV elements. All generated INP files are processed by CalculiX GraphiX and CalculiX Adanced Environment without any errors.

Thanks to Niclas Stenberg for fixing bug with empty sets.



How to use

Download Linux and Windows binaries from the releases page. Binaries don't need to be installed.

Result INP-file name is the same as UNV-file name. So only one argument should be passed to the converter:

in Linux:       ./unv2ccx file.unv
in Windows:     unv2ccx.exe file.unv



Screenshots

1D and 2D UNV elements in Salome:
UNV 2D Converted 1D and 2D elements in CalculiX GraphiX:
INP 2D

3D UNV elements in Salome:
UNV 3D Converted 3D elements in CalculiX GraphiX:
INP 3D



Your help

Please, you may:



For developers

PyPI pyversions Visual Studio Code

To run this converter from source you'll need Python 3.

Install unv2ccx package with command:

pip3 install unv2ccx

In your code use unv2ccx package in this way:

import unv2ccx
c = unv2ccx.Converter(unv_file_name)
c.run()

If you have Python version >= 3.8 create binary with nuitka:

pip3 install nuitka

In Windows:
set CC=C:\\MinGW64\\mingw64\\bin\\gcc.exe
python3 -m nuitka --follow-imports --mingw64 __init__.py

In Linux:
python3 -m nuitka --follow-imports __init__.py

If you have Python version < 3.8 create binary with pyinstaller:

pip3 install pyinstaller
pyinstaller __init__.py --onefile

Read here about how to create packages for pypi.org:

python3 -m pip install --user --upgrade setuptools wheel twine
python3 setup.py sdist bdist_wheel
twine upload dist/*



TODO

  • Multiprocessing for tests.
  • Correctly convert UNV surface set into INP surface.
  • Use pyuff module
  • Support keyword *HEADING
  • Support keyword *SURFACE

About

Salome universal to CalculiX converter. Converts UNV mesh to the CalculiX INP format.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages