{"action":"created","issue":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/255","repository_url":"https://api.github.com/repos/tbeu/Modelica","labels_url":"https://api.github.com/repos/tbeu/Modelica/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/Modelica/issues/255/comments","events_url":"https://api.github.com/repos/tbeu/Modelica/issues/255/events","html_url":"https://github.com/tbeu/Modelica/issues/255","id":195119539,"number":255,"title":"Error in Revolute's handling of non-normalized axis of rotations","user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"labels":[{"id":499441885,"url":"https://api.github.com/repos/tbeu/Modelica/labels/bug","name":"bug","color":"ee0701","default":true},{"id":499452357,"url":"https://api.github.com/repos/tbeu/Modelica/labels/Mechanics.MultiBody","name":"Mechanics.MultiBody","color":"0000aa","default":false},{"id":499453872,"url":"https://api.github.com/repos/tbeu/Modelica/labels/P:%20normal","name":"P: normal","color":"aa8888","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-12T23:44:48Z","updated_at":"2016-12-12T23:45:38Z","closed_at":"2016-12-12T23:45:28Z","body":"**Reported by HansOlsson on 19 Jan 2010 10:42 UTC**\nModelica.Mechanics.MultiBody.Joints.Revolute (and similar models) does not state that the axis of rotations 'n' should be normalized.\r\n\r\nIn case 'n' is very small, but non-zero (e.g. {0, 0, 1e-16}) incorrect results are produced without any warning.\r\n\r\nE.g. modify revolute1.n in Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum to {0, 0, 1e-16}.\r\n\r\nThe reason is that normalize is assumed to normalize, but normalize guards against small non-zero values (to avoid \"singularities\" which seems noble - but it is not clear that there are any actual issues that the guard in normalize actually resolves; yes there might be additional errors in some cases - but an error message is better than an incorrect simulation result).\r\n\r\nProposed solutions:\r\n\r\n1. The normalization of 'e' could be done without any guard for small values, e.g.:\r\n\r\n  parameter Real e[3]=Modelica.Math.Vectors.normalize(n, 0);\r\n\r\n2. Redesign normalize to just produce normalize(n, 0) always.\r\nReason:\r\nNormalize is used incorrectly in the same way in many models.\r\nLooking a bit more I'm unsure about whether the odd case for normalize is handled correctly in any model, (possibly except for the ones where it is used for visualization and not so important).\r\n\r\n\r\n \r\n\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/255"},"comment":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/comments/266590333","html_url":"https://github.com/tbeu/Modelica/issues/255#issuecomment-266590333","issue_url":"https://api.github.com/repos/tbeu/Modelica/issues/255","id":266590333,"user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T23:45:38Z","updated_at":"2016-12-12T23:45:38Z","body":"**Modified by otter on 26 Jul 2010 18:07 UTC**"}}
{"actor":{"display_login":"modelica-trac-importer"}}