2.7.1: Results Retrieval on Shells
The example file “SimpleShellESO.gh” (see fig. 2.7.1.1) contains two Python-scripts which will be explained below. The first script retrieves results from Karamba3D’s triangular shell elements:
Two python scripts: the first retrieves shell results (see code block below), the second one performs a simplified variant of an evolutionary structural optimization (ESO) procedure (see section 2.7.2).
Lines 3 and 4 reference the Karamba3D DotNet-assemblies. Depending on how you installed Rhino it might be necessary to adapt the paths. In case that one of them can not be located an error will be issued.
Plug the output of “out” into a panel. If there is only one line of output, type “GrasshopperDeveloperSettings” in the Rhino text window and check whether the “Memory load *.GHA assemblies using COFF byte arrays”-option is unhooked.
The retrieval of axial- and bending-energies works via the visitor-pattern (see [2] for details on that). Line 22 creates such a visitor object for the elastic element energies by handing over a reference to a C++ model, a state, a load-case index and possibly a load-case factor. Unless one performs non-linear calculations state “0” is the right one to chose.
A shell patch consists of several shell elements. This might lead to some confusion since in the Grasshopper UI shell patches are named “elements”, in the C++ model however the patches consist of several triangular shell elements. In lines 26 and 27 the property “fe_ind” returns the index of a C++ element that corresponds to a given C#-element. In case of shell-patches this corresponds to the first C++-element.
Other shell results like principal stresses can be retrieved directly from the FE-mesh like in lines 29 to 33. “Model_in.superimpFacsStates” represents a list of load-factors which gets defined via the “Result-Case”-setting or the input-plug “R-Factors” of the “ModelView”-component.
Last updated