


{"id":160709,"date":"2021-07-26T16:56:16","date_gmt":"2021-07-26T16:56:16","guid":{"rendered":"\/forum\/forums\/topic\/how-to-create-a-stiffness-matrix-in-apdl\/"},"modified":"2021-08-03T17:20:48","modified_gmt":"2021-08-03T17:20:48","slug":"how-to-create-a-stiffness-matrix-in-apdl","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-create-a-stiffness-matrix-in-apdl\/","title":{"rendered":"How to Create a Stiffness Matrix in APDL"},"content":{"rendered":"<div class=\"Item-Body\">\n<div class=\"Message userContent\">\n<p>Dear Support Engineers:<\/p>\n<p>Is it possible that ANSYS APDL can <strong>create <\/strong>(or <strong>provide<\/strong>) the stiffness matrix? I am not asking to import the existing stiffness matrix. Rather, I want APDL to <strong>provide <\/strong>me the <strong>stiffness <\/strong>matrix? Is it possible?<\/p>\n<p>I am using the *DMAT command. How could I let APDL know that I am interested to get the stiffness matrix as an output? Could you please have a look my APDL code as listed below? <\/p>\n<p>!! Comment<\/p>\n<p>!! Extracting Stiffness Matrix from ANSYS APDL<\/p>\n<p>finish&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! It will finish all previous work<\/p>\n<p>\/clear&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! Clean woking window<\/p>\n<p>\/title, How to Get Stiffness Matrix?<\/p>\n<p>\/prep7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! Enter to pre-processor<\/p>\n<p><\/p>\n<\/p>\n<p>!! Choose a proper element type<\/p>\n<p>et,1,180&nbsp;&nbsp;&nbsp;!! et &#8211; element type<\/p>\n<p>A=0.125&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! Area, in^2<\/p>\n<p>r,1,A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! r &#8212; real consant number<\/p>\n<p>!! Define material<\/p>\n<p>mp,ex,1,10e6&nbsp;&nbsp;&nbsp;!! mp &#8212; material properties<\/p>\n<p>mp,prxy,1,0.3&nbsp;&nbsp;&nbsp;!! mp &#8212; <\/p>\n<p>!! Make FE Model, make nodes and elements<\/p>\n<p>L= 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! L &#8212; length, 10 inch<\/p>\n<p>n,1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! n &#8212; making nodes<\/p>\n<p>n,2,L<\/p>\n<p>\/pnum,node,1&nbsp;&nbsp;&nbsp;!! p+num &#8212; plot numbering<\/p>\n<p>!! Make elements<\/p>\n<p>!! Before making elements, we must recall ID #<\/p>\n<p>type,1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! type &#8212; element type<\/p>\n<p>real,1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! real &#8212; real constant<\/p>\n<p>mat,1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! mat &#8211;materials<\/p>\n<p>e,1,2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! e &#8212; making elements by node by node<\/p>\n<p>\/pnum,elem,1&nbsp;&nbsp;&nbsp;!! pnum &#8212; plot numbering<\/p>\n<p>eplot&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! e+plot &#8212; element plot<\/p>\n<p>!! Apply BC&nbsp;&#8211; Boundary Conditions<\/p>\n<p>d,1,all,0&nbsp;&nbsp;&nbsp;!! d &#8212; dof at nodes<\/p>\n<p>!! Apply force<\/p>\n<p>f,2,fx,1000&nbsp;&nbsp;&nbsp;!! f &#8212; force at nodes<\/p>\n<p>alls&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! all select<\/p>\n<p>fini&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! finish with pre-processor<\/p>\n<p><\/p>\n<\/p>\n<p>\/solution&nbsp;&nbsp;&nbsp;!! enter solution<\/p>\n<p><strong>*Dmat,Matkd,D,???<\/strong><\/p>\n<p><strong>*print,Matkd,K???<\/strong><\/p>\n<p>solve&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! solve <\/p>\n<p>fini&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!! finish with solutions<\/p>\n<p><\/p>\n<\/p>\n<p>Any suggestions will be highly appreciated. Thanks,<\/p>\n<p>Awlad.<\/p>\n","protected":false},"template":"","class_list":["post-160709","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_author_ip":[""],"_bbp_old_reply_author_name_id":["Anonymous"],"_bbp_old_is_reply_anonymous_id":["false"],"_btv_view_count":["5754"],"_bbp_likes_count":["0"],"_bbp_subscription":["237700"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["160709"],"_bbp_forum_id":["27791"],"_bbp_engagement":["3599","50680","58821"],"_bbp_voice_count":["3"],"_bbp_reply_count":["8"],"_bbp_last_reply_id":["186769"],"_bbp_last_active_id":["186769"],"_bbp_last_active_time":["2021-08-03 17:20:48"]},"test":"awlad"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/160709","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":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/160709\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=160709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}