Azzera filtri
Azzera filtri

How can i fix 'Unable to solve the collocation equations -- a singular jacobian encountered' problem?

1 visualizzazione (ultimi 30 giorni)
Our coupled equations:
f'''+(12/5)*f''*f-(4/5)*((f')^2)+q=0 q''+(12/5)*Pr*(f*q)'=0
Here is our boundary conditions:
q(0)=1 q'(0)=0 q(inf)=0
f''(0)=0 f'(inf)=0 f(0)=0 inf:infinity
Here is our function:
function dydx = fun(x,y)
Pr=0.1;
dydx = [ y(2)
y(3)
-(12/5)*(y(3))*y(1)+(4/5)*(y(2)^2)-y(4)
y(5)
-(12/5)*Pr*(y(4)*y(2)+y(5)*y(1))];
end % End nested function
And boundary conditions:
res = fun_bc(f0,finf)
res = [ f0(1)-1
f0(2)
f0(3)
f0(1)
finf(2)];
*y(1)=f y(2)=f' y(3)=f'' y(4)=q y(5)=q' However, when we run the code we face the problem 'Unable to solve the collocation equations -- a singular jacobian encountered.' How can we solve this problem?
Thanks

Risposta accettata

Torsten
Torsten il 17 Mag 2017
You can't prescribe f(0)=1 and f(0)=0 at the same time as boundary condition.
Best wishes
Torsten.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by