TAGGED: #Modal_Analysis, apdl, harmonic, optimization


June 4, 2023 at 9:04 amMd_SalemBbp_participant
HI everyone,
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 run only the harmonic analysis based on the old data from the modal analysis (not updated) to avoid what is shown in pic1.
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 ?
I tried to write the next code in the solution block of Modal analysis as shown in pic 2.
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 :
*GET,Fd,MODE,2,FREQ !extract the needed information from modal analysis*SET,x1,Fd0.01 ! set target harmonic analysis frequency range*SET,x2,Fd+0.01/PREP7ESEL,S,ENAME,,185D,ALL,UZ,10 ! set the loads for harmonic analysisALLSELHROPT,FULL !start harmonic analysisHROUT,ONLUMPM,0EQSLV, ,0,PSTRES,0HARFRQ,x1,x2NSUBST,20KBC,1*DIM,energy_array,ARRAY,20/POST1i=1my_energy = 0*DO, step, 1,39, 2set,,,,,,,step ! store results for set stepESEL,S,ENAME,,185etable,energy,senessum*get,ST_energy,ssum,,ITEM,energyenergy_array(i)= ST_energy*IF, ST_energy, GT, my_energy, THENmy_energy = ST_energy ! set the objective*ENDIFETABLE,CLEARALLSELi=i+1*ENDDOI recived an error that harmonic analysis cannot be operated in with modal analysis.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 ?Regards 
June 5, 2023 at 1:49 pmChandra SekaranAnsys Employee
So every time you want to run the modal analysis and then follow up with a FULL harmonic solution? May be you can try the below change to your commands.
solve ! solve the modal analysisfinish/post1set,first*GET,Fd,MODE,2,FREQ !extract the needed information from modal analysis*SET,x1,Fd0.01 ! set target harmonic analysis frequency range*SET,x2,Fd+0.01finish/SOLUTIONantype,harmonicHROPT,FULL !start harmonic analysisHROUT,ONLUMPM,0ESEL,S,ENAME,,185D,ALL,UZ,10 ! set the loads for harmonic analysisALLSELEQSLV, ,0,PSTRES,0HARFRQ,x1,x2NSUBST,20KBC,1! damping ??solve ! solve harmonic analysisfinish*DIM,energy_array,ARRAY,20/POST1i=1my_energy = 0*DO, step, 1,39, 2set,,,,,,,step ! store results for set step (only real part?)ESEL,S,ENAME,,185etable,energy,senessum*get,ST_energy,ssum,,ITEM,energyenergy_array(i)= ST_energy*IF, ST_energy, GT, my_energy, THENmy_energy = ST_energy ! set the objective*ENDIFETABLE,CLEARALLSELi=i+1*ENDDO
June 5, 2023 at 5:07 pmMd_SalemBbp_participant
Dear Chandra,
Ya, I do need to make the modal analysis followed by harmonic analysis for each design point, so I thought in this methodology to avoid making special settings in the optimizer that lead to huge unnecessary data storage.
The code you provide is syntactically right; the harmonic analysis is done directly after the modal analysis, and the *DO loop is done as planned. Unfortunately, the parameter “my_energy” returns 0. When I checked the solution information, I found the next warning:
*** WARNING ***
Item SENE has not been stored in the database. The ETABLE command is
ignored.
*** ERROR ***
Unknown label in field 6 ( ENERGY ) of *GET command.
Line= *get,ST_energy,ssum,,ITEM,energy
The *GET command is ignored.Taking in consideration that this warning wasn’t present when given code is run under “harmonic analysis” block.
i.e I defined DMPRAT,8e5
Regards


 The topic ‘How to carry out harmonic analysis using APDL commands under modal analysis’ is closed to new replies.
 Error: Invalid face geometry was encountered
 AnsysWBU.exe encountered a problem…
 Withdraw test
 ANSYS AQWA. How to set fender condition for move only vertical direction?
 ANSYS WORKBENCH LS DYNA ELEMENT CONTROL
 Two way FSI – Run time Error
 Ansys Gravity v.s. Acceleration
 How can I calculate strain at integration point?
 Force Convergence Issue in Solder Joint Reliability Simulations
 Hertz, JKR , MG , DMT models in contact mecanics with Ansys Workbench
© 2024 Copyright ANSYS, Inc. All rights reserved.