A2. Form Finding
Objective
We will learn how to form find a cable net with the force density method using the compas function fd_numpy. For doing so we must create the data structure required and compile it to the numeric data.
Procedure
b. form find it into its equilibrium state
c. visualise the form found cable net
d. export the updated mesh datastructure
o. Paths and Proxy
We will build upon the mesh data structure that we imported and saved in the JSON file in the data folder in A1. Import section. We will output the resulting mesh in a new JSON file.
In order to run the numerical compas function fd_numpy that bases on NumPy in Rhino we must create a Proxy.
a. Datastructure
We want to create the COMPAS mesh data structure, then we want to extend it with attributes and methods related to form finding and analysis of flexible cable net formwork for concrete shells, and we want to set its boundary conditions.
a1. Create the Mesh
We start by creating a COMPAS mesh from the JSON file that we generated by the import from Rhino.
We use a mesh instead of a network because it provides functionalities for the concrete weight and fabric shuttering etc.
a2. Update Default Vertex and Edge Attributes
The necessary default attributes for the vertices are (similar to the nodes in section A0):
'rx': 0.0, 'ry': 0.0, 'rz': 0.0 – component of an residual force
'px': 0.0, 'py': 0.0, 'pz': 0.0 – component of an externally applied load
'is_anchor': False, – to indicate that a vertex is anchored and can take reaction forces in XYZ.
The necessary attributes for the edges are:
'q': 1.0 – force densities of an edge.
'f': 0.0 – force in an edge.
'l': 0.0 – stressed length of an edge.
'l0': 0.0 –unstressed length of an edge.
The meaning of the unstressed length l0 will be explained later in section C1. materialise cables.
all of this is already implemented within compas_fofin with the
class compas_fofin.datastructures.Cablenet
.
a3. Set Boundary Conditions
We identify the anchors on the boundary and update the 'is_anchor' attribute of these vertices:
We visualise the cable net with anchored vertices in red:
b. Form Finding
Now we want to form find the cable net into its equilibrium state under pure prestress. For this, we will use the numeric COMPAS function fd_numpy. The function does not 'understand' the datastructure, it requires the input data in lists. Thus, we provide it with lists and it form finds the equilibrium numerically and it outputs arrays, but it has no idea of the network itself, so we must update the mesh attributes ourselves afterwards.
to see what this function does exactly check out thefd_numpy
function.
b1. Compile to Numeric Data
This requires the following input parameters and returns:
Parameters
vertices (list) – XYZ coordinates of the vertices of the network
edges (list) – Edges between vertices represented by
fixed (list) – Indices of fixed vertices.
q (list) – Force density of edges.
loads (list) – XYZ components of the loads on the vertices.
Returns
xyz (array) – XYZ coordinates of the equilibrium geometry.
q (array) – Force densities in the edges.
f (array) – Forces in the edges.
l (array) – Lengths of the edges
r (array) – Residual forces.
the numerical function inputs are lists that are ordered in the index and not the keys (vertex ids), so we must convert for the input the keys to indices and for the returns the indices to keys!
For this, we use the Mesh.key_index()
method that returns a dictionary that maps vertex dictionary keys to the corresponding index in a vertex list or array.
b2. Compute Equilibrium
Now we hand this over to the fd function that we made available in Rhino with the Proxy (see o.Paths and Proxy):
If you were to run it like this with the visualisation you would see that the geometry actually hasn't changed at all yet.
b3. Update the Cablenet Mesh Datastructure
After the numerical calculation, we must update the mesh datastructure with its new equilibrium xyz-coordinates and the remaining residual forces by setting its vertex attributes and the new force density, force and length by setting its edge attributes.
all of this is already implemented within compas_fofin with the compas_fofin.fofin.update_xyz_numpy method that already takes care of the update of the attributes as it has access to them.
The simple visualisation remains the same as in a. Datastructures.
c. Visualization
If we want to visualise the reaction forces, residuals and edge forces to better understand what's going on, we can do so as follows:
These functions are not just available from somewhere in space, we import them from a file that we implement in the next section A3. Visualisation.
d. Export
At the very end, we export the equilibrium cable net by serialising the mesh data structure into a JSON file.
Last updated