-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmemb_mod.mac
More file actions
171 lines (139 loc) · 4.78 KB
/
memb_mod.mac
File metadata and controls
171 lines (139 loc) · 4.78 KB
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
!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx!
!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx!
!
! Filename: memb_mod.mac, ANSYS APDL script
! by Kolchuzhin V., TU Chemnitz, MMT
! <vladimir.kolchuzhin@etit.tu-chemnitz.de>
!
! Issue: 1. Geometric and FE modeling of rectangular membrane:
! 3D FE-mesh -> *.db
! 2. Modal structural analysis
!
! Rev.:
!
!==========================================================================!
!
! y
!
! ^
! |
! \\\\\\\|\\\\\\ memb_h
! o------|------o o--o
! /| | |\ | |
! /| | |\ | |
! /| | |\ | |
! /| *------|\----> x | |
! /| |\ | |
! /| |\ | |
! /| |\ | |
! /o-------------o\ o--o
! //////////////
!
! ASCII-Schematic of the problem
!==========================================================================!
!
!
!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx!
!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx!
FINISH $/CLEAR $/CONTOUR,1,128
/VUP,,Z
!/PLOPTS,VERS,0 $/PLOPTS,DATE,0 $/PLOPTS,TITLE,0 $/PLOPTS,Logo,off
/TITLE, Rectangular membrane
project_name='Rectangular_membrane'
!--------------------------------------------------------------------------!
/PREP7
mm=1e-3 !
um=1e-6 !
!-------------------------! geometry parametrs !---------------------------!
! rectangular membrane
memb_a=1000.0*um ! length
memb_b=1000.0*um ! width
memb_h= 30.0*um ! thickness
! mesh quality
!el_size=5.0*um
memb_nx=20
memb_ny=20
memb_nz=4
!--------------------------------------------------------------------------!
!----------------------! Defines elements types !--------------------------!
!--------------------------------------------------------------------------!
!ET,1,SOLID45 ! 8-Node 3D
!ET,1,SOLID95 !20-Node 3D
ET,1,SOLID185 !20-Node 3D
!--------------------------------------------------------------------------!
!-------------------! Defines material properties !------------------------!
!--------------------------------------------------------------------------!
EMUNIT,MKS !
! material properties of <110> Si:
MP,EX, 1,169e9 ! Young's modulus, Pa
MP,NUXY,1,0.066 ! Poisson's ratio
MP,DENS,1,2329 ! density, kg/m3
!--------------------------------------------------------------------------!
!------------------------------! FEA Domain !------------------------------!
!--------------------------------------------------------------------------!
BLOCK,-memb_a/2,+memb_a/2,-memb_b/2,+memb_b/2,-memb_h/2,+memb_h/2
!--------------------------------------------------------------------------!
LSEL,S,LOC,X,-memb_a/2*0.8,+memb_a/2*0.8 ! Mesh density in x-direction
LESIZE,ALL,,,memb_nx,,1 !
LSEL,ALL
LSEL,S,LOC,Y,-memb_b/2*0.8,+memb_b/2*0.8 ! Mesh density in y-direction
LESIZE,ALL,,,memb_ny,,1 !
LSEL,ALL
LSEL,S,LOC,Z,-memb_h/2*0.8,+memb_h/2*0.8 ! Mesh density in vertical direction
LESIZE,ALL,,,memb_nz,,1 !
LSEL,ALL
!--------------------------------------------------------------------------!
! mesh
MAT,1
TYPE,1
VMESH,ALL
!--------------------------------------------------------------------------!
!--------------------! Defines components for BCs !------------------------!
!--------------------------------------------------------------------------!
allsel
nsel,s,loc,x,-memb_a/2
nsel,a,loc,x,+memb_a/2
nsel,a,loc,y,-memb_a/2
nsel,a,loc,y,+memb_a/2
cm,nodes_fix,node
allsel
nsel,s,loc,z,+memb_h/2
cm,nodes_load,node
cmsel,all $allsel
eplot
!==========================================================================!
!save,project_name,db,,all
!==========================================================================!
! apply BCs
cmsel,s,nodes_fix,node
d,all,all,0.0
cmsel,all $allsel
!==========================================================================!
/solu
num_mode=10 ! total number of modes
antype,modal ! modal analysis
modopt,lanb,num_mode
mxpand,num_mode
!pstress,on
solve
!==========================================================================!
/post1
*DIM,fmod,,num_mode,1 ! array num_modex1
*DO,I,1,num_mode,1
SET,1,I $PLDISP,1 $PLNS,U,SUM
*GET,fmod(I),ACTIVE,,SET,FREQ
/VIEW,,1,1,1
/ui,copy,save,emf,graph,color,reverse,portrait,yes,iqual ! hard copy
*ENDDO
!.....................
/OUT,%project_name%_mode_fq,dat
*VWRITE,fmod(1)
(E20.12)
/OUT
!--------------------------------------------------------------------------!
/DSCALE,,AUTO
!/DSCALE,,1 ! do not scale displacements
SET,1,1 ! set 1. mode
allsel
plns,u,sum
!==========================================================================!