Good Evening,
I defined a function which is composed of other several functions. Mathematica compiles well but I can't get a plot and I do not understand way.
Can anyone help me with the code and explaining me why nothing is showed on the plot?
Thanks in advance
f1 = 0.0;
f2 = 0.0;
f3 = -9.0; (*fN*)
T = 300;(*K*)
ν = 1.002; (*(fN*s )/μm^2*)
Subscript[r, 0] = 0.5;(*μm*)
Subscript[r, 2] = 0.8;(*μm*)
Subscript[r, 1] = 0.2;(*μm*)
Subscript[γ, 0] = 6 π ν Subscript[r, 0];
Subscript[γ, 2] = 6 π ν Subscript[r, 2]
Subscript[γ, 1] = 6 π ν Subscript[r, 1]
(* 15.1098 *)
(* 3.77745 *)
ϕ1 = π/3;
ϕ2 = π/4;
V1[Tkin_] := (1/Subscript[γ, 1])[
f2 - f3 (((Tkin - T)/T) Cos[θ] Sin[θ])/(
Subscript[γ, 1]/Subscript[γ,
0] + ((Tkin - T)/T) (Sin[θ])^2)];
V2[Tkin_] := (1/Subscript[γ, 2])[
f2 - f3 (((Tkin - T)/T) Cos[θ] Sin[θ])/(
Subscript[γ, 2]/Subscript[γ,
0] + ((Tkin - T)/T) (Sin[θ])^2)];
V11 = V1[Tkin1]; (* Velocity of the 1st particle in protocol 1*)
V21 =
V2[Tkin1]; (* Velocity of the 2nd particle in protocol 1*)
V12 = V1[Tkin2]; (* Velocity of the 1st particle in protocol 2*)
V22 = V2[Tkin2]; (* Velocity of the 2nd particle in protocol 2*)
VA[Tkin1_,
Tkin2_, ϕ1_, ϕ2_] := {{V11 Sin[ϕ1] -
V12 Sin[ϕ2], V11 Cos[ϕ1] + V12 Cos[ϕ2]}};
VB[Tkin1_,
Tkin2_, ϕ1_, ϕ2_] := {{V21 Sin[ϕ1] -
V22 Sin[ϕ2], V21 Cos[ϕ1] - V22 Cos[ϕ2]}};
VAA = VA[Tkin1, Tkin2, ϕ1, ϕ2];
VBB = VB[Tkin1, Tkin2, ϕ1, ϕ2];
delta[Tkin1_, Tkin2_] =
ArcCos[VAA.Transpose[VBB]/(Norm[VAA] Norm[VBB])];
Plot3D[delta, {Tkin1, 300, 1000}, {Tkin2, 300, 1000},
AxesLabel -> {"Tkin1", "Tkin2", "γ"},
ColorFunction -> "BrownCyanTones", PlotRange -> Automatic]
Subscript
while defining symbols (variables).Subscript[x, 1]
is not a symbol, but a compound expression whereSubscript
is an operator without built-in meaning. You expect to do $x_1=2$ but you are actually doingSet[Subscript[x, 1], 2]
which is to assign a Downvalue to the opratorSubscript
and not an Ownvalue to an indexedx
as you may intend. Read how to properly define indexed variables here $\endgroup$delta
is a function, then it should be called with parameters. [theta] is not defined $\endgroup$γ1
is just as useful asSubscript[γ, 1]
$\endgroup$