0

I have a system of first order non-linear PDE's, but some of my boundary conditions are also of first order, so mathematica cannot solve it. When I looked online for similar problems , I found some but not of the same order of boundary conditions ,and there they use the FiniteElement method, however, FiniteElement cannot be used for nonlinear-PDE's. So the question becomes, is there a method for NDSolve that can handle these problems?

Edit, here is the code:

P[x_, y_, t_] = e[x, y, t]/(\[Gamma] - 1) ; 
e[x_, y_, t_] = (\[Gamma] - 1) \[Rho][x, y, t]/(\[Mu] mu ) kb T[x, y, t];
cp = 5/2 kb/(\[Mu] mu);
Rgas = 8.3144598;
cv = 5/2 kb/(\[Mu] mu) - Rgas;
\[Gamma] = cp/cv;
g = 28.02*9.81;
\[Mu] = 0.6163328197226503`;
mu = 1.66053904*10^-27;
kb = 1.38064852*10^-23;
sol1 = NDSolve[{
D[\[Rho][x, y, t]*u[x, y, t], 
 t] == -D[\[Rho][x, y, t]*u[x, y, t]*u[x, y, t] + P[x, y, t], x] -
  D[\[Rho][x, y, t]*u[x, y, t]*v[x, y, t], y],
D[\[Rho][x, y, t]*v[x, y, t], 
 t] == -D[\[Rho][x, y, t]*v[x, y, t]*u[x, y, t], y] - 
 D[\[Rho][x, y, t]*v[x, y, t]*v[x, y, t] + P[x, y, t], y] + 
 g \[Rho][x, y, t],
D[\[Rho][x, y, t], t] == -D[\[Rho][x, y, t]*u[x, y, t], x] - 
 D[\[Rho][x, y, t]*v[x, y, t], y],
D[e[x, y, t], t] == -D[u[x, y, t]*e[x, y, t], x] - 
 D[v[x, y, t]*e[x, y, t], y] - 
 P[x, y, t]*(D[u[x, y, t], x] - D[v[x, y, t], y]),

v[0, y, t] == v[12*10^6, y, t],
u[0, y, t] == u[12*10^6, y, t],
T[0, y, t] == T[12*10^6, y, t],
\[Rho][0, y, t] == \[Rho][12*10^6, y, t],
e[0, y, t] == e[12*10^6, y, t],

(D[u[x, y, t], x] /. x -> 0) == (D[u[x, y, t], x] /. x -> 12000000),
(D[v[x, y, t], x] /. x -> 0) == (D[v[x, y, t], x] /. x -> 12000000),
D[u[0, y, t], y] == D[u[12000000, y, t], y],
D[v[0, y, t], y] == D[v[12000000, y, t], y],
D[u[0, y, t], t] == D[u[12000000, y, t], t],
D[v[0, y, t], t] == D[v[12000000, y, t], t],

(D[T[x, y, t], x] /. x -> 0) == (D[T[x, y, t], x] /. x -> 12000000),
(D[\[Rho][x, y, t], x] /. x -> 0) == (D[\[Rho][x, y, t], x] /. 
  x -> 12000000),
D[T[0, y, t], y] == D[T[12000000, y, t], y],
D[\[Rho][0, y, t], y] == D[\[Rho][12000000, y, t], y],
D[T[0, y, t], t] == D[T[12000000, y, t], t],
D[\[Rho][0, y, t], t] == D[\[Rho][12000000, y, t], t],

P[x, 0, t] == 3.83767261162/(\[Gamma] - 1),
v[x, 4000000, t] == 0,
v[x, 0, t] == 0,
(Grad[u[x, y, t], y] /. y -> 0) == 0,
(Grad[u[x, y, t], y] /. y -> 4000000) == 0,
(Grad[P[x, y, t], y] /. y -> 0) == g \[Rho][x, y, t],
(Grad[P[x, y, t], y] /. y -> 4000000) == g \[Rho][x, y, t],
v[x, y, 0] == 0,
u[x, y, 0] == 0,
T[x, y, 0] == 5770 + 0.00835414960707927 y*10^6,
\[Rho][x, y, 0] == 
 1.42*10^-7*1.408*10^3 + 7.3561137493644*10^-10 y*10^6
},
{u, v, T, \[Rho]}, {x, 0, 12000000}, {y, 0, 4000000}, {t, 0, 100}, 
StartingStepSize -> {40000, 40000, 1}]

I changed the derivative boundary conditions to a gradient(because that is what they are), but now the code wont evaluate at all

  • It is difficult to tell something without looking at the equation. I recommend you to post it to enable us try. In general, presently MMa has no nonlinear solver, as yet. However, there is a work around, if your equation is time dependent. Have a look at Menu/Help/WolframDocumentation/tutorial/NDSolveOverview/PartialDifferentialEquations/TheNumericalMethodOfLines – Alexei Boulbitch May 23 '18 at 07:50
  • @AlexeiBoulbitch I have since edited it, I checked the Numerical Method of Lines, but I'm not that experienced with programming and stuff, and I couldn't find an example of one being done the way I described it (nonlinear first order PDE's with first order boundary condition). – Hidde Rinsema May 23 '18 at 10:39
  • 1
    Can you give an example of a PDE with such a boundary condition being solvable? – SPPearce May 23 '18 at 11:07
  • @KraZug No, because I'm an idiot and fail to see the second order derivatives in the ones I thought would work, sorry – Hidde Rinsema May 23 '18 at 11:24
  • @Hidde Rinsema Sorry, with equations like that I have no experience. – Alexei Boulbitch May 23 '18 at 11:55
  • Dirichlet boundary conditions, by definition, only deal with the function values, not their derivatives. What you're trying to implement are Neumann boundary conditions, but as far as I can tell those are only allowed for linear ODEs (look at the documentation for NeumannValue.) – Michael Seifert May 23 '18 at 12:58
  • Also, you have the same erroneous line break in your second line as you did when you posted your previous question. – Michael Seifert May 23 '18 at 13:01
  • @MichaelSeifert line break is fixed, for some reason when I copy my code from mathematica it does that. – Hidde Rinsema May 23 '18 at 15:35
  • Related: https://mathematica.stackexchange.com/q/24417/1871 https://mathematica.stackexchange.com/q/11748/1871 – xzczd May 23 '18 at 18:03

0 Answers0