Changes between Version 7 and Version 8 of ThermalConduction


Ignore:
Timestamp:
08/15/16 13:24:22 (8 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ThermalConduction

    v7 v8  
    174174So in summary we have
    175175
    176 || $A$ || $\frac{\kappa}{\rho c_v  \left ( \lambda + 1 \right ) }$ ||
     176|| $A$ || $\frac{1}{\rho c_v  \left ( \lambda + 1 \right ) }$ ||
    177177|| $B_{ij} $ || $\kappa \delta{ij}$||
    178178|| $C$ ||  $\left ( 1 - \phi \left ( \lambda+ 1 \right ) \right )$ ||
     
    182182
    183183||$\alpha_0$ || $- \displaystyle \sum_{i} \frac{B_{\hat{i}} + B_{-\hat{i}}}{\Delta x^2}$ ||
    184 ||$\alpha_{\pm i}$ || $ \frac{B_{\pm \hat{i}}}{\Delta x^2}$ ||
     184||$\alpha_{\pm i}$ || $ \frac{\kappa_{\pm \hat{i}}}{\Delta x^2}$ ||
    185185|| $\alpha*_{\pm i \pm j}$ || $ 0$ ||
    186186
     
    192192
    193193
    194 Now in the code,
    195 || $A = A$ ||
    196 || $C = \frac{\Delta t A C}{\Delta x^2}$ ||
    197 || $D = \frac{\Delta t A D}{\Delta x^2}$ ||
     194Now in the code, $\kappa$ is assumed constant
     195|| $\mbox{A} = \kappa A$ ||
     196|| $\mbox{C} = \frac{\Delta t A C}{\Delta x^2}$ ||
     197|| $\mbox{D} = \frac{\Delta t A D}{\Delta x^2}$ ||
    198198|| $\mbox{Tlambda} = T_{\pm \hat{j}}^\lambda$ ||
    199199|| $\mbox{T} = T_{\pm \hat{j}}$ ||
    200200|| $\mbox{T0} = T $ ||
    201201|| $\mbox{T0lambda} = T^{\lambda}$ ||
    202 
    203 And stencil(0) has the coefficient of $T_0'$, and stencil(1:2*ndim) has the coefficients of $T_{\pm \hat{j}}'$ and source has everything else.
    204 
    205 
    206 
    207 
    208 Now if $\kappa$ is a constant, then we have
    209 
    210 ||$\alpha_0$ || $- \displaystyle \sum_{i} \frac{2B}{\Delta x^2}$ ||
    211 ||$\alpha_{\pm i}$ || $ \frac{B}{\Delta x^2}$ ||
    212 || $\alpha*_{\pm i \pm j}$ || $ 0$ ||
     202|| $\mbox{alpha} = 1 $ ||
     203
     204
     205And stencil(0) has the coefficient of $T_0'$, and stencil(1:2*ndim) has the coefficients of $T_{\pm \hat{j}}'$ and source has everything else.  Note that the coefficients $\alpha_0$ has a term for $+\hat{i}$ and $-\hat{i}$ but the way the code is written, it loops over each neighbor and adds the contribution from $-\hat{i}$ and $+\hat{i}$ on separate iterations.
     206
     207
     208
     209
     210
    213211
    214212