Title: Modeling Heat Transfer Problems with Generalized Boundary Conditions
1Modeling Heat Transfer Problems with Generalized
Boundary Conditions
- Heidi Chen
- 26 October, 2009
2Overview
- 2D Convection heat transfer homework problem
- Problem definition
- Derivation of weak form, element stiffness matrix
and element load vector - Modeling of geometry
- MATLAB program modifications
- Solution verification with ANSYS
3Problem Definition
4Derivation of the Weak Form
- Given the governing equation
- With essential boundary condition of specified
temperature T on GT - And natural boundary condition of specified heat
flux qn on Gq such that
5Derivation of the Weak Form
- Multiplication by w and integrating by parts
yields
- Application of the boundary conditions gives the
final weak form
6Ke and fe
- Converting to matrix notation and summing over
finite elements
Ke
fe
7Geometry and Boundary Conditions
8
2
8MATLAB Program
- 2dBVP User Input Functions
- InputGrid Input the geometry and set the element
type and number of spatial dimensions. - InputData Choose plots, and specify the sides
with essential and natural boundary conditions. - Conductivity
- specifyEssBCValues
- specifyNaturalBCValues
- ff Heat generation (body force)
9MATLAB Program
- 2dBVP Solving
- Preprocess
- Assemble K and f matrices using Gauss quadrature
method for numerical integration - Apply boundary conditions, modify K and f
matrices according to the weak form - Partition the matrix and solve for u
(temperature) and r (reaction fluxes) - Postprocess Plot temperature contour and heat
flux vectors
10MATLAB Program Modifications
- InputGrid
- Create mesh of geometry
if strcmpi(load_grid,'no')1 Use default box
grid xl 0.0 left location
of the range in the x direction xr 2.0
right location of the range in the x
direction yb 0.0 bottom
location of the range in the y direction yt
8.0 top location of the range in the
y direction nx 8 number
of elements in x direction ny 8
number of elements in y direction
ElementType 1 1 Q4 2 T3 nsd
2 number of spatial dimensions (2
(default) or 3) BoxGrid_2D(xl,xr,yb,yt,nx
,ny) Use the provided box grid generator end
Input geometry
8x8 mesh
Quadrilateral 4 Nodes
2D
11MATLAB Program Modifications
Top surface has non-zero natural BC
IsBoundaryCondition 0 0 1 0
No specified temperature on boundaries
dof vals
a
ß
Convection BC on top surface
if ( sideInd 3 ) Add the NC value below
alpha -5 beta 5(-5) end
12MATLAB Program Modifications
- Conductivity
- Input the conductivity matrix
D 10 0 0 15
kx 10 and ky15
- ff
- Modify heat generation term
No internal heat generation
value 0
- NodalSoln
- Input heat source
125 on node 63
R(63) R(63) 125
13MATLAB Program Modifications
- Integrands4side
- Modified K and f to account for the boundary
conditions
alpha,beta specifyNaturalBCValue(sideInd,felm.
x) if ( alpha 0) Ke Ke - felm.N'
felm.N alpha felm.detJxW end if ( beta
0) fe fe felm.N' beta
felm.detJxW end
Modify K
Modify f
14Results
15Results
- Comparing the Temperature contour plot with ANSYS
16Results
8x8 mesh
16x16 mesh
17Results
- Adaptive mesh using ANSYS
- Refine mesh around top surface and point source
18Thank you