1

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.

xzczd
  • 65,995
  • 9
  • 163
  • 468
Dave
  • 51
  • 4
  • 1
    Welcome to MSE. What have you tried? – Rohit Namjoshi Nov 12 '21 at 01:19
  • 1
    Please edit your question and add what you tried. Better to have all the information in the question rather than in the comments. – Rohit Namjoshi Nov 12 '21 at 01:37
  • 1
    "This seems to work to give a numerical solution…" As mentioned in the linked post, what you've obtained here is already an analytic solution, it just involves an integral. (Don't forget InverseLaplaceTransform is an integral. ) – xzczd Nov 12 '21 at 03:35
  • 1
    Also, as shown in Nasser's answer therein, DSolve can directly handle this problem. Please check the Update carefully. – xzczd Nov 12 '21 at 03:45
  • I see. How can I specify that I want the analytical solution calculated only for a value of x, say x=0? – Dave Nov 12 '21 at 05:07
  • You need to add @xzczd in my comment or I won't get the reminder. You may want to read this post to learn more about @. Then, please check the document of ReplaceAll (/.) carefully by pressing F1. – xzczd Nov 12 '21 at 05:40
  • @xzczd Thanks a lot; what does the "2" refer to in there: heqn=D[u[x,t],t]==a*D[u[x,t],{x,2}]; – Dave Nov 12 '21 at 06:00
  • Please check the document of D carefully 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:16
  • 1
    It's better to show us the specific equation. Generally speaking, analytic solution of PDE is hard to achieve, at least the methods in the linked post won't work on PDE whose diffusion coefficient, etc. are function of t, I'm afraid. Using NDSolve to obtain a numeric solution is more practical. Is analytic solution necessary for you? – xzczd Nov 12 '21 at 06:43
  • @xzczd. I suppose the first step is to be sure there is no analytical solution, then if not a numerical one would be very useful too; should I edit this topic or make a new one? (cannot use the chat since I am too new apparently) – Dave Nov 12 '21 at 06:52
  • 1
    Since the new PDE is quite different from the one in this post, I think it's better to post a new question. – xzczd Nov 12 '21 at 06:58

0 Answers0