Reduced navier stokes in mathematica help please

In summary, the conversation discusses the use of Mathematica to solve a system of differential equations with boundary conditions in order to plot unknown functions. The individual is encountering an error and seeks guidance on how to overcome it, with suggestions to try using the NDSolveValue function and specifying a numerical method.
  • #1
01af
1
0
reduced navier stokes in mathematica urgent help please

ok I am modelling airflow in the upper airway for application i obstructive sleep apnoea, but I have hit a brick wall with mathematica. I have a system of 3 differential equations with boundary conditions, and I need to solve to find 3 unknown functions numerically so that they may be plotted in various graphs.

The equations are as follows:

D[a[x]*u[x], x] == 0,
u[x] u'[x] == -p'[x],
p[x] - 1 == 2 (1 - ((a[x])^(-3/2))) - 50 (a''[x]).

with boundary conditions:

u[0] == 0.1, a[0] == 1, a[10] == 1, p[10] == 1.

so initially I tried to use NDSolve like so..
Code:
NDSolve[{D[a[x]*u[x], x] == 0, u[x] u'[x] == -p'[x], 
  p[x] - 1 == 2 (1 - ((a[x])^(-3/2))) - 50 (a''[x]), u[0] == 0.1, 
  a[0] == 1, a[10] == 1, p[10] == 1}, {a}, {x, 0, 10}]

but mathematica does this:
Code:
Power::infy: "Infinite expression 1/0.^(3/2) encountered. "
Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered. >>
Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered. >>
General::stop: Further output of Infinity::indet will be suppressed during this calculation. >>
NDSolve::ndnum: Encountered non-numerical value for a derivative at x == 0.`. >>

which is super annoying, any pointers as to where I'm going wrong would be great. I'm not even sure if I should be using NDSolve so let me know what you think.
thanks in advance
a.
 
Physics news on Phys.org
  • #2
You can try using the NDSolveValue function instead. This function should help to avoid the Power::infy error. You can also use the Method option to specify the numerical method you want to use: sol = NDSolveValue[{D[a[x]*u[x], x] == 0, u[x] u'[x] == -p'[x], p[x] - 1 == 2 (1 - ((a[x])^(-3/2))) - 50 (a''[x]), u[0] == 0.1, a[0] == 1, a[10] == 1, p[10] == 1}, {a}, {x, 0, 10}, Method -> "ExplicitRungeKutta"];You can then plot the solution with:Plot[sol[x], {x, 0, 10}]
 

1. What is the Reduced Navier-Stokes equation?

The Reduced Navier-Stokes equation is a simplified form of the full Navier-Stokes equation, which is a set of partial differential equations that describe the motion of fluid in space. The Reduced Navier-Stokes equation is commonly used in computational fluid dynamics to simulate fluid flow in a simpler and more efficient manner.

2. How is the Reduced Navier-Stokes equation solved in Mathematica?

The Reduced Navier-Stokes equation can be solved in Mathematica using the built-in function NDSolve, which numerically integrates the equations over a given domain and time interval. Other functions, such as FindRoot and NSolve, can also be used to solve specific problems related to the Reduced Navier-Stokes equation.

3. Can Mathematica handle complex geometries in the Reduced Navier-Stokes equation?

Yes, Mathematica has the ability to handle complex geometries in the Reduced Navier-Stokes equation through the use of meshing and boundary conditions. The NDSolve function can also handle non-uniform meshes, making it possible to solve problems with irregular boundaries.

4. What are some common applications of the Reduced Navier-Stokes equation?

The Reduced Navier-Stokes equation is commonly used in many fields, including fluid dynamics, aerodynamics, and weather prediction. It is also used in the design and optimization of various engineering systems, such as turbines, pumps, and aircraft wings.

5. Are there any limitations to using Mathematica for solving the Reduced Navier-Stokes equation?

While Mathematica is a powerful tool for solving the Reduced Navier-Stokes equation, it does have some limitations. The computational time and memory requirements can be quite high for complex problems, and the accuracy of the results can be affected by the choice of numerical methods and parameters. It is important to carefully consider these factors when using Mathematica for solving the Reduced Navier-Stokes equation.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
137
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
262
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • Differential Equations
Replies
1
Views
2K
Replies
18
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Classical Physics
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
Back
Top