/
partial_prestressed.py
183 lines (183 loc) · 6.62 KB
/
partial_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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
"""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,partial_prestressed")
mapdl.title("partial_prestressedSolving brake squeal problem using partial 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
# --------------------------------------------------------------------------------------
#
# Surface effect element SURF154 are used to apply pressure load on pad surface.
# Tabular loading (_LOADVARI4059 and _LOADVARI4061)are defined with time and load
# values.
#
#
# ###############################################################################################
mapdl.allsel("all")
mapdl.run("fini")
# #########################################
# Analysis settings and solution control
# ##########################################
mapdl.run("/solu")
mapdl.antype("static") # Perform static analysis
mapdl.outres("all", "all")
mapdl.nropt("unsym") # Unsymmetric Newton Raphson option
mapdl.rescontrol("define", "all", 1) # Writing restart files
mapdl.nlgeom("on") # Turn on large deflection
mapdl.autots("on") # Auto time stepping turned on
mapdl.time(1.0) # specify end time
mapdl.esel("s", "type", "", 124) # Select element type 124
mapdl.nsle("s", "all") # Select nodes attached to the element
mapdl.sf("all", "pres", "%_loadvari4059%") # Apply surface pressure on the selected nodes
mapdl.esel("s", "type", "", 125) # Select element type 125
mapdl.nsle("s", "all") # Select nodes attached to the element
mapdl.sf("all", "pres", "%_loadvari4061%") # Apply surface pressure on the selected nodes
mapdl.nsel("all")
mapdl.allsel("all")
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.solve() # Perform first static solve
mapdl.finish()
mapdl.run("/post1")
mapdl.set("last")
mapdl.esel("s", "type", "", 30, 32, 2) # select contact elements attached to the brake pad
mapdl.run("/view,1,1,1,1")
mapdl.plesol("cont", "stat") # Plot the contact status for the selected elements
mapdl.plesol("cont", "slide") # Plot the slide values for the selected contact elements
mapdl.allsel("all")
mapdl.finish()
mapdl.run("/SOLU")
mapdl.antype("static", "restart", "", "", "perturb") # Restart from last load step and sub step of previous
# static solution to perform perturbation analysis
mapdl.perturb("modal", "", "", "", "") # Perform perturbation modal solve
mapdl.run("cmrot,E_ROTOR,,,2 ") # Rotate the target element to generate sliding frictional contact
mapdl.solve("elform") # Regenerate the element matrices
mapdl.outres("all", "all")
mapdl.modopt("unsym", 30) # Use UNSYM eigen solver and extract 30 modes
mapdl.mxpand(30, "", "", "") # Expand 30 modes
mapdl.solve()
mapdl.finish()
mapdl.run("/post1")
mapdl.file("", "rstp")
mapdl.run("/out,")
mapdl.set("list")
mapdl.set(1, 21)
mapdl.run("/dscale,1,auto")
mapdl.plnsol("u", "sum") # Plot the mode shape for mode 21
mapdl.set(1, 22)
mapdl.run("/dscale,1,auto")
mapdl.plnsol("u", "sum") # Plot the mode shape for mode 22
mapdl.run("/show,close")
mapdl.finish()
mapdl.run("/clear,nostart")
mapdl.exit()