'read' [<geo-file> ['add']]| [<ccx-file> 'inp' ['add'|'ext'|'nom'|'new']]| [<openFoam-file> 'foam' ['add'|'ext'|'nom']]| [<result-file(frd)> ['add'|'ext'|'nom']|[<setname>]]| [<stl-file> ['add'|'ext'|'nom']]| [<list-file> '-n'|'-e'<column>]| [<edge-file> 'edg']| [<netgen-file> 'ng' ['add'|'ext'|'nom'|'ndsb']]| [<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
If an ccx-input-file with loads, boundary-conditions and sets is read with a command like
read ccx-file inp
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:
read ccx-file inp nom
read result-file nom
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,
read ccx-file inp add
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  can be read in a similar way
read CaseDirName foam
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''
read result-file 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''
read result-file 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:
read result-file new
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
read result-file setname
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.
An stl file can be read with
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
read list-file -e3
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.
In case NETGEN is used for meshing then the edges which are generated by NETGEN can be included for modifications;
read edge-file edg
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 ngIf the NETGEN (.vol) file contains solid elements, all shells and beams are only used to define surface sets of nodes and faces (+set
>). 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 ndsbThis 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:
read pixelfile 2 4
here the picture will be scaled by a factor of ``2'' in x- and ``4'' in y-direction. Delete it with ''del pic''. The picture can not be modified in cgx. Only scaling during reading (with either a global factor or separate scaling in x- and y-direction) is supported. Other modifications have to be made with external software.
The command parameters are writen to the ''stack''.