0
$\begingroup$

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

$\endgroup$
9
  • $\begingroup$ 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 $\endgroup$ Commented May 23, 2018 at 7:50
  • $\begingroup$ @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). $\endgroup$ Commented May 23, 2018 at 10:39
  • 1
    $\begingroup$ Can you give an example of a PDE with such a boundary condition being solvable? $\endgroup$
    – SPPearce
    Commented May 23, 2018 at 11:07
  • $\begingroup$ @KraZug No, because I'm an idiot and fail to see the second order derivatives in the ones I thought would work, sorry $\endgroup$ Commented May 23, 2018 at 11:24
  • $\begingroup$ @Hidde Rinsema Sorry, with equations like that I have no experience. $\endgroup$ Commented May 23, 2018 at 11:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.