Problem solving highly non-linear pdes in mathematica Can anyone help?

In summary: Keep in mind that the order of the derivative should be a positive integer. In summary, the conversation discusses an error that is occurring while trying to solve a complex and nonlinear partial differential equation in Mathematica. The error is related to the finite difference approximation of the derivative and can be solved by increasing the approximation order. The conversation also provides a copy of the code being used and suggests using a higher order derivative to reduce the error.
  • #1
christensen22
1
0
I keep getting the error,
NDSolve`FiniteDifferenceDerivative::aord: The approximation order 0 given for dimension 1 should be a positive machine-sized integer or Pseudospectral.

I have a very complex and nonlinear pde to solve in mathematica and I keep getting errors with the code. Everything seems right to me and I can't figure out what's wrong. Is there a problem with the initial or boundary conditions? or is it not possible to solve such a complicated equation? Any help would be really appreciated! Thanks


Here is a copy of the code I am using(with mathematica 7):


With[{Re = 77.33},
NDSolve[{D[q[x, t],
t] == (10/Re)[h[x, t] - (q[x, t]/h[x, t]^2)] + (9/7)[q[x, t]^2]*
D[h[x, t], {x, 1}]/h[x, t]^2 - (17/7) q[x, t]*
D[q[x, t], {x, 1}]/h[x, t] + (5/6)*5*h[x, t]*
D[h[x, t], {x, 3}] + (1/Re) [(373/28) q[x, t]*
D[h[x, t], {x, 1}]^2/h[x, t]^2 - (205/168)*h[x, t]^2*
D[h[x, t], {x, 2}] - (2837/168)*q[x, t]*
D[h[x, t], {x, 2}]/h[x, t] + (449/28)*
D[q[x, t], {x, 2}] - (339/28)*D[q[x, t], {x, 1}]*
D[h[x, t], {x, 1}]/h[x, t] - (45/14) h[x, t]*
D[h[x, t], {x, 1}]^2] ,
D[h[x, t], {t, 1}] + D[q[x, t], {x, 1}] == 0,
q[0, t] == 1 + .05 Sin[2*Pi*5 t],
h[0, t] == (1 + .05 Sin[2*Pi*5 t])^(1/3),
Derivative[1, 0][q][0, t] == 0,
Derivative[1, 0][h][0, t] == cos[t], h[x, 0] == sin[x],
q[x, 0] == sin[x]}, {q, h}, {t, .0001, 10}, {x, .0001, 10}]]
 
Physics news on Phys.org
  • #2
</code>The error is related to the finite difference approximation of the derivative you are using. Try increasing the approximation order of the derivative in your code. For example, for the first derivative of h[x,t] use D[h[x,t],{x,2}] instead of D[h[x,t],{x,1}]. That should help reduce the error.
 

1. What is the best approach for solving highly non-linear PDEs in Mathematica?

The best approach for solving highly non-linear PDEs in Mathematica is to first understand the problem and the underlying mathematical concepts. This will help in selecting the appropriate methods and algorithms for solving the PDE. Additionally, using built-in functions and packages in Mathematica such as NDSolve and DSolve can also be helpful.

2. How can I ensure the accuracy of my solutions when solving non-linear PDEs in Mathematica?

To ensure accuracy, it is important to carefully select the discretization method, boundary conditions, and initial values. It is also recommended to compare the results obtained using different methods and refine the solutions if necessary.

3. Are there any limitations to solving highly non-linear PDEs in Mathematica?

Yes, there can be limitations depending on the complexity of the problem and the computational resources available. Some highly non-linear PDEs may require specialized techniques or additional software packages to obtain accurate solutions.

4. Can I use Mathematica for both analytical and numerical solutions of non-linear PDEs?

Yes, Mathematica can handle both analytical and numerical solutions of non-linear PDEs. For analytical solutions, the built-in function DSolve can be used, while NDSolve is suitable for numerical solutions.

5. Are there any resources or tutorials available for solving non-linear PDEs in Mathematica?

Yes, there are many resources and tutorials available online for solving non-linear PDEs in Mathematica. The Mathematica documentation, Wolfram website, and various online forums are great sources for learning about different methods and techniques for solving PDEs in Mathematica.

Similar threads

  • Differential Equations
Replies
5
Views
2K
  • Differential Equations
Replies
2
Views
2K
Replies
1
Views
1K
  • Differential Equations
Replies
2
Views
2K
Replies
1
Views
2K
Replies
8
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
  • Differential Equations
Replies
8
Views
2K
  • Differential Equations
Replies
6
Views
1K
Back
Top