From first principles
Derive the anisotropic diffusion operator from a rotated material law
Choose the principal axes of a homogeneous medium. Along them the measured flux response is diagonal, so heat conduction in direction 1 has coefficient \(k_1>0\) and in direction 2 has \(k_2>0\). Let orthogonal matrix \(R\) map principal-axis components into laboratory coordinates. Gradients rotate back with \(R^\mathsf T\), while the calculated flux rotates forward with \(R\). The material law in laboratory axes is therefore
Insert this vector law into local steady conservation \(\nabla\cdot\mathbf q=s\), with \(s\) a positive volumetric source. Expanding for constant \(K\) gives the mixed derivative explicitly:
Positive principal conductivities make \(\nabla T^\mathsf T K\nabla T\) nonnegative, the basic energy property that a spatial discretization should respect. In a rotated material, the flux need not be perpendicular to an isotherm. A face formula using only the difference of two temperatures separated along the face normal may therefore omit a real transverse-gradient contribution.
Derivation and applications
When a two-point face flux is exact for anisotropic diffusion
A discretization can preserve conservation and still send heat in the wrong direction. Consider a planar face with area \(A\), outward unit normal \(\mathbf n\) from cell \(P\) toward cell \(N\), and centre displacement \(\mathbf d=\mathbf x_N-\mathbf x_P\). Let the constant material tensor \(K\) be symmetric positive definite. For a linear temperature field \(T=T_0+\mathbf g\cdot\mathbf x\), the continuum face rate and measured neighbour difference are
A candidate two-point law is
For it to reproduce the exact flux for every possible gradient, the two vectors multiplying \(\mathbf g\) must be identical. This gives a joint mesh-material condition:
On a grid aligned with a principal axis and with cell centres aligned along the normal, this relation gives the familiar transmissibility. Otherwise split \(AK\mathbf n\) into a component parallel to \(\mathbf d\) and a remainder \(\mathbf c\) perpendicular to it. Taking a scalar product with \(\mathbf d\) yields
The correction requires a second gradient component, usually reconstructed from more cells. Using one corrected flux with opposite signs for the two neighbours still preserves conservation. The derivation checks consistency for an exactly linear field; monotonicity and stability require separate tests.
Worked example
Test a Cartesian face in a tilted material
Let \(A=1.00\) m², \(\mathbf d=(0.200,0)\) m, \(\mathbf n=(1,0)\) and \(K\) have entries \((K_{xx},K_{xy},K_{yy})=(4,1,2)\) W/(m K). For \(\mathbf g=(0,3.00)\) K/m the neighbour difference vanishes, yet the exact outward flux is \(-3.00\) W. The decomposition gives \(\tau=20.0\) W/K and \(\mathbf c=(0,1)\) in compatible units. The entire flux therefore comes from the reconstructed transverse gradient.
Second application
Choose a skew cell arrangement that needs no correction
Keep the same tensor and normal but set \(\mathbf d=(0.200,0.0500)\) m. It lies along \((4,1)=K\mathbf n\), so \(\tau=20.0\) W/K and \(\mathbf c=0\). For a gradient \((2.00,-1.00)\) K/m the neighbour temperature rise is \(0.350\) K, giving \(-7.00\) W. Direct evaluation \(-[4(2)+1(-1)]\) agrees. Geometric orthogonality to the physical face is not required when the tensor itself tilts the relevant direction.
Begin with an energy and a constitutive law
In a conducting sheet with directional properties, heat flux is
where \(K\) is symmetric positive definite. With constant volumetric capacity, conservation gives a diffusion operator proportional to \(\nabla\cdot(K\nabla T)\). For insulating boundaries and no sources, multiplying by \(T\) and integrating by parts gives a decay term \(-\int\nabla T^TK\nabla T\). It is nonpositive because the eigenvalues of \(K\) are positive. This energy test checks the sign of a discrete spatial operator even when flux and gradient do not point along the same line.
Let the principal conductivities be 4 and 1. Rotating the principal axes through 45 degrees gives
Along the diagonal direction \((1,1)/\sqrt2\), multiplying by \(K\) scales the gradient fourfold; along the other diagonal the scale is one. Along the Cartesian \(x\) direction a transverse flux component appears. The off-diagonal entries express a real constitutive response and cannot be dropped by refining the same incorrect stencil.
A patch test for a face flux
Use the exact affine temperature \(T(x,y)=y\), whose gradient is \((0,1)^T\). The flux is \((-1.5,-2.5)^T\). A vertical face with outward normal \(e_x\) therefore carries \(-1.5\) units of flux per unit length. A two-point formula based only on temperatures at the left and right cell centres sees identical temperatures and returns zero. Both fields have zero divergence in the interior because each flux is constant, so checking interior residuals alone would miss the incorrect boundary transport. Compare individual face fluxes as well as cell residuals in a linear patch test.
To recover the normal flux one can reconstruct the full gradient using neighbouring data, or choose a weak form integrating \((\nabla v)^TK\nabla T\) over each element. On a triangle with affine basis functions the gradients are constant, so constant \(K\) yields an element matrix \(A_{ij}=|E|\nabla\phi_i^TK\nabla\phi_j\). Symmetry is immediate and the row sums vanish because the basis functions sum to one.
Distinguish length scales from transport axes
For constant \(K\), a Fourier mode \(e^{i\xi\cdot x}\) decays with factor \(e^{-t\xi^TK\xi}\) when capacity is one. At unit wave number, a mode along the fast principal axis falls to \(e^{-4}\approx0.0183\) after one unit of time; a perpendicular one retains \(e^{-1}\approx0.368\). This test excites the two conductivities separately. On an elongated mesh the mesh dimensions also affect the fastest discrete time scale, so the same physical tensor can require different explicit step sizes on two grids.
Rotate the temperature, keeping the material fixed
The directional heat transport along a unit vector \(n\) is controlled by \(n^TKn\) when the imposed temperature gradient is parallel to \(n\). For the worked tensor and \(n=(1,0)^T\), this effective conductivity is 2.5 even though the full flux has a transverse component. If the specimen instead has insulated long sides, then its transverse gradient can adjust until transverse flux vanishes. Solving \(1.5T_x+2.5T_y=0\) gives \(T_y=-0.6T_x\) and effective longitudinal flux \(-1.6T_x\). The same material therefore gives different one-dimensional reductions under different boundary constraints.
Construct a positive directional stencil for a rotated tensor
For constant \(K=\left(\begin{smallmatrix}a&b\\b&c\end{smallmatrix}\right)\), the diffusion operator is \(a u_{xx}+2b u_{xy}+c u_{yy}\). On a square grid, the centred second difference along the lattice diagonal \((1,1)\), divided by \(h^2\), approximates \((\partial_x+\partial_y)^2u\), including the required mixed derivative with positive sign. For \(b\ge0\) one can therefore combine the three directional second differences with coefficients \(a-b,c-b,b\) along the horizontal, vertical and positive diagonal directions. Expanding these terms recovers the desired operator for every quadratic field.
If all three coefficients are nonnegative, a local maximum has a nonpositive spatial diffusion update. This sign property supports a discrete maximum principle and, with a sufficiently small explicit time step, a positive averaging update. For negative \(b\), the opposite diagonal changes the mixed derivative sign and the analogous coefficients involve \(|b|\). Positive definiteness of the continuum tensor only requires \(ac>b^2\), which is weaker than both \(a\ge|b|\) and \(c\ge|b|\). A physically valid material can therefore defeat this particular compact positive stencil.
Reach a strongly tilted direction using a wider stencil
Set \(a=1,\ b=1.5,\ c=4\). The determinant \(4-2.25=1.75\) is positive and both eigenvalues are positive. Yet the compact three-direction construction would assign horizontal coefficient \(-0.5\). To see the numerical problem, give the centre value zero, both horizontal neighbours value one and all diagonal and vertical neighbours zero. The centre is a minimum, but the compact operator returns \(-1/h^2\). An explicit positive time step would drive that minimum below zero, contradicting the smoothing behaviour expected from a monotone diffusion discretisation.
Consider instead a second difference along the longer lattice vector \((1,2)\). Dividing by \(h^2\) with coordinate increments \(h,2h\) approximates \(u_{xx}+4u_{xy}+4u_{yy}\). Multiplying it by \(0.75\) produces the desired mixed coefficient three. The remaining horizontal and vertical coefficients are \(1-0.75=0.25\) and \(4-3=1\), both positive. At an interior node this wider stencil has all positive neighbour couplings. On the quadratic patch \(u=xy\) the exact operator value is three; the long diagonal evaluates the centred difference as four, and its weighted contribution is exactly three while both axial differences vanish.
The longer reach introduces a boundary question: a point one row from the edge may lack a neighbour two rows away. Replacing it ad hoc with a nearest available value can destroy consistency or positivity. A boundary treatment, a mesh aligned to the material axes or a compatible finite-element formulation must address that issue separately. Selecting a positive interior stencil alone does not prove a complete domain discretisation monotone.
For the wider stencil an explicit update at an interior node has centre coefficient \(1-2(0.25+1+0.75)\Delta t/h^2\) for unit heat capacity. Preserving nonnegative weights therefore requires \(\Delta t\le h^2/4\) in the units of this example. Positive face couplings are necessary for this argument, while a compatible time step supplies the remaining condition.
Change parameters · Explore the worked calculation
Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.