Closest-fit solution for a thrust network

Is there a in-built function to find the scale for a closest-fit thrust network given the target z values (not just z_max, but z values for all points)?

Also, noted that the z coordinates given when defining the form diagram gets replaced when the thrust network is solved for the vertical equilibrium. Is this the case? If so, I assume that the z coordinates given when defining the form diagram are not taken as target z coordinates.

there is a “best-fit” function but it is not (yet) publicly available. note that finding a fit for a given target surface involves not only the scale but also the distribution of the forces throughout the network…

the form diagram currently is indeed also used to visualize the thrust network. during horizontal and vertical equilibrium calculations the z-coordinates of all diagrams are ignored.

the z-coordinates of the form diagram are thus not used as a target. zmax is an explicit parameter of the vertical_from_zmax function…

1 Like

And I would assume scale, distribution of forces (q_ind) and also the form diagram itself are variables in finding a closest fit solution

yes, but using only the force densities of the independent edges is quite limiting and computationally doesn’t always work. using all the force densities in combination with reparallelisation in between iteration while allowing for small movements in the form diagram tends to be more efficient and robust…

Okay - I was about to ask if there is a way to find the indepedent edges, but the above reply explains it.

Is this done by changing the nodal locations of the force diagram (random selection?) and then solving for horizontal equilibrium with alpha less than 100.

horizontal(form, force, alpha=80, kmax=100)

Is there another way?

well, no. you still need a search algorithm that changes the force densities such that you get closer to the target at every iteration. but rather than doing this with the independent subset of force densities, you just use all of them. this means that horizontal equilibrium will need to be reestablished after every iteration because form and force diagram will not be entirely reciprocal (parallel or perpendicular) anymore. while computing a new horizontal equilibrium with a reduced alpha you will need to add some constraints to the form diagram such that you don’t deviate from your boundary conditions and from the features of your target surface.

in any case, alpha 80 seems a bit drastic. i would more go for 98 or something like that…

Agreed. What was thinking of was what is being done inside the minimization function

 result = minimize(closest_fit_thrust_network, param, args=(form, z_targ), method="Powell") 
 def closest_fit_thrust_network(param, form, y_targ): 
     base, height = param 
      scale = vertical(form, height, kmax=100, density=0.0) 
      thickness_in_y = 0 
      for i in range(0, form.number_of_vertices()): 
         y = form.get_vertex_attribute(i, 'z') 
          thickness_in_y = max(thickness_in_y, abs(y_targ[i] - y - base)) 
      return thickness_in_y  

So what I was referring to is what I can do inside this. Do I change ‘q’ in form diagram or ‘x’,‘y’ in force diagram (i.e. is it x,y that get updated at the end of ‘horizontal’ or is it q)? Else, do both work the same?

to be honest, it is not entirely clear to me what it is that you are trying to accomplish here :slight_smile:

I am trying to find a closest fit thrust network (z_targ defining the target surface). The objective is to minimize the maximum difference between the target and realized surface. This is done in a crude manner considering the difference of z coordinates (as opposed to a perpendicular dropped from target to the realized surface). The for loop inside the function ‘closest_fit_thrust_network’ determines the objective.
This function only considers z_max. As you also pointed out, the force densities itself are important.

  1. I would have prefered to do this by considering only the independent force densities. Does COMPAS_tna have a function which helps with this (i.e. to identify a set of independent force densities)
  2. The alternative approach (in line with how COMPAS and RhinoVault solves thrust networks) is to consider all force densities and re-establish horizontal equilibrium with small changes to the form diagram. (This is what I understood, is it correct).

The latter however seems to be an optimization problem with a lot of variables (i.e. all the branch lengths in the force diagram/ or all the nodes in the form diagram). My optimization is a very crude one and I would prefer to keep the solution simplified (and specific to the problem, rather than general)

note that using only the independent edges may sound like a good idea, but identifying the independent edges is complicated and computationally expensive (see compas_ags for more info, or the paper about Algebraic Graph Statics).

using all the edges indeed sound like a problem with many more variables, but is still efficient to solve, because the matrices involved are sparse.

also note that allowing for small changes in the form diagram has no real impact on the solution from a structural point of view, especially if you keep those vertices fixed that are important for the features and boundary conditions of your target, and is computationally much more efficient and robust, because you provide more freedom to the algorithm.

in any case, within the theoretical framework of TNA you can only relate vertical differences to changes in force densities (the projection of the thrust network and the form diagram are supposed to be identical because all loads are vertical!) so it makes sense to use the z differences and not the perpendicular distances…

but, what i meant with “i don’t really understand …” is that the terms you use in your code are a bit meaningless to me without more code context: param, thickness_in_y, y, … ?