 # Contents of /trunk/doc/user/heatedblock.tex

Revision 1811 - (show annotations)
Thu Sep 25 23:11:13 2008 UTC (10 years, 5 months ago) by ksteube
File MIME type: application/x-tex
File size: 7965 byte(s)
Copyright updated in all files


 1 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 3 % 4 % Copyright (c) 2003-2008 by University of Queensland 5 % Earth Systems Science Computational Center (ESSCC) 6 7 % 8 % Primary Business: Queensland, Australia 9 % Licensed under the Open Software License version 3.0 10 11 % 12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 13 14 15 \section{Elastic Deformation} 16 \label{ELASTIC CHAP} 17 In this section we want to examine the deformation of a linear elastic body caused by expansion through a heat distribution. We want 18 a displacement field $u\hackscore{i}$ which solves the momentum equation 19 \index{momentum equation}: 20 \begin{eqnarray}\label{HEATEDBLOCK general problem} 21 - \sigma\hackscore{ij,j}=0 22 \end{eqnarray} 23 where the stress $\sigma$ is given by 24 \begin{eqnarray}\label{HEATEDBLOCK linear elastic} 25 \sigma\hackscore{ij}= \lambda u\hackscore{k,k} \delta\hackscore{ij} + \mu ( u\hackscore{i,j} + u\hackscore{j,i}) 26 - (\lambda+\frac{2}{3} \mu) \; \alpha \; (T-T\hackscore{ref})\delta\hackscore{ij} \;. 27 \end{eqnarray} 28 In this formula $\lambda$ and $\mu$ are the Lame coefficients, $\alpha$ is the 29 temperature expansion coefficient, $T$ is the temperature distribution and $T_{ref}$ a reference temperature. Note that 30 \eqn{HEATEDBLOCK general problem} is similar to eqn{WAVE general problem} introduced in section~\Sec{WAVE CHAP} but the 31 inertia term $\rho u\hackscore{i,tt}$ has been dropped as we assume a static scenario here. Moreover, in 32 comparison to the \eqn{WAVE stress} 33 definition of stress $\sigma$ in \eqn{HEATEDBLOCK linear elastic} an extra term is introduced 34 to bring in stress due to volume changes trough temperature dependent expansion. 35 36 Our domain is the unit cube 37 \begin{eqnarray} \label{HEATEDBLOCK natural location} 38 \Omega=\{(x\hackscore{i} | 0 \le x\hackscore{i} \le 1 \} 39 \end{eqnarray} 40 On the boundary the normal stress component is set to zero 41 \begin{eqnarray} \label{HEATEDBLOCK natural} 42 \sigma\hackscore{ij}n\hackscore{j}=0 43 \end{eqnarray} 44 and on the face with $x\hackscore{i}=0$ we set the $i$-th component of the displacement to $0$ 45 \begin{eqnarray} \label{HEATEDBLOCK constraint} 46 u\hackscore{i}(x)=0 & \mbox{ where } & x\hackscore{i}=0 \; 47 \end{eqnarray} 48 For the temperature distribution we use 49 \begin{eqnarray} \label{HEATEDBLOCK temperature} 50 T(x)= T\hackscore{0} e^{-\beta \|x-x^{c}\|}; 51 \end{eqnarray} 52 with a given positive constant $\beta$ and location $x^{c}$ in the domain. Later in \Sec{MODELFRAME} we will use 53 $T$ from a time-dependent temperature diffusion problem as discussed in \Sec{DIFFUSION CHAP}. 54 55 When we insert~\eqn{HEATEDBLOCK linear elastic} we get a second order system of linear PDEs for the displacements $u$ which is called 56 the Lame equation\index{Lame equation}. We want to solve 57 this using the \LinearPDE class to this. For a system of PDEs and a solution with several components the \LinearPDE class 58 takes PDEs of the form 59 \begin{equation}\label{LINEARPDE.SYSTEM.1 TUTORIAL} 60 -A\hackscore{ijkl} u\hackscore{k,l}){,j}=-X\hackscore{ij,j} \; . 61 \end{equation} 62 $A$ is of \RankFour and $X$ is of \RankTwo. We show here the coefficients relevant 63 for the we trying to solve. The full form is given in~\eqn{LINEARPDE.SYSTEM.1}. 64 The natural boundary conditions \index{boundary condition!natural} take the form: 65 \begin{equation}\label{LINEARPDE.SYSTEM.2 TUTORIAL} 66 n\hackscore{j} A\hackscore{ijkl} u\hackscore{k,l}=n\hackscore{j}X\hackscore{ij} \;. 67 \end{equation} 68 Constraints \index{constraint} take the form 69 \begin{equation}\label{LINEARPDE.SYSTEM.3 TUTORIAL} 70 u\hackscore{i}=r\hackscore{i} \mbox{ where } q\hackscore{i}>0 71 \end{equation} 72 $r$ and $q$ are each \RankOne. 73 We can easily identify the coefficients in~\eqn{LINEARPDE.SYSTEM.1 TUTORIAL}: 74 \begin{eqnarray}\label{LINEARPDE ELASTIC COEFFICIENTS} 75 A\hackscore{ijkl}=\lambda \delta\hackscore{ij} \delta\hackscore{kl} + \mu ( 76 \delta\hackscore{ik} \delta\hackscore{jl} 77 + \delta\hackscore{il} \delta\hackscore{jk}) \\ 78 X\hackscore{ij}=(\lambda+\frac{2}{3} \mu) \; \alpha \; (T-T\hackscore{ref})\delta\hackscore{ij} \\ 79 \end{eqnarray} 80 The characteristic function $q$ defining the locations and components where constraints are set is given by: 81 \begin{equation}\label{HEATEDBLOCK MASK} 82 q\hackscore{i}(x)=\left\{ 83 \begin{array}{cl} 84 1 & x\hackscore{i}=0 \\ 85 0 & \mbox{otherwise} \\ 86 \end{array} 87 \right. 88 \end{equation} 89 Under the assumption that $\lambda$, $\mu$, $\beta$ and $T\hackscore{ref}$ 90 are constant we may use $Y\hackscore{i}=\lambda+\frac{2}{3} \mu) \; \alpha \; T\hackscore{i}$. However, 91 this choice would lead to a different natural boundary condition which does not set the normal stress component as defined 92 in~\eqn{HEATEDBLOCK linear elastic} to zero. 93 94 Analogously to concept of symmetry for a single PDE, we call the PDE defined by~\eqn{LINEARPDE.SYSTEM.1 TUTORIAL} symmetric if 95 \index{symmetric PDE} 96 \begin{eqnarray}\label{LINEARPDE.SYSTEM.SYMMETRY TUTORIAL} 97 A\hackscore{ijkl} =A\hackscore{klij} \\ 98 \end{eqnarray} 99 This Lame equation is in fact symmetric, given the difference in $D$ and $d$ as compared to the scalar case. 100 The \LinearPDE class is notified of this fact by calling its \method{setSymmetryOn} method. 101 102 After we have solved the Lame equation we want to analyse the actual stress distribution. Typically the von--Mises stress\index{von--Mises stress} defined by 103 \begin{equation} 104 \sigma\hackscore{mises} = \sqrt{ 105 \frac{1}{6} ((\sigma\hackscore{00}-\sigma\hackscore{11})^2 106 + (\sigma\hackscore{11}-\sigma\hackscore{22})^2 107 + (\sigma\hackscore{22}-\sigma\hackscore{00})^2) 108 + \sigma\hackscore{01}^2+\sigma\hackscore{12}^2+\sigma\hackscore{20}^2} 109 \end{equation} 110 is used to detect material damage. Here we want to calculate the von--Mises and write the stress to a file for visualization. 111 112 \index{scripts!\file{diffusion.py}} 113 The following script, which is available in \file{heatedbox.py} in the \ExampleDirectory, solves the Lame equation 114 and writes the displacements and the von--Mises stress\index{von--Mises stress} into a file \file{deform.xml} in the \VTK file format: 115 \begin{python} 116 from esys.escript import * 117 from esys.escript.linearPDEs import LinearPDE 118 from esys.finley import Brick 119 #... set some parameters ... 120 lam=1. 121 mu=0.1 122 alpha=1.e-6 123 xc=[0.3,0.3,1.] 124 beta=8. 125 T_ref=0. 126 T_0=1. 127 #... generate domain ... 128 mydomain = Brick(l0=1.,l1=1., l2=1.,n0=10, n1=10, n2=10) 129 x=mydomain.getX() 130 #... set temperature ... 131 T=T_0*exp(-beta*length(x-xc)) 132 #... open symmetric PDE ... 133 mypde=LinearPDE(mydomain) 134 mypde.setSymmetryOn() 135 #... set coefficients ... 136 C=Tensor4(0.,Function(mydomain)) 137 for i in range(mydomain.getDim()): 138 for j in range(mydomain.getDim()): 139 C[i,i,j,j]+=lam 140 C[j,i,j,i]+=mu 141 C[j,i,i,j]+=mu 142 msk=whereZero(x)*[1.,0.,0.] \ 143 +whereZero(x)*[0.,1.,0.] \ 144 +whereZero(x)*[0.,0.,1.] 145 sigma0=(lam+2./3.*mu)*alpha*(T-T_ref)*kronecker(mydomain) 146 mypde.setValue(A=C,X=sigma0,q=msk) 147 #... solve pde ... 148 u=mypde.getSolution() 149 #... calculate von-Misses stress 150 g=grad(u) 151 sigma=mu*(g+transpose(g))+lam*trace(g)*kronecker(mydomain)-sigma0 152 sigma_mises=sqrt(((sigma[0,0]-sigma[1,1])**2+(sigma[1,1]-sigma[2,2])**2+ \ 153 (sigma[2,2]-sigma[0,0])**2)/6. \ 154 +sigma[0,1]**2 + sigma[1,2]**2 + sigma[2,0]**2) 155 #... output ... 156 saveVTK("deform.xml",disp=u,stress=sigma_mises) 157 \end{python} 158 159 \begin{figure} 160 \centerline{\includegraphics[width=\figwidth]{figures/HeatedBlock.eps}} 161 \caption{von--Mises Stress and Displacement Vectors.} 162 \label{HEATEDBLOCK FIG 2} 163 \end{figure} 164 165 Finally the the results can be visualize by calling 166 \begin{python} 167 mayavi -d deform.xml -f CellToPointData -m VelocityVector -m SurfaceMap & 168 \end{python} 169 Note that the filter \text{CellToPointData} is applied to create smooth representation of the 170 von--Mises stress. \fig{HEATEDBLOCK FIG 2} shows the results where the vertical planes showing the 171 von--Mises stress and the horizontal plane shows the vector representing displacements. 172

## Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision