TAGGED: apdl
-
-
November 2, 2023 at 10:02 am
Yinzhong Hu
SubscriberIn matlab, I use statements like this "s1="E:ANSYS2022ANSYSv221ansysbinwinx64ANSYS221.exe -b -i C:UsersLYDesktoptesttxt write to override experimenttest01 (test).txt -o C:UsersLYDesktoptesttxt to write override experiment"; "to call ansys and execute the command stream I've written.Now I hope that in this way I can save the calculated stress contour diagram, I don't know if this way is possible, I hope you can help me achieve this requirement. I've used a statement like this in the picture in the command flow, but I can't save the stress contour diagram. However, I opened ansys APDL and imported the written command stream (.txt) text, which saved the stress contours

-
November 3, 2023 at 2:09 pm
mrife
Ansys EmployeeHi Yinzhong
In Batch mode (the -b flag on the command line) there is no graphics window to capture. Instead use the /SHOW command to redirect a plot to a file:
/eshape,1,,
/show,png
plnsol,s,eqv
/show
Â
-
November 6, 2023 at 4:19 am
-
-
November 6, 2023 at 3:26 pm
mrife
Ansys EmployeeLooks like the /eshape,1 is missing
-
November 6, 2023 at 3:48 pm
Yinzhong Hu
SubscriberThe command I used was:
/eshape,1,,Â/show,pngÂplnsol,s,eqvÂ/show
I used the /eshape,1 command, and now I'm confused -
November 6, 2023 at 4:32 pm
mrife
Ansys EmployeeHi Yinzhong
Sorry, I forgot about the /GRAPHICS command! We need to change the graphics display as well to Power Graphics. So try:
/post1
set,last
/graph,power
/eshape,1
/view,1,1,1,1
eplot
/show,png
plnsol,s,eqv
/show
/rep
finishÂ
-
November 7, 2023 at 5:20 am
Yinzhong Hu
SubscriberThank you, this way I open Mecheanical APDL Product Launcher, and then read the file I wrote in advance (.dat) can meet the requirements. But I use matlab invoking ansys (" s1 = "E: ANSYS2022ANSYSv221ansysbinwinx64ANSYS221. Exe - b - C: I UsersLYDesktoptesttxt write to override experimenttest01 (test).txt -o C:UsersLYDesktoptesttxt to write override experiment";) There are still problems. As you can see from the result file, the program will stop at this step (plnsol,s,eqv), and eventually the program will stop running. I wonder if there is something wrong with my ansys setup?

-
-
- The topic ‘Use MATLAB to call ANSYS’ is closed to new replies.
-
5874
-
1906
-
1420
-
1306
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.

