


{"id":186767,"date":"2021-07-28T01:35:06","date_gmt":"2021-07-28T01:35:06","guid":{"rendered":"\/forum\/forums\/reply\/186767\/"},"modified":"2021-07-28T01:35:06","modified_gmt":"2021-07-28T01:35:06","slug":"186767","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/","title":{"rendered":"Reply To: How to Create a Stiffness Matrix in APDL"},"content":{"rendered":"<p>Dear Mr. Erik<br \/>\nMANY, MANY thanks for sharing the <strong>link<\/strong>. It was really helpful. This is what I did to get the stiffness matrix.<br \/>\nFirst, I open ANSYS Product <strong>Launcher<\/strong>. I defined the &#8220;<strong>Directory (or Folder)<\/strong>&#8221; where all the files could be generated or saved. Then, I executed my APDL code line by line. However, I am getting an error message when I am executing the command &#8220;<strong>combine, full<\/strong>!! combines all file*.full into file.full&#8221;.  <br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/forum-uploads\/592\/FHW92U494WHU.png\" width=\"701\" height=\"219\" \/>Yes, there is NO &#8220;file0.full&#8221; file in the Directory (or Folder)&#8221;. Is this error a <strong>concern <\/strong>not to provide the stiffness matrix properly?  Could you please let me know?<br \/>\nHowever, my APDL code generates the <strong>MatK <\/strong>(name of the stiffness matrix) file properly. I am using Truss element (<strong>Link180<\/strong>). I am also using &#8220;<strong>1 element<\/strong>&#8221; model. So, I have only <strong>2 nodes<\/strong>. Hence, the stiffness matrix will be a (<strong>2&#215;2<\/strong>) matrix. After applying the <strong>Boundary Condition<\/strong>, the stiffness matrix from <strong>MATLAB <\/strong>is as follows:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/forum-uploads\/008\/VL25JEIAT33C.png\" width=\"274\" height=\"116\" \/>I am using the *<strong>dmat <\/strong>command to create the dense stiffness matrix. Then, I am opening the MatKMMF.text file. This is what I am getting (as shown below). So, how to <strong>READ <\/strong>the file? Does it mean that <strong>K(1,1) = 1E6<\/strong>? Could you please correct me? Does APDL start the Row and Column numbers from <strong>ZERO<\/strong>? If so, then why I am NOT getting the K(0,0) = 1, K(0,1) = 0, and K(1,0) = -1E6? Could you please correct my understanding?<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/forum-uploads\/525\/NI14S0QH7F2O.png\" width=\"740\" height=\"372\" \/><br \/>\nThis is my APDL code. Is there anything wrong in this file?<br \/>\n!! Extracting Stiffness Matrix from ANSYS APDL<\/p>\n<p>finish!! It will finish all previous work<br \/>\n\/clear!! Clean woking window<br \/>\n\/title, How to Get Stiffness Matrix?<br \/>\n\/prep7!! Enter to pre-processor<\/p>\n<p>!! Choose a proper element type<br \/>\net,1,180!! et &#8211; element type<br \/>\n!! Define sectional properties<br \/>\nA=1!! Area, in^2<br \/>\nr,1,A!! r &#8212; real consant number<br \/>\n!! Define material<br \/>\nmp,ex,1,10e6!! mp &#8212; material properties<br \/>\nmp,prxy,1,0.3!! mp &#8212; <\/p>\n<p>!! Make FE Model, make nodes and elements<br \/>\nL= 10!! L &#8212; length, 10 inch<br \/>\nk,1!! n &#8212; making nodes<br \/>\nk,2,L<br \/>\nL,1,2<br \/>\n!! Make elements<br \/>\n!! Before making elements, we must recall ID #<br \/>\ntype,1!! type &#8212; element type<br \/>\nreal,1!! real &#8212; real constant<br \/>\nmat,1!! mat &#8211;materials<br \/>\nesize,,1  !! ONE Element<br \/>\nLmesh,all<br \/>\nelist<br \/>\n!! Apply BC- Boundary Conditions<br \/>\nd,1,all,0!! d &#8212; dof at nodes<\/p>\n<p>!! Apply force<br \/>\nf,2,fx,1000!! f &#8212; force at nodes<br \/>\nalls!! all select<\/p>\n<p>\/solution!! enter solution<br \/>\neqslv, sparse!! Equation solver<br \/>\nwrfull, 1!! Stops solution after assembling global matrix<br \/>\nsolve!! solve <br \/>\nfini!! finish with solutions<br \/>\nsave<\/p>\n<p>\/aux2!! Enters the binary file dumping processor<br \/>\ncombine, full!! combines all file*.full into file.full<br \/>\nfinish<\/p>\n<p>! Gets Stiffness Matrix<br \/>\n*dMAT, MatK, D, import, full, file.full, stiff<br \/>\n*dMAT, Nod2Bcs, D, import, full, file.full,NOD2BCS<br \/>\n*print, MatK, matk.txt! Exports Stiffness to Text File<br \/>\n*export, MatK, mmf, matkMMF.txt<\/p>\n<p>Any feedback will be highly appreciated. Thanks<br \/>\nAwlad.<\/p>\n<p><\/p>\n","protected":false},"template":"","class_list":["post-186767","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Dear Mr. Erik MANY, MANY thanks for sharing the link. It was really helpful. This is what I did to get the stiffness matrix. First, I open ANSYS Product Launcher. I defined the &quot;Directory (or Folder)&quot; where all the files could be generated or saved. Then, I executed my APDL code line by line. However,\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Learning Forum | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Reply To: How to Create a Stiffness Matrix in APDL | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"Dear Mr. Erik MANY, MANY thanks for sharing the link. It was really helpful. This is what I did to get the stiffness matrix. First, I open ANSYS Product Launcher. I defined the &quot;Directory (or Folder)&quot; where all the files could be generated or saved. Then, I executed my APDL code line by line. However,\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/forum-uploads\/592\/FHW92U494WHU.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/forum-uploads\/592\/FHW92U494WHU.png\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-07-28T01:35:06+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-07-28T01:35:06+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Reply To: How to Create a Stiffness Matrix in APDL | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Dear Mr. Erik MANY, MANY thanks for sharing the link. It was really helpful. This is what I did to get the stiffness matrix. First, I open ANSYS Product Launcher. I defined the &quot;Directory (or Folder)&quot; where all the files could be generated or saved. Then, I executed my APDL code line by line. However,\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/forum-uploads\/592\/FHW92U494WHU.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/186767\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/186767\\\/#listItem\",\"name\":\"Reply To: How to Create a Stiffness Matrix in APDL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/186767\\\/#listItem\",\"position\":2,\"name\":\"Reply To: How to Create a Stiffness Matrix in APDL\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"name\":\"Home\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/186767\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/186767\\\/\",\"name\":\"Reply To: How to Create a Stiffness Matrix in APDL | Ansys Learning Forum\",\"description\":\"Dear Mr. Erik MANY, MANY thanks for sharing the link. It was really helpful. This is what I did to get the stiffness matrix. First, I open ANSYS Product Launcher. I defined the \\\"Directory (or Folder)\\\" where all the files could be generated or saved. Then, I executed my APDL code line by line. However,\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/186767\\\/#breadcrumblist\"},\"datePublished\":\"2021-07-28T01:35:06+00:00\",\"dateModified\":\"2021-07-28T01:35:06+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Reply To: How to Create a Stiffness Matrix in APDL | Ansys Learning Forum","description":"Dear Mr. Erik MANY, MANY thanks for sharing the link. It was really helpful. This is what I did to get the stiffness matrix. First, I open ANSYS Product Launcher. I defined the \"Directory (or Folder)\" where all the files could be generated or saved. Then, I executed my APDL code line by line. However,","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/forum","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/#listItem","name":"Reply To: How to Create a Stiffness Matrix in APDL"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/#listItem","position":2,"name":"Reply To: How to Create a Stiffness Matrix in APDL","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","name":"Home"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization","name":"Ansys Learning Forum","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/forum\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/","name":"Reply To: How to Create a Stiffness Matrix in APDL | Ansys Learning Forum","description":"Dear Mr. Erik MANY, MANY thanks for sharing the link. It was really helpful. This is what I did to get the stiffness matrix. First, I open ANSYS Product Launcher. I defined the \"Directory (or Folder)\" where all the files could be generated or saved. Then, I executed my APDL code line by line. However,","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/#breadcrumblist"},"datePublished":"2021-07-28T01:35:06+00:00","dateModified":"2021-07-28T01:35:06+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/forum\/#website","url":"https:\/\/innovationspace.ansys.com\/forum\/","name":"Ansys Learning Forum","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Learning Forum | Ansys Innovation Space","og:type":"article","og:title":"Reply To: How to Create a Stiffness Matrix in APDL | Ansys Learning Forum","og:description":"Dear Mr. Erik MANY, MANY thanks for sharing the link. It was really helpful. This is what I did to get the stiffness matrix. First, I open ANSYS Product Launcher. I defined the &quot;Directory (or Folder)&quot; where all the files could be generated or saved. Then, I executed my APDL code line by line. However,","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/","og:image":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/forum-uploads\/592\/FHW92U494WHU.png","og:image:secure_url":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/forum-uploads\/592\/FHW92U494WHU.png","article:published_time":"2021-07-28T01:35:06+00:00","article:modified_time":"2021-07-28T01:35:06+00:00","twitter:card":"summary_large_image","twitter:title":"Reply To: How to Create a Stiffness Matrix in APDL | Ansys Learning Forum","twitter:description":"Dear Mr. Erik MANY, MANY thanks for sharing the link. It was really helpful. This is what I did to get the stiffness matrix. First, I open ANSYS Product Launcher. I defined the &quot;Directory (or Folder)&quot; where all the files could be generated or saved. Then, I executed my APDL code line by line. However,","twitter:image":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/forum-uploads\/592\/FHW92U494WHU.png"},"aioseo_meta_data":{"post_id":"186767","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"content","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":true,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2024-10-24 05:17:32","updated":"2026-08-13 07:01:51","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tReply To: How to Create a Stiffness Matrix in APDL\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/forum"},{"label":"Reply To: How to Create a Stiffness Matrix in APDL","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186767\/"}],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/186767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/reply"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/186767\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=186767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}