Skip to content
Snippets Groups Projects

Experiments in tendon modeling

Let's try and implement the model I derived on the whiteboard. I am not modeling the tendon using Amira's built in beam elements. Instead I'm applying a known force at the base of the "tendon" and calculating reactions at each intermediate node. In my first version of the model I'll ignore friction and only apply normal force to intermediate nodes. Then I'll add in friction and the resulting change in tension as the tendon navigates bends in the structure

Beam Model

I'm super dumb and can't generate a useable model from the tutorial ipynb. So instead I've figured out how to hack up Amira's existing model from tendons.jl. I used some python to do quick visualization and find that her modeled tendon elements are the last 4 (84,85,86,87). I just deleted these elements from the json file and saved it as a new setup.

Implementation

Amira already has a nice setup for calculating dynamic forces on specified nodes at each time step which is defined globally before the solver starts: "externalForce(currentTimeStep,N_position,N_force)". The nodal forces are based off of their current position relative to one another so I've added another argument to the end of the call N_currPosition. Later we need to come up with a way of defining the tendon routing possibly using a method like Amira's bounding boxes. Ideally we need to compute the nodes in a tendon just once so we don't have to apply tests each time we call externalForce. For now I'll cheat and use the nodes I fould attached to the last 4 elements of the previously modeled tendon: (from base to tip) 4,6,16,24,32. Don't forget to add 1 to those indices.

Call tree

externalForce is called from force which is called from updateNodes, which appears to be threaded? What does i mean in this instance? I'm very confused about the whole thing really. UPDATE it is fucked! So forces only sends along data for a single node at a time and we need data for all the nodes associated with the tendon. Now I wonder if I can dig into the global scope to find what I need . . . Time to roll back a bunch of changes lol

Update to the update: it is no longer fucked

Disabled threading of the loop that calculates internal forces (in two places) so that I can actually debug what is happening. I modified the calls to forces and externalForces to include the full currPosition node list. I wonder if these should be modified inline because copying data is gonna get ugly if the lattice is big?

Next hurdle was using Amira's vector.jl library effectively (i.e. don't be an idiot). We were doing well until multiplying a vector3 by a scalar. Now let's see if we can implement that operator in a properly julianic way? Oh look it was already defined but a little messed up in vector.jl lines 85-87