Added mass element
I am opening an issue to discuss the addition of an added mass element to MBDyn which adds apparent mass (and inertia) when a body moves through fluid (more information here: https://en.wikipedia.org/wiki/Added_mass). I began some work to create such an element, using as a starting point the body element. I have pushed this work to Gitlab to the branch added_mass_element.
The element can now be used, and an example simple test case is shown below, which applies a 1N force in each of the X, Y and Z directions. The resulting node velocity is shown in the attached figure, which demonstrates the 1N force in each direction resulting in a different acceleration in each direction as expected.
At the moment the main issue is that the added mass terms are essentially locked to the global frame, while the added inertia rotates with the attached node. This is because I have simply started from the body element, and modified it so that the mass term is a three element vector, but I have not yet introduced any change to the orientation of the forces. I wonder if anyone could help with this part?
If anyone else is interested it would be good to have someone else review the element, and other changes. I had to change some core code to make this work, for example I changed AutomaticStructElem::ComputeAccelerations to internally store the mass as a three element vector, by default all the values are the same. Again I haven't accounted for the orientation of the node here (and haven't even really thought about whether I need to do this here).
begin: data; problem: initial value; end: data; # initial value problem begin: initial value; initial time: 0.0; final time: 5.0; time step: 0.01; tolerance: 0.0000001; max iterations: 20; linear solver: naive ; end: initial value; begin: control data; structural nodes: 1; added masses: 1; forces: 1; default orientation: orientation matrix; output results: netcdf, no text; end: control data; begin: nodes; # 6 DOF structural node structural : 1, dynamic, # label, type position, 0.0, 0.0, 0.0, # absolute position orientation, matr, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, # absolute orientation velocity, 0.0, 0.0, 0.0, # absolute velocity angular velocity, 0.0, 0.0, 0.0, # absolute angular velocity accelerations, no ; # end structural node end: nodes; begin: elements; # added mass added mass : 2, 1, # label, node label 1.0, 2.0, 3.0, # added mass in x, y and z 0.0, 0.0, 0.0, # relative centre of mass matr, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 # added inertia matrix ; # end added mass force : 3, absolute, 1, position, reference, node, null, component, const, 1.0, const, 1.0, const, 1.0 ; # end structural force end: elements;