I'm studying the Ekman spiral for piecewise uniform viscosity. So I have two velocity components (u,v) for every layer. One pair for the surface and one pair for the layer below.
u1[z_] := A*Cos[z/ε] (Exp[z/ε] - Exp[-z/ε]) + B*Sin[z/ε] (Exp[z/ε] + Exp[-z/ε]) + u0*Exp[-z/ε] Cos[z/ε]
v1[z_] := A*Sin[z/ε] (Exp[z/ε] + Exp[-z/ε]) - B*Cos[z/ε] (Exp[z/ε] - Exp[-z/ε]) - u0*Exp[-z/ε] Sin[z/ε]
u2[z_] := Exp[z/(l*ε)] (K*Cos[z/(l*ε)] + L*Sin[z/(l*ε)])
v2[z_] := Exp[z/(l*ε)] (K*Sin[z/(l*ε)] - L*Cos[z/(l*ε)])
A
, B
, K
, L
, l
, u0
and ε,
are constants that I change depending on the occasion I want to study:
A := (ε*(f1 + f2))/(2*r*k1) + u0
B := -(((ε*f2) + (u0*r*k1))/(2*r*k1))
K := 1/(2 k1 r) Exp^(h (1/(l*ε) - 1/ε)) ((2 k1 r u0 + (f1 + f2) ε) Cos[h(1/(l*ε) - 1/ε)] - Exp^((2 h)/ε) (f1 + f2) ε Cos[h (1/(l*ε) + 1/ε)] - (k1 r u0 + f2 ε) (Sin[h (1/(l*ε) - 1/ε)] - Exp^((2 h)/ε) Sin[h (1/(l*ε) + 1/ε)]))
L := 1/(2 k1 r) Exp^(h (1/(l*ε) - 1/ε)) (-(k1 r u0 + f2 ε) Cos[h (1/(l*ε) - 1/ε)] + Exp^((2 h)/ε) (k1 r u0 + f2 ε) Cos[h (1/(l*ε) + 1/ε)] - 2 k1 r u0 Sin[h (1/(l*ε) - 1/ε)] - f1 ε Sin[h (1/(l*ε) - 1/ε)] - f2 ε Sin[h (1/(l*ε) - 1/ε)] + Exp^((2 h)/ε) f1 ε Sin[h (1/(l*ε) + 1/ε)] + Exp^((2 h)/ε) f2 ε Sin[h (1/(l*ε) + 1/ε)])
f := 10^(-4)
u0 := 0.2
f1 := 0.43
f2 := 0.43
k1 := 10^(-2)
k2 := 10^(-3)
ε := Sqrt[2 k1/f]
l := Sqrt[k2/k1]
r := 1027
h := 2
I can plot every layer separately by using the ParametricPlot
and ParametricPlot3D
comands, for a specific depth and make two seperate spirals.
ParametricPlot[{u1[z], v1[z]}, {z, 0, -2}]
ParametricPlot[{u2[z], v2[z]}, {z, -2, -20}]
What I need to do now, is to merge my two seperate spirals into one spiral. Not to show two different spirals in the same graph though, but one combined spiral-a single curve, that will be built by using the first equations (u1,v1) untill a certain depth (0,-2m) and the other two (u2,v2) below that (-2,-20m). Like a plot of two parametric plots. And i need to show it both in 2D and 3D.
What I practicly have to observe is how the spiral is changing as you move through the layers of diferent viscosities. Is there any way to make it happen?
Graphics
can be combined usingShow
. For any additional advice, edit your question to include your code (InputForm) for a minimal example. $\endgroup$Show
cannot do what is required. If not, perhapsConditionalExpression
. But without some minimal example we are just guessing -- and many will be unwilling to expend effort if they are just guessing at the problem. $\endgroup${A, B, K, l, L, u0, \[CurlyEpsilon]}
. Questions should include minimal code and data required to produce results. $\endgroup$