Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Dynamic analysis using finite element method- Help needed

  1. Apr 18, 2012 #1
    Dear all,

    I have written a code for dynamic analysis of a mechanical structure. My primary purpose is to find natural frequencies of the structure. When I test my code for a cantilever bar whose natural frequencies are known analytically, I found a big difference between the the first frequency obtained from my code and the analytical one . More importantly, the results depend on mesh size more than I expect. The difference is more for bars with lower thickness. I guess something is wrong with the stiffness matrix but I can't find problem.

    Please see the attached figure to compare results for different mesh size. Is the difference due to discretization error?

    Someone earlier advised me to do something to avoid shearlocking and hourgalssing. I haven't done anything about that. In the model seen in figure, could the error be because shearlocking and/or hourgalssing ?

    Note: I have used lumped mass matrix which is diagonal. The diagonal elements are all equal to 1/8 of the element mass.


    Attached Files:

    • mesh.JPG
      File size:
      41.4 KB
  2. jcsd
  3. Apr 18, 2012 #2


    User Avatar
    Science Advisor
    Gold Member

    I have found there to be a small dependence on modal frequencies with mesh density, but usually it depends on how well the mesh is capturing complex features or deformation patterns. In this case the mesh is easily capturing the geometry, so I ran a quick modal analysis in ANSYS for comparison. You don't mention the material you're analyzing, but I assume it's an alloy steel based on the modulus of elasticity and poisson's ratio (density of around 7.85 g/cc).

    The modal results from ANSYS for the two mesh densities match within about .05%, but came in well off from your results (ANSYS got 112.34 Hz vs. your 287 Hz). The Roark's analytical formula gives 116.5 Hz, so ANSYS is definitely in the right ballpark, in fact it's within 3% of the analytical value which is a great result since the beam has what I would consider a "marginal" length/thickness ratio.

    Looks like you'd better take another close look at your methodologies...

    Attached Files:

    Last edited: Apr 18, 2012
  4. Apr 18, 2012 #3


    User Avatar
    Science Advisor
    Homework Helper

    There are some results for 8 node solid elements with and without shear locking here:

    For one element through the depth, the frequency error for the first bending mode reduced from about 70% to 1%.
  5. Apr 18, 2012 #4
    Mech Engineer,

    Thanks a lot for the help. Without your help I would have been clueless.

    It seems the problem was due to the mass matrix. After correcting the mass matrix I get results much closer to that of ANSYS. The frequencies now are:


    The third frequency is quite different from ANSYS result though.

    I guess the difference in higher modes are still due to mass matrix. I will try consistent mass matrix instead of the lumped one.


    When the depth of several elements, shearlocking/hourglassing problems seem less significant. The difference in my frequencies could be due to those problems too. Of course for thin models, it may not be possible to discretize the thickness to several mesh, then the modified integration rules should be used.

    Last edited: Apr 18, 2012
  6. Apr 21, 2012 #5
    The results are better now but still the frequencies depend on the mesh size more than ANSYS's results do. More over the results are about 1.03 times larger than those of ANSYS.

    One thing, I think the difference between the ANSYS result and the analytical one is not due to error. The analytical formula has been derived for one dimensional degree of freedom, i.e the nodes are free to move in one dimension only. The analyzed problem is three-dimensional and could have different frequencies than the analytical one. Although my results are closer to the analytical one, I don't think they are more accurate than ANSYS's!

    My code gives the following modal results for the first six modes of the model, with the two mesh densities as in the figures above:

    a) coarse mesh: 117.45 , 217.98 , 520.28 , 660.55 , 998.40 , 1086.14

    b) fine mesh[itex]\cdots[/itex]: 115.95 , 216.95 , 515.53 , 650.37 , 992.08 , 1085.06

    Both mesh are fine enough to capture lower modal frequencies, I still can't figure out the cause of the errors. Perhaps ANSYS uses second or third order elements rather than first order.

    Thanks again
  7. Apr 26, 2012 #6
    The image shows the 8th bending mode for two different mesh densities. The frequency for the fine and coarse meshes are 2196.88 Hz and 2179.53 respectively. I wonder if such error (0.77% ) is natural ? The ANSYS results show much lower errors. I'm curious to know the methodology in ANSYS, if it's not a secret.

    Attached Files:

    Last edited: Apr 26, 2012
  8. Apr 30, 2012 #7


    User Avatar
    Science Advisor
    Gold Member

    ANSYS has an option to keep midside nodes on the elements, but I left it on "Automatic" so I'm not sure if it used them or not. Either way, I think you're splitting hairs as you seem to be getting good results out of your code.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook