


{"id":407201,"date":"2025-01-27T13:32:25","date_gmt":"2025-01-27T13:32:25","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/why-ansys-mechanical-is-single-precision-only\/"},"modified":"2025-02-19T14:15:28","modified_gmt":"2025-02-19T14:15:28","slug":"why-ansys-mechanical-is-single-precision-only","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/why-ansys-mechanical-is-single-precision-only\/","title":{"rendered":"Why Ansys Mechanical is single precision only?"},"content":{"rendered":"<p>&lt;p&gt;&lt;p&gt;I have a little example with simple beam bending. One side is clamped, on the other side a single node undergoes a z-displacement of 1.23456789 mm:&lt;\/p&gt;&lt;p&gt;<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2025\/01\/27-01-2025-1737983813-bild1.png\" alt=\"\" \/>&lt;\/p&gt;&lt;p&gt;After calculation, the maximum displacement at this node is 1.2345678&lt;span style=&#8221;text-decoration: underline;&#8221;&gt;<strong>&lt;span style=&#8221;color: #ba372a; text-decoration: underline;&#8221;&gt;81&lt;\/span&gt;<\/strong>&lt;\/span&gt; only. If you read this displacement with Python console inside Mechanical you get also a value of 1.2345678&lt;span style=&#8221;text-decoration: underline;&#8221;&gt;<strong>&lt;span style=&#8221;color: #ba372a; text-decoration: underline;&#8221;&gt;8063&lt;\/span&gt;<\/strong>&lt;\/span&gt;. This is exactly the value that you get if you store 1.23456789 in a single-precision floating point number (can be tried out with any programming language). This shows me that Ansys Mechanical works internally with single-precision numbers.&lt;\/p&gt;&lt;p&gt;<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2025\/01\/27-01-2025-1737983851-bild2.png\" alt=\"\" \/>&lt;\/p&gt;&lt;p&gt;But the displacement values are stored inside the RST file with double-precision! If you open Ansys Classic an load that RST from the Workbench file structure, the you can get the exact displacement (Classic only):&lt;\/p&gt;&lt;\/p&gt;<\/p>\n<pre><strong>\/post1<\/strong>&lt;br&gt;<strong>file,' c:\\scratch\\test\\dp0\\SYS\\MECH\\file',rst<\/strong>&lt;br&gt;<strong>set,1<\/strong>&lt;br&gt;<strong>\/format,7,f,16<\/strong>&lt;br&gt;<strong>prnsol,u,z<\/strong><\/pre>\n<p>&lt;p&gt;&lt;p&gt;And the list you get is:&lt;\/p&gt;&lt;\/p&gt;<\/p>\n<pre><strong>NODE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UZ<\/strong>&lt;br&gt;<strong>&nbsp;...<\/strong>&lt;br&gt;<strong>121 &nbsp; &lt;span style=\"color: #169179;\"&gt;1.234567890000&lt;\/span&gt;<\/strong><\/pre>\n<p>&lt;p&gt;&lt;p&gt;Or can I change the behavior of Mechanical to get the exact displacements? We have large numbers with large displacements, so this inaccuracy is a problem for a very specific use case.&lt;\/p&gt;&lt;p&gt;Thanks!&lt;\/p&gt;&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-407201","topic","type-topic","status-closed","hentry","topic-tag-ansys-mechanical","topic-tag-AnsysMechanical2021R2-1","topic-tag-displacement","topic-tag-precision"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_forum_id":["27791"],"_bbp_topic_id":["407201"],"_bbp_subscription":["507715","58821"],"_bbp_author_ip":["2a02:810a:8601:9600:8c29:18cc:2c35:b2d3"],"_bbp_last_reply_id":["422372"],"_bbp_last_active_id":["422372"],"_bbp_last_active_time":["2025-02-19 14:15:20"],"_bbp_reply_count":["5"],"_bbp_reply_count_hidden":["0"],"_bbp_voice_count":["2"],"_bbp_engagement":["507715","58821"],"_btv_view_count":["404"],"_bbp_topic_status":["unanswered"],"_edit_last":["52629"],"_bbp_revision_log":["a:1:{i:407208;a:2:{s:6:\"author\";i:52629;s:6:\"reason\";s:0:\"\";}}"],"_edit_lock":["1737987238:52629"],"_bbp_status":["publish"]},"test":"82dc02165941b2d28fe4a8a42d410c611c438a6f"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/407201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/407201\/revisions"}],"predecessor-version":[{"id":407208,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/407201\/revisions\/407208"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=407201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}