Solving a system of equations using Newton-Raphson in MatLab
7 次查看(过去 30 天)
显示 更早的评论
I'm finding it very difficult to get my head around how best to express the following system of equations in MatLab in order to solve it. The equations come from Von Karman's similarity solution to Navier-Stokes for a rotating disk flow. I've taken the original equations and turned them into a set of five 1st order ODEs, but I'm not clear at all on how I can code it
(1) g1 = U'
(2) g2 = V'
(3) W' = -2*U
(4) g1' = U^2 - (V+1)^2 + g1*W
(5) g2' = 2*U*(V+1)+g2*W
With boundary conditions U(0) = 0, V(0) = 0, W(0) = 0, U(20) = 0, V(20) = -1 and initial guesses for g1(0) = 0.52 and g2(0) = -0.61
The functions U, V, and W themselves then feed into the equations below in order to produce the three components of velocity for the flow:
(6) u = roU(n),
(7) v= roV(n),
(8) v = sqrt(q*o)W(n)
where n = zsqrt(q/o) and q= viscosity, o = angular velocity, z = the axial coordinate and r = radial coordinate
The second set of equations, (6),(7) and (8) I have simply added for clarity, so you can understand what it is I'm actually looking for. Like I said, could someone please help me understand/ show me how to apply a shooting method like Newton-Raphson to equations 1-5 in MatLab?
Many thanks, Mike
0 个评论
回答(2 个)
Ananya Mondal
2016-9-4
You can find some help here chrome-http://ocw.usu.edu/Civil_and_Environmental_Engineering/Numerical_Methods_in_Civil_Engineering/NonLinearEquationsMatlab.pdf
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!