<div dir="ltr">Hi Norbert,<div><br></div><div>Thanks for the response!<br><br><span style="font-family:arial,sans-serif;font-size:13px">For sqrt(1-e^2)*asin (e), I don't think you kept enough of the expansion:</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">asin(e) -> e + e^3/6</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">sqrt(1 - e^2) -> 1 - e^2/2 - e^4/8 -> </span><span style="font-family:arial,sans-serif;font-size:13px">1 - e^2/2</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">AA3 = 2/e^2 - 2*sqrt(1-e^2)*asin (e) / e^3</span></div><div><font face="arial, sans-serif"> = 2/e^2 - (2/e^3)*(e - e^3/3 - e^5/12)</font></div>
<div><font face="arial, sans-serif"> = 2/e^2 - 2/e^2 + 2/3</font></div><div><font face="arial, sans-serif"> = 2/3</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Throwing the expression into Python and setting e = tiny number gives the same result.</font></div>
<div><div><br></div>
<div>Best,</div><div><br>Charles</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 14, 2013 at 1:29 PM, Norbert Flocke <span dir="ltr"><<a href="mailto:flocke@flash.uchicago.edu" target="_blank">flocke@flash.uchicago.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry, there is a typo in the last AA3 equations. It should read:<div class="im"><br>
<br>
AA3 -> 2/e^2 - 2*(1-e^2/2)*e / e^3<br></div>
-> 2/e^2 - 2/e^2 + (2*e^2/2*e^2)<br>
-> 1<span class="HOEnZb"><font color="#888888"><br>
<br>
Norbert</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, 14 Aug 2013, Norbert Flocke wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Charles,<br>
<br>
The answer to your first question I can provide. As written in the code on line 78, the value of AA3 is<br>
<br>
AA3 = (2*sqrt(1-e^2)/e^2) * (1/sqrt(1-e^2) - asin (e)/e)<br>
<br>
or, written out<br>
<br>
AA3 = 2/e^2 - 2*sqrt(1-e^2)*asin (e) / e^3<br>
<br>
where e is the eccentricity. If e -> zero, then the MacLaurin (what coincidence!) expansions are:<br>
<br>
asin (e) -> e<br>
sqrt (1-e^2) -> 1 - e^2/2<br>
<br>
When you insert these limits into the AA3 equation, then:<br>
<br>
AA3 -> 2/e^2 - 2*(1-e^2/2)*e / e^3<br>
-> 2/e^2 - 2/e^2 + 2*e^2/2<br>
-> 1<br>
<br>
so there is no error in the formula.<br>
<br>
Cheers,<br>
Norbert<br>
<br>
<br>
On Wed, 14 Aug 2013, Chenchong Zhu wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi FLASH users,<br>
<br>
I'm currently playing with the MacLaurin spheroid example that comes with<br>
FLASH to see how well the spheroid can be represented hydrodynamically.<br>
I'm not entirely certain, but I think I might have found two bugs in the<br>
code though.<br>
<br>
On line 78 of Simulation_init.F90 AA3 as written approaches 2/3 rather than<br>
1 as sim_eccentricity goes to 0. It obeys the proper limit if it's changed<br>
to "AA3 = (3.0*sqrt...".<br>
<br>
In Simulation_initBlock.F90, under case(sim_geom3DCartesian), vxfac and<br>
vyfac have z-dependencies on their velocities. They should be multiplied<br>
by rxyinv = 1./sqrt(xdist**2 + ydist**2) rather than rinv if we want rigid<br>
rotation.<br>
<br>
Best,<br>
<br>
Charles<br>
<br>
</blockquote>
<br>
</blockquote>
</div></div></blockquote></div><br></div>