Using standalone CalculiX

Some PrePoMax users may not be used to running analyses outside of this GUI. And it’s sometimes necessary, for example in those cases:

  • changes that can’t be handled by the keyword editor (like unsupported element types)
  • submitting many analyses with small differences between them
  • testing different versions of CalculiX

Here’s how to do it on Windows:

  1. Download the package with CalculiX files from http://www.dhondt.de/

  2. After unpacking, you can use the solver by just putting its executable file (called ccx_static.exe in the current releases) in a folder containing the input file (e.g. exported from PrePoMax). Then open the command line (PowerShell in new Windows versions won’t work, you have to use the traditional command line) - it can be activated in the current folder by typing cmd in the File Explorer’s address bar. Then type this in the command line: ccx_static input_file_name

  3. Simple as that. But if you don’t want to copy the solver executable to a folder with an input file each time, you can add CalculiX to the path system variable. On Windows 10:

  • search for Edit the system environment variables
  • go to Advanced → Environment Variables… → System variables
  • select Path and click Edit, click New and paste the directory of the ccx_static.exe file (without its name, only the path to the folder in which it’s located)
  • after confirming, you can use the ccx_static command in any folder without the need to paste the solver executable there
  1. It’s usually also necessary to enable parallelization for CalculiX analyses. For this purpose, type setx OMP_NUM_THREADS "number_of_your_cpus" in the command line or use System Properties —> Advanced —> Environment Variables… as described above (just add a new variable named OMP_NUM_THREADS and its value being the number of cpus instead of modifying the existing Path variable). To check the value of this variable using the command line, type: echo %OMP_NUM_THREADS%

  2. If you want to use GraphiX (a simple postprocessor native to CalculiX, can help e.g. when some elements not supported by PrePoMax are involved), you will need the cxg_GLUT.exe and glut64.dll files. They are available in the same package as the solver. Use the following command to start postprocessing with this tool: cgx_glut results_file_name.frd Left-click somewhere in the empty space outside of the 3D view window to access options. To display results, choose Datasets → frame_number → variable_name then go back to Datasets and select Entity → component_name. To scale the deformed shape, select Viewing → Toggle Add-Displacement and then Toggle CommandLine from tools and type: scal d scale_factor. The rest can be found in the documentation: http://www.dhondt.de/cgx_2.21.pdf

11 Likes

thanks for detailed tips and hopefully useful for anyone also, maybe some note related to ccx_dynamic.exe with dynamic link library (DLL’s) of Pardiso solver and MFront materials need to be added for completeness.

Actually, it’s an old topic but I updated it today so it appeared at the top again.

Regarding Pardiso, there’s a separate thread here: Use Prepomax Solvers - Pardiso