Note
Click here to download the full example code
Dynamic simulation of a printed circuit board assembly¶
This examples shows how to use PyMAPDL to import an existing FE model and to run a modal and PSD analysis. PyDPF modules are also used for post-processing.
This example is inspired from the model and analysis defined in Chapter 20 of the Mechanical APDL Technology Showcase Manual.
Additional Packages Used¶
Matplotlib is used for plotting purposes.
Starting MAPDL as a service and importing an external model¶
The original FE model is given in the Ansys Mechanical APDL Technology Showcase Manual. The .cdb contains a FE model of a single circuit board. The model is meshed with SOLID186, SHELL181 and BEAM188 elements. All components of the PCB model is assigned with linear elastic isotropic materials. Bonded and flexible surface-to-surface contact pairs are used to define the contact between the IC packages and the circuit board.
import matplotlib.pyplot as plt
from ansys.mapdl.core import launch_mapdl
from ansys.mapdl.core.examples import download_tech_demo_data
# start MAPDL as a service
mapdl = launch_mapdl()
print(mapdl)
# read model of single circuit board
# download the cdb file
pcb_mesh_file = download_tech_demo_data("td-20", "pcb_mesh_file.cdb")
# enter preprocessor and read in cdb
mapdl.prep7()
mapdl.cdread("COMB", pcb_mesh_file)
mapdl.allsel()
mapdl.eplot(background="w")
mapdl.cmsel("all")

Out:
Product: Ansys Mechanical Enterprise
MAPDL Version: 21.2
ansys.mapdl Version: 0.61.6
'ALSO SELECT ALL COMPONENTS'
Creating the complete layered model¶
The original model will be duplicated to create a layered PCB of three layers that are binded together.
# duplicate single PCB to get three layers
# get the maximum node number for the single layers PCB in the input file
max_nodenum = mapdl.get("max_nodenum", "node", "", "num", "max")
# generate additional PCBs offset by 20 mm in the -y direction
mapdl.egen(3, max_nodenum, "all", dy=-20)
# bind the three layers together
# select components of interest
mapdl.cmsel("s", "N_JOINT_BOARD")
mapdl.cmsel("a", "N_JOINT_LEGS")
mapdl.cmsel("a", "N_BASE")
# get number of currently selected nodes
nb_selected_nodes = mapdl.mesh.n_node
current_node = 0
queries = mapdl.queries
# also select similar nodes for copies of the single PCB
# and couple all dofs at the interface
for node_id in range(1, nb_selected_nodes + 1):
current_node = queries.ndnext(current_node)
mapdl.nsel("a", "node", "", current_node + max_nodenum)
mapdl.nsel("a", "node", "", current_node + 2 * max_nodenum)
mapdl.cpintf("all")
# define fixed support boundary condition
# get max coupled set number
cp_max = mapdl.get("cp_max", "cp", 0, "max")
# unselect nodes scoped in CP equations
mapdl.nsel("u", "cp", "", 1, "cp_max")
# create named selection for base excitation
mapdl.cm("n_base_excite", "node")
# fix displacement for base excitation nodes
mapdl.d("all", "all")
# select all and plot the model using MAPDL's plotter and VTK's
mapdl.allsel("all")
mapdl.cmsel("all")
mapdl.graphics("power")
mapdl.rgb("index", 100, 100, 100, 0)
mapdl.rgb("index", 80, 80, 80, 13)
mapdl.rgb("index", 60, 60, 60, 14)
mapdl.rgb("index", 0, 0, 0, 15)
mapdl.triad("rbot")
mapdl.pnum("type", 1)
mapdl.number(1)
mapdl.hbc(1, "on")
mapdl.pbc("all", "", 1)
mapdl.view(1, 1, 1, 1)
mapdl.eplot(vtk=False)
mapdl.eplot(vtk=True)

Run modal analysis¶
A modal analysis is run using Block Lanzos. Only 10 modes are extracted for the sake of run times, but using a higher number of nodes is recommended (suggestion: 300 modes).
# enter solution processor and define analysis settings
mapdl.slashsolu()
mapdl.antype("modal")
# set number of modes to extract
# using a higher number of modes is recommended
nb_modes = 10
# use Block Lanzos to extract specified number of modes
mapdl.modopt("lanb", nb_modes)
mapdl.mxpand(nb_modes)
output = mapdl.solve()
print(output)
Out:
***** ANSYS SOLVE COMMAND *****
*** NOTE *** CP = 0.000 TIME= 00:00:00
There is no title defined for this analysis.
*** NOTE *** CP = 0.000 TIME= 00:00:00
To view 3-D mode shapes of beam or pipe elements, expand the modes with
element results calculation active via the MXPAND command's
Elcalc=YES.
*** WARNING *** CP = 0.000 TIME= 00:00:00
Previous testing revealed that 3 of the 26046 selected elements violate
shape warning limits. To review warning messages, please see the
output or error file, or issue the CHECK command.
*** NOTE *** CP = 0.000 TIME= 00:00:00
The model data was checked and warning messages were found.
Please review output or errors file ( ) for these warning messages.
*** SELECTION OF ELEMENT TECHNOLOGIES FOR APPLICABLE ELEMENTS ***
---GIVE SUGGESTIONS ONLY---
ELEMENT TYPE 1 IS BEAM188 . KEYOPT(3) IS ALREADY SET AS SUGGESTED.
ELEMENT TYPE 1 IS BEAM188 . KEYOPT(15) IS ALREADY SET AS SUGGESTED.
ELEMENT TYPE 2 IS BEAM188 . KEYOPT(3) IS ALREADY SET AS SUGGESTED.
ELEMENT TYPE 2 IS BEAM188 . KEYOPT(15) IS ALREADY SET AS SUGGESTED.
ELEMENT TYPE 3 IS BEAM188 . KEYOPT(3) IS ALREADY SET AS SUGGESTED.
ELEMENT TYPE 3 IS BEAM188 . KEYOPT(15) IS ALREADY SET AS SUGGESTED.
ELEMENT TYPE 4 IS BEAM188 . KEYOPT(3) IS ALREADY SET AS SUGGESTED.
ELEMENT TYPE 4 IS BEAM188 . KEYOPT(15) IS ALREADY SET AS SUGGESTED.
ELEMENT TYPE 5 IS BEAM188 . KEYOPT(3) IS ALREADY SET AS SUGGESTED.
ELEMENT TYPE 5 IS BEAM188 . KEYOPT(15) IS ALREADY SET AS SUGGESTED.
ELEMENT TYPE 6 IS SHELL181. IT IS ASSOCIATED WITH ELASTOPLASTIC
MATERIALS ONLY. KEYOPT(8)=2 IS SUGGESTED AND KEYOPT(3)=2 IS SUGGESTED FOR
HIGHER ACCURACY OF MEMBRANE STRESSES; OTHERWISE, KEYOPT(3)=0 IS SUGGESTED.
ELEMENT TYPE 6 HAS KEYOPT(3)=2. FOR THE SPECIFIED ANALYSIS TYPE, LUMPED MASS
MATRIX OPTION (LUMPM, ON) IS SUGGESTED.
ELEMENT TYPE 7 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 8 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 9 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 10 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 11 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 12 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 13 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 14 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 15 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 16 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 17 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 18 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 19 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 20 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
ELEMENT TYPE 21 IS SOLID186. KEYOPT(2)=0 IS SUGGESTED.
*****ANSYS VERIFICATION RUN ONLY*****
DO NOT USE RESULTS FOR PRODUCTION
S O L U T I O N O P T I O N S
PROBLEM DIMENSIONALITY. . . . . . . . . . . . .3-D
DEGREES OF FREEDOM. . . . . . UX UY UZ ROTX ROTY ROTZ
ANALYSIS TYPE . . . . . . . . . . . . . . . . .MODAL
EXTRACTION METHOD. . . . . . . . . . . . . .BLOCK LANCZOS
NUMBER OF MODES TO EXTRACT. . . . . . . . . . . 10
GLOBALLY ASSEMBLED MATRIX . . . . . . . . . . .SYMMETRIC
NUMBER OF MODES TO EXPAND . . . . . . . . . . . 10
ELEMENT RESULTS CALCULATION . . . . . . . . . .OFF
*** NOTE *** CP = 0.000 TIME= 00:00:00
SHELL181 and SHELL281 will not support real constant input at a future
release. Please move to section input.
*** NOTE *** CP = 0.000 TIME= 00:00:00
The conditions for direct assembly have been met. No .emat or .erot
files will be produced.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Internal nodes from 43998 to 44297 are created.
300 internal nodes are used for quadratic and/or cubic options of
BEAM188, PIPE288, and/or SHELL208.
L O A D S T E P O P T I O N S
LOAD STEP NUMBER. . . . . . . . . . . . . . . . 1
THERMAL STRAINS INCLUDED IN THE LOAD VECTOR . . YES
PRINT OUTPUT CONTROLS . . . . . . . . . . . . .NO PRINTOUT
DATABASE OUTPUT CONTROLS. . . . . . . . . . . .ALL DATA WRITTEN
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 22 and contact element type 22 has been set up. The
companion pair has real constant set ID 23. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 3.0609
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 23 and contact element type 22 has been set up. The
companion pair has real constant set ID 22. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.6035
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 24 and contact element type 24 has been set up. The
companion pair has real constant set ID 25. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 2.7893
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 25 and contact element type 24 has been set up. The
companion pair has real constant set ID 24. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.6670
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 26 and contact element type 26 has been set up. The
companion pair has real constant set ID 27. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 2.4344
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 27 and contact element type 26 has been set up. The
companion pair has real constant set ID 26. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.2769
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 28 and contact element type 28 has been set up. The
companion pair has real constant set ID 29. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 3.2044
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 29 and contact element type 28 has been set up. The
companion pair has real constant set ID 28. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.8833
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 30 and contact element type 30 has been set up. The
companion pair has real constant set ID 31. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 2.6992
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 31 and contact element type 30 has been set up. The
companion pair has real constant set ID 30. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.7212
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 32 and contact element type 32 has been set up. The
companion pair has real constant set ID 33. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 3.1818
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 33 and contact element type 32 has been set up. The
companion pair has real constant set ID 32. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.7511
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 34 and contact element type 34 has been set up. The
companion pair has real constant set ID 35. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 3.2093
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 35 and contact element type 34 has been set up. The
companion pair has real constant set ID 34. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.7849
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 36 and contact element type 36 has been set up. The
companion pair has real constant set ID 37. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 2.8622
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 37 and contact element type 36 has been set up. The
companion pair has real constant set ID 36. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.7993
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 38 and contact element type 38 has been set up. The
companion pair has real constant set ID 39. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 3.2658
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 39 and contact element type 38 has been set up. The
companion pair has real constant set ID 38. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.8514
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 40 and contact element type 40 has been set up. The
companion pair has real constant set ID 41. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 2.8593
Average contact pair depth 4.0000
Pinball region factor PINB 1.0000
The resulting pinball region 4.0000
*** NOTE *** CP = 0.000 TIME= 00:00:00
One of the contact searching regions contains at least 63 target
elements. You may reduce the pinball radius.
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 41 and contact element type 40 has been set up. The
companion pair has real constant set ID 40. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 1.8845
Average contact pair depth 2.5000
Pinball region factor PINB 1.0000
The resulting pinball region 2.5000
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 42 and contact element type 42 has been set up. The
companion pair has real constant set ID 43. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 2.2391
Average contact pair depth 4.0000
Pinball region factor PINB 1.0000
The resulting pinball region 4.0000
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 43 and contact element type 42 has been set up. The
companion pair has real constant set ID 42. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.4761
Average contact pair depth 2.5000
Pinball region factor PINB 1.0000
The resulting pinball region 2.5000
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 44 and contact element type 44 has been set up. The
companion pair has real constant set ID 45. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 3.3552
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 45 and contact element type 44 has been set up. The
companion pair has real constant set ID 44. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.7967
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 46 and contact element type 46 has been set up. The
companion pair has real constant set ID 47. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 3.1237
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 47 and contact element type 46 has been set up. The
companion pair has real constant set ID 46. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.5685
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 48 and contact element type 48 has been set up. The
companion pair has real constant set ID 49. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 3.0637
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 49 and contact element type 48 has been set up. The
companion pair has real constant set ID 48. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.8027
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 50 and contact element type 50 has been set up. The
companion pair has real constant set ID 51. Both pairs should have
the same behavior.
ANSYS will keep the current pair and deactivate its companion pair,
resulting in asymmetric contact.
Shell edge - solid surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Default influence distance FTOLN will be used.
Average contact surface length 3.2471
Average contact pair depth 4.0000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*** NOTE *** CP = 0.000 TIME= 00:00:00
Symmetric Deformable- deformable contact pair identified by real
constant set 51 and contact element type 50 has been set up. The
companion pair has real constant set ID 50. Both pairs should have
the same behavior.
ANSYS will deactivate the current pair and keep its companion pair,
resulting in asymmetric contact.
Auto surface constraint is built
Contact algorithm: MPC based approach
*** NOTE *** CP = 0.000 TIME= 00:00:00
Contact related postprocess items (ETABLE, pressure ...) are not
available.
Contact detection at: nodal point (normal to target surface)
MPC will be built internally to handle bonded contact.
Average contact surface length 2.6964
Average contact pair depth 2.5000
User defined pinball region PINB 0.86250
Default target edge extension factor TOLS 10.000
Initial penetration/gap is excluded.
Bonded contact (always) is defined.
*** NOTE *** CP = 0.000 TIME= 00:00:00
Max. Initial penetration 0 was detected between contact element 0 and
target element 0.
****************************************
*********** PRECISE MASS SUMMARY ***********
TOTAL RIGID BODY MASS MATRIX ABOUT ORIGIN
Translational mass | Coupled translational/rotational mass
0.25166E-03 0.0000 0.0000 | 0.0000 0.34581E-01 0.50068E-02
0.0000 0.25166E-03 0.0000 | -0.34581E-01 0.0000 0.25711E-01
0.0000 0.0000 0.25166E-03 | -0.50068E-02 -0.25711E-01 0.0000
------------------------------------------ | ------------------------------------------
| Rotational mass (inertia)
| 6.4515 0.51185 -3.5215
| 0.51185 9.6801 0.68875
| -3.5215 0.68875 3.5678
TOTAL MASS = 0.25166E-03
The mass principal axes coincide with the global Cartesian axes
CENTER OF MASS (X,Y,Z)= 102.17 -19.895 137.41
TOTAL INERTIA ABOUT CENTER OF MASS
1.5999 0.32438E-03 0.11573E-01
0.32438E-03 2.3014 0.74412E-03
0.11573E-01 0.74412E-03 0.84133
PRINCIPAL INERTIAS = 1.6001 2.3014 0.84115
ORIENTATION VECTORS OF THE INERTIA PRINCIPAL AXES IN GLOBAL CARTESIAN
( 1.000,-0.000, 0.015) ( 0.000, 1.000, 0.001) (-0.015,-0.001, 1.000)
*** MASS SUMMARY BY ELEMENT TYPE ***
TYPE MASS
1 0.326079E-05
2 0.326079E-05
3 0.326079E-05
4 0.326079E-05
5 0.326079E-05
6 0.159600E-03
7 0.429027E-05
8 0.777647E-05
9 0.197978E-05
10 0.735761E-05
11 0.186775E-05
12 0.704400E-05
13 0.696150E-05
14 0.368481E-05
15 0.459882E-05
16 0.330798E-05
17 0.197978E-05
18 0.111823E-04
19 0.391721E-05
20 0.411780E-05
21 0.568872E-05
Range of element maximum matrix coefficients in global coordinates
Maximum = 11792803.9 at element 0.
Minimum = 528.07874 at element 0.
*** ELEMENT MATRIX FORMULATION TIMES
TYPE NUMBER ENAME TOTAL CP AVE CP
1 60 BEAM188 0.000 0.000000
2 60 BEAM188 0.000 0.000000
3 60 BEAM188 0.000 0.000000
4 60 BEAM188 0.000 0.000000
5 60 BEAM188 0.000 0.000000
6 13038 SHELL181 0.000 0.000000
7 252 SOLID186 0.000 0.000000
8 432 SOLID186 0.000 0.000000
9 168 SOLID186 0.000 0.000000
10 396 SOLID186 0.000 0.000000
11 108 SOLID186 0.000 0.000000
12 384 SOLID186 0.000 0.000000
13 384 SOLID186 0.000 0.000000
14 210 SOLID186 0.000 0.000000
15 270 SOLID186 0.000 0.000000
16 408 SOLID186 0.000 0.000000
17 150 SOLID186 0.000 0.000000
18 588 SOLID186 0.000 0.000000
19 240 SOLID186 0.000 0.000000
20 216 SOLID186 0.000 0.000000
21 324 SOLID186 0.000 0.000000
22 228 CONTA174 0.000 0.000000
23 228 TARGE170 0.000 0.000000
24 435 CONTA174 0.000 0.000000
25 435 TARGE170 0.000 0.000000
26 156 CONTA174 0.000 0.000000
27 156 TARGE170 0.000 0.000000
28 354 CONTA174 0.000 0.000000
29 354 TARGE170 0.000 0.000000
30 108 CONTA174 0.000 0.000000
31 108 TARGE170 0.000 0.000000
32 348 CONTA174 0.000 0.000000
33 348 TARGE170 0.000 0.000000
34 342 CONTA174 0.000 0.000000
35 342 TARGE170 0.000 0.000000
36 204 CONTA174 0.000 0.000000
37 204 TARGE170 0.000 0.000000
38 234 CONTA174 0.000 0.000000
39 234 TARGE170 0.000 0.000000
40 300 CONTA174 0.000 0.000000
41 300 TARGE170 0.000 0.000000
42 159 CONTA174 0.000 0.000000
43 159 TARGE170 0.000 0.000000
44 519 CONTA174 0.000 0.000000
45 519 TARGE170 0.000 0.000000
46 210 CONTA174 0.000 0.000000
47 210 TARGE170 0.000 0.000000
48 204 CONTA174 0.000 0.000000
49 204 TARGE170 0.000 0.000000
50 288 CONTA174 0.000 0.000000
51 288 TARGE170 0.000 0.000000
Time at end of element matrix formulation CP = 0.
BLOCK LANCZOS CALCULATION OF UP TO 10 EIGENVECTORS.
NUMBER OF EQUATIONS = 159678
MAXIMUM WAVEFRONT = 0
MAXIMUM MODES STORED = 10
MINIMUM EIGENVALUE = 0.00000E+00
MAXIMUM EIGENVALUE = 0.10000E+31
Memory available (MB) = 0.0 , Memory required (MB) = 0.0
*****ANSYS VERIFICATION RUN ONLY*****
DO NOT USE RESULTS FOR PRODUCTION
*** FREQUENCIES FROM BLOCK LANCZOS ITERATION ***
MODE FREQUENCY (HERTZ)
1 21.68428282316
2 21.69024199150
3 21.69131650792
4 33.82973502105
5 33.83798485466
6 33.83938717704
7 37.06064329403
8 37.07091158484
9 37.07187102350
10 43.83753551706
Post-processing the modal results¶
This sections illustrates different methods to post-process the results of the modal analysis : PyMAPDL method, PyMAPDL result reader, PyDPF-Post and PyDPF-Core. All methods lead to the same result and are just given as an example of how each module can be used. The methods using DPF modules are commented in the code due to CI/CD issues but will run locally if uncommented.
# using MAPDL methods
mapdl.post1()
mapdl.set(1, 1)
mapdl.plnsol("u", "sum")
# using PyMAPDL result reader
mapdl_result = mapdl.result
mapdl_result.plot_nodal_displacement(0)
# Using DPF-Post
# from ansys.dpf import post
# solution_path = 'file.rst'
# solution = post.load_solution(solution_path)
# print(solution)
# displacement = solution.displacement(time_scoping=1)
# total_deformation = displacement.norm
# total_deformation.plot_contour(show_edges=True)
# Using DPF-Core
# from ansys.dpf import core
# model = core.Model(solution_path)
# results = model.results
# print(results)
# displacements = results.displacement()
# total_def = core.operators.math.norm_fc(displacements)
# total_def_container = total_def.outputs.fields_container()
# mesh = model.metadata.meshed_region
# mesh.plot(total_def_container.get_field_by_time_id(1))

Run PSD analysis¶
The response spectrum analysis is defined, solved and post-processed.
# define PSD analysis with input spectrum
mapdl.slashsolu()
mapdl.antype("spectr")
# power spectral density
mapdl.spopt("psd")
# use input table 1 with acceleration spectrum in terms of acceleration due to gravity
mapdl.psdunit(1, "accg", 9.81 * 1000)
# define the frequency points in the input table 1
mapdl.psdfrq(1, "", 1, 40, 50, 70.71678, 100, 700, 900)
# define the PSD values in the input table 1
mapdl.psdval(1, 0.01, 0.01, 0.1, 1, 10, 10, 1)
# set the damping ratio as 5%
mapdl.dmprat(0.05)
# apply base excitation on the set of nodes N_BASE_EXCITE in the y-direction from table 1
mapdl.d("N_BASE_EXCITE", "uy", 1)
# calculate the participation factor for PSD with base excitation from input table 1
mapdl.pfact(1, "base")
# write the displacent solution relative to the base excitation to the results file from the PSD analysis
mapdl.psdres("disp", "rel")
# write the absolute velocity solution to the results file from the PSD analysis
mapdl.psdres("velo", "abs")
# write the absolute acceleration solution to the results file from the PSD analysis
mapdl.psdres("acel", "abs")
# combine only those modes whose significance level exceeds 0.0001
mapdl.psdcom()
output = mapdl.solve()
print(output)
Out:
***** ANSYS SOLVE COMMAND *****
Time at start of random vibration closed-form solution CP= 0.
FREQUENCIES USED FOR RANDOM VIBRATION SOLUTION
MODE FREQUENCY
1 21.6843
2 21.6902
3 21.6913
4 33.8297
5 33.8380
6 33.8394
7 37.0606
8 37.0709
9 37.0719
10 43.8375
PERFORM INTEGRATION FOR DISPLACEMENT-TYPE QUANTITIES
PERFORM INTEGRATION FOR VELOCITY-TYPE QUANTITIES
PERFORM INTEGRATION FOR ACCELERATION-TYPE QUANTITIES
Modal covariance matrix computed CP= 0.
Quasi-static modal covariance matrix computed CP= 0.
Covariant-modal covariance matrix computed CP= 0.
Psd file created. CP= 0.
Time at start of random vibration mode combinations CP= 0.
BASE EXCITATION PROBLEM
***** SUMMARY OF OUTPUT QUANTITIES COMPUTED *****
AND WRITTEN ON RESULTS FILE
DISPLACEMENT-TYPE QUANTITIES COMPUTED
AND WRITTEN ON RESULTS FILE AS LOAD STEP 3
VALUES ARE RELATIVE TO BASE
THESE ARE STATISTICAL QUANTITIES WHICH
CANNOT BE COMBINED OR TRANSFORMED IN ANY
VECTORIAL SENSE
VELOCITY-TYPE QUANTITIES COMPUTED
AND WRITTEN ON RESULTS FILE AS LOAD STEP 4
VALUES ARE ABSOLUTE
THESE ARE STATISTICAL QUANTITIES WHICH
CANNOT BE COMBINED OR TRANSFORMED IN ANY
VECTORIAL SENSE
ACCELERATION-TYPE QUANTITIES COMPUTED
AND WRITTEN ON RESULTS FILE AS LOAD STEP 5
VALUES ARE ABSOLUTE
THESE ARE STATISTICAL QUANTITIES WHICH
CANNOT BE COMBINED OR TRANSFORMED IN ANY
VECTORIAL SENSE
Post-process PSD analysis¶
The response spectrum analysis is post-processed. First, the standard MAPDL POST1 postprocessor is used. Then, the MAPDL time-history POST26 postprocessor is used to generate the response power spectral density.
Note
The graph generated through POST26 is exported as a picture in the working directory. Finally, the results from POST26 are saved to Python variables to be plotted in the Python environment with the use of Matplotlib library.
Post-process PSD analysis in POST1¶
mapdl.post1()
mapdl.set(1, 1)
mapdl.plnsol("u", "sum")
mapdl.set("last")
mapdl.plnsol("u", "sum")
Post-process PSD analysis in POST26 (time-history post-processing)¶
mapdl.post26()
# allow storage for 200 variables
mapdl.numvar(200)
mapdl.cmsel("s", "MY_MONITOR")
monitored_node = mapdl.queries.ndnext(0)
mapdl.store("psd")
# store the psd analysis u_y data for the node MYMONITOR as the reference no 2
mapdl.nsol(2, monitored_node, "u", "y")
# compute the response power spectral density for displacement associated with variable 2
mapdl.rpsd(3, 2)
mapdl.show("png")
# plot the variable 3
mapdl.plvar(3)
# print the variable 3
mapdl.prvar(3)
# x-axis is set for Log X scale
mapdl.gropt("logx", 1)
# y-axis is set for Log X scale
mapdl.gropt("logy", 1)
# plot the variable 3
mapdl.plvar(3)
mapdl.show("close")
Post-process PSD analysis using Matplotlib¶
# store MAPDL results to python variables
mapdl.dim("frequencies", "array", 4000, 1)
mapdl.dim("response", "array", 4000, 1)
mapdl.vget("frequencies(1)", 1)
mapdl.vget("response(1)", 3)
frequencies = mapdl.parameters["frequencies"]
response = mapdl.parameters["response"]
# use Matplotlib to create graph
fig = plt.figure()
ax = fig.add_subplot(111)
plt.xscale("log")
plt.yscale("log")
ax.plot(frequencies, response)
ax.set_xlabel("Frequencies")
ax.set_ylabel("Response power spectral density")

Out:
Text(31.226314019097217, 0.5, 'Response power spectral density')
Exit MAPDL
mapdl.exit()
Total running time of the script: ( 0 minutes 46.884 seconds)