algorithmic modeling for Rhino

Hello Karamba team,

(Further to previous discussions on email)

We are in the process of creating a tool which uses the dynamic analysis module in Karamba to enable the real-time calculation of the Response Factor (dynamic serviceability criteria) for structures such as office floors which are often governed by dynamic considerations and sensitivity to accelerations.  This response factor calculation node is then used in an optimisation loop (Hoopsnake) along with a Eurocode section sizing node to determine required sections from a standard database for a given geometry, support, and loading condition.  We have done some work with the new version of Karamba and have a few questions regarding the eigenvectors and the normalisation thereof.


You have mentioned that the eigenvectors in Karamba are scaled to unity with respect to the mass matrix.  In other words the eigenvectors form a mass orthonormal set, i.e. for mode r, the modal mass = [eigenvectorr]T . [mass matrix] . [eigenvectorr] = 1.

As you also mentioned, this implies that the length of each mode’s eigenvector = 1/Sqrt(m*) where m*  is the modal mass in that mode.  We have taken your modal analysis example and re-analysed it in Autodesk Robot to compare results.  I have used a consistent mass matrix to calculate the results (I assume Karamba has used a lumped mass matrix for computational efficiency?).  The results (frequencies, mass-normalised eigenvectors, modal masses, and mass participation factors) of this analysis are shown below:

mX,mY,mZ are the modal masses of the current mode calculated assuming unity-normalised eigenvectors (if they were calculated with mass-normalised eigenvectors, all of the modal masses would of necessity be 1).

miX,miY,miZ are the nodal modal masses (∑miX=mX)

Cur.mas.Ux gives the mass participation (%) of the current mode.

Modal mass and participation coefficients are calculated in Robot as described in this link.  Dynamic analysis methods used by Robot are presented here – I used the subspace iteration method for the results above (but all methods give almost identical results as long as enough modes are calculated).


The above analysis shows a modal mass mY=40.5 kg (½ of the total mass) for the first mode.  This result satisfies the basic theory: for mode n of a uniform simply-supported beam of span L and mass/unit length m, the (unity-normalised) mode shape is given by ɸ = sin (nπx/L), and the modal mass M* = m*Integral(Sin2(nπx/L),dx,[0,L]) = 0.5*m*L.  In discrete form this is M* = ∑Mi*ɸi.



I attach a slight modification to your modal analysis example where I have attempted to back-calculate the modal mass from the length of the eigenvectors output for each mode.  This seems to return low modal masses less than 1 – I was expecting them to be one (as the Karamba eigenvectors I am back-calculating from are mass-normalised).  Would you be able to shed some light on this?

I also attempted to calculate the eigenvectors and modal masses in Karamba for the same 10m long beam, but with a 1000kg point mass at the centre of the beam, so I could compare the simpler three modes of that nodal mass with Robot.  However I could not set the density of the beam to zero hence could not get pure modal results for the point mass.  Should this be possible?



We also had a couple of requests (some already mentioned by email):

  • Is it possible to expose the eigenvectors as actual vectors at a requested number of divisions along each bar, similar to the section forces?
  • Is it possible to allow us to specify to Karamba which directions the mass is activated in?  For example, for a floor structure you are often only concerned with the modes activating mass in a vertical direction, as one is aware that a composite topping will restrain the beams laterally and torsionally.  This would not need to take the form of an additional node, but simply X-Y-Z radio boxes similar to the supports component.  This could either be an implementation of a solution to the reduced dynamics problem in the selected direction, or simply cull out all modes which had mass participating in directions not selected (using for example the participation factors described below).  The first option would be more technically accurate, as most structural systems are coupled.
  • I understand modal masses can be scaled arbitrarily and do not necessarily have any direct relationship to the real structure mass (they can be scaled).  However one particular scaling of them is useful, often known as the ‘effective modal mass’.  This is the set of modal masses which add up to the total mass and are directly related to the Modal Participation Factors (see e.g. Clough & Penzien pg. 308 or the link below).  Can these factors for each mode be calculated as well in Karamba?  This is useful for determining how ‘important’ each mode is and how they contribute to the dynamic response of the structure. This link describes well the calculation of effective modal masses and the modal participation factor.


Thanks again for Karamba - it is an extremely useful tool!

Kind regards,


Views: 1477


Replies to This Discussion

Hello Luke,

thank you for your contribution - it was a great help (especially the comparative calculations with Robot and your literature links). I have now updated the trial version of Karamba so that the NaturalVibrations-component also returns modal masses and participation factors in global directions. The natural modes are scaled in such a way that their largest displacement component is +/-1. There is now also a Disp-component that lets on retrieve displacements along elements. I attached an example.

Here my answers to your questions:

  • Karamba uses a consistent mass matrix.
  • The former trial version of karamba returned mass normalized natural modes. In order to arrive at the same modal masses as in the Robot-calculation one needs to scale the natural modes so that their largest component is unity. The modal mass m* of a mode mode_j is then 1/norm_inf(mode_j)**2. Here norm_inf() is the infinity norm. As Karamba does its calculations in Mg (Mega grams) one has to multiply it by 1000 in order to get kg. it is important to include also the rotational DOFs - otherwise m* will be too small.
  • zero density is a problem. The calculation of natural modes in Karamba involves a Cholesky decomposition of the mass matrix. This does not work for singular mass matrices and causes the error.

Regarding your feature requests:

  • is the new Disp-component handy enough for your purposes?
  • By means of the mass participation factors it should be possible to rank the natural modes according to your needs. You could  do it like in the 'Bracing walls' example.
  • If I understood correctly then the effective modal mass is the square of the values given as the participation vectors.

Best regards, Clemens


Hi Clemens,

I am wondering if it's possible to have Karamba also output mass-normalized natural modes (such that the eigenvectors form a mass orthonormal set, i.e. for mode r, the modal mass = [eigenvectorr]T. [mass matrix] . [eigenvectorr] = 1.)

I think in the past this is what Karamba did, but as you mentioned above, Karamba was changed to output unity-normalized natural modes (such that the max displacement is +/- 1).  Having access to mass-normalized eigenvectors can be very helpful in some situations as it becomes easier to do response spectrum analysis.  We are working on programming some components which use the dynamic results from Karamba to perform seismic and footfall analysis.

Also any coding examples you have using the dynamic results from Karamba would be very helpful.



Dear Lucas,

I am currently working on the Karamba3D API and an example collection. I will try to include 

a corresponding example.



Hi Clemens,

Wondering when this example might be available?

I've successfully implemented footfall analysis and related modal summation, but wanted to see your code example before I get too far into the modal response spectrum analysis.



Hi Lucas,

thanks for the reminder.

The repository is available at I haven't manage to include the example yet. I hope I can add a dynamics-related example next week.



Hi Lucas,

I have updated the repository Under Algorithms/NaturalVibes_tests there is an example which shows how to scale the mode shapes 'd' with respect to the mass matrix 'M' such that transpose(d) x M x d = 1).








  • Add Photos
  • View All

© 2019   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service