Professional Documents
Culture Documents
Lecture 6 Ansys Mechanical APDL Advanced Examples
Lecture 6 Ansys Mechanical APDL Advanced Examples
Lecture 6 Ansys Mechanical APDL Advanced Examples
Advanced Examples
2
Contents
2. Attached Fork
3
1. Microscope Support System
https://www.youtube.com/watch?time_continue=539&v=wPp
uBOSU7_w&feature=emb_title
4
Example 5: Microscope support system
Technical Draws
5
Example 5: Microscope support system
FINISH
/CLEAR
SB1=1
SL1=10
SB2=1
SL2=30
EKL1=0.25
EKL2=0.25
EKLA=0.7
KRAFTX=0
KRAFTY=100
/PREP7
ET,1,PLANE42,,,3
MP,EX,1,200000
MP,NUXY,1,0.27
R,1,5.0
RECTNG,0,26,0,24
CM,R0,AREA
ASEL,NONE
CYL4,0,0,20
CYL4,25/SQRT(2),25/SQRT(2),1.5
CM,L0,AREA
CMSEL,A,R0
ASBA,R0,L0
6
ASEL,NONE
RECTNG,0,38,0,33
CM,R1,AREA
ASEL,NONE
RECTNG,0,32,0,25
CM,L1,AREA
CMSEL,A,R1
ASBA,R1,L1
ASEL,NONE
RECTNG,0,47,0,47
CM,R2,AREA
ASEL,NONE
RECTNG,0,39,0,39
CM,L2,AREA
CMSEL,A,R2
ASBA,R2,L2
RECTNG,26,29-SB1/2,24-SB1,24
RECTNG,29-SB1/2,29+SB1/2,24-SL1,24
RECTNG,29+SB1/2,32,24-SL1,24-SL1+SB1
RECTNG,38-SB2,38,33,36-SB2/2
RECTNG,38-SL2,38,36-SB2/2,36+SB2/2
RECTNG,38-SL2,38-SL2+SB2,36+SB2/2,39
CYL4,27,43,4.3/2
CYL4,43,27,4.3/2
ASEL,ALL
AOVLAP,ALL
7
AGLUE,ALL
Example 5: Microscope support system (continued)
ASEL,S,LOC,X,26,32
ASEL,R,LOC,Y,0,24
CM,B1A,AREA
LSLA,S
CM,B1L,LINE
LSEL,R,LENGTH,,SB1
LESIZE,ALL,,,SB1/EKL1
CMSEL,S,B1L
LSEL,R,LENGTH,,(6-SB1)/2
LESIZE,ALL,,,(6-SB1)/2/EKL1
CMSEL,S,B1L
LSEL,R,LENGTH,,SL1-SB1
LESIZE,ALL,,,(SL1-SB1)/EKL1
CMSEL,S,B1L
LSEL,R,LOC,X,29-SB1/2
LCCAT,ALL
CMSEL,S,B1L
LSEL,R,LOC,X,29+SB1/2
LCCAT,ALL
CMSEL,S,B1A
MSHKEY,1
AMESH,ALL 8
Example 5: Microscope support system (continued)
LSEL,S,LOC,Y,33,39
ASLL,S,1 ! Selects those areas -selected lines.
CM,B2A,AREA
LSLA,S
CM,B2L,LINE
LSEL,R,LENGTH,,SB2
LESIZE,ALL,,,SB2/EKL2
CMSEL,S,B2L
LSEL,R,LENGTH,,(6-SB2)/2
LESIZE,ALL,,,(6-SB2)/2/EKL2
CMSEL,S,B2L
LSEL,R,LENGTH,,SL2-SB2
LESIZE,ALL,,,(SL2-SB2)/EKL2
CMSEL,S,B2L
LSEL,R,LOC,Y,36-SB2/2
LCCAT,ALL
CMSEL,S,B2L
LSEL,R,LOC,Y,36+SB2/2
LCCAT,ALL
CMSEL,S,B2A
AMESH,ALL
9
Example 5: Microscope support system (continued)
MSHKEY,0
ESIZE,EKLA
ASEL,ALL
AMESH,ALL
LSEL,S,LCCA
LDELE,ALL
ARSYM,X,ALL
ARSYM,Y,ALL
NUMMRG,ALL
FINISH
10
Example 5: Microscope support system (continued)
/SOLUTION
LSEL,S,RADIUS,,4.3/2
NSLL,S,1
CSYS,1
NSEL,U,LOC,Y,270,360
CSYS,0
D,ALL,ALL,0
ALLSEL
F,NODE(26,0,0),FX,KRAFTX
F,NODE(32,0,0),FX,-KRAFTX
F,NODE(-26,0,0),FX,KRAFTX
F,NODE(-32,0,0),FX,-KRAFTX
F,NODE(0,33,0),FY,KRAFTY
F,NODE(0,39,0),FY,-KRAFTY
F,NODE(0,-33,0),FY,KRAFTY
F,NODE(0,-39,0),FY,-KRAFTY
! NLGEOM,ON
SOLVE
FINISH
11
Example 5: Microscope support system (continued)
Deformation
• Plot deformed shape.
• Plot stresses
• Plot and List reactions.
• List the deflections at each node.
/post1
Pldisp,1
Maximum Deflection
1.46549 (mm)
12
Deflection
• Plot deformed shape.
• Plot stresses
• Plot and List reactions.
• List the deflections at each node.
Plnsol,u,sum,0,1
acntr
13
Example 5: Microscope support system (continued)
Plnsol,s,eqv,0,1
14
Example 8: Attached Fork
15
Example 8: Attached Fork
16
Example 8: Attached Fork
FINISH Local,11,0,0,0,0,0,0,-90
/CLEAR WPCSYS
C***Parameter RECTNG,0,100,MST+RI,650
MST=35 CM,F1,AREA
NEZ1=12 ASEL,NONE
NED1=4 CYL4,25,210+MST+RI,10
EKL1=100/NEZ1 AGEN,4,ALL,,,0,100,0
RA=15 AGEN,2,ALL,,,50,0,0
RI=40 CM,HOLES,AREA
DRUCK=0.0967 ASEL,ALL
/TITLE, Screw-fasten ASBA,F1,HOLES
/PREP7 LSEL,S,RADIUS,,10
ET,1,SOLID45 LESIZE,ALL,EKL1/2
ET,2,MESH200,6 LSEL,S,LOC,Y, MST+RI
MP,EX,1,200000 LESIZE,ALL,,,NEZ1
MP,PRXY,1,0.3 ESIZE,EKL1
TYPE,2
AMESH,ALL
TYPE,1
ESIZE,,NED1
VEXT,ALL,,,0,0,-MST 17
Example 8: Attached Fork
NUMSTR,LINE,200 LARC,207,208,206,RI
ASEL,NONE L,208,200
LSEL,NONE A,200,201,202,203,204,205,206,207,208
CSYS,0 LESIZE,207,,,3.5*RI/EKL1
WPCSYS LESIZE,205,,,NED1
K,200,0,MST+RI,0 LESIZE,208,,,NED1
K,201,0,RA,0 LSEL,S,LINE,,200,204
K,202,RA,0,0 LCCAT,ALL
K,203,MST+RI,0,0 LSEL,S,LINE,,206,207
K,204,350,0,0 LCCAT,ALL
K,205,920,20,0 LSEL,ALL
K,206,920,MST,0 MSHKEY,1
K,207,MST+RI,MST,0 TYPE,2
K,208,MST,MST+RI,0 ESIZE,EKL1
L,200,201 AMESH,ALL
LARC,201,202,200,RA LSEL,S,LCCA
L,202,203 LDELE,ALL
L,203,204 TYPE,1
L,204,205 ESIZE,,NEZ1
L,205,206 VEXT,ALL,,,0,0,100
L,206,207 18
Example 8: Attached Fork
VSEL,NONE
K,300,1000,22.8,15
K,301,1000,22.8,85
K,302,1000,MST,85
K,303,1000,MST,15
V,KP(920,20,0),KP(920,20,100),KP(920,MST,100),KP(920,MST,0),300
,301,302,303
VSWEEP,ALL
NUMMRG,ALL
FINISH
/SOLUTION
C*** CONSTRAINTS
LSEL,S,LOC,Y,MST+RI+1,649
LSEL,R,LOC,Z,1,99
ASLL,S,1
NSLA,S,1
D,ALL,ALL,0
C*** PRESSURE
ASEL,S,LOC,Y,MST
SFA,ALL,,PRES,1000
ALLSEL
SOLVE
19
FINISH
Example 8: Attached Fork
20
Example 8: Attached Fork
21
Example 8: Attached Fork
22
Example 8: Attached Fork
23
Example 10. Design of Auger screw Conveyor
Customer Requirement
Capacity: 5kg/hour and
working continuously 16 hours
Nozzle diameter
HEAT-FORMING MACHINES
Auger screw Conveyor
25
Example 10. Design of Auger screw Conveyor
Reaction Forces
Required Torque
26
Example 10. Design of Auger screw Conveyor
finish CYL4,0,0,,,rshaft
/clear NUMSTR,VOLU, 99
!DEFINE DESIGN PARAMETERS HERE VEXT,ALL,,,0,0,lshaft
nblade = 15 ! number of blades VSEL,NONE
rshaft = 30 ! shaft radius [mm] ASEL,NONE
lshaft = 710 ! shaft length[mm] LOCAL,11,0,0,0,100
wblade = 11 ! blade width* [mm] WPCSYS
gapblade = 25 ! gap between blades* [mm] CYL4,0,0,rshaft,,inradblade
outradblade = 75 ! outer radius of the blades* [mm] NUMSTR,VOLU,100
inradblade = 55 ! inner radius of the blades* [mm] VEXT,ALL,,,0,0,wblade
dphioutradblade = 50 ! angle component of the outer radius of VGLUE,99,100
the blade* [degree] NUMSTR,VOLU,200
dphiinradblade = 360/5 - dphioutradblade ! angle component CYL4,0,0,inradblade,0,outradblade,dphioutradblade,wblade
of the inner radius of the blade* [degree] VSEL,S,VOLU,,200
ekl = 5! mesh size CSYS,1
/PREP7 VGEN,5,ALL,,,0,72,0
ET,2,PLANE2 VADD,100,200,201,202,203,204
ET,1,SOLID185 VSEL,A,VOLU,,100
MP,DENS,1,0.0000078 NUMSTR,VOLU,205
MP,EX,1,200000 VADD,ALL
MP,EZ,1,200000 27
MP,PRXY,1,0.32
Example 10. Design of Auger screw Conveyor
NUMSTR,AREA,200 VSWEEP,235,1,2
AADD,63,61,51,48,59,65 ASEL,S,AREA,,2
NUMSTR,AREA,200 NSLA,S,ALL
ASEL,S,AREA,,200 D,ALL,ALL,0
TYPE,1 ASEL,S,AREA,,1
ESIZE,EKL LSLA,S
MSHKEY,0 NSLL,S,1
AMESH,ALL NROTAT,ALL
ALLSEL,ALL *GET,NNODE,NODE,0,COUNT
AADD,50,60,62,58,53,64 F,ALL,FY,1000000/NNODE
VSWEEP,205,200,201 allsel,all
VGEN,nblade,205,,,0,0,gapblade + wblade nplot
ALLSEL,ALL /SOLU
VGLUE,ALL
ASEL,S,AREA,,1
TYPE,1
ESIZE, EKL
MSHKEY,0
AMESH,ALL
ALLSEL,ALL
28
Example 10. Design of Auger screw Conveyor
Standard Parameters
Materials Selections
29
Temperature-Dependent Plasticity Analysis
Analyze the tensile behavior:
- A linear elastic material model at room temperature
- A elastic-plastic material model at a variety of temperature
Some topics will be discussed:
o Inputting Linear Material Property Values
o Inputting Nonlinear Material Property Values
o Inputting Nonlinear Material Property Curves
o Inputting Linear Temperature-Dependent Material Property
o Inputting Nonlinear Temperature-Dependent Material Property
30
Temperature-Dependent Plasticity Analysis
Nonlinear Material Property
31
Temperature-Dependent Plasticity Analysis
Nonlinear Material Property
Types of Nonlinear Materials
• Nonlinear elastic
• Bi-linear elasto-plastic
• Multi-linear plastic
• Hyperelastic
• Viscoelastic
Ex. Glass-fabric-
reinforced
polymer
32
Temperature-Dependent Plasticity Analysis
Tangent Modulus:
• Tangent modulus is defined as the slope of a
line tangent to the stress-strain curve at a point
of interest.
• Tangent modulus can have different values
depending on the point at which it is
determined.
• Tangent modulus is equal to the Young's
Modulus when the point of tangency falls
within the linear range of the stress-strain curve
33
Temperature-Dependent Plasticity Analysis
Inputting Linear Material Property Values
MP, Lab, MAT, C0, C1, C2, C3, C4
MP,EX,1,7.31e10 ! Define Young's modulus (E=7.31e10): material #1
MP,PRXY,1,0.33 ! Define Poisson's ratio (v=0.33): material #1
Inputting Nonlinear Material Property Values
TB, Lab, MAT, NTEMP, NPTS, TBOPT, EOSOPT, FuncName
Activates a data table for material properties or special element input
36
Inputting Nonlinear Material Property Curves
• The properties of some materials cannot be defined with a few constants. In these
cases, multiple data points (exp., curves) are needed to define material behavior.
• To define nonlinear material property curves: TB and TBPT commands
i) The TB command is again used to specify:
- the material model,
- the material reference number,
- the number of temperatures that will be supplied,
- the number of data points that will be supplied.
ii) The TBPT command is then used to define new values for those data points.
TBPT, Oper, X1, X2, X3, ..., XN.
The OPER: either DEFI (define a new data point) or DELE (delete an existing data point)
37
Example: Use of commands to produce the material model shown in Fig. 5.7
38
Inputting Linear Temperature-Dependent Material Property
40
Temperature-Dependent Plasticity Analysis
- if any value for C1 though C4 is supplied, ANSYS creates a table using the
temperatures defined by the current MPTEMP command and calculates the
associated properties using the polynomial equation;
- Specifying Temperature Dependence:
The MPTEMP command is used to define a temperature table for linear
material properties;
MPTEMP, STLOC, T1, T2,T3, T4, T5, T6
Where,
- STLOC is the starting location in the table where the data will be entered;
- T1, T2,T3, T4, T5, T6 arguments are the temperatures to be defined.
41
Temperature-Dependent Plasticity Analysis
- Specifying Temperature Dependence:
MPTEMP, STLOC, T1, T2,T3, T4, T5, T6
MPDATA, Lab, MAT, STLOC,C1, C2, C3, C4, C5, C6.
Used to supply the material property data associated with those temperatures
Up to 6 temperatures may be defined with a single MPTEMP
up to 6 data points may be defined with a single MPDATA
The commands may be repeated as often as needed
Example: Define the temperature-dependent thermal conductivity
/PREP7 ! Enter the Preprocessor
MPTEMP,1,310,365,420,530,645,750 ! Define temps for mat #1
MPDATA,KXX,1,,0.055,0.059,0.063,0.075,0.089,0.104 ! Define KXXs for mat #1
42
Temperature-Dependent Plasticity Analysis
To change the temperature table, you must issue a blank MPTEMP command
(MPTEMP,,,,,,,,).
44
Temperature-Dependent Plasticity Analysis
/PREP7 ! Enter the Preprocessor
MPTEMP,1,0,500 ! New temperature data table, temp1=0, temp2=500
MPDATA,EX,1,,14.665E6,12.423e6 ! Define Young's modulus for both temperatures
MPDATA,PRXY,1,,0.3 ! Define Poisson's ratio for both temperatures
TB,PLASTIC,1,2,5,MISO ! Plastic MISO data table, mat #1, 2 temps, 5 pts
TBTEMP,0 ! Define temperature = 0 for TBPT command
TBPT,DEFI,0,29.33E3 ! New data points: Strain=0; Stress=29.33e3
TBPT,DEFI,1.59E-3,50E3 ! New data points: Strain=1.59e-3; Stress=50e3
TBPT,DEFI,3.25E-3,55E3 ! New data points: Strain=3.25e-3; Stress=55e3
TBPT,DEFI,5.91E-3,60E3 ! New data points: Strain=5.91e-3; Stress=60e3
TBPT,DEFI,1.06E-2,65E3 ! New data points: Strain=1.06e-2; Stress=65e3
TBTEMP,500 ! Define temperature = 500 for TBPT command
TBPT,DEFI,0,27.33E3 ! New data points: Strain=0; Stress=27.33e3
TBPT,DEFI,2.02E-3,37E3 ! New data points: Strain=2.02e-3; Stress=37e3
TBPT,DEFI,3.76E-3,40.3E3 ! New data points: Strain=3.76e-3, Stress=40.3e3
TBPT,DEFI,6.48E-3,43.7E3 ! New data points: Strain=6.48e-3; Stress=43.7e3
TBPT,DEFI,1.12E-2,47E3 ! New data points: Strain=1.12e-2; Stress=47e3
45
Example 1: Temperature-Dependent Plasticity Analysis
of a Plate with a Central Hole ((Textbook [1], page 163)
• A linear elastic material model at room temperature
• An elastic-plastic material model at a variety of temperatures
• Data: 2024-T6 aluminum, 15 cm wide and 10 cm tall, hole is 2 cm in diameter
46
Temperature-Dependent Plasticity Analysis of a Plate with a Central Hole
FINISH
/CLEAR
/PREP7 ! Enter the Preprocessor
RECTNG,0,0.15,0,0.1 ! Create a rectangle that is 0.15 x 0.1 m
CYL4,0.075,0.05,0.01 ! Create a circle centered at (0.075,0.05)
ASBA,1,2 ! Subtract area 2 (circle) from area 1 ! (rect.)
ET,1,PLANE182 ! Use PLANE182 elements
MPTEMP,,,,,,,, ! Clear any existing temperature tables
MPTEMP,1,25,100,149,204,260,316 ! Define temperatures for data table
MPDATA,EX,1,1,7.33e10,7.22e10,6.57e10,6.04e10,5.50e10,5.02e10 ! Define Young's modulus for 2024-T6 Al
MPDATA,PRXY,1,,.33,.33,.33,.33,.33,.33 ! Define Poisson's ratio for 2024-T6 ! aluminum
SMRT,3 ! Element size determined by Smart Size of 3
AMESH,ALL ! Mesh all areas
47
Temperature-Dependent Plasticity Analysis of a Plate with a Central Hole
AMESH,ALL ! Mesh all areas
LSEL,S,LOC,X,0.05,0.1 ! Select the lines in the plate center by x
LSEL,R,LOC,Y,0.025,0.075 ! Select the lines in the plate center by y
LREFINE,ALL,,,1,1,1,1 ! Refine the mesh attached to the selected
AREFINE,ALL,,,3,0,1,1 ! Refine the mesh for all areas in the plate
FINISH ! Finish and Exit Preprocessor
/SOLU ! Enter the Solution Processor
LSEL,S,LOC,X,0 ! Select the line at x=0
DL,ALL,,UX,0 ! Constrain the line from movement in x
KSEL,S,LOC,X,0 ! Select the keypoints at x=;0
KSEL,R,LOC,Y,0 ! Reselect the keypoint at (0,0)
DK,ALL,UY,0 ! Constrain the keypoint from movement in y
LSEL,S,LOC,X,0.15 ! Select the line at x=0.15
SFL,ALL,PRES,-200e6 ! Apply a pressure of -200e6 Pa to the line
ALLSEL,ALL ! Select everything in the model
TIME,1 ! Set time=1
TUNIF,25 ! Set model temperature=25 C
SOLVE ! Solve problem
FINISH ! Finish and Exit Solution
48
Temperature-Dependent Plasticity Analysis of a Plate with a Central Hole
49
Temperature-Dependent Plasticity Analysis of a Plate with a Central Hole
FINISH
/CLEAR
/PREP7 ! Enter the Preprocessor
RECTNG,0,0.15,0,0.1 ! Create a rectangle that is 0.15 x 0.1 m
CYL4,0.075,0.05,0.01 ! Create a circle centered at (0.075,0.05)
ASBA,1,2 ! Subtract area 2 (circle) from area 1 ! (rect.)
ET,1,PLANE182 ! Use PLANE182 elements
MPTEMP,,,,,,,, ! Clear any existing temperature tables
MPTEMP,1,25,100,149,204,260,316 ! Define temperatures for data table
MPDATA,EX,1,1,7.33e10,7.22e10,6.57e10,6.04e10,5.50e10,5.02e10 ! Define Young's modulus for 2024-T6 Al
MPDATA,PRXY,1,,.33,.33,.33,.33,.33,.33 ! Define Poisson's ratio for 2024-T6 ! aluminum
50
Temperature-Dependent Plasticity Analysis of a Plate with a Central Hole
51
Temperature-Dependent Plasticity Analysis of a Plate with a Central Hole
53
/POST1 ! Enter the General Postprocessor
PLNSOL,U,SUM,2,1 ! Plot deformation w/undeformed edge
PLNSOL,S,EQV, ! Plot equivalent (von Mises) stress
PLNSOL,EPPL,EQV,2,1 ! Plot von Mises plastic strain
54
/POST1 ! Enter the General Postprocessor
PLNSOL,U,SUM,2,1 ! Plot deformation w/undeformed edge
PLNSOL,S,EQV, ! Plot equivalent (von Mises) stress
PLNSOL,EPPL,EQV,2,1 ! Plot von Mises plastic strain
55
/POST1 ! Enter the General Postprocessor
PLNSOL,U,SUM,2,1 ! Plot deformation w/undeformed edge
PLNSOL,S,EQV, ! Plot equivalent (von Mises) stress
PLNSOL,EPPL,EQV,2,1 ! Plot von Mises plastic strain
56
Temperature-Dependent Plasticity Analysis of a Plate with a Central Hole
/TIME,1 ! Set time=1
SOLVE ! Solve the current model (25 C)
TIME,2 ! Set time=2
TUNIF,100 ! Set model temperature=100 C
SOLVE ! Solve the current model (100 C)
TIME,3 ! Set time=3
TUNIF,200 ! Set model temperature=200 C
SOLVE ! Solve the current model (200 C)
TIME,4 ! Set time=4
TUNIF,250 ! Set model temperature=250 C
SOLVE ! Solve the current model (250 C)
57
Example 2: 3D Thermal Model With Geometric Discontinuities
58
Example 2: 3D Thermal Model With Geometric Discontinuities
/tilte 3D Thermal Model
/clear
/PREP7 ! Enter the Preprocessor
K,1,-0.2,-0.2 ! Create a keypoint at (-0.2,-0.2)
K,2,-0.2,-0.1 ! Create a keypoint at (-0.2,-0.1)
K,3,-0.2,-0.025 ! Create a keypoint at (-0.2,-0.025)
K,4,-0.2,0.025 ! Create a keypoint at (-0.2,0.025)
K,5,-0.2,0.1 ! Create a keypoint at (-0.2,0.1)
K,6,-0.2,0.2 ! Create a keypoint at (-0.2,0.2)
L,1,2 ! Create a line between keypoints 1 and 2
L,2,3 ! Create a line between keypoints 2 and 3
L,3,4 ! Create a line between keypoints 3 and 4
L,4,5 ! Create a line between keypoints 4 and 5
L,5,6 ! Create a line between keypoints 5 and 5
K,7,-0.1,0.2 ! Create a keypoint at (-0.1,0.2)
K,8,-0.025,0.2 ! Create a keypoint at (-0.025,0.2)
K,9,0.025,0.2 ! Create a keypoint at (0.025,0.2)
K,10,0.1,0.2 ! Create a keypoint at (0.1,0.2)
K,11,0.2,0.2 ! Create a keypoint at (0.2,0.2)
L,6,7 ! Create a line between keypoints 6 and 7
L,7,8 ! Create a line between keypoints 7 and 8
L,8,9 ! Create a line between keypoints 8 and 9
L,9,10 ! Create a line between keypoints 9 and 10
L,10,11 ! Create a line between keypoints 10 and 11
ADRAG,1,2,3,4,5,,6,7,8,9,10 ! Drag lines 1–5 along lines 6–10
NUMMRG,ALL ! Merge all entities
59
NUMCMP,LINE ! Compress entity numbering
Example 2: 3D Thermal Model With Geometric Discontinuities
! Create volumes for the model geometry
VEXT,ALL,,,0,0,0.025 ! Extrude all areas by 0.025 in z direction
ASEL,S,LOC,Z,0 ! Select areas at z=0
VEXT,ALL,,,0,0,-0.025 ! Extrude selected areas by -0.025 in z dir.
ASEL,S,LOC,Z,0.025 ! Select areas at z=0.025
VEXT,ALL,,,0,0,0.175 ! Extrude selected areas by 0.175 in z dir.
ASEL,S,LOC,Z,-0.025 ! Select areas at z=-0.025
VEXT,ALL,,,0,0,-0.175 ! Extrude selected areas by -0.175 in z dir.
ASEL,S,LOC,X,-0.1,0.1 ! Select areas between x=-0.1 and 0.1
ASEL,R,LOC,Y,-0.1,0.1 ! Reselect areas between y=-0.1 and 0.1
ASEL,R,LOC,Z,0.2 ! Reselect areas at z =0.2
VEXT,ALL,,,0,0,0.6 ! Extrude selected areas by 0.6 in z dir.
ASEL,S,LOC,X,-0.1,0.1 ! Select areas between x=-0.1 and 0.1
ASEL,R,LOC,Y,-0.1,0.1 ! Reselect areas between y=-0.1 and 0.1
ASEL,R,LOC,Z,-0.2 ! Reselect areas at z =-0.2
VEXT,ALL,,,0,0,-0.6 ! Extrude selected areas by -0.6 in z dir.
60
Example 2: 3D Thermal Model With Geometric Discontinuities
61
Example 2: 3D Thermal Model With Geometric Discontinuities
62
Example 2: 3D Thermal Model With Geometric Discontinuities
63
Example 3: Pipe Flange Using Symmetry
• Model of a pipe flange: The pipe and the flange are made from high carbon steel with
a thermal conductivity of 40 W/mK. The pipe is a hollow cylinder 25 cm long, with
an inner radius of 8.75 cm and an outer radius of 10 cm. The flange is a hollow
cylinder 2.5 cm thick, with an inner radius of 10 cm and an outer radius of 25 cm.
The bolt holes are located 20 cm from the center of the flange. They are spaced at an
interval of 30 degrees and have a radius of 1.25 cm
• The fluid inside the pipe is assumed to be at 95oC (368 K)
with a convective heat transfer coefficient of 1000 W/m2K.
• The pipe is cooled via natural convection with a heat
transfer coefficient of 20 W/m2K. The surrounding air is at
25C (298 K).
• The goal is to find the steady-state temperature distribution
and thermal flux in the pipe flange.
64
FINISH
/CLEAR
/PREP7 ! Enter the Preprocessor
/VIEW,1,1,1,1 ! Set view to isometric (1,1,1)
CYLIND,0.1,0.0875,0,0.25,0,90 ! Create the pipe volume
CYLIND,0.25,0.0875,0,0.025,0,90 ! Create the flange volume
VOVLAP,ALL ! Overlap the created volumes
CM,PIPEFLANGE,VOLU ! Create a component of the volumes
VSEL,NONE ! Unselect all volumes
CYL4,0,0.2,0.0125,,,,.05 ! Create a volume for the first bolt hole
CSYS,1 ! Change to global cylindrical CS
VGEN,4,ALL,,,,-30,,,0 ! Generate volumes for the other bolt holes
VSEL,ALL ! Select all volumes
65
VSBV,PIPEFLANGE,ALL ! Subtract bolt hole cylinders from flange
ET,1,SOLID87 ! Use SOLID87 elements
MP,KXX,1,40 !Define thermal conductivity for material#1
SMRT,1 ! Use Element Smart Size of 1
VMESH,ALL ! Mesh all areas
EREF,ALL,,,1,0,1,1 ! Refine mesh for all elements
LSEL,S,LOC,Z,0.025 ! Select all lines at z=0.025
CSYS,1 ! Change to cylindrical coordinate system
LSEL,R,LOC,X,0.1 ! Reselect all lines at r=;0.1
LREFINE,ALL,,,3 ! Refine mesh at selected line (level 3)
ALLSEL,ALL ! Select everything in the model
66
/SOLU ! Enter the Solution Processor
ASEL,S,LOC,X,0.0875 ! Select all areas inside the pipe radius
SFA,ALL,1,CONV,1000,95 ! Apply heat convection to all selected areas
KSEL,S,LOC,X,0.1,1 !SelectallkeypointsatthepipeODandbeyond
KSEL,R,LOC,Z,0.025,1 !Reselectkeypointsatflangetopandbeyond
KSEL,A,LOC,X,0.25 !Addthekeypointsattheflangeouterdiameter
LSLK,S,1 ! Select all lines defined by the key point set
ASLL,S,1 ! Select all areas defined by the line set
SFA,ALL,1,CONV,20,25 ! Apply heat convection to all selected areas
ALLSEL ! Select everything
SOLVE ! Solve the model
FINISH ! Finish and Exit Solution
67
68
/POST1 ! Enter the General Postprocessor
PLNSOL,TEMP ! Plot temperature contours in the model
PLVECT,TF,,,,VECT,ELEM,ON,0 ! Plot thermal flux vectors
VSEL,S,LOC,X,0.1,0.25 ! Select volume associated with the flange
ESLV,S ! Select the elements attached to the volume
PLNSOL,TEMP ! Plot temperature contours in the flange
ESEL,INVE ! Invert the selected element set
PLNSOL,TEMP ! Plot temperature contours in the pipe
ASEL,S,LOC,Z,0.25 ! Select the area at the hot end of the pipe
NSLA,S ! Select the nodes attached to the area
ESLN,S ! Select the elements attached to the nodes
/VIEW,1,,,1 ! Set view to front (0,0,1)
/AUTO,1 ! Fit the view to the Graphics Window
PLNSOL,TEMP ! Plot temperature contours
FINISH ! Finish and Exit Postprocessor
SAVE ! Save the database ! 69
PLNSOL,TEMP ! Plot temperature contours in the model
70
PLVECT,TF,,,,VECT,ELEM,ON,0 ! Plot thermal flux vectors
71
References
Textbook
1. Thompson, K. M., and Thompson J. M., ANSYS Mechanical APDL for Finite
Element Analysis. Butterworth-Heinemann, 2017 (google book).
Reference texts
1. ANSYS Mechanical APDL Modeling and Meshing Guide. 2012.
2. ANSYS Mechanical APDL Introductory Tutorials. 2012
3. Larry J. Segerlind, Applied Finite Element Analysis, Second Edition, John Wiley
and Sons.
Software
1. Ansys Mechanical APDL
72
Computer Science for Mechanical Engineering
73