0% found this document useful (0 votes)
293 views167 pages

GiD 13 Customization Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
293 views167 pages

GiD 13 Customization Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 167
GiD The universal, adaptative and user friendly pre and postprocessing system for computer analysis in science and engineering Customization Manual Table of Contents Chapters 1 FEATURES: 2 INTRODUCTION 2 XML file 2.1 ValidatePassw ord node 4 PROBLEMTYPE SYSTEM 4.1 Structure of the problem type 4.2 Definitions 4.3 Data tree fields 4.3.1 PTdata 4.3.1.1 container 43.1.2 value 4.3.1.3 condition 4.3.1.3.1 symbol 4.3.1.4 blockdata 4.3.1.5 edit_command 4.3.1.6 dependencies 4.3.1.7 groups 4.3.1.8 groups_types 4.3.1.8.4 group_type 4.3.1.9 units 4.3.1.9.3 unit_magnitude 4.3.,9:2.4 unit 4.3.1.20 function 4.3.1.20.1 functionVariable 4.4 Units 4.5 Main procedures 4.6 Writing the input file for calculation 4:7 User preferences 4.8 Import export materials 4.9 About Customuib 4.10 CustornLiB extras 4.10.1 SPD_fields 4.10.4. include 4.10.2 Extra functions 5 EXECUTING AN EXTERNAL PROGRAM 5.1 Show ing feedback when running the solver 5.2 Commands accepted by the GiD command.exe 5.3 Managing errors 5.4 Examples 6 PREPROCESS DATA FILES 6.1 Geometry format: Modelname.geo 6.1.1 Geometry example 7 POSTPROCESS DATA FILES 7.4 Results format: Modall'ame,postres 7.1.4 Gauss Points 7.2.2 Result Range Table 7.2.2 Result 7.2.3.3 Results example 7.4.4 Result group 7.2 Mach format: ModelN'ame.post.msh 7.2.1 Mesh example 7.2.2 Group of meshes 7.3 List fle format: Modell ame. post lst Pag, 20 a 12 13 13 33 33 33 a4 a4 a4 a4 a4 35 29 39 22 23 23 24 24 24 24 27 27 2 32 33 35 35 38 43 43 44 48 49 st 34 36 39 39 62 Table of Contents fi 7.4 Graphs file format: Modelltame.post. orf 63 8 TCL AND TK EXTENSION 65 8.1 Event procedures 6s 8.2 GiD_Process function n 8.3 GiD_Info function 3 8.3.1 automatictolerance 73 8.3.2 condtions 73 8.3.3 coordinates 74 8.3.4 check 74 8.3.5 events 74 8.3.6 gendata 8 8.3.7 geometry 5 8.3.8 gidbits 8 8.3.9 gidversion 76 8.3.10 graphcenter 76 8.2.12 intvdata 76 8.3.12 ispointinside 76 8.3.13 layers 76 8.3.14 listmassproperties ” 8.3.15 list_entities ” 8.3.16 localaxes 9 8.3.17 magnitudes 9 8.3.18 materials 9 8.3.19 mesh 9 8.3.20 meshauality 80 8.3.21 opengl 80 8.3.22 ortholimits 80 8.3.23 bounding_box 80 8.3.24 parametric et 8.3.25 perspectivefactor e1 8.3.26 postprocess et 8.3.27 problemtypepath 83 8.3.28 project 83 8.3.29 robdefauitbackground 83 8.3.30 unitssysters 34 8.3.91 variables 34 8.3.92 view 34 8.4 Special Tel commands 34 8.4.1. Geometry 84 8.4.2 Mesh 86 8.4.2.1 Preprocess mesh 86 8.4.2.2 Cartesian grid 97 8.4.2.3 Postprocess mesh 97 8.4.3 Groups 38 8.4.3.1 Definition 88 8.4.3.2 Entities 88 8.4.4 Data 89 8.4.5 Results 92 8.4.6 Sets 93 8.4.6.1 Definition 93 8.4.6.2 Entities 93 8.4.7 Graphs 94 8.4.8 GraphSets 95 8.4.9 OpenGL 95 8.4.10 Other 97 8.5 HTML help support 00 8.5.1 HelpDirs 00 Table of Contents 8.5.2 Structure of the help content 8.5.3 TocPage 8.5.4 IndexPage 8.6 Managing menus 8.7 Custorn data window = 8.7.1 TeWidget 8.7.2 Data window s behavior 8.8 Interaction with themes 8.8.1 Asking for images 8.8.2 Forcing themes use 8.8.3 Creating new themes 8.9 GID version 8.10 Detailed example 9 PLUG-IN EXTENSIONS 9. Tel plugrin 9.2 GID dynamic library plug-in 9.2.1 Introduction 9.2.2 In GiD 9.2.3 Developing the plugin 9.2.4 Functions provided by iD 9.2.5 List of examples 410 APPENDIX A (PRACTICAL EXAMPLES) 41 APPENDIX B (classic problertype system) 11.4 PROBLEMTYPE ‘CLASSIC’ 11.4.1 CONFIGURATION FILES 11.1.2.1 Conditions file (.end) 41.4.4.4.1 Example: Creating the conditions file 11.1.2.2 Problem and intervals data file (.prb) 11.4.4.2.1 Example: Creating the PRA data file 11.2.4.3 Materials file (.mat) 411.2.4..1 Example: Creating the materials file 14.1.4.4 Special fields 11.1.4.5 Unit System file (.uni) 11.1.1.6 Conditions symbols file (sim) 11.1.1.6.1 Example: Creating the Symbols file 11.2.2 TEMPLATE FILES 11.1.2.1 Commands used in the .bas file 11.1.2.1.1 Single value return commands 11.1.2.1.2 Multiple values return commands 11.1.2.1.3 Specific commands 11.1.2.2 General description 1.1.2.3 Detailed example - Template file creation 11.4.2.3.1 Formatted nodes and coordinates listing 11.1.2.3.2 Elements, materials and connectivities listing 11.4.2.3.3 Nodes listing declaration 11.1.2.3.4 Elements listing declaration 11.4.2.3.5 Materials listing declaration 411.4.2.3.6 Nodes and its conditions listing declaration 100 aon aon on 104 104 06 107 107 109 109 120 aaa a3 a3 13 13 a3 a4 us us 9 aa aaa 322 322 12s 126 126 227 128 128 133 134 134 135 136 136 140 143 150 150 154 156 156 357 158 159 1 FEATURES Gi offers the following custorrization features: + Complete menu's can be custorrised and created to suit the specific needs of the user's simulation softw are, * Simple interfaces can be developed bety een the data definition and the simulation softw are. * Simple interfaces based on scalar, vector and matrix quantities can be developed for the resuits visualisation. © Menus for the results visualisation can be customised and created according to the needs of the application or analysis, “The customization in GiD is done by creating a Problem Type, INTRODUCTION 2 INTRODUCTION When GiO is to be used for 2 particular type of analysis, itis necessary to predefine all the information required from the User and to define the w ay the final information is given to the solver module, To do so, some files are used to describe conditions, materials, general data, units systems, symbols and the format of the input file for the solver. We give the name Problem Type to this collection of files used to configure GiD for a particular type of analysis. Not this tutorial is included mith the GiD package you have bought. You can also dovnload it from the GID support web page (http://w gidhome. corn/ support). + You can also learn how to configure GiD for a particular type of analysis by following the Problem Type Tutorial; GiD has been designed to be a general-purpose Pre- and Postprocessor: consequently, the configurations for different analyses rust be performed according to the particular specifications of each solver. It is therefore necessary to create specific data input files for every solver. How ever, GiD lets you perform this configuration process inside the program itself, without any change in the solver, and without having to program any independent utility. GiD Prone Pospecess C SOLVER C INPUT OUTPUT FILE FILE “To configure these files means defining the data that must be input by the user, aswell as the materials to be implemented and other geometrical and time-dependent conditions. It is also possible to add symbols or dravings to represent the defined conditions, GiD offers the opportunity to work with units when defining the properties of the data mentioned above, but there must be a configuration file where the definition of the units systems can be found. It is also necessary to define the way in which this data is to be written inside the file that will be the input file read by the corresponding solver From the 13th version of GiD, 2 nen system of problertye has been implemented (based in the CustomLIB library) [Although the ‘classic’ problem type system is stil supported by GiD, itis considered deprecated, as the new one offers clear advanteges in terms of usability, performance and integration cappabilities. Documentation about the deprecated classic problem type systern can be found in the annex of this manual ‘This new problem type definition uses a single .=pd file to describe general properties, materials, conditions and units (as a tree with xml syntax), All this data is show ed in a ‘ree view", and materials and conditions are associated to groups of enties. About writting the input fle, Tel commands are used to write the data in files (optionally aided with the special funcion GiD_WriteCaleulationFile for efficiency). “The new problem type creation system lean on a collection of tools, which facilitates the development of advanced problem types for customizing the personal pre and post processor system GID for computer simulation codes. It is based on a XML hierarchical structure and an automatic physical tree view. XML file 3 XML file The file problem_type.xml declare information related to the configuration of the problem type, such name, version, file browser icon, passw ord validation or message catalog location, history news, etc. ‘The data included inside the xm file should observe the following structur “ifane XC/Hame> eer iene) Version By default GiD read this file when loading the problertype and provide its key-value pairs parsed in a Tel global array named 'problemtype_current (2.9. $1:problemtype_current{version) returns the version of the problerntype) Compulsory nodes: (the values of these nodes are just examples) + itane>emas7a_custonl ib to provide an identifier name for the problem type, + 1. 0¢/Version> dotted version number of the problem type. ‘The name and version of the problemtype is used to compare the version of the problemype used for a old model and do ‘an automatic transform if necessary to try to map the old and new data fields. ‘The ‘Internet retrieve! tool also uses Mame and Version to compare a local problemtype with the remote copy of the Internet repository, Optional node: © -ctiniman¢iDVersion>12.1.114¢/MiniamnGiDVersion> to state the minim GiD version required. Te the problempe iz loaded in a GID version lower than the one required a warning mevsage will he 2 cimagePil eBrowser>inages/ InageFileBrowser gifc/ ImageTileBrowser> icon image to be used in the file browser to show a project corresponding to this problem cype. The recommended dimensions for thiz + ctingeatReoe>scripes/nogs 2 pach, relative of absolute, indicating where the folder wich + .. 2 path, relative or absolute, indicating where to write the passn ord information see ValidstePacsy ord node -paq. 5). + WalidatePassword> provides a custom validation script in order to override the default GiD validation (see ValidatePassu ord node -pag. 5). + i This node must be defined only for ‘customLib like! problerrtypes, with values O (default) or 1 If true i alloys to do. automatic tasks to ure the library (otherwise the problemtype developer must write extra code to use the library, like load packages, initialize the library, etc.) + ic/ Custonk ibllativeccoups> This node must be defined only for ‘custorrLib like’ problemtypes, with values 0 (default) or 1, to specify that the library uses ‘native GID groups’ instead of ‘pseude-groups GiD conditions’ It is possible to set other non-standard nodes, to use 3.1 ValidatePassword node ‘The default action taken by GID when validating a problem type passw ord is verifying that it is nat empty. When a passu ord is considered as valid, this information is written in the fle ‘passw ord.tst’ which is lecated in the problem type directory. In order to override this behaviour, tv o nodes are provided in the .xmrl file * Passi ordPath: The value of this node specifies a relative or absolute path describing where to locate/create the file password.txt. If the value is a relative path itis taken with respect to the problem type path, Exarle: PasswordPath>.. * ValidatePassn ord: The value of this node is a Tel script which will be executed when a passw ord for this problem type needs to be validated. The script receives the parameters for validation in the following variables: key with the contents of the password typed, dir with the path of the problem type, and computer_name with the name of host machine Note: Its like this Tel procedure prototype: proc Passw ordPath { key dir computer_name} {... body... } ‘The script should return one of three possible codes: ValidatePassword node 6 On case of failure, Lin case of success 2 in case of success; the difference here is that the problem type has just saved the password. information so GID should not do it. Furthermore, we can provide a description of the status returned for GID to show to the user. If ancther status is returned, itis assumed to be 1 by default Below is an example of a node, Hvalidacion-exe simulates an external program to validade the key for chis conpucemnane Hinsvead an external program can be used a cel procedure Gf ( [catch (set rex [exec [£ile join fair validation.exe] fkey fcomputername]) megexe] ) ( zetumn (Lise 0 "Error fmagezs"] > switch “regexp -- res ( ‘eai1RB ( seturn (Lise 0 “you ask me co fail!) > ckandsaveRB ( proc save_pass (dir id pass) ( see date [clock format [clock second] “format "WY tm ta") Bee £a [open [4ile goin Faiz. "pasoword.cxe") “a"] pats $£a "Pid fpans # faace Password for Problem cype ‘Faiz! close #68 > pave_pass $4iz fcompucernane fey zenawe sate pass secur (Iise 2 "password fey saved by me" > oun seturn (Lise 1 "password fkey will be saved by gid") > default ( seturn (ise 0 "Ersoz: unexpected retusn value fzez"] > > 4 PROBLEMTYPE SYSTEM A problem type is a collection of utilities, which allows the user to interact easily with them by means of a Graphical User Interface (GUI), and facilitates the definition and introduction of all the data necessary for carrying out a particular calculation. In order for GID to prepare data for a specific analysis program, it is necessary to customize it. The customization is defined in GiD by means of a problem type. ‘The new system of problem types creation adds some additional capabilities compared with the classic one: © Ik takes advantage of the XML (Extensible Markup Language) format features and its hierarchical structure. It stores data more efficiently. The elements in a XML document form a tree-structure that starts at Dithe roctL] and branches to [ithe leaves(] with different relationships betw een the nested elements It permits to process automatically XML documents on 2 physical data tree view on the GID window for interfaces creation. + It facilitates the automatic creation of standard windows in the data tree to enter input dates. It couples geometry or mash entities with identical properties inta the called groups using these standard window s + It permits to couple entities with identical properties into groups. In this w ay, it couples geometry or mesh entities with Identical properties into the called groups using these standard window s + If allows to apply efficiently geometry properties and boundary conditions (je. constraints, loads, materials...) into ‘groups and to edit their properties easily. + In order to configure GiD for a specific type of analysis, itis possible to set the data tree hiding the required parts automatically «= Ik allows to fix the data tree hiding concrete parts if this is convenient, for a specific type of analysis. =f couples all the common features of the different problem types. 4.1 Structure of the problem type ‘The problem type is defined using a directory with the its name and a set of files, The directory with the problem type will be located in the problemtypes directory in the GiD distribution, or in a subdirectory of it, This set of files define the problertype and contain the full functionality for custorrizing the pre-process. The main files that configure the problem type are shown in the table below. * Main configuration file of the data tree, XML-based. ‘The main configuration file in XML format contains the definition of all the data (except the geometry) necessary to perform an analysis. It ie defined in XML format with the extension .=pd (specific problem type data) and contains all the definition ofall the data that defines the analysis like boundary conditions, loads, materials, loadcases, etc. ‘The syntax rules of the -spd file are very simple, logical, concise, easy to learn and to use. The file is human-legible, clear and easy to create. Moreover, the information is stored in plain text format. It can be viewed in all major of browsers, and itis designed to be self-descriptive ‘The elements in a XML document form a tree-structure that starts at "the root” and branches to "the leaves" with different relationships between the nested elements. It allows to aggregate efficiently elements. Customlib takes advantage of this hierarchical structure to convert automatically the main XML file to a physical tree on the GiD. window. The XML elements can have attributes, which provide additional information about elements. It is necessary to modify this XML document in order to add conditions, or general data to the problem type. + Main TCL fie, initialization ATCL initialization fle is used to create complex window s or menus. Contains the initialization routines + Output description to the file of analysis, ATCL file located in the folder determines the » ay in which the final information has to be written inside the Structure of the problem type 8 input files that will be read by the solver: * Conditions file File with extension .cnd is used but should not be modified by the problemtype creator. * Information for data input fle File .bas is not used it should be existing but void. + Several other TCL files 4.2 Definitions CustomLib defines its own XML tags, which clearly describes its content. For more information about this attribute, see the section| + 100N library ‘The {00M library is used by the Toolkit due to it combines high performance XML data processing with easy and pow erful Tel scripting functionality. 100M is one of the fastest w ays to manipulate XML and it uses very litle memory in the process of creating a DOM tree from a XML document. In TDOM terminology we call Yield to the ‘Element narne! and ‘parameter’ to the ‘attribute’ All data is stored in fields and parameters, where the parameters can contain a value, @ xpath expression or a [TCL command] + XPATH XPath is a language for addressing parts of an XML document using path notations. It is used for navigating through the hierarchical structure of a XML document to extract information. Ttis based on a tree of nodes representing the XML fle, It provides the ability to navigate around the tree, selecting nodes from it and computing string-values. xpath expression -> A search is performed and the result is substituted in the parameter when necessary. [TCL command] -> The command between brackets is executed when necessary and the return value is replaced inside the parameter, 4.3 Data tree fields “The fields and parameters of the main configuration file (.spd) of the data tree, are described below. 4.3.1 PT_data Main root field of the .spd file, It contains the version number and the name of the problem type. PT must be replaced by the problem type name, ‘version ~ Internal version number. 2.69, if the problertype is named ‘cmas2d_customlib’ the main node will be 4.3.1.1 container This is the simplest form to group the data for improving its visualization, (On the resulting window, in addition to the inputs there will be the following set of buttons: It can contain the following fields: , , , , The parameters are as follows, in - Name used to reference the field, especially when writing the .dat fle, pn = Label that will be visualized by the user. It can be translated. icon - It alloys to put an image in .png format in the data tree, The image should be stored inside the images folder of the problem type, container 9 help - 1t displays a pop-up wrindow of help information related to the task the user is performing. state - Specifies one of two states for the field: normal, or hidden. Note that hidden field can be used for storing hidden values, that you de not want to show in the user interface, It also permits to handle a Tel function, by means of square brackets. update_proc - It calls @ TCL procedure, when clicking on the ‘Ok’ button in the window. Square brackets are not supported. actualize_tree - Itupdates the information in the whole data tree, and automatically refresh data shown in the user interface. It is a boolean value as a 1 of 0 that indicates ft is activated or deactivated. Ifthe data source is changed, such 1s new fields have been added or data values and field have been modified, all the user interface will reflact those changes. Furthermore, all the TCL procedures defined in the data tree will be called and the whole data tree will be refreshed. “Therefore, this instruction must be carried out only when necessary. actualize - This only updates a specified field in data tree, Note that only this specified field will be refreshed in the user interface, and not the whole data tree, itis a boolean value as a 1 or O that indicates if is activated or deactivated del_cancel_button - It is a boolean value as 1 of 0 that indicates ifthe cancel button is removed (1) or not (0). On the resulting window there will be only the ‘OK’ button, 2s follow s, Example: selver'/> Stop tolerance! value='Le-8!/> 4.3.1.2 value It is the main field to store data, This field allows to define an entry, or a combobox in the window It can contain the follow ing fields: , , The parameters are as follows, in = Name used to reference the field, especially when writing the .dat fle, pn = Label that will be visualized by the user. It can be translated. \v-The value of default value for a 'value' field state - Specifies one of the four states for the entry: normal, disabled, hidden or readonly. Ifthe entry is readonly, then the value may not be changed using widget commands and ne insertion cursor will be displayed, even # the input focus is in the widget; the contents of the widget may stil be selected, Ifthe entry is disabled, the entry may not be changed, no insertion cursor will be displayed and the contents will nat be selectable. Note that hidden entry can be used for storing hidden values, It alzo permits to define a Tel function, by means of square brackets values_tree - Permits to define a TCL function, by means of square brackets, and returns a combobox with a list of strings values - Commarseparated list of strings For instance, value ‘mech.therm” dict - Comma-separated list of key,value. This operation places a mapping from the given key to the given value, which is shown in the GUL, Values can be translated. For instance, dict="mech Mechanical therm, Thermal" show s Mechanical and Thermal string_is - Tests the validity of various interpretations of a string, as follows, integer ~ To test ifa string is an integer value integer_or_void - To test if a string is an integer value, or empty (not-filled), double - To test if a string is a double value, double_or_void - To test if string is a double value, or empty (not-filed) 1% - To test if a string is a percentage (%4) list_of_double - To test f a string is a list of doubles, representing a data structure of doubles in Te. help = It displays a pop-up window of help information related to the task the user is performing. actualize_tree - Itupdates the information in the whole data tree, and automatically refresh data shown in the user interface. It is a boolean value as a 1 of 0 that indicates ft is activated or deactivated. Ifthe data source is changed, such 1s new fields have been added or data values and field have been modified, all the user interface will reflect those changes. Furthermore, all the TCL procedures defined in the data tree will be called and the whole data tree will be refreshed. “Therefore, this instruction must be carried out only when necessary. value 10 actualize - This only updates a specified field in data tree, Note that only this specified field will be refreshed in the user interface, and not the whole data tree, itis a boolean value ax a 1 or O that indicates if tis activated or deactivated update_proc - It cals a TCL procedure, when clicking on the ‘OF’ button in the window or when changing the value of the entry. Square brackets are not supported. menu_update - It allows to update the menus.Values can be yes of no. It is necessary to define a field, as follow s, ficldtype - Itcreates a box in the user interface in order to introduce a text. It can be: longtext - A text box is created editable - Its a boolean value as 2 1 or 0 that indicates if the entry could be changed or not. If itis activated (1) the entry may not be changed, no insertion cursor will be displayed and the contents will nt be selectable. uunit_magnitude - Physical quantity (ie. L, for Length). For more information about this attribute, see the sectionDescription of the units units - Unit of the physical quantity (i. units (General_Data'/value[@n='analysis_type']" att="menu_update” 1m). For more information about this attribute, see the sectionDescription of the function - Contains a Tel command, which is executed when is called, It permits to create or edit a function for a determined entry function_func - Perrrits to define a TCL function, values_check - It allow s to handle a Tel function, by means of square brackets, min_two_pnits - It is a boolean value as a1 or 0 and indicates that tvo points or more are required in a linear interpolation. uunit_definition - The fields used to choose the default units in the GUI are special, They contain the attribute called unit_definition= "magnitude" being magnitude the name 'n' to be used in that field. It is important to note that these bind of fields does not contain dependencies. Mass! wnit_definieion='M'/> Force! unit_definieion='F'/> unit_mesh_definition - The field used to choose the mesh unit is special, It has the attribute "and it does not contain any "v" attribute or dependencies. units_system_definition - The field used to choose the units system is special. It has the attribute ‘does not contain any "v" attribute, and it contains a unique dependency related to the units “Gdependencies nede="//“[@unis_definivion of @init nesh definivion='1']" acei='change_wnits_system* wen /> Civalue> 4.3.1.3 condition < It contains some inputs with values and can be applied to groups. For each applied group, a dependent set of values will be created that belong to that group, for this condition. |A group is a category that brings together selected entities (points, lines, surfaces and/or volumes) with identical properties. I should be noted that any entity can belong to more than one group (unlike the concept of layer, where any entity cannot belong to more than one layer) It can contain the follow ng fields: , , a condition a Button ‘Select’ enables to create a group and choose entities into it. ov, ovi, i=1,2 - Indicates to which entity types can a ‘condition’ be applied. Can be one of several of the following values: point, line, surface, surface_as_volume, volume, ov_default - Indicates the default entity type which a ‘condition’ can be applied. Can be one of the following values: point, line, surface, surface_as_volume, volume. ovm, ovmi, i=1,2 - Indicates to which entity can a condition’ be applied, It can be element, node, face_element or void. state - Specifies one of two states for the field: normal, or hidden. Note that hidden field can be used for storing hidden values, that you de not want to show in the user interface, It also permits to handle a Tel function, by means of square brackets. 4.3.1.3.1 symbol Every condition can have a symbol, that will be drawn when the user selects Draw symbols in the contextual menu that ‘appears on user interactions such as right-mouse click operation. ‘The symbol is defined by a field inside the condition, The available XML parameters are: © proci Includes the name of @ TCL proc to be defined in the TCL files of the problemtypes. In that prac, OpenGL is used to make the real drawing. ‘The procedure must return the id of a OpenGL draw ing list (created by GiD_OpenGL draw -gent ists 1), or a dict with some required keys depending on the orientation attribute value * orientation: can be global, local, localLA, section, shell_thickness, loads. * global means that the symbol defined in the proc will be drav with its axes corresponding to that of the global axes of the model. * local means that the symbol will be dravin related to a local axes systern dependent on the entity, For lines, this local axes system will have x’ axe parallel to the line, For surfaces, the 2’ axe will be parallel to the surface normal * local A is similar to local * section is similar to local, used to draw bar section profiles + shell_s In this case the proc must return a dict Tel object with a key named thickness witht the value of the thickness associated to the surface. kness to draw the surface with a thickness, * Toads to represent loads. In this case the proc must return a dict Tel object with @ key named load_type with possible values global, global projected, local “There are Tel predefined procedures to facilitate dran’ing with OpenGL: ‘To automatically import a GiD mech fleta be drawn with OpenGL. ~ ‘The filename to be read must be a GiD ASCII mesh of lines, triangles and quadrilaterals (with as feu: elements as as possible), This mesh could be exported from the menu Files->Export->GiD mech. The pracedure read the mesh and invoke 64_openct ara commands, ‘The mesh rust represent a normalized shape, centered at the origin and contained in a box of size 4 for every of its dimensions (a 2x2x2 cube) = gid_groups_conds:: arau_symbol_image Cimage> ‘To automatically import in image file to be drawn with OpenGL. The image must use some valid image format (png, if. 3p.) ‘The values_list argument is currently not used. + gid_groups_conds:: draw_symbol_cexe cvalues_Lise> To automatically print a text with OpenGL. ‘The values_list argument is currently not used. Note: The package gid_drav_openg| also contains some predefined interesting procedures. Example: wane eo apply'/> symbol 12 (mana: DrawSynbolWeigch" orientation "global "/> ‘And its Tel drawing procedure, assuring that the mesh file named weight problemtype: moh is located in the symbols folder or the proc (nance: -DeausyabolWeigch {values List > ¢ TE ( Hlindo exiata ~epengl_draw List(weighe)] ) ( Zee opengl dea 1ise (weight) (64D_opencL draw ~genl ists 1 Gin_Gpencu deaw cneel ne # opengl draw lise (weighs) compile pet filenane mesh [file join [Cnas2e -GetDiz] symbols weighe gid, groups conds: inpost gid mesh an_openGl #£ilename_nesh black blue > see weigeh_and.unie [Izange [lindex fvalues_1ise (1search ~index 0 fvalues_lise Weighel] 121 See weigh [1index fweigeh and unit 0] dee scale (expr (Gweigeh"0-1)1 dee transform matrix [1ise Fecale 0.00 0 facale 0000 fecate 0.000 11 See Lise sa (65D openGh dea ~genl ists 11 GiD_openGL draw Thewl ise $list sd compile GsD_opench draw “pushnaczix ~malematrie Feransform matzix GiD_opencL draw -eall ¢_opengl_draw1ise(weight) secusn Sine id > 4.3.1.4 blockdata < Represents a set of properties with some kind of relationship. A ‘blockdata' field can copy itself, to duplicate and create several sets, It can contain the following fields: , , , , , and other in - Name used to reference the field, especially hen writing the .dat fle, ame - Label that will be visualized by the user. It can be translated Sequence - It allow sa ‘blockdata' field to by duplicated and copied by the user in order to create several sets. Like several load cases with its ‘value’ and ‘condition’ included. If it has the ‘sequence’ parameter activated, itis possible for the user to create consecutive repetitions of the full block data in order to represent, for example, leadcases with all its conditions inside. sequence_type - It can be! any ~ The lst can be void (this is the default) rnon_void_disabled - At least there needs to be one element, It can be disabled. rnon_void_deactivated - At least there needs to be one element, It can be deactivated, editable_name - can be void " or ‘unique’. The ‘unique! means that itis not possible to use the same name (‘pn field), For two different ‘sequence! ‘blockdata’ morebutton - It is a boolean value az a1 of 0 to show a ‘More.’ button in fields of type ‘blockdata’. It ic activated by default. For more information about this attribute, see the section Import export materials can_delete_last_item - A single blockdata could be deleted. before_update_proc - It allows to call a TCL procedure, when choosing this field in data tree, Square brackets are not supported. update_proc - It calls 2 TCL procedure, when clicking on the ‘Ok’ button in the window. Square brackets are not supported. icon - If alloys to put an image in .png format in the data tree, The image should be stored inside the images folder of the problem type, help - It displays a pop-up wrindow of help information related to the task the user is performing. state - Specifies one of tio states for the field: normal, or hidden. Note that hidden field can be used for storing hidden values, that you de not want to show in the user interface, It also permits to handle a Tel function, by means of square brackets. allow_import - It is a boolean value ar a 1 or 0 that allows to add the ‘Import/export material’ item in the contextual menu for a specific ‘blockdata' field. tis deactivated by default. For more information about this attribute, see the section Import export materials edit_command 13 4.3.1.5 edit_command < It adds 2 button in the window that allows to call a TCL procedure when necessary. The parameters are as follows, in = Name used to reference the field, especially hen writing the .dat fle, pn = Label that will be visualized by the user. It can be translated. icon - It alloys to put an image in .png format in the data tree, The image should be stored inside the images folder of the problem type, proc - Perrrits to define 2 TCL proc. The code will receive an implicit argument with name ‘domNode' that represents the TDOM node in the calling field context. Square brackets are not necessary in edit_command field help - It displays a pop-up wrindow of help information related to the task the user is performing. 4.3.1.6 dependencies When a field of type ‘value! changes its value 'v', the field allows to force a change in other values. The parameters are as follows, node - It is the xpath expression to the node that should be updated. value - Field allow s to define a condition to execute a dependence. att, atti, =1,2 - Indicates to which attributes of a node affect a change in one value, wyvi #=1,2 ~ Indicates the new value for atti, =1,2. It can be normal, hidden or disabled, default - Default value for the condition. It permits to execute a dependence. actualize - This only updates a spacified field in data tree, Note that only this specified field will be refreshed in the user interface, and not the whole data tree, itis a boolean value as a 1 or O that indicates if is activated or deactivated actualize_tree - Itupdates the information in the whole data tree, and automatically refresh data shown in the user interface. It is a boolean value as a 1 of 0 that indicates ft is activated or deactivated. Ifthe data source is changed, such 1s new fields have been added or data values and field have been modified, all the user interface will reflact those changes. Furthermore, all the TCL procedures defined in the data tree will be called and the whole data tree will be refreshed. “Therefore, this instruction must be carried out only when necessary. Example: when the user select ‘No! in the combo 'show_w eigth’ the itern value with name whan select "Yas! is show ed. igth’ will be hidden, and Note the use of a relative xpath nede="../value(@r='weight']" to specify the xml node to be changed by the dependency’ ‘“aependencies value: weighe'] Ve inozmal '/> Saependencies value” Jreaive (n= weight] ‘niaden'/> wane eo apply"/> 4.3.4.7 groups Initial groups field. tis aly ays an empty field in the .sp file 4.3.1.8 groups_types Represents the types of groups. It can contain the following fields: The parameters are as follows, editable - Its a boolean value as 2 1 or 0 that indicates if the entry could be changed or not. If itis activated (1) the entry may not be changed. 4.3.1.8.1 group_type Main configuration field of the group types. pn = Label that will be visualized by the user. It can be translated. group_type “4 default - itis a boolean value ar a 1 or 0 that indicates the default group type. auto_from_be - It is a boolean value as a 1 or 0 that indicates that the group type is a boundary condition (be). Example: 4.3.1.9 units Main unit field. It can contain the follow ing fields: 4.3.1.9.1 unit_magnitude - It is necessary to add a field of type unit_magnitude to change the priority ‘p' for a given unit, together with the values of the priorities, for each ‘unit ' considered. It can contain the following fields: The parameters are as follows, in - Name used to reference the field, especially when writing the .dat fle, pn - Label that will be visualized by the user. It can be translated. default - Default unit for a specific magnitude, ST_base -Unit based in the international system units for a specific magnitude. active - It is the default unit shown in the user interface, for a spacific magnitude, 43.1.9.1.1 unit in - Name used to reference the field, especially when writing the .dat fle, pn = Label that will be visualized by the user. It can be translated. P = Priority of the unit, itis regarded as more important than others units, The possible values for 'p' are 2, 2 and 3. For more information about this attribute, see the sactionDescription of the units factor - The conversion factor used to multiply a quantity »'hen converting from one system of units to another. For more information about this atribute, see the sectionDescription of the units help - To make easier to the user to identify the unit units_system - There are two systems used to define units, the possible values ar SI International system imperial - Imperial system addend - Conversion number, relation bet een two units. Example: In order to go from Celsius to Kelvin, 273.15 is added to the temperature in Celsius, Therefore, addend = 273.15. printable_name - Name used to print the unit. For instance, ‘oC’ could be the print name of °C. 4.3.1.10 function - Main function field, srhich contains a function variable field called , It permits to create or edit a function defined by points for a determined field. 2-9, for a property variable with the temperature. It can contain the following fields: 4.3.1.10.1 functionVariable - It allow s to define the default values of a function defined by xy points. The parameters are as follow s, in - Name used to reference the field, especially when writing the .dat fle, pn = Label that will be visualized by the user. It can be translated. ‘variable - Name of the variable shown in the GUL units - Its value is the default unit shown in the GUI, which could be changed, #f desired, Example: functionVariable 15 value netdens" pae'Density" min_eve_pnts="l" help="Density of Steel" unit_magnitude="W/L“2" sniesitkg/n°2" function" [density function)” function func" veHLO) eprecs>, ‘cprec n=!densicy function’ azgst!args!> erteDarat MyDensivyFunceion Gdonede Fars a> In this example the proc density_function referenced by the function’ attribute is implemented in the xml .spd file but itis very simple and only invokes anether procedure named MyDensityFunction adding some arguments. The body of the tel procedure could be implemented separatelly in a.tl file (sourced in the problemtype), this facilitate its edition and debug. proc MyDensityFunction ( donilede args} ( set result [join [list scalar [list incezpelatoz func = = Templ] +] secur Szemuie > “The proc referenced by the function’ must return as value something like this: where seataz is a keyword, interpolator_func is the same name used in in the *.spd file can be used to change some defaults or to add specialized units, which in principle are not supported, The structure and contents of this subtree requires to have the format ar further detailed in this document. The following attributes are available: * p= Priority of the unit, itis regarded as more important than others units, The possible values for ‘p' are 2, 2 and 3, as follow s, 1 It gives maximum priority, and therefore a unit with p="2" is the default unit in the GUL 2A unit mith p="2" is alu ays shown in the corrbobox of below to facilitate the selection of the most used units. 3- It gives low est priority, and therefore a unit with p in the combobox of below , which enables the user to choose the unit from a table. could only be chosen when clicking on ‘More units.’ option bs 1 Move > tite 1 Options fy Rogan 1o me arem(S) te pound 04539057 penal 5s oy Brogan ter ine sem (5) eaten 605 ne aes) ig Stage co) Int aptem (3) ap seagem oat ine em (3) 3 eaten tel5 intone (3) $3 femtagare seit ineaysem (3) @ * factor - The conversion factor used to multiply a quantity when converting from one system of units to another. It is the mathematical tool for converting beby een units of measurement [1 un#t=factor*unit(SI)]. Exarrple: Imm=10e- + help - To make easier to the user to identify the unit, Example of field: Species concentration and reference variable are not supported and therefore, both magnitudes are defined in the *.spd file, as follows, 10.001" helpriper-one-thowsand"/> reppes"/> conic iparto-perwill ion" p ‘parta-percmill fon'/> sparta-per-bill ion"/> sneshendeed"/> sne-thowsand"/> Units system definition ‘The field used to choose the units system is special. thas the attribute units_syster_definition="1", it does nat contain Units v7 any "v" attribute, and it contains a unique dependency related to the units fields. ‘The field used to choose the mash unit is also special. It has the attribute unit_mesh_definition="1", and it does not attribute or dependencies contain any ‘The fields used to choose the default units in the GUI are also special, They contain the attribute called Lnit_defiition="magnituda” being magnitude the name 'n' to be used in that field, It is important to note that these kind of fields does not contain dependencies Here's an example of node type “container” in the .spd file, which allows to choose the geometry units and the general Units, as follows, sexy units" wuit_nesh definieion="" iconstunies-16"/> Caependencies node="//*{unit_definicion oz Gunit_nesh_definieio change wnits_systen® vI="(@r)"/> Example of window to spect the International and Imperial systems ‘There are to primary systems used to define units: the international and imperial systems, as seen below. The international system of units is the modern standardized form of the metric system, It sets standard measurements and conversions, and is the mast commonly and universally accepted system of units. The imperial system, also known as Britich Imperial, is the system of units first defined in the British Weights and Measures Act of 1924, which was later refined and reduced, ‘The fields of type can contain the attribute called units_system, as follow s, + unite_system - There are tro systems used to define units, the possible values are: SI - International system imperial - Imperial systern Defining magnitudes and units Units 18 “The attributes involved in any field of the .spd fle are ‘unit_magnitude! and ‘units. + unit_magnitude: Its value relates to the name 'n! used to reference the unit field. Please see the table below for a complete lst ofall the names available. © units: Its value is the defauit unit chown in the GUI, which could be changed, f desired. Some functions are useful for writing data with units defined into the calculation file, For more information about this issue, see the section called Writing the input file for calculation. Example: Note: For instance, itis convenient to change magnitudes like unit_magnitude="F/L“2" by unit_magnitude=' “The table below gives a summary of the names used forall units available, ee ult Length L m Mass ™ kg Time T . Temperature Temp, K Frequency Frequency He Force F " Pressure P Pa Energy Energy 3 Pow er Pow er w Angle Angle rad Solid_angle Solid_angle * Velocity Velocity m/s Acceleration Acceleration mis-2 Area Area m2 Volume Volurne m3 Density Density kglme3 Electric current Electric_current ‘Amount of substance Amount_of_substance mol Luminous intensity Luminous_intensity cd Electric charge Electric_charge c Electric potential Flectric_potential v Capacitance Capacitance F Electric resistance Electric_resistance > Electric conductance Electrie_conductance s Magnetic flux Magnetic_flux we Magnetic flux density Magnetic_flux_density T Inductance Inductance 4 Delta phi DeltaPhi ag Delta temperature DeltaTemp. ak Luminous flux Luminous flux Im. tlurninance Ilurninance x KinematicViscosity KinematicViscosity m/s Viscosity Viscosity Pats Permeability Permeability m2 “The magnitudes available to be used ith the problem type in XML format are also listed below “To change the priority 'p' for a given unit, itis necessary to add a field of type ‘unit_magritude’ in the node of the ‘spd file, together with the values of the priorities, for each ‘unit ' considered. Here is shown an example of node in the -spd file, where kl and MPa will be the units by default for the force and pressure respectively: Units 19 “The default magnitudes and conversion factors could be seen at the file 2¢#ipt=\ custonl ib\ custonb ib\wnits_sml 4.5 Main procedures PROBLEMTYPE ‘CUSTOMLIB'>Main procedures “The main procedures available to be used in the TCL files, are listed belo * gid_groups_conds::actualize_conditions_window ‘This procedure updates the information of the whole data tree, and automatically refresh data shown in the user Interface. If the data source is changed, such as nen fields have been added or data values and field have been. ‘modified, all the user interface will reflect those changes. Furthermore, all the TCL procedures defined in the data tree will be called and the whole data tree vill be refreshed, Note that this instruction must be carried out only when necessary. Ithas no arguments. * gid_groups_conds::begin_problemtype spd_file defaults fle " ‘This procedure allows to load the problem type and should be defined in the InitGIDProject procedure. The arguments are the following} spd fle - The directory of the main configuration file (.sp4)- defaults file - The directory of the preferences file. Ifthe directory of the preferences file does not already exist, it is created. * gid_groups_conds::SetProgramitame program_name ‘This procedure stores the program name in the preferences file and should be defined in the InitIDProject procedure ‘The argument is the follon ing} program_name - Name of the program. * gid_groups_conds:1end_problemtype defaults_file ‘This procedure will be called when the project is about to be closed, in the EndGlDProject procedure, It receives az argument: defaults_file - The directory of the preferences file, Ifthe directory of the preferences file does not already exist, it is created. * gid_groups_conds::give_data_version ‘This function returns the version number of the problem type, + gid_groups_conds::save_spd file spd file ‘This procedure saves the .spd file and should be defined in the SaveGIDProject procedure, Therefore, i will be called when the currently opened file is saved to disk. It receives az argument spd file: path of the file being saved * gid_groups_conds:import_export_materials widget xpath ‘This procedure allow s to open the ‘Import/export materials! window. It receives as arguments: widget - Parent widget: xpath - It is thexpath expression to the field ‘container’ of materials. 4.6 Writing the input file for calculation “The procedure called GID_WriteCalculationfile permits to create the output description to the file of analysis. GiD_WriteCalculationFile init| end |puts [coordinates all_connectivities |connectivities|nodes elements |has_ele ments?-elemtype ? ?-localaxes "2 ?-elements_faces _all|elements|faces? 2-number_ranges ? ?-unique? ?-multiple? 2-all_entities? ?-do_subst? ?-sorted? ?-count? 2-retum? 2-print_faces_conecs ? -connec_ordering? corner_face_corner_face Writing the input file for calculation 20 + GiD_WriteCalculationFile init ?-encoding extemal utf-#2 ‘To open for writting the calculation file (external default encoding). Before to print any information to the file it must be opened with this command. Exarle: GiD_NriveCaleulationFile init (c:/temp/my output ast) + GiD_WriteCalculationfile end To close the calculation file Exarle: * GiD_WriteCalculationFile puts ?-nonewline? Print the string in the calculation file and a carriage return + -nonewline avoid the carriage return, Exarele: * GiD_WriteCalculationFile coordinates ?-count? ?-retum? ?-factor ? ‘This command rust be used to print all nodes of the mesh, It prints for each node. must be a "C-like’ format for an integer an three doubles. ‘Are only printed the values with supplied format, e.g. if the format is "sed 96°" only the node number and its x will be printed. If 2 %.0s is specified then the corresponding value is not printed (trick to avoid print some values) + IF -count is specified then only return the number of entities, without print + If return is specified then return the string, without print + If factor is set the the coordinates will be scaled by the (that must be a real number, 1.0 by default), It i used ald to write the mesh based on the declared mesh unit and the current reference length unit. Example: see mumcoordinates [6iD_WriveCalculationFile coordinates “come "*] ;ffwith “cone the fommat GiD_WeiceCalculacionFile pues "mum coordinates: Fnum coordinates” see mesh unit [yid_groups_conds: :give_mesh_wnit] ict mesh factor [1index (gid groups_conds:7give wmit_facter L fmesh_unit] 0] Gip_NrieCalculationFile coordinates “factor fresh factor "Wd tg tg 8g) * GiD_WriteCalculationFile all_connectivities ?-elemtype ? ?-count? ?-return? ?-connec_ordering comers_faces|comer_face_comer_face? ‘This command must be used to print all elements of the mesh, It prints the element number and its connectivities for teach element of type of the mesh (sll types if -elemtype is not set) < must be an integer for the element id and as much integers ar connectivities to be printed. + can be: Linear|Triangle| Quadrilateral |Tetrahedra | Hexahedral Prism | Point| Pyramid | Sphere| Ci de + If -count is specified then only return the number of entities, without print. +f -returm is specified then return the corlete string, without print * for quadratic elements the order of nodes could be specified with -connec_ordering corners_faces|comer_face_comer_face by default the order is corners_faces (First are printed the corners and then the quadratic nodes) Exarele: * GiD_WriteCalculationFile connectivities |nodes|elements|has_elements ?-elemtype ? ?-localaxes ? ?-elements_faces all | elements | faces? ?-number_ranges ? ?-count? f repeated? ?-multiple? 2-all_entities? ?-print_faces_conecs? ?-sorted? ?-do_subst? 2ounique? ?-error_i ?-connec_ordering? ?-retum? ‘To get entities information related to groups: connectivities, nodes, elements of the group names specified in the dictionary Writing the input file for calculation 21 is 2 dictionary (list of pairs key value), with key=group and value=format for connectivities it prints the element number and its connectivities for nedes it prints the node number for elements it prints the element number + -elemtype can be: Linear! Triangle| Quadrilateral |Tetrahedra|Hexahedra| Prism| Point] Pyramid] Sphere| Circle + & Jocalaxes can be set in order to write local coordinate axes, where is a dictionary (list of pairs key-value), with key equal to LA name and value equal to a format, which could be for instance ‘{9ed[euler_angles matris/matrixT "Seg%q%a%a%g%q%eG%a%G"T}. The euler_angles is a function and matrix or matrix its argument in order to remark that its rotation matrix or its transposed matrix should be written. A format equal to" should be specified at the end of the GiD_WriteCalculationfile function. The EAmat function permits to have more control about the rotation matrix related to the euler angles using for instance the format {(9ed[EAmat 1 1][EAMmat 2 1][EAmat 3 1][EAmst 1 2][EAmst 2 2I[EAmat 3 2][EAmat 1 3][EAmat 2 3][EAmat 3 3D} to write the directions of the local coordinate systems. The three angles giving the rotation matrix are called Euler angles: ‘A -do_subst flag should be required in order to replace the previous formulas in the GiD_WriteCalculationFile. is a dictionary (list of pairs key value) of local axes, with key=LA_name and value=format + Acelements_faces can be set to specify any type (all), body elements (elements) or face elements (faces). ‘Therefore, it considers element connectivities or face elements connectivities A cunique can be set to specify thet each entity should be written once, + -multiple can be used in order to consider a list of variables containing @ dictionary value (list of pairs key value). It is known that "dict set dictionary key valve” command takes the name of a variable containing a dictionary value and places an updated dictionary value in that variable, containing a mapping from the given key to the given value. It should be noted that when multiple keys are present, this operation creates or updates 1a chain of nested dictionaries and the GiD_WriteCalculationFile function requires -multiple flag. + A -all_entities can be set to specify that all entities should be considered. + A -do_subst can be set to replace formulas, + A -number_ranges can be set to group entities using a groups dictionary, + is a dictionary of number of ranges + A-sorted can be set to apply a string ordering. + A-print_faces_conecs can be set to print face element connectivities. A ~elements faces of face elements should be specified when 2 -print_faces_conecs is used. + A. -connec_ordering can be set to specify @ connectivities ordering as corner-middle _edge-comner (comer_face_comer_face), default is first all corner nodes (comners_faces) + IF -count is specified then only the number of entities is returned, without print. + If return is specified then the complete string is returned, without print. Example: to print the id and connectivities of the triangle elements of the groups named $group_a or $group_b see format_by_group [dice create fgroup_a "AD 44 ~ td 4d 4d" Ggroup_b "BR td td 8a ta") GiD_NriveCalcalacionFile connectivities “elemtype Triangle #fozmae_by_gzoup Example: to print the node id of the nodes belonging to $group_name and a text with the group name see format_by_group [dice create fyroup_nane "$d of group $group_nam Gid_NriveCalculavionTile nodes fEermat_ by group Functions to convert between different unit types ‘There are a couple of functions that are essential hen writing the input file for the calculation. These functions permit the treatment of the units, and facilitates the conversion from one measurement to anather. They are the follow ing + gid_groups_conds::give_mesh_unit ‘This function provides the mesh unit, + gid_groups_conds::set_mesh_unit unit “This function imposes a mesh unit, where the argument is as follows Unit - A text string, denoting the unit that you want to apply as mesh unit © gid_groups_conds::convert_value_to nodeObject to_unit ‘This function converts the value of a nodeObject from the current unit for the original number to another unit, where the arguments are as follows: Writing the input file for calculation 22 nodeObject - DOM node object chosen, to_unit - A text string, denoting the unit that you want to convert the original number to. © gid_groups_conds::convert_value_to_active nodeObject ‘This function converts the value of a nedeObject from the current unit type to the general active unit selected in the GUL The argument is as follons: nodeObject - DOM node object chosen, © gid_groups_conds::convert_unit_value magnitude value unit_frorn to_unit This function converts a number from one unit type to another unit type, for the same magnitude. It receives as arguments: ‘magnitude - Unit definition, itis the name 'n’ of the physical quantity (eg. "L" for Length) value - The number to be converted, unit_from ~ A text string, denoting the unit fr the original number ‘to_unit - A text string, denoting the unit that you want to convert the original number to. + gid_groups_conds::convert_value_to_printable_unit nodeObject ‘his function returns a text string, denoting the current unit of the node. It receives as argument: nodeObject - DOM node object chosen, * gid_groups_conds::give_unit_ factor magnitude unit ‘This function returns the conversion factor for the unit given. The arguments are as follows ‘magnitude ~ Unit definition, itis the name 'n’ of the physical quantity (eg. "L" fer Length) unit - A text string, denoting the unit chosen to obtain the conversion Factor, + b_write_cale_file::apply_unit_ factor magnitude value to_unit ‘his function returns the conversion factor, the numerical factor used to multiply a quantity when converting from one system of units to another, It is the mathematical tool for converting between units of measurement [1 Unit=factor*unit(S1)], Example: 1mm=10e-3 m The arguments are as follows: ‘magnitude ~ Unit definition, itis the name 'n’ of the physical quantity (eg. "L" for Length) value - The number to be converted, ‘to_unit ~ A text string, denoting the unit that you want to convert the original number to. * gid_groups_conds::convert_v_to_default value magnitude unit_from ‘This function converts a number from one unit type to the unit type by default, for the same magnitude, It receives az arguments value - The number to be converted, ‘magnitude - Unit definition, itis the name 'n' of the physical quantity (eg unit_from ~ A text string, denoting the unit fer the original number for Length) + gid_groups_conds::give_active_units_system This function returns a string list, where the first iter is the units system, + Gid_groups_conds::give_active_unit magnitude “This function returns the active unit for a given magnitude. It receives as argument: ‘magnitude - Unit definition, itis the name 'n’ of the physical quantity (eg. "L’ for Length) 4.7 User preferences User preferences of the problemtype will be automtically saved/read to/from disk in a xml file named ‘$problem_typefversion.ini, located in the same user folder as the GiD preferences, “To set/get user preferences variables these procedures must be used. + gid_groups_conds:iget_preference ‘This function returns the value of a preference, or the default value if the preference does nat already exist, It receives 2s arguments: name - Name of the preference value - Default value J groups_conds::set_preference User preferences 23 ‘This function imposes the value of a preference, It receives as arguments: name - Name of the preference value - Default value Example: get or set a user variable named 'verbosity_level’, with default value= set level (gid_groups_conds: -get_prefezence verbosity level 01 gid_groups_conds:: set preference verbosity level 2 4.8 Import export materials, Parameter called allow_import in fields of type allows to add the ‘Import/export materiale’ item in the contextual menu for a specific ‘blockdata' field A material is composed by a set of material properties, which can be applied to geometry entities, Import/export tool allows to handle material properties easily. This tool is located inside the right mouse menu when a particular material of a materials collection is selected in the data tree and allow_import parameter is activated, + In order to activate the Import/ export materials tool, itis necessary to call n="materials" to the global container in the spd, Moreover, although the intermediate containers could be defined using any attribute n, each final material blockdata has to be called n="material” © The “Import/export materials” window contains two different material data trees. At the left side there is the local materials list associated to the current model. At the right side there is 2 material data tree list, which could be imported or exported depending on the user interests. It is possible to import/export materials in four different w ays * Global databace active * Global databace inactive + Import from a file + Export to afi ‘The global database active is the database shovin in the data tree located at the left side of the GiD window when a new model is created, ‘The global database inactive is an internal database which does not affect the default data tree for nen models, It could be used to store odd materials in order to import them for a particular model The global database active also allows to import the original defauit materials clicking on the button located just at the Fight side of the "Import/export to" combo-box, which facilitates to recover easily the original input data for materials. It is also possible to import or export selected materials from particular XML-files without modifying the global database, It should be noted that the creation of nen materials can be done directly using the right mouse menu in the import/export materials window 4.9 About CustomLib Cirne's copyrighted CustomLib is developed between CIMNE and Compass Ingenieria y Sistemas, and it is the library included in GiD for creating advanced customized problerrtypes, ive. adaptations to third-party simulation codes or external programs. CustomLib terms of use are the same as the GiD ones. Compass offers the possibility of implementing advanced customizations of GiD, based on custornLib, adapted to the specific need of every spacific client. For more information about this service, please visit \/»\v.compassis.com. About CustomLib 24 © compass Ingenieria y Seen http://w w w.compassis.com info@compassis.com 4.10 CustomLIB extras For using this extra functionality, just activate the Custonl bAucomaeic field in the [RICHIE “paq Sor load it manually by requiring the package custom! Sh_exezar ‘The extra content on this package is © New fields added to the spd file 4.10.1 SPD_fields t's used to join diferent parts of the spd file. It must contain the follow ing attributes: 1 relative path, from the problemtype folder It can contain the following attributes: specifies if the part must be added in the final + active: Example: cimelude path=tenl /materials snl "/> 4.10.2 Extra functions “The main procedures available to be used in the TCL files, are listed below. All the usages and examples can be found on the 'cmas2d_customlib' problemtype. © customlibr:Pracessincludes directory ‘This procedure parses the active include nodes of the spd file, and replaces them for the node found in the path files. * customlibs PracessincludesRecurse filename bazedit This procedure parses the active include nodes of the specified file, and replaces them for the node found in the path files, Basediris the directory where the file specified by the path field is, + customlibs initWriteFile filename (Open the fle for nritting + customlibr:éndWriterile + custornlibs initMaterialslist_of_condition_names ‘The list_of_condition_names is the list of these conditions were we can find a material, so we can consider it as "used, asigning it a MID (Material Identifier) for further queries. + custornlbi:Writestring str Writes the content of str in the opened file + customnlbs: WriteConnectvities list_of_condition_names parameters Utlity to print elements and connectivities In the spd file, we can define condition tags to assign properties to a GiD group. The list_of_condition_names is the list of these conditions whose groups’ elements must be printed. parameters is a list of lists of 3 words, and defines the format and the information that we want to print. The first Word is al ays a format. The second w ord can be “element”, "material", "property" or string’, "element" is set to write clement information. "material" is set to print any material property. "string" is set to print a string. The third word depends on the second one. IF it's "element", the third can be: “id” or "connectivities". If it's “material”, the third one can be "MID", "Density" or any material property according to GetMaterials function. Obviously, to use ‘material’ data, ‘a material must be definad in the condition, Valid examples: Extra functions 25 + crnnoa’ + cena’ + cena’ + Coxaoa® “nacesiat (vio naeeriat 2a") (osioa" sproperey’ (vag ssering™ Exarle: see List_of condition panes (Lise "Shell s"] dee paraneers (Lise ("10a" “elemene™ id") ("¥204" “wrD) 1 cusconl ib: UriveConnectivicies $1ist_of condition names Sparaneters Jenene" “connectivicies") ("810a" ‘maverial™ # These instructions prine the following text = customlibr: Writeltodes lit_of_condition_names parameters lags? Uslity to print the nodes of the groups of the conditions specified at list_of_condition_names, and the infermation asigned to them. Exarle: set ist_of condition panes [Lise “Pine Weight") dee paranecers [Lise ('¥a" Yelemene” 'id") (412. Se" property” "Weighe"] Cuscoml ib: Wrivelodes flist_ef condition names Sparanctezs # cwepue + custornlb::GettlumberOfodes list_of_concition_names flags? Uslity to get the number of nodes of the groups of the conditions specified at list_of_condition_names. + customlibs: WiriteCoordinates formats Writes the coordinates of the nodes of the model. # cwepue: # cwepue: + custornlib::GetMaterials ?state? This procedure returns a nested dict, where the first kay is the name of 2 material, the second key is the name of the property state can be ‘used’, to return only the used materials, or ‘all to return all the materials. Example: set mat_dict [custornlib::GetMaterials used] set aluminium [dict get $mat_dict "Aluminiur") set density [dict get aluminium "Density"] + custornlb::GetMaterials 2otate? This procedure returns a nested dict, where the first kay is the name of 2 material, the second key is the name of the property state can be ‘used’, to return only the used materials, or ‘all to return all the materials. Exarle: see mat_dice (custom! ib: GetMaverials used Extra functions 26 see aluminium (dict gee Snat_dice "ALuniniun") Bee densiey (dice gee Galuminiun "Densiey"] + custornlb::GettlumberOfMaterials 2state? state can be all’ of ‘used! Returns the number of materials in the database. If state is used, it returns the number of materials used in the model. © customlb::WriteMaterials parameters ?state? state can be''all’ of ‘used! Uslity to print the list of materials, and their properties defined in parameters. Exarele: set parameters (Lise (4d) MID") ("412_5e" Snaverial Casconl ib: Wrivelisterials Sparanccers used material Denssey")] # cwepue: 5 EXECUTING AN EXTERNAL PROGRAM Once all the problem type files are finished (.end, .rnat, .prb, it directly from inside Gio. im, .bas files), you can run the solver. You may wish to run To do so, itis necessary to create the file Peoblem type_nane bat in the Problem Type directory. This must be a shell script that can contain any type of information and that will be different for every operating system, When yau select the Calculate option in GiD Preprocess this shell script is executed (see CALCULATE from Reference Manual). Because the .bat file will be different depending on the operating system, itis possible to create two files: one for Window = and another for Unix/Linux. The Windons file has to be called: problem type_nane.win.bat; the Unix/Linux file has to be called: problem eype_nane unix bat IEGID finds a -win.bat or -unix.bat file, the file Pe0bl em_eype_nane bat will be ignored. If 2 -b2° fle existe in the problem type directory when choosing Start in the calculations window, GiD will automatically write the analysis file inside the example directory assigning the name Project_nane. dat to this file (if there are more files, the names project_nane-1. dat ... are used), Next, this shell script will be executed, GiD will assign three arguments to this script + Ast argument: pr03¢ce_name (name of the current project): © and argument: «:\a\\c\pzo3ect_nane.gid (path of the current project); + ard argument: <:\2\b\<\pzobl en_eype_nane.gid (path of the problem type selected); ‘Among other utilities, this script can move of rename files and execute the process unti i finishes, Note 1: This file must have the executable flag set (see the UNIX command chmod +x) in UNIX systems. Note 2: GID sets as the current directory the model directory (example: ¢:\exanples\test1..gia) just before executing the .bat file. Therefore, the lines (cd #aizectozy) are not necessary in the scripts. Note 3: In UNIX platforms check you have installed the shell you are using in the .unix.bat script, there are more than one possibilities: bash, esh, tesh, “The first line of the script specify the shell to be used, for example Bi bin ob. Bi/binl bash In Window s platforms, the command.exe provided by GID is used instead the standard cmd.exe or command.com 5.1 Showing feedback when running the solver, ‘The information about what is displayed when Output view : is pressed is also given here. To determine what will be shown, the script must include a comment line in the following forrn: For Windows For Linux/Unix: B owepueFile: “fits” where "$i.log” means to display in that window a file whose name ist project_name.log. The name can also be an absolute name like output-dat. If this line is omitted, when you press Output view :, nothing will be displayed, 5.2 Commands accepted by the GID command.exe The keyu ords are as follos: * chasz (ca) + Rename (Ren, Move) ease (a) Commands accepted by the GiD command.exe 28 + Eeke (Gecko) Unknown instructions will be executed as from an external file, Not all the possible parameters and modifiers available in the operating system are implemented in the GiD executable command.exe, Note: At the moment, command.exe is only used in Window s operating systems as an alternative to command.com or cmd.exe. With the GID command.exe some of the disadvantages of Windows can be avoided (the limited length of parameters, temporary use of letters of virtual units that sometimes cannot be elirinated, flesting appearance of the console window , etc). If GID finds the file command.exe located next to gid.exe , it will be used to interpret the *.bat file of the problem type: ifthe file command.exe cannot be found, the *.bat file will be interpreted by the window = command.com. If conflicts appear by the use of some instruction still not implemented in the GID command.exe , itis possible to rename the corrmand.exe file, so that GiD does net find it, and the operating system cormand.com is used, % Returns the value of a variable, Senumber Soname% Parameters number “The number is the position (from 0 to 9) of one of the parameters w hich the *-bat fle receives. ‘The name of an environment variable, That variable has to be declared with the instruction "set Not GiD sends three parameters to the *.bat file: %1, 92, 963 961 is the name of the currant project (project_name) 962 is the path of the current project (c:\a\b\c\project_name.gid) 963 is path of the problem type (ct\a\b\c\problem_type_name.gid) For example, if GiD is installed in €:\gidwin, the "problemtyp inc:\temp (the project is a directory called ¢:\temp\test-gia with some files inside), parameters will have the following name is emas2a.gid and the project is test. gid, located cl\eenp\eere gid 82 ©: \gidwin\ prob] entypes\ cmas: Note: It is possible that the file and directory names of these parameters are in the short mode Windows format. So, parameter %3 would be: ¢:\ GIDUIIN\PROBLE~\cwAS2D. 61D Examples echo 42> s2\ az exe shift ‘The shift command changes the values of parameters 960 to %9 copying each parameter in the previous one, That is to say, value S61 is copied to %0, value %2 is copied to %1, etc. shift Parameter None, Not “The shift command can be used to create a batch program that accepts more than 10 parameters, If it specifies Commands accepted by the GiD command.exe 29 more than 10 parameters in the command line, those that appear after tenth (%9) will move to parameter %9 one by one. Rem Rem is used to include comments in a *.bat file or in a configuration file, rem{comment] Parameter comment ‘Any character string, Note: Some comments are GiD commands. chair (ca) Changes to a different directory. chdir(drive:path] [-] cdfdrive:path] [..] Parameters Fative-path] Disk and path of the new directory. ba Goes back one directory. For example if you are within the C:\WINDOWS\COMMAND> directory this would take you to cAwmpows>. Note: When GiD calls the *.bat file, the path of the project is the current path, so itis not necessary to use ed 962 at the beginning of the *-bat file. Examples chdiz e:\emp cd Delete (Del, Erase) Command used to delete files permanently from the computer. delete[drive: path] filetlame [filetlame] Parameters Edrive: [path] filetlame [filetame] Parameters that specify the location and the name of the file that has to be erased from disk, Several file names can be given. Not Files will be eliminated although they have the hidden or read only flag. Use of wildcards is nat allow ed, For example del *.* is not valid. File names must be separated by spaces and if the path contains blank spaces, the path should be inside inverted commas (the short path without spaces can also be used). Examples delece 2\sa\ tile cat del C:\ewp\£a.dae Co \enp\ fb dae del "C:\Program files\eese Lexe" copy Copies one or more files to another location. copy source [+ source [+] destination Parameters source Specifies the file or files to be copied, destination Specifies the filename for the new file(s). “To append files, specify a single file for destination, but multiple files for source (using the filet + file2 + file3 Format) Not it File names must be separated by spaces. If the destination only contains the path but not the filename, the new name will If the destination file already exists, it will be overwritten without prometing whether or not you wish to overwrite Commands accepted by the GiD command.exe 30 be the same as the source filename. Examples copy fi-exe olen fem if dizectory e:\tmp exists, c:\emp\£l.txt will he created, if it dees not exist, file c:\emp will be Rename (Ren, Move) Used to rename files and directories from the original name to a new name, rename/drive:J[path] filellamet filellame2 Parameter [drive:][path] filel'amet Specifies the path and the name of the file hich is to be renamed. filel'ame? Specifies the new name file. Note: If the destination file already exists, it will be overwritten without prorreting whether or not you wish to overwrite it, Wildcards are nat accepted (*,?), s0 only one file can be renamed every time, Nate that you cannot specify a ne drive for your destination. A directory can be renamed in the same w ay as ifit was a file, Examples Rename "c:\Peogeam Files\fa.cxe" c:\emp\fa.cxe Rename c:\test.gid c:\test? gid Mlle (end) Allow s you to create your ov'n directories. micdir[drive:|pathmd [drive:]path Parameter drive: Specifies the drive where the new directory has to be created path Specifies the name and location of the new directory. The maximum length of the path is limited by the file system Not mkdir can be used to create a nen path with many new directories. Examples mediz e:\tm? pueaiz an\ar\aa set Displays, sets, or removes Window s environment variables. set variable=[string) Parameters variable Specifies the environment-variable name, string Specifies a series of characters to assign to the variable Note: The set command creates variables which can be used in the same way as the variables %0 to %9. Variables %0 to 969 can be assigned to new variables using the set command, To get the value of a variable, the variable has to be written inside tre % symbols. For example, if the environment-variable name is V1, its value is %6V1%, Variable names are not case-sensitive Examples Echo (@echo) Displays messages. echo [message] Commands accepted by the GiD command.exe 31. Parameters massage Specifies the text that will be displayed in the screen, Note: The message will not be visible because the console is not visible, since GID hides it-Therefore, this command is only useful the output is redirected to a file (using > or >>). The symbol > sends the text to a new file, and the symbol >> sends the text to afile ft already exists, The if and echo commands can be used in the same command line. Examples Echo tpacht >> one .exe 1 Wot Exist ¢2\¢1 post.xes Echo "Program Eailed" >> ¢2\¢L.ex= i Executes a conditional sentence. If the specified condition is true, the command which follows the condition will be executed; ifthe condition is false, the next line is ignored, * iffnot] exist fletame command + if [not] string! ==string2 command © iffnot] errorlevel number command Parameters not Spacifies that the command has to be executed only if the condition is false. exist file Returns true if file exists command Is the command that has to be executed i the condition returns true, string1==string2 Returns true if string and string2 are equal. It is possible to compare two strings, or variables (for example, %1). errorlevel number Returns true if the last program executed returned a code equal to or bigger than the number specified Note: Exist can also be used to check if a directory exists, Examples call Executes nev program. call[drive:]fpath] file [parameters] Parameter [dtiva:Ilpath] file Specifies the location and the name of the program that has to be executed parameters Parameters required by the program executed, Not ‘The program can be *.bat file, a *.exe file or a *.comfile. If the program does a recursive call, some condition has to be imposed to avoid an endless cul Examples Goto “The execution jumps to a line identified by a label. goto label Parameter label It specifies a line of the *.bat file where the execution will continue, That label must exist when the Goto command is executed, A label is aline of the *.bat file and starts mith (:). Goto is often used with the command if, in order to execute conditional operations. The Goto corrmand can be used with the label :E0F to make the execution jurrp to the end of the ‘bat file and finish, Not ‘The label can have more than eight characters and there cannot be spaces between them, The label name is not case-sensitive Commands accepted by the GiD command.exe 32 Example Declares a label tlabelltame Parameter labelliame A string which identifies a line of the file, so that the Goto command can jump there, The label line will not be executed Note: The label can have more than eight characters and there cannot be spaces between them, The label name is not case-sensitive Examples Tye Displays the contents of text files type[drive:J[path] fileliame Parameters [dtiva:Ilpath] filetlame Specifies the location and the name of the file to be displayed. If the file name contains blank spaces it should be inside inverted commas ("file name"). Note: The text will not be visible because the console is not visible, since GID hides it Therefore, this command is only Useful if the output is redirected to a file (using > or >>). The symbol > sends the text to a new file, and the symbol >> sends the text to afile fit already exists. It is recommended to use the copy command instead of type. In general, the type command should net be used with binary files, Examples eype t2\tase > salar exe 5.3 Managing errors Aline of code like For Windows For Linux/UNIX B EecosPile: “fers included in the .bat file means that the given filename is the error file, At the end of the execution of the .bat file, if the errorfile does not exist or is zero, execution is considered to be successful, If not, an etror window appears and the contents of the error file are considered to be the error message, If this line exists, GiD will delete this file just before calculating to avoid errors with previous calculations. A comment line like B WaeningPile: “F1wen" included in the bat file means that the given filename is the waming file. This file stores the warnings that may appear during the execution of the -bat fle, Examples 5.4 Examples: 33 Here are two examples of easy scripts to do. One of them is for Unix/Linux machines and the other one is for MS-Dos or Window s + UNZX/Linux example: Bibi oh Dasenane = $2 aizectony = $2 PechlenDizectory = $2 # owepuerile: "flog" IT IS USED BY GiD B EeesPile. "flezs" 17 15 USED BY GiD im -£ "fhasenane post 243 "Probl enDixecvory/mprogran” “fhasenane! are "Phasenane result: + MS-D0S/Windows exampl em basenane=tl JUST INFORMATIVE rem dizectory=¥2 JUST INFORMATIVE sem ProblenDizectozy-2 JUST INFORMATIVE sem OuepucFile: Slog 71S USED BY GiD sem EnzosFile: tex: IT 15 USED BY GID S2\ayprogran 81 PREPROCESS DATA FILES 34 35 6 PREPROCESS DATA FILES 6.1 Geometry format: Modelname.geo DESCRIPTION OF THE FORMAT ‘There are two versions of the .geo GiD format: Binary (used by GiD by default) and ASCIL, This chapter describes the format of the geometry ASCII fie During the development of the program, the back ard compatibility has been tried to be guaranteed as much as possible, s0 that, in general, any GiD version is be able to read it (some very old version of GiD can ignore some neu entities) + The file "geo" is written using Export->SaveAsciProject, but by default the geometry will be saved in binary format In order to GiD to read the file, it should be placed inside a directory named "*.cid” Document natation: © By default all the variables are of type integer, the variables of type float will be written underlined, and those of type double with double underlined. (data types of the "C" language) + A carriage return is denoted for ‘The commas written to separate the variables should not be written in the fle, they only appear in this document to facilitate their reading, and the same applies for the white lines. “The file should contain the following fields, and in the described order dn enery for each meshing data (avoid if net exits) Mali entity (denoves end of mesh data) Mall entity (denoves end of geometric entities) Header RAMSAN-ASCII-gid-v7.6 (it is used to identify the file type and its version, in this case 7.6) Problem Type Problem type (variable of type string) IsQuadratic (0 for lineal elernents) (problem type name, UNKNOWN type for not loading none) Must Repair 0 (0 i itis not necessary to apply the "Repair" function after the reading, "Repait" corrects the value of some fields like the counter of the number of higher entities to those an entity is subordinated to) Layer Number of layer, Name (variable of type string), isfrozen (0 oF 1),ison (0 er 1), RGB_R, RGB_G, RGB_B (RGB color, values from 0 to 255) Null entity for end of entities) NoStructuredMeshData Entity code= -2, number 1D, NumOféntities (number of entities than point to it), elementtype, MustBeMashed (0 oF 2, default=0), size (edge element size), StructuredMeshData Entity Code= -2, number ID, NumOffntities, elementtype, MustBeMeshed, Size, StructuredWeightedMeshData Geometry format: Modelname.geo 36 Entity Code= -3, number ID, NumOfEntities, elementtype, MustBeMeshed, Size (number of divisions), w eight (positive or negative value to a non uniform concentration of the elements) Where ElernType={Nolle=0, Linear=1, Triangle=2, Quadrilateral OnlyPoints=7} |» Tetrahedra=4, Hexahedr 1 Prism=6, Point Entity Code=1, number ID, label”, selection’, number of higher entities, conditions=0, materi data=0 xy 2 . number layer, mesh ‘The flag value label is only used by old GID versions (to set on/off the visualization of the entity label), current versions use only selection for both flags (frst bt for selection on/off and second bit for label on/off) Straight segment Entity Code=2, number GOES, labels, selection, number of higher entities, condition data=0 < CR> Number of intial point, number of final point , material=0, number layer, mesh fee Entity Code=3, number 1D, label, selection, number of higher entities, condition data=0, Number of initial point, number of final point, x center, y center, radius, intial angle, final angle ‘TransformationMatrix [0] [0]... TransformationMatrix [0] [3] ‘TransformationMatrix [3] [0]... TransformationMatrix [3] [3] “The transformation matrix maps the points from 2D to the final 30 location. Polyline Entity Code=4, number of 1D, label, selection, number of higher entities, conditions data=0, Number of initial point, number of final point, number of parts, length, UsePointsInMeshing=0, checknur sense[2] j.., sense[number parts] (gives the orientation of the sub line, possible values 0 or 4) length{2],...)ength{number parts] here the description for each one of then sub-curves is written, with the particularity that the number is set = -2 to all of them, to mark that they are not independent entities. number of layer, mesh NURBS curve Entity Code=11, number ID, label, selection, number of higher entities, conditions=0, mater data=0, , number layer, mesh Number of initial point, number of final point, number de polygon contrel points, degree, length xpoint{1], y point{2], z point{1] x point [number points], y point [nurrber points], z point [number points] Inots[2], ... » knots [number peints+degreeti], IsRational (0 or 4) Weight{2] ,.., Weight [number points ] (only if rational) “The length is ignored when reading, itis recalculated (it could be set to 0.0) Planar Surface Entity Code=5, number 1, label, selection, number of higher entities, condition data=0 0, material >» number layer, rmesh Number of boundary lines, number of curvel2], .. , number of curvefnumber of lines] (Note: if the curve is a part of a polyline it should be substituted “number of curvefi]" for "= number curvefi], relative position inside the poly-line”, Note the negative sign in the polyline number, and the position in the polyline will be Ot...) sense[2], ... sense[number of lines], (set the orientation of a segment, rust be 0 or 1) x center, y canter, 2 center, x normal, y normal, z normal, (vector normal to the plane) Geometry format: Modelname.geo 37. Coon Surfaces (defined by 4 sides, their interior is interpolated from the contour) Entity Code=6, number of ID, label, selection, number of higher entities, conditions data=0, number of layer, mesh Number of boundary lines=4, Number of curve[], ... , number of curve[4], (Note: if the curve is part of a polyline it should be substituted "number of curvefi]" for "= number of curve], relative location inside the polyline", note the negative sign in the polyline number, and the position in the polyline will be 0, sense[2]..., sense[4] (set the segment orientation, must be 0 or 1) xcenter, y canter, 2 center, ) x normal, y normal, z normal, (vector normal to the plane) NURES Surface Entity Code=14, number of 1D, label, selection, number of higher entities, concitions=0, material=0, number of layer, mesh data=0, Number of boundary lines Number of curve[], .«. , number of curve[4], sense[]..., sense[4] (set the segment orientation, must be 0 or 1) xcenter, y canter, z center, x normal, y normal, z normal, (vector normal to the plane) <> IsTrimmed, NU (number of control points in the U direction), NV, degreeU (polynomial degree), degree xpoint{1], y point{2], z point[1], x point{NUMNV], y pointINUMV J, z point{NUMIY J, knotsU[L], ... , knotsU [WUtdegreeU+4], knotsv[2}, ... , knotsV [NV+degreeV+4], IsRational (0 or 1) Weight{2],.., Weight [NU*NV] (only if rational) Volume Entity Code=9, number of 1D, label, selection, number of higher entities, conditions data=0 number of layer, mesh Number of boundary surfaces Number of surface[2],... , number of surface[number of surfaces], sense[2], .. sense [number of surfaces], (segment orientation, 0 or 1) xcenter, y canter, 2 center, Rules to follow: ‘There are four level types of geometrical entities: Point, Curves (straight segment, are, polyline, Nurbs), Surface (planar, Coon, Wurbs) and Volume. + Geometrical entities of the same type cannot have the same ID number associated (is not valid to have to curves with same 1D) + The numeration begins with 1 (not by 0 like in the “ entity is deleted). + The entities of a level are listed with increasing ID. style), and it could be jumps in the numeration (¢¢. when a ‘The center of the entities doesrit refer to the geometric center, itis simply an approximate center where its label will be drawn, + The higherentities number can be intialized to zero, and it will be corrected automatically if "Must Be repaired” flag was set to 2. In any case is recommended to set the righ value and avoid the reparation. + The lenght of NURBS curves could be set to zero, currant versions ignore this value and recalculate it, + Parametric curves are normalized to parameter space [0.0,4.0] + Parametric curve must have its initial point at parameter 0.0 and end point at parameter 1.0. A closed curve must share the same start and end point. + Parametric surfaces are normalized to parameter space [0.0,1.0]+{0.0,1.0] ‘The boundary curves of a surface define a outer loop and some possible inner loops. The outer loop is before outer loops. + The curves of a loop are ordered consecutivelly. A loop finish when the starting point of the first curve (taking into ‘account its sense for the surface) is equal to the last point of other curve. Geometry format: Modelname.geo ES + The ordering and orientation of the boundary curves must agree with the surface normal (Xu°Xy) (right-hand rule), ‘The outer loop must point to the same sense as the surface normal, and inner loops is any in the opposite sense, * Volumes are defined by a closed shell of surfaces: first surfaces must define the outer shell, and then the inner shells, + The order of surfaces on a ‘volume shell’ is not relevant, but the orientation must be 0 (SAME1ST) is the surface 6.1.1 Geometry example ‘This example consists on a simple cylinder, like the ene shown on the right It contains points, curves of type straight lines, circumference ares and curved NURBS with circumference shape, and surfaces of the types planar, ‘Coon and NURBS with cylindrical form, and there is a single volume. Note: This model could be found at: Examples\ Cylinder ASCIL.gid Geometry example 39 Geometry example 40 This is the explanation of its content: RAMSAN-ASCII-gid-v7.6 UNKNOWN 0 ° “The GiD geometry ASCII file is wrote with rules of version 7.6, and without any problertype (UNKNOWN) “The model has two layers, created with: 1 Tops 0 100.255 2 Lateral 0.10255 255 ° “The layer number 1 is named Tops’, is net frozen, visible, and with RGB color The layer number 2 is named ‘Lateral, is not frozen, visible, and with RGB color Last 0 denotes the end of layers block ° ‘There is no meshing information attached to entities. “Then four points (code=1) are defined: 111230020 -1.65134 -1.60324 0 121230020 -1,65134 -1.60324 2.76945 131230020 -1,80449 -3.49553 0 141230020 -1,80449 -3.49553 2.76945 2.65134,-1.60324,0) 1,65134,-1,60324,3,76945) the meaning of rype_point 1=peint_id 1: layer ‘Lateral’ O=has_mesh_data 2=label_on_selection_off 3higherentities Jum_conditions O=id_material the point 1 belong to 3 curves (1, 3 and 5) then higherentities must be 3 211220020 12 221220020 34 ‘This define curves 1 and 2 that are straigth lines (type surfaces, then its higherentity counter is 2 .2), In this model that close a volume all curves belong to two “The curve 1 starts in the point 1 and end in the point 2 1131220020 135 22.98214 -1.65134 -1.603240 "2159749 -1.52666 0 "2167407 -2.47281 0 “2175064 -3.41896 0 “1180449 -3.49553 0 ooo0s05111 110.707107 10.707107 1 1141220020 2452 2.98214 "1.65134 -1.60324 2.76945 “2159749 -1.52666 2.76945 "2167407 -2.47281 3.76945 Geometry example 41 “2.75064 -3.41896 3.76945 “110449 -3.49553 3.76945 ooo0s05111 41.0.707107 10.707107 1 1151220020 3.15 22,98213 “1.80449 -3.49553 0 58344 -3.57211 0 [781767 -2.62596 0 0519 -1.67981 0 71165134 -1.60324 0 0000505111 110.707107 10.707107 1 Previous text define curves 3, 4 and 5 that are NURBS (type==11) ig rational, weigehs= 1 0.707107 1 0.707107 1 jeguee 2. 902101ength 361220020 42 -0.315383 0.025526 0.949244 4.62163 7.77322 1000 o100 oo10 -1,41253 -2.57491 3.76945 1 And curve 6 is a circurference arc (type 11) angie (22a) ig 2 4x4 transformation matrix that moves the 2D arc to the final 3D location snd point (-0.215263 0.025526)=20 cencex 0.945244 1411210020 a 1423 oon “2.67407 -2.47281 1. 0.996741 -0.080672 0 02512 -1,65134 -1.60324 0 71165134 -1.60324 3.76945 "2159749 -1.52666 0 "2159749 -1.52666 3.76945 “2.67407 -2.472810 "2167407 -2.47281 3.76945 "2175064 -3.41896 0 "2175064 -3.41896 3.76945 “110449 -3.49553 0 “1180449 -3.49553 3.76945 oo oo00s505111 1.110.707 107 0.707107 1 10.707107 0.707107 11, 473 Surface 1 is a NURBS surface (type respectivelly Its approximated center is (-2.67407 -2.47281 3.98473) (0.996744 -0.080672 0) then are isted the control points, the Frets u=(0 0 42) andbnets va(0 000-8. 0-8 1 1a) and the weigths=(2 1 0.707107 0.707107 1 1 0.707307 9.707307 3 1) 14), it has 4 boundary lines: 1, 4, 2, 3, with orientations same, same, dif diff Geometry example 2 621210020 a 1526 1100 781767 -2.62596 1.88473 -10.6459 0.861634 -0 Surface 1 is a Coons surface (type==6), it has 4 boundary lines: 1, 5, 2, 6, with orientations dif, diff, same, same. Then is printed its approximated center and normal ‘The chape of kind of surface is defined only by its boundary. 1431210010 2 53 oo -1.72792 -2.54939 0 oor 12211 “2.7699 -1.5074 0 “217699 -3.59137 0 Surface 3 is like the 2. a NURBS surface (type 4), but in this case is trimming a planar squared shape. 541210010 2 64 an -1.41253 -2.57491 2.76945 oot Surface 4 is a planar surface (type=: ), that is defined by a canter an normal, and the trimming boundary lines. 911200020 4a 1243 ooo0 -1,72792 -2.54939 1.08473 ° This define the volume 1 (typs and approximated center=(-1.72792 -2.54939 1.88473) ) that is defined by 4 boundary surfaces: 1, 2, 4, 3 with orientations same, same, same, Last 0 is 2 NULL entity (type==0) that finish the definition of geometrical entities 43 7 POSTPROCESS DATA FILES In GiD Postprocess you can study the results obtained from a solver program The solver and GiD Postprocess communicate through the transfer of files. The solver program has to urite the results to a file that must have the extension .post.res and its name must be the project name, ‘he solver program can also send the postprocess mesh to GID (though this is not mandatory), where it should have the extension .post.msh. IF this mech is nat provided by the solver program, GiD uses the preprocess mesh in Postprocess. ‘The extensions .msh and .res are also allow ed, but only files with the extensions .post.res ~ and potentially .post.msh - will automaticaly be read by GiD when postprocessing the GID project. Postprocessing data files are ASCII files, and can be separated into two categories: + Mech Data File: projece_nane.post.msh for volume and surface (3D oF 2D) mesh information, and = Results Data File; peeject_nane-post-res for results information 0 oe. post SOLVER, Proprosase GD rote epee Note:Projectitame.post.msh handles meshes of different element types: points, lines, triangles, quadhilaterals, tetrahedra and hexahedra, If a project is loaded into GiD, when changing to GiD Postprocess it will look for Projectitame,post.res. If a mesh information file with the name Proj ecttlame,post.msh is present, it ill also be read, regardless of the information available from GiD Prepracess, * ProjectName.postimsh: This fle should contain nodal coordinates of the mesh and its nodal connectivities as well as the material of each element. At the moment, only one set of nodal coordinates can be entered. Different kinds of elements can be used but separated into different sets, If no material is supplied, GiD takes the material number to be equal to zero. + ProjectName.postres: This second file must contain the nodal or gaussian variables, GID lets you define as many nodal variables as desired, as well as several steps and analysis cases (limited only by the memory of the machine). “The definitions af the Gauss points and the results defined on these points should also be written in ths file, ‘The files are created and read in the order that corresponds to the natural w ay of solving a finite element problem: mesh, surface definition and conditions and finally, evaluation of the results. The format of the read statements is normally free, ibe itis necessary only to separate them by spaces. “Thus, files can be modified with any format, leaving spaces betu een each field, and the resuits can also be written with as many decimal places as desired, Should there be an error, the program wars the user about the type of mistake found. GiD reads all the information directly from the preprocessing files whenever possible in order to gain efficiency. 7.1 Results format: ModelName.postres Results format: ModelName.post.res 44 Note: Code developers can dow nload the GiDpost tool from the GiD web page (http://w w..sidhome. comm gid-plus/tools/gi post!) this is a C/C++/Fortran library for creating pastprocess files for GiD in both ASCII and compressed binary format. ‘This is the ASCII format description: ‘The first line of the files with results written in this new postprocess format should be: where must be: 1.0 in general >=1:1 in case of binary compressed format >=1.2 in case of contain some OnllurbsSuzface result Comment lines are allo» ed and should begin with a'#", Blank lines are also allow ed. Results files can also be included with the keyw ord include, for instance: This is useful, for instance, for sharing several GaussPoints definitions and ResultRangeTable among different analyses. This ‘include’ should be outside the Blocks of information ‘There are several types of Blocks of information, all of them identified by a keyword = GaussPoints: Information about gauss peints: name, number of gauss points, natural coordinates, etc; * ResultRangesTable: Information for the resuit visualization type Contour Ranges: name, range limits and range + Result: Information about a result: name, analysis, analysis/time step, type of result, location, values: + ResultGroup: several results grouped in one block, These results share the same analysis, time step, and location (nodes or gauss points) 7.1.1 Gauss Points If Gauss points are to be included, they must be defined before the Result which uses them. Each Gauss points block is defined bety een the lines GaussPoints and End GaussPoints. ‘The structure is as follows, and should: * Begin with a header that follons this model GaussPoints "gauss_points_name" Elemtype my_type "mesh_name” where + GaussPoints, elemtype: are not case-sensitive; + sgauss_poines_name': is a name for the gauss points set, which will be used as reference by the results that are located on these gauss points: ma pme, decribes which element type these gauss points arefor, i.e, Mine, Tetangie, Guadsstatesal, + Smesh_name': is an optional field. If this field is missing, the gauss points are defined for all the elements of ‘type my_type. If a mesh name is given, the gauss points are only defined for this mesh. * Be follow ed by the gauss points properties: Number of Gauss Points: number_gauss_points_per_element Nodes included Nodes notincluded Natural Coordinates: Intemal Natural Coordinates: Given natural_coordinates_for_gauss_point_1... . natural_coordinates_for_gauss_point_n where + Number of Gauss Points: number_gauss_points_per_element: is not case-sensitive and is followed by the number of gauss points per element that defines this set. IF Natural Coordinates: is set to Internal, urber_gauss_points_per_element should be one of + 4, 3, 6for Triangles: + 4, 4, 9 for Quadiilaterals: Gauss Points 4s + 1, 4, 10 for Tetrahedra: + 1,8, 27 for Hexahedra; + 1, 6 for Prisms: #4, Sfor Pyramids; and + 2s. m points equally spaced over lines, For triangles and quadrilaterals the order of the gauss points with Internal natural coordinates will be this: y y 4 3 4 3 2 2 1 1 Internal coordinates: Internal coordinates: Internal coordinates: (0,0) 2£0.57735027 77459667 (ara) (ara) (2 3) (ara) (ara) (a, a) (0a) (2, 0) (a2) a.) (0, a) (2,0) (0, 0) ‘Gauss Points positions of the quadrature of Gauss-Legendre Quadilaterals Internal coordinates: Internal coordinates: Internal coordinates: 1/3 13=0.09157621 6=0.8168475 7 144594849 d=0,1081030 (aa) (2,0) (a, )(0, a) : (2,2) (ba) (26) (ed) (ee) (de) Gauss Points positions of the quadrature of Gauss for Triangles For tetrahedra the order of the Internal Gauss Points is this: Gauss Points Internal coordinates: 2=(5434sqrt(5))/20=0.585410198624968 b=(S-sart(S))/20 =0.138196601125020 (1b, b, b) ( a,b, b) ( b, a, b) (bb, a) For hexahedra the order of the Intemal Gauss Points is this: Internal coordinates: 2 0.577350269189626 (-ararca) (aaa) (a, aa) (-a, ara) (ara, a) (ara.a) (aaa) Ca, aa) For prisms the order of the Internal Gauss Points is this: 9.21324965405187 799675134594012 (a0 (bad (abe (aa) (bead) (abd) Internal coordinates: 9=0,108103018168070 b=0,445948490915965 =0.816847572980459, (aaa(caad(aca)(aad (by a, a) (by bs a) (a, by a) (a, a,b) (by a,b) (a,b, b) Internal coordinates: 9.774596669241483 a) ( a-aica) ( 2, aa) (-a, ara) (Cara, a) (ara, a) (a, 2,3) (-a, a a) (0-aa) ( a, 0.-a) (0, aa) (-a, 0.-a) (ara, 0) (ara, 0) (a, 2, 0) (-a, a, 0) (0a, a) (3,0, 2) (0, a, a) (-a, 0. a) (0, 0-3) (0a, 0) ( 3, 0, 0) (0, a, 0) (-a, 0, 0) (0,0, a) (0,0, 0) For pyramids the order of the Internal Gauss Points will be this: Gauss Points a7 Internal coordinates: (258.0 sqrt(2.0/15.0)/ 5.0 =0.584237394572177 b=-2/3 =-0.ss66sescee56665 /5 = 0.4 (-3;-2,b) (2,-2,b) (aab) (-3, a,b) (0.0, 0.0, ¢) ‘The given natural coordinates for Gauss Points should range: + betu een 0.0 and 1.0 for Triangles, Tetrahedra and Prisms, and for Quadrilaterals, Hexahedra and Pyrarrids. Note: If the natural coordinates used are the internal ones, almost all the Results visualization possibilities will have some limitations for tetrahedra and hexahedra with more than one gauss points. If the natural coordinates are given, these limitations are extended to those elements with number_gauss_points_per_element not included in the list written above. + Nodes Included / Nodes not Included: are not case-sensitive, and are only necessary for gauss points on Line elements which indicate whether or not the end nodes of the Line element are included in the urber_gauss_points_per_element count: ‘The default value is nodes not included Note: By now, Natural Coordinates for line elements cannot be "Given" + Natural Coordinates: Internal / Natural Coordinates: Given: are not case-sensitive, and indicate whether the natural coordinates are calculated internally by GiD, or are given in the following lines. The natural coordinates should be written for each line and gauss point. + End with this tall End GaussPoints where End GaussPoints: is not case-sensitive Here is an example of results on Gauss Points Internal Gauss points Gauss Points 48 ‘The following Internal gauss points are automatically defined, Results can use this names without explicitly define them with a GaussPoints / End GaussPoints statement op_pONT_a GP_LINE2 GP_TRIANGLE_1 GP_TRIANGLE_3 GP_TRIANGLE_6 GP_QUADRILATERAL_1 GP_QUADRILATERAL. 4 GP_QUADRILATERAL 9 GP_TETRAHEDRA_1 GP_TETRAHEDRA_4 GP_TETRAHEDRA_10 GP_HEXAHEDRA_1 GP_HEXAHEDRA_@ GP_HEXAHEDRA_27 GP_PRISM_1 GP_PRISM_6 GP_PIRAMID_1 GP_PIRAMID_S GP_SPHERE_1 GP_CIRCLE_2 Is is possible to use also the generic name GP_ELEMENT_1 to mean all kind of elements with 1 gauss point (instead of the specific element GP_LINE_1, GP_TRIANGLE_t, etc. 7.1.2 Result Range Table If Result Range Table is to be included, it must be defined before the Resuit which uses it. Each Result Range Table is defined betw een the lines ResultRangesTable and End ResultRangesTable ‘The structure is as follows and should * Begin with a header that follows this model ResultRangesTable "ResultsRangeTablell ame” where ResultRangesTable: is not case-sensitive; "ResultsRangeTablellame": is a name for the Result Ranges Table, hich will be used as a reference by the results that use this Result Ranges Table, + Be follow ed by a lst of Ranges, each of them defined as follows Min_Value - Max_Values "Range Name” where + Min_value : is the rinimum value of the range, and may be void if the Max_value is given. If void, the minimum value of the result will be used; + Max_value + is the maximum value of the range, and may be void if the Min_value is given. If void, the maximum value of the result will be used: + "Range Name" : is the name of the range which will appear on legends and labels. © End with this tall End ResultRangesTable where End ResultRangesTable: is not case-sensitive. Here are several examples of results range table: + Ranges defined for the hole result: Ball the ranges are min <= rex < mar except # che ase range is min <= res * dust a couple of ranges: + OF using the maximum of the result: Result Range Table 49 7.1.3 Result Each Result block is identified by a Result header, follow ed by several optional properties: component names, ranges table, and the result values, defined by the lines Values and End Values. ‘The structure is as follows and should * Begin with a result header that follow s this model Result "resuit name" "analysis name" step_value resuit_type result_location "location name" where + Result is not case-sensitive; + vresule mane": ig a name for the Result, which will be used for menusi if the result name contains spaces it should be written betw ean "" or betw ean (}. "analysis name": is the name of the analysis of this Result, which will be used for menus; ifthe analysis name contains spaces it should be written betw een "or between {. + svep_valwe: is the value of the step inside the analysis "analysis name": + resule_cype: describes the type of the Result, It should be one of the follow ini + Seals: one component per result + Vector: ty, three or four components for result: x, y, 2 and ( signed) modulus Macrix: three components for 2D matrices, six components for 3D matrices PlainDefosmationtiaesix: four components: Six, Syy, Sx, SEZ Nainifacsix: the three main unitary eigen vectors vectors ( three components each) and three eigen values of the matrix + “Loeat Ares: three auler angles to specfy the local axis + ComplexSealar’ tio components to spacty a+b i + ComplexVecter: four components for 2D complex vectors, six or nine components for 3D vectors! FX ix r¥ iY £2 iZ [el lil [vector] ~-> to specify the vector (1X + ik, r¥ +i, 12 + 12) + zesult_location® is where the Result is located. It should be one of the following: Ifthe Result is onGaursPoines, g “Location nane" should be entered: is the name of the Gauss Points on which the Result is defined Note: Resuits can be visually grouped into ‘folders’ like in the following picture ts: sta . os seslFaceNUn FT % igiese Hts by just grouping of results using double slahes in the result names: Result "fechanical//Pressures//Watez pressure” "Time analysis" 60 Result "Physical//Sacuzation" "Time analysis” 60 Scalar Onllodes and £0 on. + Be follow ed (optionally) by result properties: Result 50 ResultRangesTable "Name of a result ranges table” ComponentNames "Name of Component 1", "Name of Component 2° + ResultRangesTable "Name of a result ranges table": (optional) is not case-sensitive, follow ed by the name of the previously defined Result Ranges Table, which will be used if the Contour Ranges result visualization is chosen (see Table pag 40); + Componentitames "Name of Component 1", "Name of Component 2": (optional) is not case-sensitive, follow ed by ‘the names of the components of the results which will be used in GiD. Missing components names will be Tezult Rani automatically generated, The number of Component Names are! * One for a Scalar Result + Three for a Vector Result © Six for a Matrix Result * Four for a PlainDeformationMatrix Result * ‘Six for a MainMatrix Result + Three for a Localaxes Result + Two for a ComplexScalar Result * Six or nine for ComplexSealar + Uniti the unit of the result. + End with the result values: Values End Values where * Values: is not case-sensitive, and indicates the beginning of the results values section; © The lines + node_or_eler_number component_1_value component_2_value + node_or_elern_number component_1_value component_2_value are the values of the result at the related 'node_or_elem_number’ ‘The number of results values are limited thus: *+ the Result is located Onttodes, they are limited to the number of nodes defined in Projectitame.post.rnsh, +f the Result is located OnGaussPoints "My GP", and if the Gauss Points "My GP" are defined for the mesh "My mesh’, the limit is the number of gauss points in "My GP" multiplied by the number of elements of the mesh “My mesh’ For results in gauss points, each element must have 'ngause' lines of results For example, ifthe number of gauss points is 3, then for an element, 3 lines of gauss point scalar result must appear. Holes are allowed in any result. The element nodes with no result defined will not be drawn, ie. they will appear transparent. Result location: OnNodes: results are defined on the nodes of the mesh. If nodes are shared betw een elements, as usual, then the result field is continous. OnGaussPoints: results are defined in some locations of the mesh elements. Usually solvers calculate values in some special locations named ‘gauss points’ for its numerical integration, then is natural to write the results on these locations. The resuits field is discontinuous between elements, then some options like calculate streamlines are not allow ed for this kind of result. Sometimes results are extrapolated and averaged on nodes providing a continuous and Result SL smoothed result. OnNurbsSurface: results are defined on the ‘control points’ of the NURBS surfaces. These surfaces by default are the ones of preprocess, but could be overriden by an optional file with the same format as the .geo preprocess file In this case the .post.geo fle must contain only surfaces of NURBS type, and any volume. Note: in case of have some result OnllurbsSurface the file header must be declared with version greater of equal to 12 ‘The values block of a result Onl\urbsSurface must have for each surface with results something like this Walwe()_sonponent_A ...valwe()_comonent_n value (num_contzel_poines_s)_component_1 -.. value(num_contzel_poines_u)_component_n value (num_contzol_poines_w x num_control_peints_v)_component_1... value(num_contzol_poinesy ol_posnes_v) companent_m where surface_nunber js the id of the surface (the same integer number that identify the surface in preprocess) value jg the real number of the result, It is compulsory to write the values for all control pointsof the surface, if some control point doesn't has result it must have a NR value to represent 'no result” This is tipical of trimmed NURBS surfaces, some control points far of trimmed part are not relevant and doest'n have any value, Ie the whole surface doesn't has OntlurbsSurface result, itis not nacesary to be written, ‘There is a model with isogeometric results OnllurbsSurface ati Examples\IGA_shell.gid\IGA_chell.postires ‘The number of components for each Result Value are: * for Scalar results: one component resuit_nurrber_| scalar_value * for Vector results: three components, with an optional fourth component for signed modules result_number_i xvalue y_value 2_value result_number_i x_value y_value 2 value signed_module_value + for Matrix results: three components (2D models) or six components (30 models)2D: _result_number_i Sxx_value Syy_value Sxy_value3D: result_ourrber_j Sxe_value * for PlainDeformationMatrix results: four components result_number_i Sxx_value Syy_value Sxy_value Sez_value + for MainMatrix result Sxx_value Syy_value Sez_value Sxy_value Syz_value prelve components result_number_i Si_value Sil_value Sill_value Vix_value Viy_value Vie_value Viix_value Viiy_value Viiz_value Vilix_value Vily_value Viiz_value * for Localxes results: three components describing the Euler angles result_number_i euler_ang_3_value ‘euler_ang_?_value euler_ang_3_value, Look for LocalAxesDef(EulerAngles) at Multiple values return commands for a more detailed explanation to calculate axis from euler angles and vice-versa + for ComplexScalar results: two components to specify a+b +i * for ComplexVector results: four components for 2D complex vectors, six or nine components for 3D vectors: CK FIV FZ [rf [i] [vector] => to specify the vector (1+ 1K, HY HY, FZ +12) * End Values: is not case-sensitive, and indicates the end of the results values section Not For Matrix and PlainDeformationMatrix resuits, the Si, Sii and Sili components are calculated by GiD, which represents the eigen values & vectors of the matrix results, and which are ordered according te the eigen value. 7.1.3.1 Results example Here is an example of results for the table in the previous example (see fish sxamale Results example Results example 53 Results example 54 7.1.4 Result group Results can be grouped into one block. These results belong to the same time step of the same analysis and are located in the same place. So all the results in the group are nodal results er are defined over the same gauss points set Each Result group Is identified by a ResultGroup header, followed by the results descriptions and its optional properties ~ such as corrponents names and ranges tables, and the results values - all bety een the lines Values and End values. ‘The structure is as follows and should * Begin with a header that follons this model ResultGroup "analysis name" step_value my_location " where + Resultsrou is not case-sensitive: + "analysis name’: is the name of the analysis of this ResultGraup, which will be used for menus: if the analysis name contains spaces it should be written between or between {). * step_value! is the value of the step inside the analysis “analysis name": + my_lecation: is where the ResultGroup is located, It should be one of the following: Onllodes, OnGaussPoints. If the ResultGroup is OnGaussPoints, a "lecation name" should be entered, location name": is the name of the Gauss Points on which the ResultGroup is defined. * Be follow ed by at least one of the resuits descriptions of the group ResultDescription "result name" my_result_type{:components_number] ResultRangesTable "Name of a result ranges table’ ComponentNames "lame of Component 1", "Name of Component 2" where + ResultDescription: is not case-sensitive: + "result name"! is a name for the Resuit, which will be used for menus; ifthe result name contains spaces it should or between {. + my_type: describes the type of the Result. It should be one of the following: Scalar, Vector, Matrix, PlainDeformationMatrix, MainMatrix, or LocalAxes. The number of components for each type is as follows be written bet een © One for a Scalar: the_scalar_value + Thres for a Vector: x, Y and Z + Six for a Matrix: Sxx, Syy, Szz, Sxy, Syz and Sxz * Four for a PlainDeformationMatrix: Sxx_value, Sy, Sxy and Sez + Twelve for a MainMatrix: Si, Si, Sil, VIX, Viv, VIZ, Vix, ViY, VIZ, ix, Vi and Viz + Three for a LocalAxes: euler_ang_1, euler_ang_? and euler_ang 3 Following the description of the type of the result, an optional modifier can be appended to specify the number of components separated by a colon, It only makes sense to indicate the number of components on vectors and matrices: © Vector:2, Vectori3 or Vector:4: which specify © Vector:2: x and ¥ x, ¥ and Z X,Y; Z and [Vector] (module of the vector, with sign for some tricks) ‘The default (Vector) is 3 components per vector. © Matrix: oF Matrixi6: which spect 3: Six, Sy and Sxy Sox, Sys $22, Sxy, Syz and Sxz ‘The default (Matrix) is 6 components for matrices: Here are some examples: ‘and w here (optional properties) * ResultRangesTable "Name of a result ranges table": (optional) is not case-sensitive, and is follow ed by the name of the previously defined Result Ranges Table which will be used if the Contour Ranges result visualization is chosen Result group 55 (see Result Range Table -pea. 48); CCommponentitames "Name of Component 1", "Name of Component 2": (optional) is not case-sensitive, and is follow ed by the names of the components of the results which will be used in GiD. The nurrber of Component Names are: * One for a Scalar Result + Three for a Vector Result © Six for a Matrix Result * Four for a PlainDeformationMatrix Result Six for a MainMatrix Result + Three for a Localaxes Result = End with the results values: Values End Values ~ ~ ~ where * Values: is not case-sensitive, and indicates the beginning of the results values section; + The lines * location_1. result_1_cormponent_1_value result_1_component_2_value result_1_cormponent_3_value result_2_component_2_value result_2_component_: 2 value result 2_component_3_value * locationn result_1_corponent__value result_1_component_: 2 value result_1_component_3_value result_2_compenent_2_value result_2_component_2_value result_2_component_3_value are the values of the various results described with ResultDescription for each location. All the results values for the lecation '' should be written in the same line". ‘The number of results values are limited thus: + the Result is located Onttodes, they are limited to the number of nodes defined in Projectitame-post.rnsh, If the Result is located OnGaussPoints "My GP", and if the Gauss Points "My GP" are defined for the mash "My mesh’, the limit is the number of gauss points in "My GP" multiplied by the number of elements of the mesh “My mest Holes are allow ed. The element nodes with no result defined will not be drav'n, ie, they will appear transparent: “The number of components for each ResultDescription are: * for Scalar results: one component resuit_nurrber_| scalar_value for Vector results: three components result_number_i x_value y_value =_value for Matrix results: six components (30 medels)3D: result_number_i Six_value Syy_value S2z_value Sxy_value Syz_value Sxz_value * for PlainDeformationMatrix results: four components result_number_| Six_value Syy_value Sxy_value Sez_value + for MainMatrix results: prelve components result_number_i Si_value Sil_value Sill_value Vix_value Viy_value Vie_value Viix_value Viiy_value Viiz_value Vilix_value Vily_value Viiz_value for LocalAxes resuits: three components describing the Euler angles result_number_i euler_ang 1_value ‘euler_ang_?_value euler_ang_3_value * End Values: is not case-sensitive, and indicates the end of the results group values section. Jectors in a ResultGroup alw ays have three components. Matrices in a ResuitGroup alw ays have six components: All the results of one node or gauss point should be mritten on the same line. Note: For Matrix and PlainDeformationMatrix results, the Si, Sii and Sill components are calculated by GiD, which represents the eigen values & vectors of the matrix results, and which are ordered according te the eigen value. Nodal ResultGroup example: Result group 56 ResultGroup ‘Lead Analysis" 1 Onledes ResultDescription "Ranges test” Scalar ResultRangesTable "My cab) ResultDescription "Scalar test" Scalaz ResultRangesTable "Presser ResultDescription "Displ acemen ‘ComponentNames "{-Displ", "Y-DispI" *Z-Displ ResultDescription Medal Stresses" Maer ComponentNames "Sx", "Sy", "Se", "Sey", "Sys", "See" Gauss Points ResultGroup example: GaussPoints "iy Gauss" Elentype Triangle ‘Number Of Gauss Points: 2 Natural Coordinates: Inteznal 7.2 Mesh format: MedelName.post.msh Not ‘This postprocess mesh format requires GiD version 6,0 or higher. Comments are allow ed and should begin wth a'#, Blank lines are aso allow ed. To enter the mesh names and result names in another encoding, just write # encoding your_encoding for example # encoding wee-8 Inside this fle one or more MESHes can be defined, each of them should: * Begin mith a header that follons this model MESH "mesh_name” dimension mesh_dimension Elemtype element_type Nnede element_nur_nodes where + MESH, dimension, elemtype, nnode: are key ords that are not case-sensitive; + mesh_name": ig an optional name for the mesh; + mesh dimension: ig 2 of 3 according to the geometric dimension of the mesh; + elenent_eype: describes the element type of this MESH. It should be one of the following: Peint, Line, Mesh format: ModelName.post.msh 57. Teiagle, Quadrilateral, Tetrahedra, Hershedra, Prism, Pyramid, Sphere, Cizcle ; + element_nom nodes: the number of nodes of the element: * Point: 4 node, Point connectivity’ + Line: 2 or 3 nodes, : | __ Line connectivities: we Ay + Triangle: 3 or 6 nodes, ‘Triangle connectivities: A&é + Quadrilateral: 4, 8 or 9 nodes, Quadrilateral connectivities + Teerahedra, 4 of 10 nodes, Teerahedsa, connectivities & & + Mexahedsa, 9, 20 of 27 nodes, Hexaheds2, connectivities: mH 7 of * Prism: 6,15 or 18 nodes, Prism connectivities: + Pyramid: 5 or 13 nodes, Pyramid connectivities: Mesh format: ModelName.post.msh 58 + Sphere: 1 node and a radius + Circle: node, 2 radius and a normal (x,y. 2) Note: For elements of order greater than linear, the connectivities must written in hierarchical order, ve, the vertex nodes first, then the middle ones. * An optional line declaring the units of the mesh coordinates + An optional line describing its colour with # color R GBA, where R, G, B and A are the Red, Green, Blue and Alpha components of the color written in integer format betw een 0 and 255, or in floating (real) format betw een 0.0 and 1.0. (Hote that if is found in the line it will be understood as integer, and so 1 above 255, rather than floating, and so 1. above 1.0). Alpha values represent the transparency of the mesh when this visualization options is active, being 0.0 totally opaque and 3.0 tetally transparent, # color 127 1270 In this way different colours can be specified for several meshes, taking into account that the # color line rust be bet een the MESH line and the Coordinates line. * Be follow ed by the coordinates: coordinates end coordinates where * the pair of keywords coordinates and end coordinates are not case-sensitive: * between these keyu ords there should be the nodal coordinates of all the MESHes or the current one, Note: If each MESH specifies its own coordinates, the node number should be unique, for instance, f MESH "mesh cone’ uses nodes 1..100, and MESH "other mech” uses 50 nodes, they should be numbered from 103 up. + Be follow ed by the elements connectivity elements Bet end elements where + the pair of keywords elements and end elements are not case-sensitive: + beti aan these keywords there should be the nodal connectivities for the my_type elements, Note: On elements of order greater than linear, the connectivities must written in hierarchical order, ie. the vertex nodes first, then the middle ones; + There is optionally 2 material number. * For Sphere elements : Elenent_number Wode number Radius [optional_material_nonber] + For Circle elements ; Elenent_nonber ode nunber Radius [optional_nermal_x optional_nezmal_y optional_nozmal_s] (opeional_material_nunber] If the normal is not written for circles, normal ( 0.0, 0.0, 1.0) vill be used. Mesh example 59. 7.2.1 Mesh example This example clarifies the description: ne coordinates then they are already in the fizse MESH 7.2.2 Group of meshes If the same meshes are used for all the analyses, the following section can be shipped. ‘Anew concept has been introduced in Postprocess: Group, which allows the postprocessing of problems which require Group of meshes 60. re-meshing or adaptive meshes, where the mesh change depending on the time step. Normal operations, such as animation, displaying results and cuts, can be done over these meshes, and they will be actualized when the selected analysis/step is changed, for example by means of View results -> Default analysis/step ‘There are tw o ways to enter in GiD the diferent meshes defined por diferent steps or analysis: 1. define separate files for each mash, for instance: = binary format: mesh+tresuit_1.post.bin, mesh+result_2.post.bin, mesh+result_3.post.bin, ~ ascii format: mesh_1.post.msh + mesh_L.post.res, mesh_2.post.msh + mesh_2.post-res, Note: the steps values ( or analysis) should be diferent for each pair mesh+result. To read them you can use File--> Open Multiple (see POSTPROCESS > Files menu from Reference Manual) 2. define on binary file or tv asci files (msh+res): Meshes that belong to a group should be defined betw een the following highlighted commands Group “group name" MESH "mesh_name” dimension .. tend elerments MESH "anther_mesh” tend elerments end group Results which refer to one of the groups should be written between these highlighted commands OnGroup “group name’ Result "vesult name" end values end ongroup Note: GID versions 7.7.36 and later only allow one group at a time, i-e. only one group can be defined across several steps of the analysis. Care should be taken so that groups do net overlap inside the same step/ analysis. For instance, an analysis which is 10 steps long © For steps 1, 2, 3 and 4: an ‘environment’ mach of 10000 elements and a 'body' mesh of 10000 elements are used and its results * For steps 5, 6, 7 and 8: with some refinement, the ‘environment’ mesh now being used has 15000 elements and the Group of meshes 61 "body' mesh needs 20000 elements and its results are * For steps 9 and 10: the last meshes to be used are of 20000 and 40000 elements, respectively and its results are ‘There are tw o ways to postprocess this: * store the information in three pairs (or three binary files), thus © steps 1.2.3 4,post.msh and steps_1_2.3_4.post.msh (or steps_1_2 3. 4,post.bin) + steps_5_6_7_8.post.mch and steps_5_6_7_8.post.msh (or steps_5_6_7_8.post.bin) * steps_9_20.postimsh and steps_9_10,postimsh (or steps_9_10,post.bin) land use the ‘Open multiple’ option (see POSTPROCESS > Files menu fram Reference Manual) to selected the six (or three) files; or * sirite them in only ta files (one in binary) by using the Group concept: + all_analysis,post.meh (note the group - end group pairs) Group "steps 1, 2, 3 and 4” MESH “environmer MESH "body" . end group Group “steps 5, 6, 7 and 8” MESH “environmer Group of meshes 62 MESH "body" . end group Group "steps 9 and 10" MESH “environment”. MESH "bods end group and + all_analysis.post.res (note the ongroup - end ongroup pairs) GiD Post Results File 1.0, OnGroup "steps 1, 2, 3 and 4” Results Results "result 2 Results "result 2 Results ‘end ongroup OnGroup "steps 5, 6, 7 and 8” Results "result 2 Results "result 2" "time" 6.0... Results "result 2 Results "result 2" "time" 8.0... ‘end ongroup OnGroup "steps 9 and 10) Results "result 2 Results ‘end ongroup land use the normal Open option, 7.2 List file format: ModelName postlst New file *.post.st can be read into GiD, postprocess, This file is automatically read when the user works in a GID project and changes from pre to postprocess, ‘This file can also be read with File-->Open ‘The file contains alist of the files to be read by the postprocess: List file format: ModelName.post.{st 63 + The first line should contain one of these words: * Single: just a single file (ti 0 for asci files: one for mesh and another for results) is provided to be read: + Merge: several filenames are provided, one filename per line, which are to be merged inside GID, for instance when the files come from a domain decomposed simulation: + Multiple: several filenames are provided, one filename per line, which are read in GiD, for instance if they belong to a DEM simulation, or FEM simulation with mesh refinements + next lines: the mesh and results files to be read, with one filename per line: + following the postprocess mesh and result files, a list of graphs filenames can be provided so that GID reads them too; fraphs files have the extension .grf; + comment lines begin with the # character and blank lines are also adrrited; + file names may have absolute path names or relative to the lst fle location; Example of alist file: # postprocess files graph files File names may have absolute path names or relative to the lis file location. 7.4 Graphs file format: ModelName.post.grf “The graph file that GID uses is a standard ASCIT fie. Every line of the file is a point on the graph with X and coordinates separated by a space. Comment lines are also allowed and should begin with a'#" ‘The title of the graph and the labels for the X and Y axes can alzo be configured with some ‘special’ comments: + Title: Ifa comment line contains the Keyw ord 'Graphs' the string betw ean quotes that follows this keyw ord will be used as the title of the graph, + Axes labels: The string between quotes that follows the keywords "X:' and 'Y: ‘Y-axes respectively. The same is true for the Y axis, but with the Keyword "7! + Axes units will be used as labels for the X- and Example: B Graph: "Serenses! 8 Graphs file format: ModelName.post.grf The file *.grf (which contains graphs) is read when changing from pre to post projectiiame.gid/projectitame.post.grf exists, or the postprocess files are read through example.msh/res/bin and exarrple.grf are read. “The post list file ( *.post-Ist) can also contain a list of graphs (*.arf ). process and Flle-->Open, then 64 6s 8 TCL AND TK EXTENSION This chapter looks at the advanced features of GiD in terms of expandability and total control. Using the Tel/Tk extension ‘you can create script files to automatize any process created with GiD. With this language new window s and functionalities can be added to the program. For more information about the Tcl/Tk programming language itself, look at w ww. scriptics.com http://w w.seriptics.com. If you are going to use a Tcl file, it must be located in the Problem Type directory and be called problem_type_name.tl Problem Type directory D -1 Event procedures A Event procedure’ is a Tel procedure that is invoked from GiD when doing some actions, I allow's developers to interleave its code with the GID flow. The structure of problem _type_name.tel can optionally implement some of these Tel prototype procedures (and other User-defined procedures). The procedures listed below are automatically called by GiD. Their syntax corresponds to standard Tel/Tk language: Not isis possible to get the list of Tel events with the procedure GiD_Info events proc InieGIProjece ( az} ¢ > proc BeforeinieGIDPostProcess () ( > proc InieGIDPostProcess () ( seurn fvaiee > proc EndoipPregect () ( > proc EndGipPostProcess () ( > proc AfverdpenFile ( filenane format exsoz ) ( > proc AfverSaveFile ( filename format exzoz ) ( > proc AfverSavelmage ( filename fozmar } ( > proc BeforeReadGIDProject ( filename } ( boay, Event procedures 66 zecurn fvalue > proc AfvesReadGIDProject ( filenane } ( > proc LoadGInProject ( filespa } ( > proc SaveGIDProject ( filespa } ( > prec AfvesSaveas (ol: > 1 filename new filename } ( proc LoadResulesGipPostProcess ( file } ( > proc BeforelfeshGenezation ( elenentsize } ( seurn fvaiee > proc AfvenifesAGeneracion ( fail } ( > proc AfterRenumber ( uscof leveltype renuneration ) ( > proc SelectGIDBaeFile ( diz basename } ( seurn fvaiee > proc BeforeRunCalcul ation ( batfilenane basenane diz problencypediz gidexe args) ( seurn fvaiee > proc AfvesRunCalculation ( basenane diz problentypediz where exzoz exrozfilenane ) ( seurn fvaiee > proc Changedbanguage ( language } ( > proc BeforeWriveCalcPilecimProject ( €ile ) ( seurn fvaiee > proc AfvestiriveCalcFileGIDProject ( file exzoz } ( seurn fvaiee > proc BeforeTzansfornProblentype { file oldproblencype newproblemtype } ( seurn fvaiee > proc AfvesTransfosnProblenType ( file oldproblemtype newpreblencype messages } ( seurn fvaiee > proc TelCalcModelBowndaries( wseof ) ( Event procedures 67. > Semin Gymin Gamin Gemae dyer fama proc A€vesthangeBackgzound ( ) ( > proc BeforeCopy ( useof transformation exzoz } ( proc AfvesCopy ( useof transformation exzor } ( proc Beforetove ( useof transformation exzoz } ( proc Afvesifove ( useof transformation exzor } ( proc AfvesCreatePoine ( mum } ( proc AfvesCzeateLine (mum) ( proc AfverCeearesurtace (mam } ( proc AfvesCreateVolune ( num} ( proc BeforeDelevePoine ( num) ( proc BeforeDeleveLine ( mum } ( proc BeforeDelevesurface ( num } ( proc BeforeDelereVolume ( mam } ( proc AfvesCreateLayer ( name) ( proc AfvesRenaneLayer ( oldnane nemane } ( > proc BeforeDeleveLayer (name } ( setusn fvalue > proc AfvesthangeLayer ( nane property } ( > proc AfvesthangeParentLayer ( oldnane nemane } ( proc AfverSeclayesTolse ( mane} ( proc A€verSendToLayer ( name) ( proc AfterCreateGroup ( name ) ( proc AfterRenmeGroup ( oldnane nemane ) ( > proc BeforeDeleteGroup ( name ) ( Event procedures 68. zecurn fvalue > proc AftesDeleveGroup ( name) ( proc AfterthangeGroup ( nane property } ( proc AfvesthangeParentGroup ( oldnane nesmane } ( proc AfterthangeLicenceStatus ( status} ( proc AfverCzeateHlaverial ( nawe } ( proc AfvesRenaneHlaverial ( oldnane nemane ) ( > proc BeforeDeleveaterial ( mane) ( seurn fvaiee > proc AfvesthangeHlaterial ( nane changedfields } ( > proc AfverAssignilacerial ( nane leveleype } ( > proc BeforelfeshEzrors ( filename ) ( setusn fvalue > proc BeforeResultReadEzzors ( filenane meg format} ( setusn fvalue > proc AfvesProcess ( words iz_zotation } ( > proc AfverCreateVolumesee (mane) ( > proc AfvesRenaneVolumesee ( oldnane nemane } ( > proc BeforeDeleveVolumeser ( mane } ( value ~cancel- to avoid delecion zecurn fualee > proc AtvesCreatesurfaceser ( mane} ( > proc AfvesRenanesurfaceSet ( oldname nemane } ( > proc BeforeDeleveSurfaceser ( name ) ( value “cancel co avoid delecion zecurn fualee > proc AfvesCeeareCutser (name } ( > proc AfvesRenaneCutset { oldnane nemane ) ( > Event procedures 69 proc BeforeDeleveCueser ( mane} ( value “cancel co avoid deletion zecurn fualee > proc AfverthangeViewtfode ( wseof ) ( > proc AfvesCreateGraph ( name) ( > proc BeforeDeleteGraph ( name ) ( setusn fvalue > proc AfvesDeleveGraph ( name) ( proc AfvesthangeGraph ( nane property } ( proc AfvesRenaneGraph ( oldnane nemane } ( proc AfverCzeateGraphser ( mane} ( > proc BeforeDeleveGraphsee (mane ) ( seurn fvaiee > proc AfvesDeleveGraphser ( mane} ( proc AfverthangeGraphser ( nane property ) ( proc AfvesRenaneGraphser ( oldnane newmane ) ( proc AfverSecGraphSecToUse ( mane} ( + IniteIDProject: will be called when the problem type is selected. It receives the dir argument, which is the absolute path to the proble_type_name.cid directory, which can be useful inside the routine to locate some alternative files + BeforeInitGIDPostProcess: will be called just before changing from pre to postprocess, and before read any postprocess fle (this event can be used for example to check the results fle existence and/or rename files). It has no ‘arguments, If t returns ~cancel- as a value then the sy apping to postprocess mode will be cancelled. InitG1DPostProcess: wll be called when postprocessing starts, It has no arguments, + EndGIDProject: wil be called when this project is about to be closed. It has no arguments. + EndGIDPostProcess: will be called when you leave Postprocess and open Preprocess. It has no arguments * AfterOpentile: will be called after a geometry or mesh file is read inside GID. Tt receives as arguments: * filename: the full name of the file that has been read: * format: ACIS_FORMAT, CGNS_FORMAT, DXF_FORMAT, GID_BATCH FORMAT, GID_GEOMETRY_FORMAT, GID_MESH FORMAT, IGES_FORMAT, NASTRAN_FORMAT, PARASOLID_FORMAT, RHINO_FORMAT, ‘SHAPEFILE_FORMAT, STL_FORMAT, VDA_FORMAT, VRML_FORMAT or 3DSTUDIO_FORMAT, * error: boolean 0 or 1 to indicate an error when reading, + AfterSaveFile: will be called after a geometry or mesh file is exported to 2file It receives as arguments: * filename: the full name of the fle that has been written; * format: ACIS_FORMAT, DXF_FORMAT, GID_GEOMETRY_FORMAT, GID_MESH FORMAT, IGES_FORMAT, RHINO_FORMAT, AMELET_FORMAT, KML_FORMAT, * error: boolean 0 or 3 to indicate an error when reading + AfterSavelmage: will be called after a picture or modal is saved to disk. It receives as arguments: Event procedures 70 * filename: the full name of the file that has been saved: * Format: eps, ps. tif, bmp. ppm, gif, png. jpg. tga, wl + BeforeReadGIDProject: 1 ll be called just before read a GID project, It receives the argument filename, which is the path of the model folder, without the .gid extension, If it retuns -cancel- then the reading is cancelled. + AfterReadGIDProject: will be called just after read 2 GiD project. It receives the argument filename, which is the path of the model folder, without the .gid extension, + LoadG1DProject: will be called when a GID project or problem type is loaded. It receives the argument flespd, which is the path of the file which is being opened, but wth the extension .spd (specific problemtype data). This path can be Useful if you w ant to write specific information about the problem type in anew file + SaveGIDProject: wll be called when the currently open file is saved to dick, It receives the argument filespd, which is the path of the file being saved, but nith the extension .spd (specific problemtype data). This path can be useful if you want to write specific information about the prablem type in a new file. © AfterSaveAs: will be called after GiD save its information in the new_filename location, when this folder and the model files exists, and provide the old_filename argument for example to allow to copy extra data, like result files handled by the problemtype, + LoadResultsGIDPostPracess: will be called when a results file is opened in GiD Postprocess. It receives one argument, the name of the file being opened without its extension. * BeforeMeshGeneration: wil be called before the mesh generation. It receives the mesh size desired by the user as the elementsize argument. This event can typically be used to assign some condition automatically. It returns ~cancel- the mesh generation is cancelled. + AfterMeshGeneration: will be called after the mesh generation, It receives as its fail argument a true value if the mash is not created + AfterRenumber: ll be called after renumber the geometry or the mesh (to update for example fields storing entity identifiers) * useof : could be GEOMETRYUSE or MESHUSE * leveltype: the kind of entity that w as renumbered. Geometry: must be ALL LT: Mesh: could be NODE_LT of ELEM_LT, + enumeration: Geometry: four sublists with the old and new idenfiers for points, ines, surfaces and volumes. Mesh: a sublist with the old and new identifiers for nodes or elements. + SelectGIDBatFile: must be used to snitch the default batch file for special cazes. This procedure must return as a value the alternative pathname of the batch file. For example itis used as a trick to select a different analysis from a list of batch calculation files + BeforeRunCalculation: will be called before running the analysis. It receives several arguments: * batfilename: the name of the batch file to be run (see EXECUTING All EXTERNAL PROGRAM -paq 274)s *+ basename: the short name model; * dir: the fll path to the model directory: * problemtypedir: the full path to the Problem Types directory: © idexe: the full path to gid: + args: an optional lst with other arguments. If it returns -cancel- ?? then the calculation is not started, is an optional message to be shown, + AfterRun Calculation: wil be called just after the analysis finishes. If it returns nowindow as a value then the window that inform about the finiched process will not be opened. It receives as arguments: * basename: the short name model; * dir: the fll path to the model directory: * problemtypedir: the full path to the Problem Types directory: + here: must be local or remote (remote if it vas run in a server machine, using ProcServer); * error: returns 2 if an calculation error w as detected; * errorfilename: an error filename with seme error explanation, or nothing if everything » as ok + ChangedLanguage: will be called when you change the current language. The argument is the new language (en, @5, .). Tt s used, for example, to update problem type custorrized menus, ete, © BeforeWriteCalcFileGIDProject: ll be called just before writing the calculation file. It is useful for validating sere parameters. Event procedures 71 If it returns -cancel- as a value then nothing will be written * file: the name of the output calculation file. + AfterWriteCalcFileGIDProject: wll be called just after writing the calculation file and before the calculation process. It s useful for renaming files, or cancelling the analysis If it returns -cancel- as a value then the calculation is not invoked * file: the name of the output calculation fle error: an error code if there is some problem writing the output calculation file. * BeforetransformProblemType: will be called just before transforming a model from 2 problem type to 2 new problem type version. IFit returns -canca/- as a value then the transformation will net be invoked, * file: the name of the model to be transformed; * oldproblemtype: the name of the previous problem type: * new problertype: the name of the problem type to be transformed. + AfterTransformProblemType: sll be called just after transforming a model from a problem type to a new problem type version. ‘The messages argument explains the transferring operations done. 1t must return 1 if there » ere modal changes dene in this procedure, 0 else. It returns ~cancel- as a special value, then the transformation messages w on't be shown, * file: the name of the model to be transformed; * oldproblemtype: the name of the previous problem type: * new problerrtype: the name of the problem type to be transformed. + TelCaleModelBoundaries: will be called when recalculating the bounding box, for example when user select "zoom frame" * useof: can be "GEOMETRYUSE”, "MESHUSE", "POSTUSE” or "GRAPHUS! This procedure must return xin yrrin 2rrin xmax ymax zmaz of the bounding box of the entities directly managed by the problemtype (this entities must be directly drau’n with the draw opengl command) If" is returned instead "xrrin ymin zrin xmax ymax zmaz” then any additional bounding box is considered. * AfterChangeBackground: will be called just after change some background property, like color, direction or image. * Before Copy /Move AfterCopy/Move: will be called just before or after use copy or move tod, * useof : could be GEOMETRYUSE or MESHUSE + transformation : could be ROTATION, TRANSLATION, MIRROR, SCALE, OFFSET, SWEEP or ALIGN + AfterCreatePoint/Line /Surface /Volume: »ll be called just after create the entity, providing its number + BeforeDeletePoint/Line /Surface/Volume: wil be called just before delete the entity, providing its number + AfterCreateLayer: will be called just after create the layer ‘name! + AfterRenameLayer: yl be called just after the layer ‘oldname’ has been renamed to ‘newname! * BeforeDeleteLayer: will be called just before delete the layer ‘name’ If it returns ~cancal- the layer deletion is cancelled. * AfterChangeLayer: will be called just after change some property of the layer ‘name! * ‘property’ could be ON, OFF, FROZEN, UNFROZEN, ALPHA , COLOR whit RRR, GGG, BBB, AAA from 0 to 255 + AfterChangeParentLayer: will be called when moving a layer to another parent of the tree. + AfterSetLayerToUse: will be called when setting ‘name! ax current layer to use + AfterSendToLayer: will be called when changing entities to the layer 'narne! + AfterCreateGroup: sirilar to layer commands + AfterRenameGroup: + BeforeDeleteGroup: wll be called just before delete the group ‘name! If it returns ~cancel- the deletion is cancelled, * AfterDeleteGroup: + AfterChangeGroup: property could be color, visible, state, alow ed_types + AfterGroupParentLayer: Will be called when moving a group to another parent of the tree, + AfterChangelicenceStatus: will be called when the licence status of GiD changes. Possible status could be "academic", "professional" or "ternporallyprofessional” * AfterCreateMaterial: will be called just after create the material ‘name! + AfterRenameMaterial: wil be called just after the mateial‘oldname’ has been renamed to ‘nen name! + BeforeDeleteMaterial: will be called just before delete the material ‘name! If it returns -cancel- the material deletion is cancelled © AfterChangeMaterial: ll be called just after change some field value of the material ‘name! changedfields jg alist with the index of the changed fields (index starting from 1) + AfterAssignMaterial: will be called just after arsign or unassign the material of some entities, Event procedures 72 name is the name of the new material. If tis "™ then the material has been unassigned leveltype: is the kind of entity, if could be For geometry: POINT_LT, LINE_LT, SURFACE_LT.VOLUME_LT For mesh: ELEM_LT, * BeforeMeshErrors: filename is the full path to the file that has information about the meshing errors, Retuning -cancel- the standard 'Mesh error window’ won't be opened + BeforeResultReadErrors: filename iz the results file that was read, mag is the error message, format provide Information about the kind of file: cand be "GID_RESULTS_FORMAT’, "3DSTUDIO_FORMAT", “TECPLOT_FORMAT", "FEMAP_FORMAT", "XYZ_FORMAT" Retuning -cancel- the standard 'Read results errar window w on't be opened + AfterProcess: will be called just after GiD has finished the process of 'words! (the parameter is_rotation==1 if the command is a view movement). This event could be interesting for some tricks, like save processed commands in a batch fle, or send the commands to be processed by other GID slave, etc + AfterCreateVolumeset, AfterCreateSurfaceSet, AfterCreateCutset: will be called just after 2 postprocess set of volumes, surfaces or cuts is created, providing its name * AfterRenameVolumeset, AfterRenamesurfaceSet, AfterRenameCutSet: ill be called just after 2 postprocess set of volumes, surfaces or cuts has been renamed providing its old and current name * BeforeDeleteVolumeset, BeforeDeleteSurfaceSet,BeforeDeleteCutSet: will be called just before a postprocess set of volumes, surfaces or cuts will be deleted created, providing its name, If the procedure return ~cancel~ then the set won't be deleted * AfterChangeViewMode: usecfi can be "GEOMETRYUSE", "MESHUS! + AfterCreateGraph: ill be called when a new graph is created + AfterRenameGraph: + BeforeDeleteGraph: will be called just before delete the graph ‘name’ If it returns -cancel- the deletion is cancelled, + AfterDeleteGraph: + AfterChangeGrap! values, visible + AfterCreateGraphSet: will be called when a new graphset is crested © AfterRenameGraphSet: * BeforeDeleteGraph Set: will be called just before delete the graphset ‘name’ If it returns ~cancel- the deletion is cancelled, © AfterDeleteGraphSet: * AfterChangeGraphSet: property could be! legend_location, ttle_visible + AfterSetGraphSetToUse: sill be called when setting ‘name’ as current graphset to use 'POSTUSE" or "GRAPHUSE: property could be: coler, contour fill, ine_pattem, line width, pattern factor, point_size, style, Note: To use Tel to improve the capabilities of writing the calculations file, itis possible to use the command ‘tl in the template file (-bas file); see Specific commands for details, .2 GD_Process function GiD_Process command_t command? ‘Tel command used to execute GID commands, ‘This is a simple function, but a very pov erful one, It is used to enter commands directly inside the central event manager “The commands have the same form as those typed in the command line within GID. You have to enter exactly the same sequence as you would do interactively, including the escape sequences (using the word escape) and selecting the menus and operations used, You can obtain the exact commands that GiD needs by checking the Right buttons menu (Utlities -> Tools -> Toolbars). It is also possible to save a batch file (Utilities -> Preferences) where the commands used during the GID session can be checked. Here is 2 simple example to create one line: Note: Mescape is a multiple ‘escape’ command, to go to the top of the commands tree. GiD_Info function 73 .2 GD_Info function GiD_Info