Description
Description
A slab 0 < x < L has a field u(t,x) (temperature or concentration) that diffuses with a diffusivity that depends on u itself: du/dt = 1/r d/dr (r D(u) du/dr ), u(t,a) = θ1, u(t,b) = θ2, u(0,x) = θ1.Three laws are studied: (1) linear D = D0 (1 + beta u), (2) power law D = D0 u^m, (3) exponential D = D0 exp(beta u).Define the Kirchhoff potential θ(u) = D(s)ds. Since D > 0, theta is strictly increasing and can be inverted. The flux is q = -D du/dr = -dθ/dr, so the nonlinearity disappears from the flux. At steady state 1/r (r θ/d)/d = 0, so θ(r)=+. The steady profile is therefore found without solving any PDE: transform the boundary values, draw a straight line, transform back.References:[1] Kirchhoff, G. (1894). Vorlesungen über die Theorie der Wärme (Vorlesungen über mathematische Physik, Vol. 4). Edited by M. Planck. Leipzig: B. G. Teubner. X + 210 pp.[2] Carslaw, H. S. and Jaeger, J. C., Conduction of Heat in Solids, 2nd ed., Oxford University Press, 1959.[3] Crank, J., The Mathematics of Diffusion, 2nd ed., Oxford University Press, 1975, which covers concentration-dependent diffusion.
u
∫
0
d
d
r
r
θ
1
(-)ln(r/a)
θ
2
θ
1
ln(b/a)
Workflow
Workflow
1
.Set the parameters (slab thickness, boundary values, D0, beta, m, end time).
2
.For each D(u): write down D(u), the potential θ(u) = D(s)ds
u
∫
0
3
.Solution of the full transient PDE with NDSolve. The boundary condition u(t,0) = θ1+(θ2-θ1)(1-Exp[-t/ε]) keeps the initial and boundary data consistent at the corner, so NDSolve gives no ibcinc warning. Plot snapshots at the chosen times.
4
.Steady state by Kirchhoff: compute θ(uL)=θb and θ(uR)=θa, form θ(x) = , and invert it to get u(x)=(-1+Sqrt[1+2 β θ[x]/D0])/β (case 1), u(x)= ((m+1) θ[x]/D0)^(1/(m+1)) (case 2), u(x)= Log[1+β θ[x]/D0]/β (case 3).
θa+
(θb-θa)Log[r/a]
Log[b/a]
5
.Steady flux per unit length: r q = r dθ/dr. It is the same at every r.
6
.Effective diffusivity: Deff = the mean of D over [θ1, θ2]. It is computed by direct NIntegrate of D.
7
.Validation: overlay the dashed steady profile on the transient curves
In[]:=
(*Parameters*)a=1;b=2;(*cylindricalannulusdimensions*)θ2=1;θ1=0.1;(*boundaryvalues*)D0=1;β=2;m=1.25;tEnd=5;
In[]:=
times={0.002,0.05,0.1,tEnd};
In[]:=
θ[r_]:=θa+
(θb-θa)Log[r/a]
Log[b/a]
In[]:=
ε=0.0001;
Case 1 - linear diffusivity D = D0 (1 + beta u)
Case 1 - linear diffusivity D = D0 (1 + beta u)
In[]:=
SOL=NDSolveValue[{D[u[t,r],t]==1/rD[D0(1+βu[t,r])rD[u[t,r],r],r],u[0,r]==θ1,u[t,b]==θ1+(θ2-θ1)(1-Exp[-t/ε]),u[t,a]==θ1},u,{t,0,tEnd},{r,a,b}]
Out[]=
InterpolatingFunction
In[]:=
p1=Plot[Evaluate[Table[SOL[tt,r],{tt,times}]],{r,a,b},PlotLegends->(StringForm["t = ``",#]&/@times),PlotStyle->Table[{Hue[(i+2)/5]},{i,6}],PlotRange->All,AspectRatio->1,Frame->True,GridLines->Automatic,FrameLabel->{Style["position",14],Style["concentration",14]}]
Out[]=
In[]:=
θa=First[x/.NSolve[(-1+Sqrt[1+2βx/D0])/β==θ1,x]]
Out[]=
0.11
In[]:=
θb=First[x/.NSolve[(-1+Sqrt[1+2βx/D0])/β==θ2,x]]
Out[]=
2.
In[]:=
c[x_]:=(-1+Sqrt[1+2βθ[x]/D0])/β
In[]:=
Show[p1,Plot[c[x],{x,a,b},PlotStyle->{Black,Dashed}]]
Out[]=
In[]:=
θ[x]
Out[]=
0.11+2.72669Log[x]
In[]:=
(*Steadyflux:q=-Ddu/dx=-dθ/du=-(θ(uL)-θ(uR))/(ul-uR)*)steadyFlux=xD[θ[x],x]
Out[]=
2.72669
In[]:=
(*Effective(mean)diffusivitybetweentheboundaryvalues*)Deff=NIntegrate[D0(1+βu),{u,θ1,θ2}]/(θ2-θ1)
Out[]=
2.1
Case 2 - power law D = D0 u^m
Case 2 - power law D = D0 u^m
In[]:=
SOL=NDSolveValue[{D[u[t,r],t]==1/rD[D0u[t,r]^mrD[u[t,r],r],r],u[0,r]==θ1,u[t,b]==θ1+(θ2-θ1)(1-Exp[-t/ε]),u[t,a]==θ1},u,{t,0,tEnd},{r,a,b},MaxStepSize->0.001]
Out[]=
InterpolatingFunction
In[]:=
p2=Plot[Evaluate[Table[SOL[tt,r],{tt,times}]],{r,a,b},PlotLegends->(StringForm["t = ``",#]&/@times),PlotStyle->Table[{Hue[(i+2)/5]},{i,6}],PlotRange->All,AspectRatio->1,Frame->True,GridLines->Automatic,FrameLabel->{Style["position",14],Style["concentration",14]}]
Out[]=
Case 3 - exponential diffusivity D = D0 exp(beta u)
Case 3 - exponential diffusivity D = D0 exp(beta u)
Discussion
Discussion
Geometry: The problem is posed on the cylindrical annulus a < r < b with a = 1, b = 2. The Kirchhoff step is the same as for a slab: with θ(u) = Integral of D(s) ds, the flux is q = -D du/dr = -dθ/dr, and the steady equation (1/r) d/dr (r dθ/dr) = 0 is linear. Only the base solution changes: θ is linear in ln r instead of in x, so θ(r) = θ(a) + (θ(b) - θ(a)) ln(r/a)/ln(b/a), and the constant-D reference curve is the logarithmic profile, not a straight line. The flux itself is no longer uniform: it is r q that is constant, so q(r) = q'/r falls by the factor b/a = 2 from the inner to the outer wall. The transient equation u_t = (1/r)(r D(u) u_r)_r = D u_rr + D'(u) u_r^2 + (D/r) u_r has the extra (D/r) u_r term, which the transform does not remove.
Results: with (u(a) = 0.1, u(b) = 1, D0 = 1, beta = 2, m = 1.25, a = 1, b = 2), the Kirchhoff calculation gives Deff = 2.1 and q' = 2.7267 for the linear law, Deff = 0.4911 and q' = 0.6376 for the power law, and Deff = 3.4265 and q' = 4.4490 for the exponential law. Here q' = r dθ/dr = (θ(b) - θ(a))/ln(b/a) is the flux per unit length of cylinder divided by 2 π (the total rate is 17.13, 4.006 and 27.95 respectively). The local flux has magnitude q'/r, so for the linear law it is 2.727 at r = a and 1.363 at r = b, directed toward the inner wall because u is larger at r = b.
Shape of the steady profiles: Since r D(u) du/dr = q' is constant, du/dr = q'/(r D(u)): the profile is steep where r D is small and flat where r D is large. Two effects add up. The factor 1/r makes the profile steepest at the inner wall even for constant D, which is why the logarithmic curve is the right reference. All three laws also have D increasing with u, so D is smallest at the cold inner wall r = a, which steepens the profile there further, and largest at the hot outer wall r = b, where the profile is flat. All three steady profiles therefore lie above the logarithmic constant-D curve (at r = 1.5 it gives u = 0.627, against 0.711 linear, 0.789 power law and 0.787 exponential). The ratio of the slope at r = a to the slope at r = b is (b/a) D(u(b))/D(u(a)): 2 x 2.5 = 5 for the linear law, 2 x 17.8 = 35.6 for the power law and 2 x 6.05 = 12.1 for the exponential law, where the factor 2 comes from the geometry and the rest from the contrast in D. The effect is strongest for the power law, where D varies by a factor of about 18 across the annulus.
Transient behaviour: Heat or mass enters at the outer wall r = b and penetrates inward toward the inner wall r = a, which is held at u = 0.1. The front moves faster where D is large. Ahead of the advancing front u is close to 0.1, so for the power law D is small there (D(0.1) = 0.056, against about 1.2 for the other two laws) and the front is sharper and slower. At t = 0.1 the linear and exponential profiles are already close to the steady state while the power-law profile is still far from it; by tEnd = 5 all three have settled. Because the power law has D = 0 at u = 0, the choice u(0,r) = 0.1 > 0 keeps the equation non-degenerate; with a zero initial value the front would have a finite speed.
Effective diffusivity: Deff = (θ(u(b)) - θ(u(a)))/(u(b) - u(a)) is the mean of D(u) over [u(a), u(b)] taken in u, not in r, so it does not depend on the geometry. The steady flux equals that of a linear problem with constant diffusivity Deff in the same annulus: q' = Deff (u(b) - u(a))/ln(b/a), that is q(r) = Deff (u(b) - u(a))/(r ln(b/a)). The only change from the slab formula q = Deff (uL - uR)/L is that L is replaced by r ln(b/a). It describes the steady state only. It is not the relaxation rate of the transient, which is controlled mainly by the smaller diffusivities.
Accuracy: The Kirchhoff steady state is exact, so any difference from the NDSolve result at tEnd is numerical. The power law is the most demanding case because D varies by a factor of about 18 and the profile is steepest near r = a, where it is about 36 times steeper than at r = b. The outer boundary value is ramped as 1 - exp(-t/ε) with ε = 0.0001 to keep the initial and boundary data consistent; this is complete well before the first plotted time, t = 0.002.
Limitations: The transform removes the nonlinearity from the flux but does not linearize the transient problem. It needs a scalar D(u) that does not depend on r, constant rho*Cp (for heat), radial symmetry, and Dirichlet or prescribed-flux boundaries. A prescribed flux on an annulus must be given as r q (or the total rate per unit length): fixing q at one wall fixes q', and the flux at the other wall follows as q'/r, so the two wall fluxes cannot be set independently. Convective or radiative boundaries need an iterative solve.