You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PyElastica we store velocity on nodes and for some computations (i.e. rod damping, plane damping or stokes flow) we have to convert velocity from nodes to elements. Currently we are averaging the neigboring node velocity to compute element velocity using the following function.
Although this function is correct for uniform rods (uniform cross-section, element length and density) for tapered rods, momentum is not conserved since neighboring node masses are not the same. Thus, we have to first compute the total momentum of element and divide by the element mass to compute element velocity.
How to fix :
Use the following function to compute element velocities
In PyElastica we store
velocity
on nodes and for some computations (i.e. rod damping, plane damping or stokes flow) we have to convertvelocity
fromnodes
toelements
. Currently we are averaging the neigboring node velocity to compute element velocity using the following function.PyElastica/elastica/interaction.py
Lines 664 to 703 in fee87b9
Although this function is correct for uniform rods (uniform cross-section, element length and density) for tapered rods, momentum is not conserved since neighboring node masses are not the same. Thus, we have to first compute the total momentum of element and divide by the element mass to compute element velocity.
How to fix :
node_to_element_pos_or_vel
asnode_to_element_position
, since this will be only used to compute the element positions.The text was updated successfully, but these errors were encountered: