...
See how we print the units, we are asking gid GiD for the current active units for the different magnitudes: F for Force, L for LenghtLength, M for Mass
Code Block | ||
---|---|---|
| ||
customlib::WriteString "Input Data file for Frame3DD - 3D structural frame analysis ([gid_groups_conds::give_active_unit F],[gid_groups_conds::give_active_unit L],[gid_groups_conds::give_active_unit M])" |
...
Code Block | ||
---|---|---|
| ||
customlib::WriteString "" customlib::WriteString "[GiD_Info Mesh NumNodes] # number of nodes" customlib::WriteString "#.node x y z r" customlib::WriteString "# [gid_groups_conds::give_active_unit L] [gid_groups_conds::give_active_unit L] [gid_groups_conds::give_active_unit L] [gid_groups_conds::give_active_unit L]" customlib::WriteString "" customlib::WriteCoordinates "%5d %14.5e %14.5e %14.5e 0.0\n" |
Elements assigned to the condition that assigns a material
...
condition that assigns a material
Code Block |
---|
set condition_name "frameData" # If we want this output format "element_id connectivity_x connectivity_y connectivity_z" set condition_formats [list {"%5d" "element" "id"} {"%5d" "element" "connectivities"}] # If we want this output format with element id and properties set condition_formats [list {"%1d" "element" "id"} {"%13.5e" "property" "Ax"} {"%13.5e" "property" "Asy"} ... {"%13.5e" "material" "Density"}] # To get the number of elements set formats [customlib::GetElementsFormats $condition_name $condition_formats] set number_of_elements [GiD_WriteCalculationFile elements -count -elemtype Linear $formats] # To write the connectivities customlib::WriteConnectivities $condition_name $formats$condition_formats "" active |
ContraintsConstraints
This is the way we get the number of nodes assigned to a condition called 'constraints' in the spd.
...
This is the way we access to the data in the tree. Notice that we are building what we call xpath, that is a kind of path in the spd, from the root to the item we want.
Then we get the xml node from the document using selectNodes, and finaly finally we get the current value with get_domnode_attribute
...
In this section, we will write the coordinates, connectivites, and conditions assuming that the input can be different, such as the one in Matfem . In some codes, like matfem, the input file into the solver is not written in a text file, but in a "code like file". The coordinates section in the matfem solver is a matlab array, with a single comma splitting x and y (x, y) and a semicolon spliting splitting a node from another (x1, y1; x2, y2; ...)
...