My CalculiX projects are all kept in their own directories.
In each of those directories there exists a
This contains instructions for the make program.
By default, invoking
make in this directory runs the pre-processor and the
But there are also specific sub-commands, for example:
- “make mesh” shows the mesh used in the FEA.
- “make disp” shows the deformed product in the post-processor.
- “make stress” shows the stresses in the product in the post-processor.
make does is re-build targets if their sources are more recent then
the target. Targets can be real files, but they don’t need to be.
Targets that are not files are called “phony”.
By default it rebuilds the first target that it finds in the
The first targets in my standard
Makefile for CalculiX look like this.
all: static.frd # Run the pre-processor all.msh: pre.fbd cgx -bg pre.fbd # Run the solver static.frd: static.inp all.msh /usr/bin/time -lh env OMP_NUM_THREADS=4 ccx -i static rm -f static.log spooles.out *.12d *.cvg *.sta
So by default, it tries to rebuild the
all target, which depends on the
That file depends in turn on
The target file
all.msh depends on the source file
all.msh, the command
cgx -bg pre.fbd is run.
The commands should be indented with an actual
Dependencies can be nested. As shown above,
all.msh is both a target and
To create the file
static.frd, the solver is run in the first command.
After that some temporary files are cleaned up in the second command.
So if I invoke
make after having edited either
static.inp, it will call the required programs to rebuild the targets.
Next to these real targets, there are some “phony” targets to view the results.
# view the mesh mesh: all.msh cgx -b view-mesh.fbd # view displacements disp: static.frd view-disp.fbd cgx -b view-disp.fbd # view (laminate) stress stress: static.frd view-stress.fbd cgx -b view-stress.fbd # view core stress core: static.frd view-core.fbd cgx -b view-core.fbd
To view the calculated stress, I can now just use:
.fbd files used here are convenient groupings of post-processor
An example of a
# Titles capt Sandwich panel 3-point bending ulin Worst principal stress # Read data read static.frd read static.inp # Mirror because of symmetry. copy all new mir x a comp all do # Orient the view. rot y rot r 30 rot u 15 frame zoom 0.8 # Select and display data. cmap turbo ds 12 e 23 view disp view elem
These will be slightly different depending on the simulation, but the pattern is generally the same.
For comments, please send me an e-mail.
- Corrugation against buckling
- Approximating elliptical arcs in CalculiX Graphics
- Hex versus tet meshes in FEA
- Singularities versus stress concentrations in FEA
- Mooney-Rivlin rubber data for CalculiX