'read' [<geo-file> ['add']]|
[<list-file> '-n'|'-e'<column>]|
[<text-file> 'stack']|
[<edge-file> 'edg']|
[<pixel-file> [<zoom>]|[<x_zoom> <y_zoom>]]

This keyword is used to read files or commands from a file. Most commands can be read from a file but not all of them. In general all basic commands to create geometry are understood and up to now this is the only way to read pre defined geometry during run-time. To read commands from a file like pnt, line, node, or seta and so on, type

this will eventually replace entities if their names were already in use. To prevent this, type

this forces the program to change the names which are already in use to unused ones. Therefore no existing geometry will be overwritten. It is advisable to name command files which contain more than the basic geometry commands with a different name extention as '.fbd' since a subsequent 'save' would overwrite the command file with a file which contains just the basic geometry commands (it is a common practice to use '.fbl' instead).

If an ccx-input-file with loads, boundary-conditions and sets is read with a command like

then the loads and boundary-conditions are stored in automatically created sets which start with a leading '+'. For example the ccx command '*BOUNDARY' will trigger the creation of the set '+bou'. The ccx sets are stored in cgx sets of the same name. The load-values are stored in Datasets.

The option “nom” (no-mesh) can be used to speed up the reading of frd or inp formatted files like:

and/or

This option suppresses the reading of nodes and elements and makes sense if the mesh exists and only the set-definitions and loads or results should be read.

If the parameter ”add” is used,

then existing node- or element-numbers are not overwritten and the program choses new numbers. If the ccx-input-file ends with “.inp” the parameter “inp” might be omitted.

An openFoam file [9] can be read in a similar way

as an ccx input file. Sets will be created if defined in the openFoam file. Results can be used for mapping purposes. For further details see “How to map loads” in the appendix.

The user might read a result-file in frd format during runtime. If a mesh exists and should not be overwritten just add the parameter “add”

this forces the program to change the numbers which are already in use to unused ones. Existing datasets will be extended by the new node-numbers and their data. The option “ext”

will also extend the existing datasets but in this case the nodes and elements are updated (modified). If no parameter follows then existing nodes and elements are updated and the new datasets will be appended to existing ones. Since the dependency checks are time consuming the user might scip them by using the 'ne' parameter. Then the existing mesh is deleted before the new one is read:

It is also possible to read files written in the result format (.frd) during runtime only to define sets of nodes or elements without changing the definitions of them. The command

will create a set of the name setname and all nodes and elements listed in the file mesh.frd will be added to that set. But this will NOT create or modify the nodes and elements. All nodes and elements must exist and will not be changed.

In case a file written in an un-common format should be evaluated the user may read the file into the cgx stack memory:

Then the user may loop over the stack using “while” and “valu” to read and evaluate each record. Extracted data can be stored in new datasets (see “ds” and “node”). An example can be found in “User File Parser”.

An ascii stl file can be read with

The file stores just triangles which will be interpreted as unconnected triangle elements. The nodes of this mesh can be merged (“merg”) and the resulting connected elements can be used as a basis for a tet mesh (see “mesh” and “mids”).

If a file with the numbers of nodes or elements is not available in the result format (.frd) then a so called list-file could be read instead. In such a file either numbers of nodes or elements can be defined. The numbers found in a specified column is interpreted as a node- or element-number. If ”-n” is specified the numbers are interpreted as nodes and if ”-e” is specified the numbers are interpreted as elements. For example

will define a set storing names of elements from the third column of file list-file.txt. The created set-name is always the name of the file.

NETGEN Import

In case NETGEN is used for meshing then the edges which are generated by NETGEN can be included for modifications;

will create beam elements based on the defined edges. When the modifications are done, the beam elements can be exported in the NETGEN-edge format with the ”send setname stl” command and used for meshing in netgen (see also ”How to deal with CAD-geometry”). The netgen mesh can be imported with

read netgen-file ng

If the NETGEN (.vol) file contains solid elements, all shells and beams are only used to define surface sets of nodes and faces (+set<nr>). The shell elements and beams are deleted by default. If you want to be more selective about the elements imported from netgen, you use the keyword ndsb (NoDeleteShellsAndBeams).
read myfile.vol ng ndsb

This keyword forces all the netgen elements to be imported. Be aware that the imported NETGEN element types (1D, 2D and 3D elements) are distributed in various sets for further operations (as well as being contained in set 'all'). For instance the set '+typ11' will contain all elements of type 11 (2-node beams). Please see ”Element Types” for a key to the element numbers.

If a pixel-file in xwd-format is available it can be included as a background-picture. The user can then create geometry based on this picture: