{"id":158121,"date":"2022-06-06T09:58:45","date_gmt":"2022-06-06T09:58:45","guid":{"rendered":"\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/"},"modified":"2022-06-06T09:58:45","modified_gmt":"2022-06-06T09:58:45","slug":"need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/","title":{"rendered":"Need a script to calculate percentage of volume with stress over certain value"},"content":{"rendered":"<p>This is post processing commands should be added under the &#8216;Solution&#8217; object:<\/p>\n<p>resume<br \/>strs_limit=100       !element with equivalent stress larger than this limit will be outputed <br \/>my_volu_all = 0<br \/>my_volu = 0  <\/p>\n<p>\/post1 <br \/>set,last  <br \/>allsel  <br \/>*get,my_n_el,elem,,count    !count of elements <br \/>etable,vonMises,s,EQV <br \/>etable,el_volu,volu  <br \/>*cfopen,el_out,dat                     !open a dat file to write output  <br \/>*do,i,1,my_n_el,1                      !do loop over all elements <br \/>*dim,avg_vonMise,array,1,1 <br \/>*vget,avg_vonMise(1,1),elem,i,etab,vonMises        !get vonMise stress of element i <br \/>*get,i_volu,elem,i,volu               !get element volume <br \/>my_volu_all = my_volu_all+i_volu                   !add element volume to total volume of the model  <br \/>*if,avg_vonMise(1,1),gt,strs_limit,then my_volu = my_volu + i_volu     !add element volume to volume with stress over stress limit <br \/>my_volu_ratio = my_volu\/my_volu_all   <br \/>*endif  <br \/>*ENDDO <br \/>*cfclose<\/p>\n","protected":false},"template":"","class_list":["post-158121","topic","type-topic","status-publish","hentry","topic-tag-percentage","topic-tag-script","topic-tag-stress","topic-tag-volume"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"This is post processing commands should be added under the &#039;Solution&#039; object:resumestrs_limit=100 !element with equivalent stress larger than this limit will be outputed my_volu_all = 0my_volu = 0 \/post1 set,last allsel *get,my_n_el,elem,,count !count of elements etable,vonMises,s,EQV etable,el_volu,volu *cfopen,el_out,dat !open a dat file to write output *do,i,1,my_n_el,1 !do loop over all elements *dim,avg_vonMise,array,1,1 *vget,avg_vonMise(1,1),elem,i,etab,vonMises !get vonMise\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/\" \/>\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 Knowledge | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Need a script to calculate percentage of volume with stress over certain value | Ansys Knowledge\" \/>\n\t\t<meta property=\"og:description\" content=\"This is post processing commands should be added under the &#039;Solution&#039; object:resumestrs_limit=100 !element with equivalent stress larger than this limit will be outputed my_volu_all = 0my_volu = 0 \/post1 set,last allsel *get,my_n_el,elem,,count !count of elements etable,vonMises,s,EQV etable,el_volu,volu *cfopen,el_out,dat !open a dat file to write output *do,i,1,my_n_el,1 !do loop over all elements *dim,avg_vonMise,array,1,1 *vget,avg_vonMise(1,1),elem,i,etab,vonMises !get vonMise\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-06-06T09:58:45+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-06-06T09:58:45+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Need a script to calculate percentage of volume with stress over certain value | Ansys Knowledge\" \/>\n\t\t<meta name=\"twitter:description\" content=\"This is post processing commands should be added under the &#039;Solution&#039; object:resumestrs_limit=100 !element with equivalent stress larger than this limit will be outputed my_volu_all = 0my_volu = 0 \/post1 set,last allsel *get,my_n_el,elem,,count !count of elements etable,vonMises,s,EQV etable,el_volu,volu *cfopen,el_out,dat !open a dat file to write output *do,i,1,my_n_el,1 !do loop over all elements *dim,avg_vonMise,array,1,1 *vget,avg_vonMise(1,1),elem,i,etab,vonMises !get vonMise\" \/>\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\\\/knowledge\\\/forums\\\/topic\\\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/script\\\/#listItem\",\"name\":\"script\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/script\\\/#listItem\",\"position\":3,\"name\":\"script\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/script\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\\\/#listItem\",\"name\":\"Need a script to calculate percentage of volume with stress over certain value\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\\\/#listItem\",\"position\":4,\"name\":\"Need a script to calculate percentage of volume with stress over certain value\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/script\\\/#listItem\",\"name\":\"script\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#organization\",\"name\":\"Ansys Knowledge\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\\\/\",\"name\":\"Need a script to calculate percentage of volume with stress over certain value | Ansys Knowledge\",\"description\":\"This is post processing commands should be added under the 'Solution' object:resumestrs_limit=100 !element with equivalent stress larger than this limit will be outputed my_volu_all = 0my_volu = 0 \\\/post1 set,last allsel *get,my_n_el,elem,,count !count of elements etable,vonMises,s,EQV etable,el_volu,volu *cfopen,el_out,dat !open a dat file to write output *do,i,1,my_n_el,1 !do loop over all elements *dim,avg_vonMise,array,1,1 *vget,avg_vonMise(1,1),elem,i,etab,vonMises !get vonMise\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\\\/#breadcrumblist\"},\"datePublished\":\"2022-06-06T09:58:45+00:00\",\"dateModified\":\"2022-06-06T09:58:45+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/\",\"name\":\"Ansys Knowledge\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Need a script to calculate percentage of volume with stress over certain value | Ansys Knowledge","description":"This is post processing commands should be added under the 'Solution' object:resumestrs_limit=100 !element with equivalent stress larger than this limit will be outputed my_volu_all = 0my_volu = 0 \/post1 set,last allsel *get,my_n_el,elem,,count !count of elements etable,vonMises,s,EQV etable,el_volu,volu *cfopen,el_out,dat !open a dat file to write output *do,i,1,my_n_el,1 !do loop over all elements *dim,avg_vonMise,array,1,1 *vget,avg_vonMise(1,1),elem,i,etab,vonMises !get vonMise","canonical_url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/knowledge","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","position":2,"name":"Topics","item":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/script\/#listItem","name":"script"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/script\/#listItem","position":3,"name":"script","item":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/script\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/#listItem","name":"Need a script to calculate percentage of volume with stress over certain value"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/#listItem","position":4,"name":"Need a script to calculate percentage of volume with stress over certain value","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/script\/#listItem","name":"script"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#organization","name":"Ansys Knowledge","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/knowledge\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/#webpage","url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/","name":"Need a script to calculate percentage of volume with stress over certain value | Ansys Knowledge","description":"This is post processing commands should be added under the 'Solution' object:resumestrs_limit=100 !element with equivalent stress larger than this limit will be outputed my_volu_all = 0my_volu = 0 \/post1 set,last allsel *get,my_n_el,elem,,count !count of elements etable,vonMises,s,EQV etable,el_volu,volu *cfopen,el_out,dat !open a dat file to write output *do,i,1,my_n_el,1 !do loop over all elements *dim,avg_vonMise,array,1,1 *vget,avg_vonMise(1,1),elem,i,etab,vonMises !get vonMise","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/#breadcrumblist"},"datePublished":"2022-06-06T09:58:45+00:00","dateModified":"2022-06-06T09:58:45+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#website","url":"https:\/\/innovationspace.ansys.com\/knowledge\/","name":"Ansys Knowledge","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Knowledge | Ansys Innovation Space","og:type":"article","og:title":"Need a script to calculate percentage of volume with stress over certain value | Ansys Knowledge","og:description":"This is post processing commands should be added under the 'Solution' object:resumestrs_limit=100 !element with equivalent stress larger than this limit will be outputed my_volu_all = 0my_volu = 0 \/post1 set,last allsel *get,my_n_el,elem,,count !count of elements etable,vonMises,s,EQV etable,el_volu,volu *cfopen,el_out,dat !open a dat file to write output *do,i,1,my_n_el,1 !do loop over all elements *dim,avg_vonMise,array,1,1 *vget,avg_vonMise(1,1),elem,i,etab,vonMises !get vonMise","og:url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/","article:published_time":"2022-06-06T09:58:45+00:00","article:modified_time":"2022-06-06T09:58:45+00:00","twitter:card":"summary_large_image","twitter:title":"Need a script to calculate percentage of volume with stress over certain value | Ansys Knowledge","twitter:description":"This is post processing commands should be added under the 'Solution' object:resumestrs_limit=100 !element with equivalent stress larger than this limit will be outputed my_volu_all = 0my_volu = 0 \/post1 set,last allsel *get,my_n_el,elem,,count !count of elements etable,vonMises,s,EQV etable,el_volu,volu *cfopen,el_out,dat !open a dat file to write output *do,i,1,my_n_el,1 !do loop over all elements *dim,avg_vonMise,array,1,1 *vget,avg_vonMise(1,1),elem,i,etab,vonMises !get vonMise"},"aioseo_meta_data":{"post_id":"158121","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":"default","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":false,"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":"2025-10-17 18:05:18","updated":"2026-07-29 04:11:38","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\/knowledge\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/\" title=\"Topics\">Topics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/script\/\" title=\"script\">script<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tNeed a script to calculate percentage of volume with stress over certain value\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/knowledge"},{"label":"Topics","link":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/"},{"label":"script","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/script\/"},{"label":"Need a script to calculate percentage of volume with stress over certain value","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/need-a-script-to-calculate-percentage-of-volume-with-stress-over-certain-value\/"}],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_last_active_time":["06-06-2022 20:20"],"_bbp_forum_id":["27795"],"_btv_view_count":["3479"],"_bbp_likes_count":["0"]},"test":"articlesansys-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/158121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/158121\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=158121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}