Hey all,
Till now, I used CalculiX by manually writing .fbd files for the geometry and then solving it with ccx.
Is there any option, where I can use a .step/iges file geometry with the ccx, instead of creating the .inp myself ?
My aim is to run an optimisation loop (with another open source optimisation software) where the parameters in the .inp file are changed every loop. Both ccx and the optimisation software are called within a shell script
You will have to mesh the step/iges files and apply analysis features to be written in the input file. If you want to run parametric studies involving geometry, you could try using FreeCAD. It supports CalculiX in its FEM workbench, has Python scripting and even some add-ons specifically for parametric studies.
Thanks for the quick reply and Sorry, there was a mistake in my original question:
What if wanted to say was “instead of writing the .fbd file myself”. So how can the mesh and boundary files usually created by cgx for input to ccx, be created by using a step file ?
Could you please provide little more detail on the method you suggested ?
The other software is dakota
In FreeCAD, you can create geometry like in any other CAD software (no need to use step files if you stay in FreeCAD). Then in the FEM workbench set CalculiX study by meshing the geometry and applying analysis features to it. There are many tutorials covering basic setup. Once you get familiar with that, you can try some parametrization/optimization. There is a Spreadsheet workbench to parameterize many aspects of FreeCAD models but for automatic submission you will need a Python script or some ready-made solution like this add-on workbench: FemByGen Workbench - Parametric FEM Analysis - FreeCAD Forum
That is assuming that you want to change the geometry on every iteration. If it’s just about changing the analysis feature while the geometry and mesh always stay the same then there are easier ways since you can just use a script to change the input deck written in text format.
Thanks… that’s sounds great and I will look into it.
But for now, I actually have solidworks files and I do not want to remodel them again in another CAD software. Also I am familiar with using dakota and would like to do the optimisation part with it. So is there also a way I can realise that with solidworks cad files and dakota, instead of having to model the parts again ?
Can this be done with PrePoMax ? and is PrePoMax better than FreeCAD for pre processing (meshing/boundary conditions, etc) ?
FreeCAD can also work with step files. You just won’t be able to parameterize the geometry (unless you add e.g. some cutouts or new extrusions to it). But the rest can be scripted with Python. PrePoMax is great as a pre- and postprocessor for CalculiX but doesn’t have any scripting capabilities yet. The chooce of preprocessor also depends on what kinds of analysis features you want to use - whether they are supported and easy to define in a given preprocessor or not. Of course, basic features like force/pressure loads and displacement boundary conditions are common for all preprocessing tools.
Hi @MS_d,
you could also take a look at Cubit.
There is a free component to allow pre- and postprocessing for calculix that’s already got a pyhton interface to query results.
There is already a webinar that at least describes a Dakota, Cubit Moose workflow too.
There is also to possibility to change geometric features.
Here is a example.
A plate with a hole under tension. I tweak the hole to get a bigger radius and rerun the simulation until a limit mises stress in the hole is reached.