question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mapdl.lssolve() doesn't work

See original GitHub issue

I noticed that when I use the command mapdl.lssolve(), I get no results. I wanted to check first whether it works, soI made a simple coding. No, It only doesn’t work in pyansys, although I already checked the macro works in MAPDL.

from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(loglevel="WARNING")
mapdl.run("/units,user,0.001,0.001,1,1,0,1,1,1")
mapdl.prep7()
mapdl.et(1, 182)
mapdl.mp("ex", 1, 210e3)
mapdl.mp("nuxy", 1, 0.33)
mapdl.mp("dens", 1, 7.81e-06)
mapdl.k(1, 0, 0)
mapdl.k(2, 5, 0)
mapdl.k(3, 5, 1)
mapdl.k(4, 0, 1)
mapdl.l(1, 2)
mapdl.l(2, 3)
mapdl.l(3, 4)
mapdl.l(4, 1)
mapdl.al(1, 2, 3, 4)
mapdl.lsel("s", "", "", 1, 4)
mapdl.lesize("all", 0.1)
mapdl.amesh(1)
mapdl.allsel()
mapdl.finish()
mapdl.run("/solu")
mapdl.antype("static'")
mapdl.kbc(0)
mapdl.lsel("s", "", "", 4)
mapdl.nsll("s", 1)
mapdl.d("all", "all", 0)
mapdl.ksel("s", "", "", 3)
mapdl.nslk("s")
mapdl.f("all", "fy", 5)
mapdl.allsel()
mapdl.lswrite(1)
mapdl.fdele("all", "all")
mapdl.ksel("s", "", "", 3)
mapdl.nslk("s")
mapdl.f("all", "fy", -5)
mapdl.allsel()
mapdl.lswrite(2)
mapdl.lssolve(1, 2)
mapdl.exit()

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rlaalswo0623commented, May 11, 2021

It works! It works!!! Oh!!! Thanks a lot! Thank you!! I can work again on my project!

0reactions
akaszynskicommented, May 11, 2021

Until I fix this with the next patch release, here’s a quick fix you can run on your end:

replace:

out = mapdl.lssolve(1, 2)

with:

with mapdl.non_interactive:
    mapdl.lssolve(1, 2)
out = mapdl.last_response
Read more comments on GitHub >

github_iconTop Results From Across the Web

commands LSWRITE/LSSOLVE in Mechanical Workbench
The simulation consists of moving a load over a line. For this, I created a Commands (APDL) to writes load step (LSWRITE), and...
Read more >
Can anyone tell me how to solve this error Message in ANSYS ...
To see the current script file while working in ANSYS apdl, you can go to session editor. And to save the script file...
Read more >
Mechanical APDL Command Reference - BME-MM
LSSCALE - Generates a scaled set of lines from a pattern of lines. LSSOLVE - Reads and solves multiple load steps. LSTR -...
Read more >
ANSYS Advanced Analysis Techniques Guide - iMechanica
Define and Control Your Load Cases or Frequency Extraction . ... See the ANSYS APDL Programmer's Guide for a discussion of the ANSYS....
Read more >
ansys (1) - Epsilon FEA, LLC
14, Tips, APDL CSITOTW, Basics of ANSYS Macros [PDF], David Haberman (CSI) ... Note that this doesn't work with the root menu MenuRoot....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found