Solving a system of equations using Newton-Raphson in MatLab

조회 수: 4 (최근 30일)
Michael
Michael 2015년 5월 3일
답변: Ananya Mondal 2016년 9월 4일
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

답변 (2개)

Torsten
Torsten 2015년 5월 4일
help bvp4c
Best wishes
Torsten.
  댓글 수: 1
Michael
Michael 2015년 5월 4일
Could you please help me understand how I fit my set of equations into that format? I'm not very knowledgeable at all when it comes to MatLab, and I've been banging my head against a brick wall trying to understand how I format them properly so as to fit- do I just input the right hand side of the equation, or do I take the derivative over and make it all equal zero, or what? The only examples I can find use one equation, typically in the form ax^2 + bx + c = 0. How do I make this work for a system of several derivatives? Please help

댓글을 달려면 로그인하십시오.


Ananya Mondal
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

카테고리

Help CenterFile Exchange에서 Newton-Raphson Method에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by