


{"id":287005,"date":"2023-06-04T09:04:41","date_gmt":"2023-06-04T09:04:41","guid":{"rendered":"\/forum\/forums\/topic\/how-to-carry-out-harmonic-analysis-using-apdl-commands-under-modal-analysis\/"},"modified":"2023-06-04T09:04:41","modified_gmt":"2023-06-04T09:04:41","slug":"how-to-carry-out-harmonic-analysis-using-apdl-commands-under-modal-analysis","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-carry-out-harmonic-analysis-using-apdl-commands-under-modal-analysis\/","title":{"rendered":"How to carry out harmonic analysis using APDL commands under modal analysis"},"content":{"rendered":"<p style=\"color: #252525\">HI everyone,<\/p>\n<p style=\"color: #252525\">I am doing a MOGA optimization where some information from modal analysis is required in harmonic analysis, and hence the objective parameter ( energy) is maximized (which is obtained from harmonic analysis). To enforce the optimizer tool to go through the modal analysis first, then the harmonic analysis, I had to Preserve Design Points After DX Run and Retain Data for Each Preserved Design Point, otherwise each new design point will&nbsp; run only the harmonic analysis based on the old data from the modal analysis (not updated) to avoid what is shown in pic1.<\/p>\n<p><span style=\"font-size: 14pt\">1<\/span><img decoding=\"async\" style=\"font-size: 14pt\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/06\/04-06-2023-1685867585-pic1.png\" alt=\"\"><span style=\"font-size: 14pt\">. <\/span><\/p>\n<p style=\"color: #252525\">This resulted in a huge amount of data. How do I reduce this data knowing that I set the optimization properties (as said previously) to Preserve Design Points After DX Run and Retain Data for Each Preserved Design Point ?<\/p>\n<p style=\"color: #252525\">I tried to write the next code in the solution block&nbsp; of Modal analysis as shown in pic 2.<\/p>\n<p><span style=\"font-size: 14pt\">&nbsp;<\/span><img decoding=\"async\" style=\"font-size: 14pt\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/06\/04-06-2023-1685868237-pic2.jpg\" alt=\"\"><\/p>\n<p>in order to avoid using harmonic analysis and hence enfoce the optimizer to update the Modal analysis and choose no to Preserve Design Points After DX Run , so the preserved data volume is reduced :<\/p>\n<div>*GET,Fd,MODE,2,FREQ&nbsp; !extract the needed information from modal analysis<\/div>\n<div>*SET,x1,Fd-0.01 ! set target harmonic analysis frequency range<\/div>\n<div>*SET,x2,Fd+0.01<\/div>\n<div>\/PREP7<\/div>\n<div>ESEL,S,ENAME,,185<\/div>\n<div>D,ALL,UZ,10&nbsp; &nbsp; ! set the loads for harmonic analysis<\/div>\n<div>ALLSEL<\/div>\n<div>HROPT,FULL&nbsp; &nbsp;!start harmonic analysis<\/div>\n<div>HROUT,ON<\/div>\n<div>LUMPM,0<\/div>\n<div>EQSLV, ,0,<\/div>\n<div>PSTRES,0<\/div>\n<div>HARFRQ,x1,x2<\/div>\n<div>NSUBST,20<\/div>\n<div>KBC,1<\/div>\n<div>*DIM,energy_array,ARRAY,20<\/div>\n<div>\/POST1<\/div>\n<div>i=1<\/div>\n<div>my_energy = 0<\/div>\n<div>*DO, step, 1,39, 2&nbsp;<\/div>\n<div>&nbsp; &nbsp;set,,,,,,,step&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! store results for set step<\/div>\n<div>&nbsp; &nbsp;ESEL,S,ENAME,,185<\/div>\n<div>&nbsp; &nbsp;etable,energy,sene<\/div>\n<div>&nbsp; &nbsp;ssum<\/div>\n<div>&nbsp; &nbsp;<\/div>\n<div>&nbsp; &nbsp;*get,ST_energy,ssum,,ITEM,energy<\/div>\n<div>&nbsp; &nbsp;energy_array(i)= ST_energy<\/div>\n<div>&nbsp; &nbsp;*IF, ST_energy, GT, my_energy, THEN<\/div>\n<div>&nbsp; &nbsp; &nbsp;my_energy = ST_energy&nbsp; &nbsp;! set the objective<\/div>\n<div>&nbsp; &nbsp;*ENDIF<\/div>\n<div>&nbsp; &nbsp;ETABLE,CLEAR<\/div>\n<div>&nbsp; &nbsp;ALLSEL<\/div>\n<div>&nbsp; &nbsp;i=i+1<\/div>\n<div>*ENDDO<\/div>\n<div>&nbsp;<\/div>\n<div>I recived an error that harmonic analysis cannot be operated in with modal analysis.&nbsp;<\/div>\n<div>&nbsp;<\/div>\n<div>What do you think I sholud do to reduce the amount of induced data without any deviation form the optimizer from the correct sequence ? And is there any way to use the approach I have shown ?<\/div>\n<div>&nbsp;<\/div>\n<div>Regards<\/div>\n<div>&nbsp;<\/div>\n","protected":false},"template":"","class_list":["post-287005","topic","type-topic","status-closed","hentry","topic-tag-Modal_Analysis-1","topic-tag-apdl","topic-tag-harmonic","topic-tag-optimization"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["51194","23687"],"_bbp_author_ip":["168.143.243.14"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["2003"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["287005"],"_bbp_forum_id":["27791"],"_bbp_engagement":["23687","51194"],"_bbp_voice_count":["2"],"_bbp_reply_count":["2"],"_bbp_last_reply_id":["287207"],"_bbp_last_active_id":["287207"],"_bbp_last_active_time":["2023-06-05 17:07:37"]},"test":"md_abdelrhimhotmail-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/287005","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\/287005\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=287005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}