Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Physics sorted by activeWhere are notebooks for "Classical Mechanics with Mathematica", 2nd ed?
https://community.wolfram.com/groups/-/m/t/1419748
I just got the new book ""Classical Mechanics with Mathematica", 2nd ed, by Romano and Marasco. The preface refers to available Mathematica notebooks, the cover includes a box "EXTRAS ONLINE".
Where are those notebooks found?
So far as I can see, there is no indication in the books' preface, colophon, etc., as to the notenooks' loccation. And the page for the book at the publisher's website, https://www.springer.com/us/book/9783319775944, seems to have no link whatsoever to such notebooks. (The "Downloads" link there has as target an external site giving metrics on downloads of the ebook and individual chapters of it.)
In face, as I have begun to read the book, I have not yet found any mention of Mathematica, not even in exercises in the "Mechanics" part of the book, where the preface alleges that exercises using Mathematica may be found.Murray Eisenberg2018-08-22T21:57:28ZSolving wave equation with spherical coordinates using NDSolveValue?
https://community.wolfram.com/groups/-/m/t/2203903
I am trying to use NDSolveValue for a fairly simple setup (used for testing that I understand NDSolveValue which apparently I don't). I have a wave equation (for a vector potential) where I use a plane wave propagating in the -x direction as initial conditions. It works fine in Cartesian coordinates where I only need to solve for 1 function. But if I switch to spherical coordinates where I have two functions (the r and phi components of the vector potential) then the solution is no longer correct. I wonder if it is because I am not extracting the results from NDSolveValue correctly; if I compare the initial conditions that are used by NDSolveValue then these do not correspond to the "solution" I get out at the initial time. So I am wondering if anyone might have an idea as to what is going wrong - am I for instance extracting the output from NDSolveValue incorrectly? The notebook code is shown below.
In[1]:= Needs["DifferentialEquations`InterpolatingFunctionAnatomy`"]
eqr = -r r D[Ar[t, r, phi], t, t] +
r r D[Ar[t, r, phi], r, r] + D[Ar[t, r, phi], phi, phi] +
2 r D[Ar[t, r, phi], r] - 2 r D[Aphi[t, r, phi], phi] -
2 Ar[t, r, phi] == 0
eqphi = -r r r D[Aphi[t, r, phi], t, t] +
r r r D[Aphi[t, r, phi], r, r] + D[Aphi[t, r, phi], phi, phi] r +
4 r r D[Aphi[t, r, phi], r] + r Aphi[t, r, phi] +
2 D[Ar[t, r, phi], phi] == 0
a[r_, phi_] := 1
omega := 0.2
Aric =
Ar[t, r, phi] == a[r, phi] Sin[phi] Cos[omega (r Cos[phi] + t)]
Aphiic =
Aphi[t, r, phi] == a[r, phi] Cos[phi] Cos[omega (r Cos[phi] + t)]/r
{Arsol, Aphisol} =
NDSolveValue[{eqr, eqphi,
DirichletCondition[{Aric, Aphiic}, t == 0]}, {Ar, Aphi}, {t, 0,
100}, {r, 0.001, Sqrt[2] 100}, {phi, 0, 2 Pi}, AccuracyGoal -> 24,
PrecisionGoal -> 10]
For any rvalue and phivalue in the intervals [0.001,Sqrt[2] 100] and [0, 2 Pi] I would expect that Arsol[0,rvalue,phivalue] and Aphisol[0,rvalue,phivalue] should be equal to the expressions indicated in Aric and Aphiic evaluated at those same rvalue, phivalue. But they are not. Why?Sofie Koksbang2021-02-25T08:51:24Z