-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallel transport dev #32
base: master
Are you sure you want to change the base?
Changes from 5 commits
aab5522
da58399
0f0e95d
149e435
2bc026b
d902e49
1657a5c
b7c1059
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,13 +156,13 @@ | |
|
||
|
||
PrecessionPhase[orbit_KerrGeoOrbitFunction,\[CapitalUpsilon]\[Psi]_,qr0_,qz0_,q\[Psi]0_:0]:= | ||
Function[{\[Lambda]}, | ||
Function[{Global`\[Lambda]}, | ||
Evaluate@With[ | ||
{ | ||
\[CapitalUpsilon]r=orbit["RadialFrequency"], | ||
\[CapitalUpsilon]z=orbit["PolarFrequency"] | ||
}, | ||
q\[Psi]0+\[CapitalUpsilon]\[Psi] \[Lambda] +PrecessionPhaser[orbit][\[CapitalUpsilon]r \[Lambda] + qr0]+PrecessionPhasez[orbit][\[CapitalUpsilon]z \[Lambda] + qz0] | ||
q\[Psi]0+\[CapitalUpsilon]\[Psi] Global`\[Lambda] +PrecessionPhaser[orbit][\[CapitalUpsilon]r Global`\[Lambda] + qr0]+PrecessionPhasez[orbit][\[CapitalUpsilon]z Global`\[Lambda] + qz0] | ||
] | ||
] | ||
|
||
|
@@ -174,21 +174,9 @@ | |
(*Tetrads*) | ||
|
||
|
||
MarckCarterFrame[orbit_KerrGeoOrbitFunction]:= | ||
Module[ | ||
{ | ||
a,\[ScriptCapitalE],\[ScriptCapitalL],\[ScriptCapitalQ],\[ScriptCapitalK],rf,\[Theta]f | ||
}, | ||
a=orbit["a"]; | ||
{\[ScriptCapitalE],\[ScriptCapitalL],\[ScriptCapitalQ]}=Values@orbit["ConstantsOfMotion"]; | ||
\[ScriptCapitalK]=\[ScriptCapitalQ]+(a \[ScriptCapitalE]-\[ScriptCapitalL])^2; | ||
rf=Function[\[Lambda],orbit["Trajectory"][[2]][\[Lambda]]]; | ||
\[Theta]f=Function[\[Lambda],orbit["Trajectory"][[3]][\[Lambda]]]; | ||
Function[{\[Lambda]}, | ||
Evaluate@With[{ | ||
r=rf[\[Lambda]],\[Theta]=\[Theta]f[\[Lambda]],rd=rf'[\[Lambda]],\[Theta]d=\[Theta]f'[\[Lambda]] | ||
}, | ||
{(*(Subscript[e, i])^(a)Subscript[\[Eta], (a)(b)]Subscript[(\[Omega]^(b)), \[Mu]]*) | ||
MarckCarterFrame[{a_,\[ScriptCapitalE]_,\[ScriptCapitalL]_,\[ScriptCapitalK]_},{r_,rd_,\[Theta]_,\[Theta]d_}]:= | ||
Module[{\[Alpha],\[Beta],\[CapitalSigma],\[CapitalDelta]}, | ||
{(*(Subscript[e, i])^(a)Subscript[\[Eta], (a)(b)]Subscript[(\[Omega]^(b)), \[Mu]]*) | ||
{-\[ScriptCapitalE], rd/\[CapitalDelta][r],\[Theta]d, \[ScriptCapitalL]}, | ||
{(-r rd \[Alpha]-a^2 \[Beta] \[Theta]d Cos[\[Theta]] Sin[\[Theta]])/(Sqrt[\[ScriptCapitalK]] \[CapitalSigma][r,\[Theta]]),(r ((a^2+r^2) \[ScriptCapitalE]-a \[ScriptCapitalL]) \[Alpha])/(Sqrt[\[ScriptCapitalK]] \[CapitalDelta][r]),(a \[Beta] Cos[\[Theta]] (-\[ScriptCapitalL] Csc[\[Theta]]+a \[ScriptCapitalE] Sin[\[Theta]]))/Sqrt[\[ScriptCapitalK]],(a Sin[\[Theta]] ((a^2+r^2) \[Beta] \[Theta]d Cos[\[Theta]]+r rd \[Alpha] Sin[\[Theta]]))/(Sqrt[\[ScriptCapitalK]] \[CapitalSigma][r,\[Theta]])}, | ||
{(a^2 \[ScriptCapitalE] \[Alpha]+r^2 \[ScriptCapitalE] \[Alpha]+a \[ScriptCapitalL] (-\[Alpha]+\[Beta])-a^2 \[ScriptCapitalE] \[Beta] Sin[\[Theta]]^2)/\[CapitalSigma][r,\[Theta]],-((rd \[Alpha])/\[CapitalDelta][r]),-\[Beta] \[Theta]d,(-(a^2+r^2) \[ScriptCapitalL] \[Beta]+a (a \[ScriptCapitalL] \[Alpha]+a^2 \[ScriptCapitalE] (-\[Alpha]+\[Beta])+r^2 \[ScriptCapitalE] (-\[Alpha]+\[Beta])) Sin[\[Theta]]^2)/\[CapitalSigma][r,\[Theta]]}, | ||
|
@@ -199,8 +187,41 @@ | |
\[Alpha]-> Sqrt[(\[ScriptCapitalK]-a^2 Cos[\[Theta]]^2)/(r^2+\[ScriptCapitalK])], | ||
\[Beta]-> 1/Sqrt[((\[ScriptCapitalK]-a^2 Cos[\[Theta]]^2)/(r^2+\[ScriptCapitalK]))] | ||
} | ||
] | ||
|
||
|
||
MarckCarterFrame[orbit_KerrGeoOrbitFunction]:= | ||
Module[ | ||
{ | ||
a,\[ScriptCapitalE],\[ScriptCapitalL],\[ScriptCapitalQ],\[ScriptCapitalK],rf,\[Theta]f,mcf,\[CapitalUpsilon]r,\[CapitalUpsilon]\[Theta] | ||
}, | ||
a=orbit["a"]; | ||
{\[ScriptCapitalE],\[ScriptCapitalL],\[ScriptCapitalQ]}=Values@orbit["ConstantsOfMotion"]; | ||
\[ScriptCapitalK]=\[ScriptCapitalQ]+(a \[ScriptCapitalE]-\[ScriptCapitalL])^2; | ||
\[CapitalUpsilon]r=orbit["Frequencies"]["\!\(\*SubscriptBox[\(\[CapitalUpsilon]\), \(r\)]\)"]; | ||
\[CapitalUpsilon]\[Theta]=orbit["Frequencies"]["\!\(\*SubscriptBox[\(\[CapitalUpsilon]\), \(\[Theta]\)]\)"]; | ||
rf=orbit["Trajectory"][[2]]; | ||
\[Theta]f=orbit["Trajectory"][[3]]; | ||
mcf=Switch[ | ||
orbit["Parametrization"], | ||
"Mino", | ||
Function[{Global`\[Lambda]}, | ||
Evaluate@With[{ | ||
r=rf[Global`\[Lambda]],\[Theta]=\[Theta]f[Global`\[Lambda]],rd=rf'[Global`\[Lambda]],\[Theta]d=\[Theta]f'[Global`\[Lambda]] | ||
}, | ||
MarckCarterFrame[{a,\[ScriptCapitalE],\[ScriptCapitalL],\[ScriptCapitalK]},{r,rd,\[Theta],\[Theta]d}] | ||
] | ||
], | ||
"Phases", | ||
Function[{Global`qr,Global`q\[Theta]}, | ||
Evaluate@With[{ | ||
r=rf[Global`qr],\[Theta]=\[Theta]f[Global`q\[Theta]],rd=\[CapitalUpsilon]r rf'[Global`qr],\[Theta]d=\[CapitalUpsilon]\[Theta] \[Theta]f'[Global`q\[Theta]] | ||
}, | ||
MarckCarterFrame[{a,\[ScriptCapitalE],\[ScriptCapitalL],\[ScriptCapitalK]},{r,rd,\[Theta],\[Theta]d}] | ||
] | ||
] | ||
]; | ||
mcf | ||
] | ||
|
||
|
||
|
@@ -211,20 +232,51 @@ | |
\[CapitalUpsilon]\[Psi] = MinoPrecessionFrequency[orbit]; | ||
pt\[Psi]=PrecessionPhase[orbit,\[CapitalUpsilon]\[Psi],initPhases[[2]],initPhases[[3]],initPhases[[5]]]; | ||
|
||
ptf=Function[{\[Lambda]}, | ||
ptf=Function[{Global`\[Lambda]}, | ||
Evaluate[ | ||
{ | ||
mcf[Global`\[Lambda]][[1]], | ||
mcf[Global`\[Lambda]][[2]]Cos[pt\[Psi][Global`\[Lambda]]]+mcf[Global`\[Lambda]][[3]]Sin[pt\[Psi][Global`\[Lambda]]], | ||
-mcf[Global`\[Lambda]][[2]]Sin[pt\[Psi][Global`\[Lambda]]]+mcf[Global`\[Lambda]][[3]]Cos[pt\[Psi][Global`\[Lambda]]], | ||
mcf[Global`\[Lambda]][[4]] | ||
} | ||
] | ||
]; | ||
|
||
assoc = Last@orbit; | ||
assoc["PrecessionFrequency"]=\[CapitalUpsilon]\[Psi]; | ||
assoc["ParallelTransportedFrame"]=ptf; | ||
assoc["MarckCarterFrame"]=mcf; | ||
assoc["PrecessionPhase"]=pt\[Psi]; | ||
|
||
KerrParallelTransportFrameFunction[a,p,e,x,assoc] | ||
|
||
] | ||
|
||
|
||
KerrParallelTransportFramePhases[a_,p_,e_,x_]:=Module[ | ||
{orbit,mcf,\[CapitalUpsilon]\[Psi],pt\[Psi],ptf,assoc}, | ||
orbit=KerrGeoOrbit[a,p,e,x,"Method"->"Analytic","Parametrization"-> "Phases"]; | ||
mcf=Evaluate@MarckCarterFrame[orbit]; | ||
\[CapitalUpsilon]\[Psi] = MinoPrecessionFrequency[orbit]; | ||
pt\[Psi]=Function[{Global`qr,Global`q\[Theta],Global`q\[Psi]},Evaluate@PrecessionPhase[orbit,\[CapitalUpsilon]\[Psi],Global`qr,Global`q\[Theta],Global`q\[Psi]][0]]; | ||
|
||
ptf=Function[{Global`qr,Global`q\[Theta],Global`q\[Psi]}, | ||
Evaluate[ | ||
{ | ||
mcf[\[Lambda]][[1]], | ||
mcf[\[Lambda]][[2]]Cos[pt\[Psi][\[Lambda]]]+mcf[\[Lambda]][[3]]Sin[pt\[Psi][\[Lambda]]], | ||
-mcf[\[Lambda]][[2]]Sin[pt\[Psi][\[Lambda]]]+mcf[\[Lambda]][[3]]Cos[pt\[Psi][\[Lambda]]], | ||
mcf[\[Lambda]][[4]] | ||
mcf[Global`qr,Global`q\[Theta]][[1]], | ||
mcf[Global`qr,Global`q\[Theta]][[2]]Cos[pt\[Psi][Global`qr,Global`q\[Theta],Global`q\[Psi]]]+mcf[Global`qr,Global`q\[Theta]][[3]]Sin[pt\[Psi][Global`qr,Global`q\[Theta],Global`q\[Psi]]], | ||
-mcf[Global`qr,Global`q\[Theta]][[2]]Sin[pt\[Psi][Global`qr,Global`q\[Theta],Global`q\[Psi]]]+mcf[Global`qr,Global`q\[Theta]][[3]]Cos[pt\[Psi][Global`qr,Global`q\[Theta],Global`q\[Psi]]], | ||
mcf[Global`qr,Global`q\[Theta]][[4]] | ||
} | ||
] | ||
]; | ||
|
||
assoc = Last@orbit; | ||
assoc["PrecessionFrequency"]=\[CapitalUpsilon]\[Psi]; | ||
assoc["ParallelTransportedFrame"]=ptf; | ||
assoc["MarckCarterFrame"]=mcf; | ||
assoc["PrecessionPhase"]=pt\[Psi]; | ||
|
||
KerrParallelTransportFrameFunction[a,p,e,x,assoc] | ||
|
||
|
@@ -245,11 +297,12 @@ | |
method = OptionValue["Method"]; | ||
param = OptionValue["Parametrization"]; | ||
|
||
If[param =!= "Mino", Print["Only Mino time parametrization has been implemented for parallel transport."];Return[];]; | ||
If[param =!= "Mino"&& param =!= "Phases", Print["Only Mino time parametrization has been implemented for parallel transport."];Return[];]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should change these Print statements to Messages There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll take care of this (and other) changes to ParallelTransport.m There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another instance of a Print statement that we probably want to change to a Message There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
If[method =!= "Analytic", Print["Only analytic method has been implemented for parallel transport."];Return[];]; | ||
|
||
If[method == "Analytic", | ||
If[param == "Mino", Return[KerrParallelTransportFrameMino[a, p, e, x, initPhases]]]; | ||
If[param == "Phases", Return[KerrParallelTransportFramePhases[a, p, e, x]]]; | ||
]; | ||
|
||
Print["Unrecognized method: " <> method]; | ||
|
@@ -277,6 +330,7 @@ | |
|
||
|
||
KerrParallelTransportFrameFunction[a_, p_, e_, x_, assoc_][\[Lambda]_/;StringQ[\[Lambda]] == False] := assoc["ParallelTransportedFrame"][\[Lambda]] | ||
KerrParallelTransportFrameFunction[a_, p_, e_, x_, assoc_][\[Lambda]__] := assoc["ParallelTransportedFrame"][\[Lambda]] | ||
KerrParallelTransportFrameFunction[a_, p_, e_, x_, assoc_][y_?StringQ] := assoc[y] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add Keys support to KerrParallelTransportFrameFunction, just as we have for KerrGeoOrbitFunction There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a "TimeFrequency" key as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added it to the "Frequencies", but did not added a top level key, because I did not know what to best call it.