I am new to Mathematica and I'm trying to find the analytical solution to the diffusion of excess pore pressure in a porous media using this equation: $$ \frac{\partial P}{\partial t} - \alpha \nabla^2 P=0 $$ but at the base of the domain, where there is no flux. We assume the P(h) is linear at all times.
The domain is of unit length h[0,1]. The pressure P is dimensionless by scaling it with lithostatic weight at base. Thus P[0,1] across the entire domain. At t=0, the pressure profile P is linear with a value of P(h=0) = 0 and at the bottom P(h=1)=1 I would like to get the analytical solution for the equation at the height h=0 (basal pressure). BC are: at h=1, P=0 at all time, and at the lower BC (h=0), there is no flux.
How would one find the solution with Matematica (v12.2 for instance)
Thanks so much for the help!
Based on (Analytic solution for 1D heat equation)
I tried:
heqn=D[u[x,t],t]==a*D[u[x,t],{x,2}];
ic=u[x,0]==1-x;
bc1=u[1,t]==0;
bc2=D[u[x,t],x]==0/. x->0;
a=0.01;
thisDir=ToFileName[
("FileName"/.NotebookInformation[EvaluationNotebook[]])
[[1]]];
SetDirectory[thisDir];
tset = LaplaceTransform[{heqn, bc1, bc2}, t, s] /. Rule @@ ic /.
HoldPattern@LaplaceTransform[a_, __] :> a
tsol[x_, s_] = u[x, t] /. First@DSolve[tset, u[x, t], x]
plotlst=Table[
ListLinePlot[
(Compile[{{x,_Real,1}},#]&@FT[tsol[x,#1]&,t])@Range[0,1,1/50],
DataRange->{0,1},PlotRange->{0,1}],{t,10^-3,10,1/50}];
plotlst//ListAnimate
(Export["a.gif",plotlst])
which requires an AddOn to be placed in AddOns/Application (https://library.wolfram.com/infocenter/MathSource/5026/#downloads)
This seems to work to give a numerical solution. But I don't know how to get an analytical solution.
InverseLaplaceTransformis an integral. ) – xzczd Nov 12 '21 at 03:35DSolvecan directly handle this problem. Please check the Update carefully. – xzczd Nov 12 '21 at 03:45ReplaceAll(/.) carefully by pressing F1. – xzczd Nov 12 '21 at 05:40Dcarefully by pressing F1. BTW, if you can read Chinese, check this: https://note.youdao.com/ynoteshare/index.html?id=abd51087f44c0b6a41ff6022d549dc41 – xzczd Nov 12 '21 at 06:16NDSolveto obtain a numeric solution is more practical. Is analytic solution necessary for you? – xzczd Nov 12 '21 at 06:43