Message Boards Message Boards

0
|
10039 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Need help including a singularity

Posted 9 years ago

Hi, I am having trouble bypassing or including a singularity for a generalized one dimensional flow model. Here is the ODE I am solving for, but as expected there is a singularity where the Mach number=1. I am relatively new to Mathematica, so I am struggling with the syntax a bit. Anyway, here is the ODE I am solving for [M]'[x] == ( 70 M[x] (1 + 0.125 M[x]^2) (1 + 1.25 M[x]^2))/((200 + 140 x) (1 - M[x]^2)) for x=0 to 20 Is there a way to exclude the solution for M[x]=1 or there is another form of the equation that can handle the singularity, but it is only valid for M=1, so is there some way to use that equation for M=1 and combine it with the original ODE?

POSTED BY: Nick Perry
2 Replies

You did not say what the initial conditions are. But Mathematica DSolve can solve it. The solution is complex, so I plotted the real part below.

ClearAll[m, x];
eq = m'[x] == (70 m[x] (1 + 125/1000 m[x]^2) (1 + 125/100 m[x]^2))/((200 + 140 x) (1 - m[x]^2))
sol = First@DSolve[{eq, m[0] == 1}, m[x], x]
Plot[Re@Evaluate[m[x] /. sol], {x, 0, 20}, PlotRange -> All]

enter image description here

There is a second solution also given by DSolve to look at. The above is just the first one. ps. not good idea to use user defined UpperCaseVariables or Symbols in Mathematica.

POSTED BY: Nasser M. Abbasi
Posted 9 years ago

Thanks, I was using NDsolve and m[0]==0.2. The initial boundary condition m[0] must be less than one as the airflow will encounter shocks at the inlet driving the mach number below the sonic condition. Could NDsolve be used as well? Also, what does First @ and Re @ mean in Mathematica? I know Re will plot the real solution, however what does Re@Evaluate do? How do you use the output of m[x] in another function? Here is the code I have, sorry for the all questions.

Attachments:
POSTED BY: Nick Perry
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