/
linear_non_prestressed.py
148 lines (148 loc) · 4.97 KB
/
linear_non_prestressed.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
"""Script generated by ansys-mapdl-core version 0.59.dev0"""
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(loglevel="WARN")
mapdl.run("/batch,list")
mapdl.run("/verify,linear_non_prestressed")
mapdl.title("linear_non_prestressedSolving brake squeal problem using linear non pre-stressed modal solve")
mapdl.run("/graphics,power ") # turn on power graphics
mapdl.run("/rgb,index,100,100,100,0 ") # specifying RGB values for images and contour plot
mapdl.run("/rgb,index,80,80,80,13")
mapdl.run("/rgb,index,60,60,60,14")
mapdl.run("/rgb,index,0,0,0,15")
mapdl.run("/show,png")
mapdl.run("/out,scratch")
mapdl.prep7()
mapdl.shpp("off", "", "nowarn") # turn off shape checking
mapdl.cdread("comb", "disc_pad_model", "cdb", "", "") # Read disc_pad_model.cdb file
mapdl.allsel("all")
# ################################################################################################
# disc_pad_model.cdb file contains the following information
#
# 1. Nodes and elements of the brake disc pad model
# ****************************************************
#
# 2. Element definition and their key-option settings
# ****************************************************
#
# The model is meshed with Solid186 elements with reduced integration
# element technology
#
# -----------------------------------------------------------------------
# ET,1,SOLID186
# KEYOPT,1,2,0
# ------------------------------------------------------------------------
#
#
# 3. Material properties for the brake disc pad model
# ******************************************************
#
# All components of the disc pad model is assigned with
# linear elastic isotropic materials
#
# -----------------------------------------------------------------------
# MP,DENS,1,7850.,
# MP,EX,1,200000000000.,
# MP,NUXY,1,0.3,
# -----------------------------------------------------------------------
#
#
# 4. Contact pair definition
# ******************************
#
# Frictional contact pairs are used to define contact between brake pads
# and disc
#
# Bonded contact pairs are used to define contact for other components of
# the braking system.
#
# Friction contact pair definition
#
# --------------------------------------------------------------------------
# *set,tid,31
# *set,cid,30
# r,tid
# r,cid
# et,tid,targe170
# et,cid,conta174
# keyo,cid,10,2
# keyo,cid,12,0
# mp,mu,cid,0.3
# keyo,cid,2,0
# keyo,cid,9,1
# keyo,cid,5,1
# keyo,cid,7,0
# ------------------------------------------------------------------------------
#
# Bonded contact pair definition
#
# ----------------------------------------------------------------------------------
# *set,tid,35
# *set,cid,34
# r,tid
# r,cid
# et,tid,targe170
# et,cid,conta174
# keyo,cid,12,5
# keyo,cid,4,2
# keyo,cid,2,2
# keyo,cid,9,1
# keyo,cid,7,0
# ------------------------------------------------------------------------------------
#
# 5. Boundary conditions and loading applied on the brake disc and pads
# ************************************************************************
#
# Components are formed with nodes and element to specify boundary conditions
#
# Nodes belonging to component FIXEDSU is fixed in all directions.
#
# -----------------------------------------------------------------------------------
# cmsel,s,FIXEDSU,node
# d,all,all
# ------------------------------------------------------------------------------------
#
# Nodes belonging to the pads surface where pressure loading is applied are
# grouped to form components named _ZERODISPUX and _ZERODISPUY.
#
# Nodes belonging to component _ZERODISPUX are constrained in X direction
#
# Nodes belonging to component _ZERODISPUY are constrained in Y direction
#
# -------------------------------------------------------------------------------------
# cmsel,s,_ZERODISPUX,node
# d,all,ux,0
# cmsel,s,_ZERODISPUY,node
# d,all,uy,0
# --------------------------------------------------------------------------------------
#
#
#
# ###############################################################################################
mapdl.allsel("all")
mapdl.run("fini")
# #########################################
# Analysis settings and solution control
# ##########################################
mapdl.run("/solu")
mapdl.antype("modal") # Perform modal analysis
mapdl.modopt("unsym", 30) # Use UNSYM eigen solver and extract 30 modes
mapdl.mxpand(30, "", "", "") # Expand 30 modes
mapdl.nropt("unsym") # Unsymmetric Newton Raphson option
mapdl.cmsel("s", "c1_r", "")
mapdl.cmsel("a", "c2_r", "")
mapdl.cm("E_ROTOR", "elem") # Create a component with target elements attached to disc
mapdl.allsel("all")
mapdl.cmrotate("e_rotor", "", "", 2, "") # Rotate the target elements to generate sliding friction contact
mapdl.solve()
mapdl.finish()
mapdl.run("/post1")
mapdl.run("/out,")
mapdl.set("list")
mapdl.set(1, 21)
mapdl.plnsol("u", "sum") # Plot the mode shape for mode 21
mapdl.set(1, 22)
mapdl.plnsol("u", "sum") # Plot the mode shape for mode 22
mapdl.run("/show,close")
mapdl.finish()
mapdl.run("/clear,nostart")
mapdl.exit()