Message Boards Message Boards

1
|
9681 Views
|
4 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Mathematica and Euler's equation

Posted 9 years ago

Hi,

I've been trying to solve Euler's equation for fluid motion with the simplest possible boundary conditions but from the way I'm writing I'm getting nowhere. Mathematica just outputs

NDSolve::femnonlinear: Nonlinear coefficients are not supported in this version of NDSolve

I've tried everything I found on the internet even some voodoo about telling Mathematica the equations are time-dependent fails. Is this really it? Mathematica can't numerically solve a coupled pde with non-constant coefficients? If Mathematica can't who can?

I have to admit I'm not symplifing anything, I've just copied Marsden's (A Mathematical Introduction to Fluid Mechanics) equations and hoped for the best. I'm doing this to get an idea about solutions and how they behave but this has proven to be a fruitless path.

Thanks in advance,

E.

4 Replies
Posted 1 year ago

Hello, in case anyone still needs assistance, this link may help: https://mathworld.wolfram.com/EulerEquation.html .

POSTED BY: Farial Mahmod

Hi,

so here's the code:

b = {0, -10*y}

NDSolve[ {[Rho][x, y, t](D[ux[x, y, t], t] + ux[x, y, t]D[ux[x, y, t], x] + uy[x, y, t]D[ux[x, y, t], y]) == -D[p[x, y, t], x] + [Rho][x, y, t]b[[1]], [Rho][x, y, t](D[uy[x, y, t], t] + ux[x, y, t]D[uy[x, y, t], x] + uy[x, y, t]D[uy[x, y, t], y]) == -D[p[x, y, t], y] + [Rho][x, y, t]b[[2]],

D[[Rho][x, y, t], t] + ux[x, y, t]*D[[Rho][x, y, t], x] + uy[x, y, t]*D[[Rho][x, y, t], y] == 0, D[ux[x, y, t], x] + D[uy[x, y, t], y] == 0, ux[0, y, t] == 0, ux[10, y, t] == 0, uy[x, 0, t] == 0, uy[x, 10, t] == 0, [Rho][x, y, 0] == 1, p[x, 10, t] == 10}, {ux, uy, [Rho], p}, {x, 0, 10}, {y, 0, 10}, {t, 0, 10}]H

Boundary conditions translate to n dot u == 0 at the boundary. I wish I had a better way to post this code. I hope it's readable. [Rho] is the density, p is the pressure, u is the velocity and b is the body force, I just added gravity. The problem happens even in one dimension when you multiply de density times the velocity field.

Anyway as you sad, they are hard equations to solve. What's the procedure people usually do to solve them?

Thanks,

E.

P.S.: I'm attaching the notebook hoping it helps to read the stuff.

Attachments:
Posted 9 years ago

Hi Everton,

Mathematica is an excellent tool, but like any tool it has limitations. This type of problem -- a system of nonlinear partial differential equations -- is usually approached with very highly developed, and very expensive, finite element analysis software. An example is Comsol Mulitphysics, but there are many more. And even for these tools, fluid dynamics is a difficult problem. In the laminar flow regime, solutions are usually not difficult. As the Reynolds number increases, approaching turbulence, the stability of the numerical solution becomes an issue. In the turbulent regime, there is no steady state solution for the flow, and a direct time dependent solution is needed. However, the turbulent eddies become very detailed, and the mesh needed can become so fine that not even a supercomputer can handle the problem.

So, in short, if I could have only one tool it would be Mathematica, because of its versatility. But there is still a need for specialized tools which are not as broad, but much deeper in their particular subject. I think this is one such case, and it is not realistic to expect Wolfram to provide the capability in Mathematica. (I would welcome being proven wrong!)

Kind regards, David

POSTED BY: David Keith

Hi, You might want to show your code. euler's equation is nonlinear and with some exceptions extremely difficult to solve!

POSTED BY: Kay Herbert
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract