Problem with transforms in DisplacementCylindrical.liml

In DisplacementCylindrical.liml the equation for Displacement_r (the radial displacement) is ( x*u.x + y*u.y ) / sqrt(x^2+y^2). However, this causes a problem when a node is located on the Z-axis where both x and y are 0 --> then the denominator = 0 so the overall value is undefined. When clicking on a Z-axis node using Displacement_r, the result is NaN whereas the result should be 0 when the lateral faces have frictionless constraints. As a result, the plot of Displacement_r is corrupted (see image "Mecway - modal radial displacements 1a").

The way I have found around this is to add a small, insignificant value (1e-10) to the denominator to prevent it from going to 0 -- i.e. , Displacement_r = ( x*u.x + y*u.y ) / (sqrt(x^2+y^2) + 1e-10). Then the results are correct (see image "Mecway - modal radial displacements 2a").

The same also applies to Displacement_t (the circumferential displacement).

Comments

  • Good spotting. I wonder if there's a way to rewrite it without the singularity?
  • Since both the denominator and numerator go to zero on the Z-axis, I vaguely recall that there is a way to handle this (possibly taking limits). Just rearranging the equation didn't help.

    I chose 1e-10 somewhat arbitrarily. What is the smallest real number that Mecway can handle?
  • 1e-14 should be a safe choice
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!