LiveLink
The following section will show you how to use FEM-Design connection
. The connection allows you to dialog with FEM-Design instance on the fly as if you were using the application to perform specific task. The connection links Grasshopper to FEM-Design and, therefore, the methods are applied to the opened model in FEM-Design.
You can download the Grasshopper definition used in this tutorial from here 👉Grasshopper Definition
- The tool CAN NOT be use to perform iterative analysis (i.e. Galapagos).
The LiveLink components use the GrasshopperAsync methodology implemented by Speckle.
The async component, however, might create some error if not use carefully. Our suggestion is to connect the component as shown in the picture below.
The flow is clearly stated and the methods will be called in the right order.
Connection
Connection
opens a specific instance of FEM-Design that will run the methods.
Open model
Open a model on an instance of FEM-Design.
Get model
Get the current opened model from FEM-Design instance.
Calculations
Run analysis
Run design
Results
Get FEA model
Get load case and combination results
Get stability results
Get quantities
Get results from bsc
While we provide some ready result types to be extract (i.e ResultType
), it might be that you want to extract some specific results that they have not been implemented yet. In that scenario, you can use the batch .bsc
file which will inform the software to give you back the desired results.
If you want to create the .bsc file, you need to:
- Open
FEM-Design
- Click on
Tools
- Select
List... (TAB)
You can now select the results that you want to extract and create the .bsc
file that you can use in the Grasshopper component.
Configurations
Set global configurations
SetGlobalConfigurations
defines the calculation settings that will instruct FEM-Design in operation like creating the finite element mesh. The API provides a set of components and a preset file that you can modify to fullfil your need. However, most of the structure can be analysed with the already specified values.
Using specific components
Preset file
The default global configuration file can be accessed from the following path:
%AppData%\McNeel\Rhinoceros\packages\7.0\FemDesign\cmdglobalcfg.xml
To access FEM-Design -> Settings -> Calculation
, you need to use a specific XML file that contains the commands to control the global calculation configurations for Soil, Mesh and Peak Smoothing. Below is a fully prepared file with some guidance, called cmdglobalcfg.xml
which contains the default settings for the software. The current approach is to modify this text file with the desired values.
cmdglobalcfg.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- (c) StruSoft 2012-2021, http://www.strusoft.com -->
<cmdglobalcfg command="$ FEM $CODE(GLOBALCFG)">
<!-- modify the value below if you want to change the Globalcfg setting -->
<!-- attributes that start with 'f' must be 0 or 1 -->
<!-- attributes that start with 'r' are double numbers -->
<!-- attributes that start with 's' are integer numbers -->
<mesh_general
fAdjustToLoads = "0" />
<mesh_elements
fElemCalcRegion = "1"
rElemSizeDiv = "6.0"
fCorrectToMinDivNum = "1"
sDefaultDivision = "2"
rDefaultAngle = "15.0" />
<mesh_functions
fRefineLocally = "1"
sRefineMaxStepNum = "5"
fMaxIterWarning = "0"
fReduceSize = "1"
sSmoothStepNum = "3"
fCheckMeshGeom = "1"
rCheckGeomMinAngle = "10.0"
rCheckGeomMaxAngle = "170.0"
rCheckGeomMaxSideRatio = "8.0"
fCheckMeshOverlap = "1"
fCheckMeshTopology = "1" />
<mesh_prepare
fAutoRegen = "1"
fThPeak = "1"
fThBeam = "0"
fThColumn = "1"
fThTruss = "0"
fThFicBeam = "0"
fThFreeEdge = "0"
fThRegionBorder = "0"
fThSuppPt = "1"
fThSuppLn = "0"
fThSuppSf = "0"
fThEdgeConn = "0"
fThConnPt = "0"
fThConnLn = "0"
fThConnSf = "0"
fThLoadPt = "0"
fThLoadLn = "0"
fThLoadSf = "0"
fThFixPt = "0"
fThFixLn = "0"
fAutoRebuild = "1"
fAutoSmooth = "1"
fAutoCheck = "0" />
<peaksm_method
sPeakFormFunc_M = "1"
sPeakFormFunc_N = "1"
sPeakFormFunc_V = "1" />
<peaksm_auto
fPeakBeam = "0"
fPeakColumn = "1"
fPeakTruss = "0"
fPeakFicBeam = "0"
fPeakPlate = "0"
fPeakWall = "0"
fPeakFicShell = "0"
fPeakSuppPt = "1"
fPeakSuppLn = "0"
fPeakSuppSf = "0"
fPeakConnPt = "0"
fPeakConnLn = "0"
fPeakConnSf = "0"
rPeakFactor = "0.5" />
</cmdglobalcfg>
For example, if you want to change the general mesh settings to enable Adjust mesh to load positions
, you need to set the fAdjustToLoads
attribute to 1
(true).
<mesh_general
fAdjustToLoads = "1" />
Or, if you want to change the lowest minimum division number
of bar elements to 10
, you need to set the sDefaultDivision
attribute to 10
.
<mesh_elements
fElemCalcRegion = "1"
rElemSizeDiv = "6.0"
fCorrectToMinDivNum = "1"
sDefaultDivision = "10"
rDefaultAngle = "15.0" />
Most of the XML attribute names reflect the functionality of the FEM design settings. The attribute value types are logically the same as when you set them manually in the GUI. For example, the attributes corresponding to checkboxes are Boolean parameters, so their value can be 0 or 1. If you have to specify a number using the GUI, this means that the attribute value will be an integer or a double, depending on the case.
Keep in mind:
- attributes beginning with 'f' must be 0 or 1
- attributes beginning with 'r' are double numbers
- attributes beginning with 's' are integers