For installation help, see .../Calculix/cgx_X.X/INSTALL. After the program is installed on your machine, you should check the functionality by running the examples included in the distribution. The examples are located in .../Calculix/cgx_X.X/examples/. Begin with a result file called result.frd. Just type
and some information is echoed in the konsole and a new window called main window appears on the screen. The name conventions used for the different areas in the main-window are explained in figure 2. Now you should move the mouse pointer into the menu-area and press the left mouse-button. Keep it pressed and continue over the menu item “Dataset” to “Disp”. There you release the button. Then press the left button again and continue over “Dataset” and “Entity” to “D1”. For background informations look into the subsection ”Datasets” and ”Entity” which explains how to display results. After seeing the values you might play around a bit with the ”Menu”. Before going further, you should read the section ”Input Devices”. See also the commands ”steps”, ”maxr”, ”minr”, ”max”, ”min” (or the combination of max and min ”mm”) and ”scal” which might be used to modify the colour representation of the displayed values. For example type “min 0” to set the lower value of the colour bar to zero. Now you should study the following interactive commands: Use ”qenq” to enquire values at nodes. Use ”qtxt” to generate node attached texts showing their number and value. Use ”qcut” to generate a section through the model. And use ”graph” to generate a 2D time history plot (for results with several time-steps) or a 2D plot of values along a sequence of nodes (see ”qseq”). In case you want to display just a set of nodes, faces or elements with their results use the ”plot”, ”plus” and ”minus”. commands (see also ”How to get the sets from a geo- or ccx-inp file for post-processing”). Watch out when you type a command; the cgx window MUST stay active and not the konsole from which the program was started. It is better to stay with the mouse pointer in the cgx window. Next, ”Quit” the program and type
”cgx -b geometry.fbd”
in the konsole. The program starts again but now you see only a wire-frame of the geometry. Move the mouse-pointer into the new window and type ”mesh all”. The mouse-pointer MUST stay in this window during typing and NOT in the konsole from which the program was started. After you see ”ready” in the parent konsole, the mesh is created. To actually see it, type ”plus ea all”. Now you see the mesh in green color. To see the mesh as a wire-frame, choose in the main menu”Viewing” and continue to the entry ”Toggle Element Edges” and then again in ”Viewing” choose ”Dots”. To see the mesh illuminated chose in the main menu ”Viewing” and continue to the entry ”Show Elements With Light”. To see it filled, choose in the main menu ”Viewing” and continue to the entity ”Fill”. Most of the time it is sufficient to see the surface elements only. For this purpose, choose in the main menu ”Viewing” and continue to the entry ”Toggle Surfaces/Volumes”. If you start cgx in the post processor mode, as you did in the first example (cgx result.frd), the surface mode is automatically set. To see the interior of the structure, choose in the main menu ”Viewing” and continue to the entity ”Toggle Culling Back/Front”. To save the mesh in the format used by the solver, type ”send all abq”. To store the mesh in the result format type ”send all frd”.
To create a new model start the cgx by typing
If possible, create higher geometry by sweeping or copying geometry with ”swep” or ”copy”. You might move or scale your model with the command ”move”. The commands require sets to work with. Sets reference entities like bodies or nodes. They are useful because you can deal with a bunch of entities at once. See the section ”How to define a set of entities” about how to create them.
You may write a file with basic commands like ”pnt” to create the basis for your construction and read it with the ”read” command. Most commands can be used in batch mode. This allows the user to write a command file for repeated actions.
”cgx -b file”
where ”file” will be the name of the new model if you later exit the program with the command ”exit”. The way to create a model from scratch is roughly as follows, create
If you want to start with CAD geometry then please read ”How to deal with CAD-geometry”.
The interactive commands start with the letter 'q'. Please make yourself familiar with all of them before you start to model complex geometry.
After the geometry is created, the divisions of the lines can be changed to control the density of the elements. Display the lines and their divisions with
To change the element division, use
The default division is ”4”. With a division of”4,” a line will have 6 nodes and will therefore be the edge of two element of the quadratic type. Next, the type of the elements must be defined. This can be done for each of the different sets. A new assignment will replace a previous one. Delete all previous assignments with
and assign new types with
If a mesh is already defined type
and mesh again with
Then choose the menu entity ”Viewing - Show Elements With Light” to see the illuminated mesh. Lastly, export the mesh in the calculix solver format with
With the ”send” command, it is also possible to write boundary conditions, loads and equations to files. The equations are useful to ”glue” parts together (see ”How to connect independent meshes”.
It is advisable to save your work from time to time without exiting the program. This is done with the command
You leave the program either with
Exit will write all geometry to an fbd-file and if a file of this name exists already then the extension of this file will be renamed from fbd to fbb. ”quit” closes the program without saving.
A solver input file can be written with the help of an editor (emacs, nedit etc.). If you write a ccx command file, then include the mesh, the boundary conditions etc. with the ccx command ”*INCLUDE”. After you finished your input-file for the solver (ccx) you might read it by calling the program again with
Each line starts with the set-index, then the set-name followed by the number of all referenced entities. The sets can be specified by index or name. For example if the index of set ”blade” is ”5” the following commands are equivalent:
”cgx -c solverfile.inp”
for a final check. All predefined sets are available together with automatically generated sets which store boundaries, equations and more. These sets start with the ”+”-sign. For example the set +bou stores all constrained nodes where the set +bou1, +bou2, +bou3 store the constraints for the individual directions. Further the set +dep and +ind store the dependent and independent nodes involved in equations etc. See which sets are defined with the command
The use of wildcards is possible to search for a certain expression:
Now all sets starting with a “+” in their names will be listed.
- ”plot p 5”
- ”plot p blade”
Predefined loads are stored as ”Datasets” to be visualized. Sets with the name of the load-type (CLOAD, DLOAD) store the related nodes, faces or elements. Use the command
to visualize entities of sets.
Then run the input file with ccx. The result file (.frd) can be visualized with
”cgx result.frd solverfile.inp”
were the solver input file ”filename.inp” is optional. With this file, the sets, boundary conditions and loads used in the calculation are available together with the results.
If you have problems doing the above or if you want to learn more and in more detail about the cgx continue with the tutorial  and look in the appendix, section Tips and Hints and Known Problems.