Getting Started
Keywords: cgx

Next: Program Parameters Up: CalculiX USER'S MANUAL - Previous: File Formats Contents

#
Getting Started

For installation look in the INSTALL file. After the program is installed on your machine you should check the functionality. For this purpose some examples are included in the distribution. Before we start you should read the section ``Input Devices''. Then we begin with a result file called result.frd. Just type
``cgx result.frd''
and some information is echoed in the xterm and a new window called main window appears on the screen, see Figure 1. Now you should continue with the subsection ``Dataset'' and ``Entity'' which explains how to display results. After seeing the values you might play around a bit with the ``Menu''. See also the commands ``steps'', ``max'', ``min'', ``scal'' which might be used to modify the representation. But watch out if you type a command, the cgx window MUST stay active and not the xterm from which the program was started. So better stay with the mouse pointer in the cgx window. At next ``Quit'' the program and type
``cgx -b geometry.fbd''
in the xterm. 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 xterm from which the program was started. After you see ``ready'' in the parent xterm the mesh is created. To actually see it type ``plus ea all''. Now you see the mesh without illumination. To see the mesh as a wire-frame chose in the main menu ``Viewing'' and continue to the entry ``Lines''. To see the mesh illuminated chose in the main menu ``Viewing'' and continue to the entry ``Show Elements With Light''. Now you see just a illuminated wire-frame of all elements. Mostly it is sufficient to see only the surface elements, for this purpose chose in the main menu ``Viewing'' and continue to the entry ``Toggle Surfaces/Volumes''. To see it filled chose in the main menu ``Viewing'' and continue to the entity ``Fill''. If you start the 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 chose 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
``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

- points with ``qpnt`` or ``pnt``,
- lines with ``qlin'',
- surfaces with``qsur'',
- Bodies with ``qbod''.

If possible you should create higher geometry by sweeping or copying geometry with ``swep'' or ``copy''. It should be mentioned that you might also 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. Therefore the user might write a command file for repeated actions.

After the geometry is created the divisions of the lines can be changed to control the density of the elements using

- ``qdiv''.

But before display the lines and there divisions with the command

- ``plot ld all''.

The default division is ``2''. With a division of''2'' a line will have 3 nodes and will therefore be the edge of just one element of the quadratic type. Now the type of the elements must be defined. This can be done individual for the entites of different sets. A new assignment will replace a previous one. Delete all previous assignments with

- ``elty all''

and assign new types with

- ``elty all he20''.

If a mesh is already defined type

- ``del mesh''

and mesh again with

- ``mesh all''.

Then choose the menu entity ``Viewing - Show Elements With Light'' to see the mesh lighted. At last export the mesh in the calculix solver format with

- ``send all abq''.

With this command (send) it is also possible to write boundary conditions, loads and equations to files. The equations are useful to ``glue'' parts together.
It is advisable to save the work from time to time without exiting the program. This is done with the command

- ``save''.

You leave the program either with

- ``exit''

or with

- ``quit''.

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 just closes the program without a save.

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
``cgx -c solverfile.inp''
for a final check. All predefined sets are available together with additional automatically generated sets which store boundaries, equations and more. This sets start with the ``+''-sign. For example the set +bou stores all constrained nodes where the set +bou1, +bou2, +bou3 store the constrains for the individual directions. Further the set +dep and +ind store the dependend and independend nodes involved in equations etc. See which sets are defined with the command

- ``prnt se''.

In addition predefined loads are stored as ``Datasets'' to be visualized. Sets with the same name store the affected faces. Use the command

- ``plot''

or

- ``plus''

to visualize entities of sets.

Then run the input file with ccx. The result file (.frd) can be visualized with
``cgx resultfile.frd ccxinput.inp''
were the file ccxinput.inp is optional. With this file the sets, boundary conditions and loads used in the input-file 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 [9] and look in the appendix, section Tips and Hints and Known Problems.

Next: Program Parameters Up: CalculiX USER'S MANUAL - Previous: File Formats Contents