-
-
November 2, 2018 at 7:12 pm
Sawan
SubscriberHello Members,
I have an array A (4 rows and 1 col), which contains numbers (eg. 15, 20, 45, 5). These number represent the element number of my meshed geometry. I want to select the the elements with these number i.e 15th, 20th, 45th and 5th element. I am using *do loop with esel command to select these particular elements but cant select all of them. My final purpose is to kill these element from analysis by ekill command. So this selection is necessary.
The code which i have for this task is:
esel,s,,,A(1,1)
*do,i,2,4,1
esel,a,,,A(i,1)
*enddo
PS. I know it can be done manually, but for the sake of simplicity I have presented this example. In real, I have an array with more than 100 rows.
Any suggestion for a better method to make this selection or improvisation in my way of doing it would help me a lot.
Many Thanks.Â
-
November 2, 2018 at 7:22 pm
jpasquerell
Ansys EmployeeInstead of a do loop you can use an implied do. It only works for the row subscript though.
esel,s,,,A(1,1)
esel,a,,,A(2:4,1)Â
-
November 3, 2018 at 4:13 pm
Sawan
SubscriberThanks. Works like a charm.
-
November 6, 2018 at 8:58 am
Keyur Kanade
Ansys EmployeeGreat. Can you please mark this as 'Is Solution' to help others on forum.Â
-
- The topic ‘Extracting values from an Array’ is closed to new replies.
- air flow in and out of computer case
- Varying Bond model parameters to mimic soil particle cohesion/stiction
- Eroded Mass due to Erosion of Soil Particles by Fluids
- I am doing a corona simulation. But particles are not spreading.
- Guidance needed for Conjugate Heat Transfer Analysis for a 3s3p Li-ion Battery
- Centrifugal Fan Analysis for Determination of Characteristic Curve
- Issue to compile a UDF in ANSYS Fluent
- JACOBI Convergence Issue in ANSYS AQWA
- affinity not set
- Resuming SAG Mill Simulation with New Particle Batch in Rocky
-
3967
-
1431
-
1272
-
1119
-
1015
© 2025 Copyright ANSYS, Inc. All rights reserved.