Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post_processing.plot_nodal_pressure() fails for CPT element type though data is there. #3051

Open
4 tasks done
mikerife opened this issue Apr 30, 2024 · 0 comments
Open
4 tasks done

Comments

@mikerife
Copy link

mikerife commented Apr 30, 2024

🤓 Before submitting the issue

🔍 Description of the bug

PyMAPDL 0.68.1
Get a:
raise KeyError(f'Data array ({name}) not present in this dataset.')
When plotting nodal pressure for an model with CPT element type and pressure as a DOF activated.
Have tried with 2D CPT213 and 3D CPT215. Here is example using CPT213.

🕵️ Steps To Reproduce

from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(loglevel="WARNING", print_com=True, port=50056)
mapdl.clear()
mapdl.units('mks')

# parameters
# loading
Pressure = 10

# geometric
H1 = -10
W1 = 1

# material properties
EXX = 5.8E5
NU = 0.0
permiability = 8.62E-3
biot = 1

mapdl.prep7()

# 2D 8 NODE COUPLED PORE-PRESSURE ELEMENT, plane strain formulation
mapdl.et(1, "CPT213")
mapdl.keyopt(1, 3, 2)
mapdl.keyopt(1, 12, 1)

# material moldel
# linear elastic
mapdl.mp("EX", 1, EXX)
mapdl.mp("NUXY", 1, NU)
# PERMEABILITY
mapdl.tb("PM", 1, "", "", "PERM")
mapdl.tbdata(1, permiability, permiability, permiability)
# BIOT COEFFICIENT
mapdl.tb("PM", 1, "", "", "BIOT")
mapdl.tbdata(1, biot)

# solid model
mapdl.rectng(0, W1, 0, H1)

# set element size and mesh
mapdl.esize(W1)
mapdl.amesh(1)

# HORIZONTAL DOFS ARE CONSTRAINED
mapdl.d("ALL", "UX")

# BOTTOM SURFACE IS CONSTRAINED IN Y DIRECTION
mapdl.nsel("S", "LOC", "Y", H1)
mapdl.d("ALL", "UY", 0)
mapdl.allsel()

# PRESSURE DOF BLOCKED ON TOP SURFACE
mapdl.nsel("S", "LOC", "Y", 0)
mapdl.d("ALL", "PRES", 0)
mapdl.allsel()

mapdl.finish()

# set up for a static unsymmetric solution at time .002 sec
mapdl.slashsolu()
mapdl.antype("STATIC")
mapdl.nropt("UNSYM")
mapdl.time(0.002)

# use 100, 1000, 10 initial, max and min substeps
mapdl.nsubst(100, 1000, 10)

# write out all results at all substeps to the result file
mapdl.outres("ALL", "ALL")

# step change load
mapdl.kbc(1)
# APPLY EXTERNAL LOAD ON TOP SURFACE
mapdl.nsel("S", "LOC", "Y", 0)
mapdl.sf("ALL", "PRES", Pressure)
mapdl.allsel()

mapdl.solve()
mapdl.finish()
mapdl.post1()
mapdl.set('last')

# this returns the pressure data
mapdl.post_processing.nodal_pressure()

# this fails to plot
apdl.post_processing.plot_nodal_pressure()

mapdl.finish()
mapdl.exit

💻 Which Operating System are you using?

Windows

🐍 Which Python version are you using?

3.10

💾 Which MAPDL version are you using?

2023 R2

📝 PyMAPDL Report

Show the Report!

# PASTE HERE THE OUTPUT OF `python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())"` here

📝 Installed packages

Show the installed packages!

# PASTE HERE THE OUTPUT OF `python -m pip freeze` here

📝 Logger output file

Show the logger output file.

# PASTE HERE THE CONTENT OF THE LOGGER OUTPUT FILE.

@mikerife mikerife changed the title post_processing.plot_nodal_pressure() fails for CPT213 element type though data is there. post_processing.plot_nodal_pressure() fails for CPT element type though data is there. Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant