1
$\begingroup$

Code show empty legend lines. What should i do to show the three legend lines graphs?

eq1 = A1F'''[[Eta]] + A2(F''[[Eta]] + (F'[[Eta]])^2) - A1F'[[Eta]] - A2Fr*(F'[[Eta]])^2 + S2Exp[-S1 [Eta]] == 0; eq2 = Knf[Theta]''[[Eta]] + A1PrF[[Eta]] [Theta]'[[Eta]] +
PrNt ([Theta]'[[Eta]])^2 +
Nb
Pr*[Theta]'[[Eta]][CurlyPhi][[Eta]] == 0; eq3 = [CurlyPhi]''[[Eta]] - ScF[[Eta]][CurlyPhi]'[[Eta]] + Nt/Nb [Theta]''[[Eta]] - K1[CurlyPhi][[Eta]] == 0; bcs1 = {F[0] == S, F'[0] == 0, F'2 == 1}; bcs2 = {[Theta]'[0] == -0, [Theta]2 == 0}; bcs3 = {[CurlyPhi]'[0] == -1, [CurlyPhi]2 == 0}; A1 = 1/(1 - [CurlyPhi]1)^2.5; A2 = ((1 - [CurlyPhi]1) + [CurlyPhi]1*[Rho]sCs/[Rho]bCb); b1 = Block[{[CurlyPhi]1 = 0.4, [Rho]s = 5200, [Rho]s = 4250, Cs = 670, [Rho]b = 890, [Rho]b = 670, Cb = 686.2, k1 = 6, knf = 0.126, Pr = 1.0, Sc = 0.5, S1 = 1.2, S2 = 0.1, [Lambda] = 0.1, Nt = 0.5, Nb = 0.3, S = 0.2, K1 = 0.8, Fr = 1.3}, First[NDSolve[{eqn1, eqn2, eqn3, bcs1, bcs2, bcs3}, {F[[Eta]], F'[[Eta]], [Theta][[Eta]], [Theta]'[[Eta]], \ [Phi][[Eta]], [Phi]'[[Eta]]}, {[Eta], 0, 4}, Method -> Shooting]]]; b2 = Block[{[CurlyPhi]1 = 0.4, [Rho]s = 5200, [Rho]s = 4250, Cs = 670, [Rho]b = 890, [Rho]b = 670, Cb = 686.2, k1 = 6, knf = 0.126, Pr = 1.0, Sc = 0.5, , S1 = 1.2, S2 = 0.1, [Lambda] = 0.1, Nt = 0.5, Nb = 0.3, S = 0.2, K1 = 0.8, Fr = 1.3}, First[NDSolve[{eqn1, eqn2, eqn3, bcs1, bcs2, bcs3}, {F[[Eta]], F'[[Eta]], [Theta][[Eta]], [Theta]'[[Eta]], \ [Phi][[Eta]], [Phi]'[[Eta]]}, {[Eta], 0, 4}, Method -> Shooting]]]; b3 = Block[{[CurlyPhi]1 = 0.4, [Rho]s = 5200, [Rho]s = 4250, Cs = 670, [Rho]b = 890, [Rho]b = 670, Cb = 686.2, k1 = 6, knf = 0.126, Pr = 1.0, Sc = 0.5, S1 = 1.2, S2 = 0.1, [Lambda] = 0.1, Nt = 0.5, Nb = 0.3, S = 0.2, K1 = 0.8, Fr = 1.3}, First[NDSolve[{eqn1, eqn2, eqn3, bcs1, bcs2, bcs3}, {F[[Eta]], F'[[Eta]], [Theta][[Eta]], [Theta]'[[Eta]], \ [Phi][[Eta]], [Phi]'[[Eta]]}, {[Eta], 0, 4}, Method -> Shooting]]];

Needs["PlotLegends`"]

Plot[Evaluate[{F'[[Eta]] /. b1, F'[[Eta]] /. b2, F'[[Eta]] /. b3}], {[Eta], 0, 4}, PlotRange -> All, PlotStyle -> {{Dashing[{solid}], Black}, {Dashing[{solid}], Red}, {Dashing[{solid}], Blue}, {Dashing[{solid}], Green}, {Dashing[{0.01}], Black}, {Dashing[{0.02}], Red}, {Dashing[{0.03}], Blue}, {Dashing[{0.04}], Green}}, PlotLegend -> {"[Lambda] = 0.1", "[Lambda]= 0.2", "[Lambda] = 0.3"}, LegendSize -> {0.4, 0.45}, LegendPosition -> {-0.01, 0.1}, PlotMarkers -> Automatic, LegendShadow -> False, Frame -> True, Axes -> False, FrameLabel -> {Style["[Eta]", Italic, Black], Style["F'([Eta])", Italic, Black]}]

enter image description here enter image description here

$\endgroup$
2
  • $\begingroup$ Error: There a double definitions of $\rho s$ in Block $\endgroup$
    – Roland F
    Commented Sep 26, 2023 at 8:18
  • $\begingroup$ PLease copy your input from here and try it in MMA and make it run. $\endgroup$ Commented Sep 26, 2023 at 17:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.