Skip to content

ACCOPTION causes pymapdl run to fail #2798

@mcMunich

Description

@mcMunich

🤓 Before submitting the issue

🔍 Description of the bug

The ACCOPTION command should allow the user to accelerate an analysis using their GPU. However, it seems to cause my analysis to fail.
image

🕵️ Steps To Reproduce

from ansys.mapdl.core import launch_mapdl
import os
here = os.getcwd()

# parameters
x = 1 # create a square block
f = 1e6 # force over 1 side of block
ndiv = 4 # element/line division
numElem = (ndiv/x)**3
loadDirection = 'y'

##### modeling
#elemSize = (x**3)/numElem**(1/3)

#### Launch pymapdl
mapdl = launch_mapdl(run_location=here, version = 232)
mapdl.prep7()

#### Materials
mapdl.mp("EX", 1, 200e9)
mapdl.mp("PRXY", 1, 0.3)

#### Geometry
mapdl.csys(0)
mapdl.blc4(0, 0,x, x, x)

#### Elements and meshing
mapdl.et(1, "SOLID186")
mapdl.type(1)
mapdl.keyopt(1, 2, 1)
#mapdl.esize(elemSize)
mapdl.vmesh("ALL")
mapdl.eplot()

#### Boundary Conditions: fixed constraint
mapdl.nsel("s", "loc", loadDirection, 0)
mapdl.d("all", "all")

#### Boundary Conditions: load
mapdl.nsel("s", "loc", loadDirection, x)
nnodes = mapdl.get("NumNodes" , "NODE" ,0 , "COUNT" )
mapdl.f("all", "fy",f/nnodes)
mapdl.allsel()

#### Solve
mapdl.run("/solu")
mapdl.accoption(activate='ON')
sol_output = mapdl.solve()

#### Plot Results
# plot the normalized global displacement
mapdl.post_processing.plot_nodal_displacement(lighting=False, show_edges=True)

mapdl.exit()

💻 Which Operating System are you using?

Windows

🐍 Which Python version are you using?

3.11

📝 PyMAPDL Report

na

📝 Installed packages

na

📝 Logger output file

na

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions