-
-
July 19, 2023 at 7:48 pmAudy MaulizarSubscriber
Dear all. I am currently working on a model of a cable-stayed bridge as shown above. As part of the modelling process, I would like to simulate sagging effect on the cables by calculating modified elasticity modulus for every cable. I figured I could do it more efficiently by using an APDL command in the analysis. My idea is to create a txt file that is comprised of two columns with the first column comprised of the stay cable ID and the second column comprised of the calculated values of the elasticity modulus. Roughly speaking, the file would look like this:
Cable IDÂ Â Â Â Â Â |Â Â Â Â Â Â Â Â Â Modified Elasticity Modulus (MPa)
EC1Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â Â Â Â Â Â Â Â Â Â Â Â 174000
EC2Â Â Â Â Â Â Â Â Â Â Â Â Â |Â Â Â Â Â Â Â Â Â Â Â Â Â 160000
I would then make named selections of each cable pair (e.g. "EC1", "EC2", etc) in Mechanical. The APDL command script would read the cable ID in the first column, select the appropriate named selection, and then change the elasticity modulus of the elements in the named selection with the values in the second column. So far I've come up with this script but it still doesn't work.
/inquire,my_lines,lines,D:\Sagging_Calc,txt
*DIM,STRING_DATA,string,128,my_lines
*DIM,ARRAY_DATA,array,my_lines
*SREAD,STRING_DATA(1),D:\Sagging_Calc,txt
!Read from files
*DO,AR80,1,my_lines
AR70 = strpos(STRING_DATA(1,AR80),'')
ARRAY_DATA(AR80) = valchr(strsub(STRING_DATA(1,AR80),1,AR70))
AR71 = strleng(STRING_DATA(1,AR80))-AR70+1
STRING_DATA(1,AR80) = strsub(STRING_DATA(1,AR80),AR70,AR71)
*ENDDO
!Change the Elasticity Modulus
*DO,I,1,my_lines,1
CMSEL,S,STRING_DATA(I)
MP,EX,,ARRAY_DATA(I)
CMSEL,U,STRING_DATA(I)
*ENDDO
CMSEL,allFrom the result of the analysis, it seems that the problem is in the last block of code. I couldn't get CMSEL to recognize the stay cable ID which is stored in STRING_DATA. Any help would be appreciated.
-
July 20, 2023 at 9:57 amAshish KhemkaForum Moderator
Hi,
Please see if the following link helps: How to change material properties or material assignment in between steps (ansys.com)
Regards,
Ashish Kumar
-
July 20, 2023 at 11:08 amRahul KumbharAnsys Employee
Hi,
Can you check if the first do loop has filled the array successfully?
-
July 20, 2023 at 1:55 pmAudy MaulizarSubscriber
How do you check the content of the array?
-
-
- The topic ‘APDL Command for Changing Material Properties on Individual Structural Elements’ is closed to new replies.
- Problem with access to session files
- Ayuda con Error: “Unable to access the source: EngineeringData”
- At least one body has been found to have only 1 element in at least 2 directions
- Error when opening saved Workbench project
- Geometric stiffness matrix for solid elements
- How to apply Compression-only Support?
- How to select the interface delamination surface of a laminate?
- Timestep range set for animation export
- Image to file in Mechanical is bugged and does not show text
- SMART crack under fatigue conditions, different crack sizes can’t growth
-
1216
-
543
-
523
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.