Wolfram言語™

一酸化炭素分子の小さい振動をモデル化する

In[1]:=
```qho = -(\[HBar]^2/(2 m)) Laplacian[u[x], {x}] + (m \[Omega]^2)/ 2 x^2 u[x];```

In[2]:=
```sol = DEigensystem[qho, u[x], {x, -\[Infinity], \[Infinity]}, 4, Assumptions -> \[HBar] > 0 && m > 0 && \[Omega] > 0, Method -> "Normalize"]```
Out[2]=

In[3]:=
`\[Psi][x_, t_] = Total[MapThread[1/2 Exp[I E t #1/\[HBar]] #2 &, sol]]`
Out[3]=

In[4]:=
```m = QuantityMagnitude[( Entity["Element", "Carbon"][ EntityProperty["Element", "AtomicMass"]] Entity["Element", "Oxygen"][EntityProperty["Element", "AtomicMass"]])/( Entity["Element", "Carbon"][ EntityProperty["Element", "AtomicMass"]] + Entity["Element", "Oxygen"][ EntityProperty["Element", "AtomicMass"]]), "AtomicMassUnits"]```
Out[4]=
In[5]:=
```\[Omega] = Sqrt[QuantityMagnitude[Quantity[1.86, "Kilonewtons"/"Meters"], "AtomicMassUnit"/"Femtoseconds"^2]/m]```
Out[5]=
In[6]:=
```\[HBar] = QuantityMagnitude[Quantity[1., "ReducedPlanckConstant"], "AtomicMassUnit"*"Picometers"^2/"Femtoseconds"]```
Out[6]=

In[7]:=
```\[Rho][x_, t_] = FullSimplify[ComplexExpand[Conjugate[\[Psi][x, t]] \[Psi][x, t]]]```
Out[7]=

In[8]:=
`Chop[Integrate[\[Rho][x, t], {x, -\[Infinity], \[Infinity]}]]`
Out[8]=

In[9]:=
```Animate[Plot[\[Rho][x, t], {x, -25, 25}, PlotRange -> {0, .16}, PlotTheme -> "Detailed", FrameLabel -> {Row[{x, RawBoxes@RowBox[{"(", "\"pm\"", ")"}]}, " "], None}, LabelStyle -> Larger, PlotLegends -> Placed[{Row[{HoldForm[\[Rho]][x, Quantity[NumberForm[t, {2, 1}], "Femtoseconds"]], RawBoxes@RowBox[{"(", SuperscriptBox["\"pm\"", -1], ")"}]}, " "]}, Above]], {t, 0., 5.7, ImageSize -> Small}, AnimationRate -> 1, SaveDefinitions -> True, Alignment -> Center]```