Changes between Version 6 and Version 7 of ThermalConduction


Ignore:
Timestamp:
08/15/16 12:44:28 (8 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ThermalConduction

    v6 v7  
    172172and it is independent of direction, so it is just a scalar.
    173173
     174So in summary we have
     175
     176|| $A$ || $\frac{\kappa}{\rho c_v  \left ( \lambda + 1 \right ) }$ ||
     177|| $B_{ij} $ || $\kappa \delta{ij}$||
     178|| $C$ ||  $\left ( 1 - \phi \left ( \lambda+ 1 \right ) \right )$ ||
     179|| $D$ ||  $\phi \left ( \lambda + 1 \right )$ ||
     180
     181and
    174182
    175183||$\alpha_0$ || $- \displaystyle \sum_{i} \frac{B_{\hat{i}} + B_{-\hat{i}}}{\Delta x^2}$ ||
     
    177185|| $\alpha*_{\pm i \pm j}$ || $ 0$ ||
    178186
    179 Also if $\kappa$ is a constant, then we have
     187
     188And our equation becomes
     189
     190$T_0 + \Delta t \displaystyle \sum_{\parallel, \perp} AC \left [ \alpha_0 T^{\lambda+1}_0 +  \displaystyle \sum_{\pm j} \alpha_{\pm j} T^{\lambda+1}_{\pm \hat{j}}  \right ] = $
     191$T'_0 - \Delta t \displaystyle \sum_{\parallel, \perp} AD \left [  \alpha_0 T^{\lambda}_0T'_0 + \displaystyle \sum_{\pm j} \alpha_{\pm j} T^{\lambda}_{\pm \hat{j}} T'_{\pm \hat{j}}  \right ]$
     192
     193
     194Now 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}$ ||
     198|| $\mbox{Tlambda} = T_{\pm \hat{j}}^\lambda$ ||
     199|| $\mbox{T} = T_{\pm \hat{j}}$ ||
     200|| $\mbox{T0} = T $ ||
     201|| $\mbox{T0lambda} = T^{\lambda}$ ||
     202
     203And 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
     208Now if $\kappa$ is a constant, then we have
    180209
    181210||$\alpha_0$ || $- \displaystyle \sum_{i} \frac{2B}{\Delta x^2}$ ||