Problem when performing modal analysis in PyMAPDL #2387
-
I am trying to convert my APDL code into PyMAPDL code (Modal Analysis). My APDL code for the modal analysis is as follows: And the corresponding PyMAPDL code is as follows: I am getting the following error: Could anyone guide me on how to solve this issue? The problem is actually with the mapdl.solve() command. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi @arun-maniam import os
from ansys.mapdl.core import launch_mapdl
path = os.getcwd()
mapdl = launch_mapdl(run_location = path, additional_switches = '-smp')
print(mapdl)
mapdl.prep7()
mapdl.et(1,"BEAM188")
mapdl.keyopt(1,3,3)
mapdl.mp("EX",1,200E9)
mapdl.mp("NUXY",1,0.3)
mapdl.mp("DENS",1,8000)
mapdl.sectype(1,"BEAM","RECT")
mapdl.secdata(2,2)
for i in range(0,11):
mapdl.n(i+1,i)
for i in range(1,11):
mapdl.e(i,i+1)
mapdl.finish()
mapdl.slashsolu()
mapdl.antype("MODAL")
mapdl.mxpand(10,'','',"YES")
mapdl.modopt(method='lanb', nmode=10, freqb=1, freqe=1000)
mapdl.d(1,'UX',0,0,1,1,'UY','UZ','ROTX')
mapdl.d(11,'UY',0,0,11,1,'UZ')
mapdl.solve()
mapdl.exit() mike |
Beta Was this translation helpful? Give feedback.
-
Hi @mikerife, Product: Ansys Mechanical Enterprise Academic Research |
Beta Was this translation helpful? Give feedback.
-
I have added the first part of your code into mine ( from import os ... until mapdl.prep7()). ` S O L U T I O N O P T I O N S PROBLEM DIMENSIONALITY. . . . . . . . . . . . .3-D
LOAD STEP NUMBER. . . . . . . . . . . . . . . . 1
TOTAL RIGID BODY MASS MATRIX ABOUT ORIGIN TOTAL MASS = 0.63898E-27 CENTER OF MASS (X,Y,Z)= 0.25000 0.10000 0.30864E-03 TOTAL INERTIA ABOUT CENTER OF MASS *** MASS SUMMARY BY ELEMENT TYPE *** TYPE MASS Range of element maximum matrix coefficients in global coordinates *** WARNING *** CP = 6.062 TIME= 08:47:35 *** ELEMENT MATRIX FORMULATION TIMES
Time at end of element matrix formulation CP = 6.0625. BLOCK LANCZOS CALCULATION OF UP TO 10 EIGENVECTORS. Memory allocated for solver = 38.834 MB *** NOTE *** CP = 6.609 TIME= 08:47:36 Total memory available for LANCZOS = 13.325508 GB Process memory required for in-core LANCZOS Workspace = 72.292397 MB *** WARNING *** CP = 7.172 TIME= 08:47:36 *** NOTE *** CP = 7.172 TIME= 08:47:36 *** NOTE *** CP = 7.203 TIME= 08:47:36 *** MAPDL BINARY FILE STATISTICS What could be the reason that there are no modes in the specified range, even though there actually exist a few modes? |
Beta Was this translation helpful? Give feedback.
-
Hi @arun-maniam Also see the LANBOPTION command. You could activate the Sturm check to see how many modes are in the range. And then try the alternative LANB solver as well. |
Beta Was this translation helpful? Give feedback.
Hi @arun-maniam
It helps to know the PyMAPDL and MAPDL version being used. And enough of the script to run and troubleshoot. So please use this as an exmaple; run it and let us know what happens: