Skip to content

Commit 1bf337e

Browse files
committed
stochastic particle notes, esquared simplification, updated waves
1 parent 80dcfae commit 1bf337e

9 files changed

Lines changed: 225 additions & 23 deletions

content/complex-kg.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ $$
5151

5252
This is directly computable for each cubic cell $i$ in the system.
5353

54-
It becomes very clear when explicitly written out in this manner that charge represents a coupling of the two otherwise independent variables in the complex number, and this suggests why a single scalar number cannot represent a conserved charge value. The fact that these variables are coupled here, but not in the actual wave equations that drive their updating, seems magical.
54+
It becomes clear when explicitly written out in this manner that charge represents a coupling of the two otherwise independently-updated variables in the complex number, and this suggests why a single scalar number cannot represent a conserved charge value.
5555

5656
{id="sim_cc" title="Complex charge" collapsed="true"}
5757
```Goal
@@ -82,16 +82,15 @@ func valUpdate() {
8282
bphaseStr = fmt.Sprintf("b phase: %4.0f", bphase)
8383
massStr = fmt.Sprintf("mass: %4.1f", mass)
8484
hbarStr = fmt.Sprintf("hbar: %4.1f", hbar)
85-
bi := ai * float64(math32.Cos(math32.DegToRad(float32(bphase))))
86-
bvi := math.Sqrt(mcOverHSq) * ai * float64(math32.Cos(math32.DegToRad(float32(bphase+90))))
85+
bi := ai * float64(math32.Cos(math32.DegToRad(float32(-bphase))))
86+
bvi := math.Sqrt(mcOverHSq) * ai * float64(math32.Sin(math32.DegToRad(float32(-bphase))))
8787
##
8888
mf := array(mcOverHSq)
8989
cf := array(heOver2mCSq)
9090
ap := array(ai)
9191
bp := array(bi)
9292
av := array(0.0)
9393
bv := array(bvi)
94-
mxv := array(0.0)
9594
##
9695
for t := range 100 {
9796
##
@@ -106,8 +105,6 @@ func valUpdate() {
106105
107106
bv -= mf * bp
108107
bp += bv
109-
110-
mxv = max(mxv, av)
111108
##
112109
}
113110
msgStr = fmt.Sprintf("<b>Charge: %7.3g </b>", chg.Float(99))
@@ -175,9 +172,9 @@ addSlider(&massStr, &mass, 0.1, 1.0)
175172
addSlider(&hbarStr, &hbar, 0.1, 1.0)
176173
```
177174

178-
[[#sim_cc]] demonstrates how this works, in terms of two simple harmonic oscillator variables _a_ and _b_, which are set to be a specific phase apart from each other. Regardless of the phase relationship, the computed charge value remains constant across the cycles of oscillation. However, critically, the value of the charge is directly a function of this phase relationship, with a maximum of 0.5 when the _b_ value is +90 degrees in relation to the _a_ value, and a minimum of -0.5 for -90 degrees, and zero for 0 or 180 degrees. These relationships are fairly obvious once you appreciate the relationship between velocity and position for each of the variables, and how they enter into the charge equation.
175+
[[#sim_cc]] demonstrates how this works, in terms of two simple [[harmonic oscillator]] variables _a_ and _b_, which are set to be a specific phase apart from each other (+90 degrees shifts _b_ to the _left_ (earlier) relative to _a_, while -90 shifts to the right, due to the trigonometric convention of 0 degrees being at 1,0 and proceeding counter-clockwise from there). Regardless of the phase relationship, the computed charge value remains constant across the cycles of oscillation. However, critically, the value of the charge is directly a function of this phase relationship, with a maximum of 0.5 when the _b_ value is +90 degrees in relation to the _a_ value, and a minimum of -0.5 for -90 degrees, and zero for 0 or 180 degrees. These relationships are fairly obvious once you appreciate the relationship between velocity and position for each of the variables (which are 90 degrees out of phase with each other, always), and how they enter into the charge equation.
179176

180-
Because the separate real-valued wave functions are independently updated, it thus becomes important that these two wave states are initialized with a specific phase relationship, which will then determine the charge value represented.
177+
Critically, complex numbers are _always_ 90 degrees out of phase with each other by the very nature of the complex plane. Thus, even though the separate real-valued wave functions are independently updated, it is critical that these two wave states are _initialized_ with the 90 degree phase relationship appropriate for complex numbers, which will then determine the sign of the charge value represented.
181178

182179
Perhaps the most important feature of this charge equation is that it can be either positive or negative, as a function of the phase relationship. This is not true of the corresponding expression for Schrödinger's equation, which is "definitely positive", or, in mathematical terminology, "positive definite". This is one of the major reasons why standard quantum physics has strongly embraced Schrödinger's equation, and not KG: KG does not fit with the standard probabilistic framework, where the wave describes a probability, and a probability is always positive.
183180

content/harmonic-oscillator.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
+++
2+
bibfile = "mechphys.json"
3+
+++
4+
5+
The **simple harmonic oscillator** (SHO) captures the core oscillatory behavior of [[waves]], without any spatial dimensions to bother with. It can be seen as the 0-dimensional version of a wave, where the force that drives the oscillation comes not from neighbors, but from the position (height) of the wave itself. As such, it provides a potentially interesting role in the mechanics of [[stochastic particles]] because it can be entirely localized to one discrete grid cell within the [[cellular automaton]] framework. Thus, a particle in this view can be considered to be a simple harmonic oscillator that periodically jumps between cells.
6+
7+
The basic equations from [[waves]] for the SHO are:
8+
9+
{id="eq_force" title="restoring force"}
10+
$$
11+
f = -c^2 y^t
12+
$$
13+
14+
where $c$ is the basic rate update constant, analogous to the speed of light in waves, which determines the effective strength of the restoring force, and thus the oscillation rate. The _t_ suffix indicates the time step (only for variables that require integration over time). Everything else from this point onward is the same, in the basic Newtonian physics framework of acceleration, velocity, and position:
15+
16+
{id="eq_a" title="acceleration"}
17+
$$
18+
a = \frac{f}{m}
19+
$$
20+
21+
{id="eq_" title="new velocity"}
22+
$$
23+
v^{t+1} = v^t + a
24+
$$
25+
26+
{id="eq_" title="new state"}
27+
$$
28+
y^{t+1} = y^t + v^{t+1}
29+
$$
30+
31+
{id="sim_sho" title="Simple harmonic oscillator" collapsed="true"}
32+
```Goal
33+
ip := 1.0
34+
c := 0.2
35+
mass := 0.5
36+
csq := c * c
37+
38+
var massStr, cStr, msgStr string
39+
40+
##
41+
totalTime := 100
42+
sp := zeros(totalTime)
43+
sv := zeros(totalTime)
44+
pE := zeros(totalTime)
45+
kE := zeros(totalTime)
46+
tE := zeros(totalTime)
47+
##
48+
49+
func valUpdate() {
50+
massStr = fmt.Sprintf("mass: %4.1f", mass)
51+
cStr = fmt.Sprintf("c: %4.1f", c)
52+
csq = c * c
53+
##
54+
mf := array(mass)
55+
cf := array(csq)
56+
p := array(ip)
57+
pp := array(ip)
58+
pv := array(0.0)
59+
mv := array(0.0)
60+
v := array(0.0)
61+
pot := array(0.0)
62+
kin := array(0,0)
63+
##
64+
for t := range 100 {
65+
##
66+
pv = 1.0 * v
67+
pp = 1.0 * p
68+
v = pv - (cf * pp) / mf
69+
p = pp + v
70+
71+
mv = 0.5 * (v + pv) // midway
72+
pot = 0.5 * pp * pp
73+
kin = (mv * mv * mf) / (2.0 * cf)
74+
75+
sp[t] = p
76+
sv[t] = v
77+
pE[t] = pot
78+
kE[t] = kin
79+
tE[t] = pot + kin
80+
##
81+
}
82+
msgStr = fmt.Sprintf("<b>Total E: %7.3g </b>", tE.Float(99))
83+
}
84+
85+
valUpdate()
86+
87+
plotStyler := func(s *plot.Style) {
88+
s.Plot.XAxis.Label = "Time"
89+
s.Plot.XAxis.Range.SetMax(100).SetMin(0)
90+
}
91+
plot.SetStyler(sp, plotStyler)
92+
93+
fig1, pw := lab.NewPlotWidget(b)
94+
pl := plots.NewLine(fig1, sp)
95+
vl := plots.NewLine(fig1, sv)
96+
pEl := plots.NewLine(fig1, pE)
97+
kEl := plots.NewLine(fig1, kE)
98+
tEl := plots.NewLine(fig1, tE)
99+
fig1.Legend.Add("p", pl)
100+
fig1.Legend.Add("v", vl)
101+
fig1.Legend.Add("pE", pEl)
102+
fig1.Legend.Add("kE", kEl)
103+
fig1.Legend.Add("tE", tEl)
104+
105+
msgTx := core.NewText(b)
106+
msgTx.Styler(func(s *styles.Style) {
107+
s.Min.X.Ch(80) // clean rendering with variable width content
108+
})
109+
core.Bind(&msgStr, msgTx)
110+
111+
func updt() {
112+
valUpdate()
113+
pl.SetData(sp)
114+
vl.SetData(sv)
115+
pEl.SetData(pE)
116+
kEl.SetData(kE)
117+
tEl.SetData(tE)
118+
msgTx.UpdateRender()
119+
pw.NeedsRender()
120+
}
121+
122+
func addSlider(label *string, val *float64, mnVal, mxVal float32) {
123+
tx := core.NewText(b)
124+
tx.Styler(func(s *styles.Style) {
125+
s.Min.X.Ch(40) // clean rendering with variable width content
126+
})
127+
core.Bind(label, tx)
128+
sld := core.NewSlider(b).SetMin(mnVal).SetMax(mxVal).SetEnforceStep(true)
129+
if mxVal > 10 {
130+
sld.SetStep(10)
131+
} else {
132+
sld.SetStep(0.1)
133+
}
134+
sld.SendChangeOnInput()
135+
sld.OnChange(func(e events.Event) {
136+
updt()
137+
tx.UpdateRender()
138+
})
139+
core.Bind(val, sld)
140+
}
141+
142+
addSlider(&massStr, &mass, 0.1, 1.0)
143+
addSlider(&cStr, &c, 0.1, 1.0)
144+
```
145+
146+
The equivalent of the wavelength for the SHO is the _period_, in time, for the cycle to repeat.
147+

content/special-relativity.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ $$
167167

168168
These two variables can be related in the relativistic energy-momentum equation:
169169

170+
{id="eq_esq-p" title="relativistic energy-momentum"}
170171
$$
171172
E^2 = \vec{p}^2 c^2 + (m_0 c^2)^2
172173
$$
@@ -193,9 +194,51 @@ $$
193194
E \approx \frac{1}{2}m_0 \vec{v}^2 + m_0 c^2
194195
$$
195196

196-
Interestingly, the [[Klein-Gordon]] equation can be derived directly from this equation!
197+
Interestingly, the [[Klein-Gordon]] equation can be derived directly from the full $E^2$ equation!
197198

198-
Finally, we note that the warping of space and time that produces gravitational effects according to general relativity enters into our model in a very different way, as described later. Thus, in our model, special and general relativity result from two very different mechanisms.
199+
## Simplification of the energy factor
200+
201+
The relativistic energy factor as normally expressed in [[#eq_esq-p]] actually just contains 3 essential variables, when you apply the Lorentz factor to the momentum expression. Thus, it can be simplified considerably to combine all these factors together, which reveals a rather interesting expression:
202+
203+
{id="eq_esq-simp" title="simplified relativistic energy-momentum"}
204+
$$
205+
E^2 = \frac{c^6 m_0^2}{c^2 - v^2}
206+
$$
207+
208+
The $c^6$ in the numerator is particularly striking, in that one rarely sees such a large power in a fundamental equation such as this. If the "basic" power for a squared equation such as this is $c^2$, then it seems that there are 3 such elements coming together in this energy expression. Does that perhaps have something to do with the 3 spatial dimensions? Interestingly, in [[stochastic particles]], we create a system of 3 simple [[harmonic oscillators]] to encode the momentum of a discrete particle, one for each spatial dimension, so perhaps this is in fact represented in the total energy of the particle.
209+
210+
The denominator is also another way of understanding the Lorentz factor, where as the velocity $v$ increases toward $c$, this denominator gets smaller, and thus the $E^2$ factor grows toward infinity.
211+
212+
### Algebraic steps
213+
214+
For concreteness, here are the steps taken to arrive at this simplification:
215+
216+
$$
217+
E^2 = \frac{c^2 m_0^2 v^2}{1 - \frac{v^2}{c^2}} + (c^4 m_0^2)
218+
$$
219+
220+
$$
221+
E^2 = \frac{c^2 m_0^2 v^2}{\frac{c^2 - v^2}{c^2}} + (c^4 m_0^2)
222+
$$
223+
224+
$$
225+
E^2 = \frac{c^4 m_0^2 v^2}{c^2 - v^2} + (c^4 m_0^2)
226+
$$
227+
228+
$$
229+
E^2 = \frac{c^4 m_0^2 v^2}{c^2 - v^2} + \frac{(c^4 m_0^2)(c^2 - v^2)}{c^2 - v^2}
230+
$$
231+
232+
$$
233+
E^2 = \frac{c^4 m_0^2 (v^2 + c^2 - v^2)}{c^2 - v^2}
234+
$$
235+
236+
$$
237+
E^2 = \frac{c^6 m_0^2}{c^2 - v^2}
238+
$$
239+
240+
241+
<!--- Finally, we note that the warping of space and time that produces gravitational effects according to general relativity enters into our model in a very different way, as described later. Thus, in our model, special and general relativity result from two very different mechanisms. actually maybe not! -->
199242

200243
## Relativistic momentum and velocity
201244

content/stochastic-particles.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ It is essential that these probability computations are all propagated in terms
9696

9797
The basic behavior of a stochastic particle independent of any waves is described by [[@^Sciarretta18]] (in the 1D case; [[@Sciarretta21]] extends to the 3D case with spin). In this non-relativistic model, the particle has an associated real-valued 3-component normalized (range -1..1) momentum vector $\vec{\nu}$ that drives a _stable_ trajectory over time, despite the stochastic nature of each movement step. Any forces accumulate in this momentum vector, and it propagates with the particle. The motion of the particle is defined per dimension $\mu$ (per the [[four-vector]] notation), in reference to an energy-like factor:
9898

99+
todo: figure out if e should in fact be across all dims -- seems like it should. just run an empirical sim.
100+
99101
$$
100102
e_{\mu} = \frac{1 + \nu_{\mu}^2}{2}
101103
$$
@@ -120,15 +122,25 @@ It would be useful to derive a relativistic version of these individual motion e
120122

121123
Key points:
122124

123-
* key point about simple harmonic oscillator (SHO): the height position _itself_ provides the acceleration force pulling back -- this is even simpler than a wave! So there is a 4 vector of SHO that represent the momentum of the particle, and are coupled to the wave variables! The time-like one is the "heartbeat" of the particle, representing the rest mass, while the 3 spatial ones represent the direction.
125+
* key point about simple [[harmonic oscillator]] (SHO): the height position _itself_ provides the acceleration force pulling back -- this is even simpler than a wave! So there is a 4 vector of SHO that represent the momentum of the particle, and are coupled to the wave variables! The time-like one is the "heartbeat" of the particle, representing the rest mass, while the 3 spatial ones represent the velocity direction.
126+
127+
* each velocity axis (X,Y,Z) has a phase relative to the central time-like beat, and this phase represents the -1..+1 velocity value. This phase relationship is now demonstrated in [[complex KG]]. The extreme nutrino-level particle would have the extreme case. There would have to be some kind of coordination across the 3 pairs, so the total norm could not exceed 1.
128+
129+
* the resting state is all four oscillating in sync with 0 phase, and then forces act by boosting or lagging an axis wave relative to the central one. this could be pretty natural. the amount of boost needs to be dependent on existing phase to capture relativistic effects.
130+
131+
* the wave oscillation frequency is determined by the relativistic E^2 energy which goes up as momentum increases. This captures the key momentum / frequency relationship with QM. Never quite gets to CSq with massive particles.
132+
133+
* probability of jumping is then proportional to these values. can just implement that. it might emerge more naturally from some kind of phase offset dynamic, but that can be a later stage.
134+
135+
* coupling to surrounding wave is directly via drive from the central time-like oscillator, which provides the driving input to the field in its neighborhood.
124136

125-
* How does it represent both positive and negative directions? In phase relationship with the center? maybe they all just oscillate the same and it is ONLY the phase relationship? An acceleration kick just bumps the phase? doesn't capture the conservation dynamics among the SHOs.
137+
* An acceleration kick just bumps the phase? doesn't capture the conservation dynamics among the SHOs.
126138

127139
Weyl wave couples spin with direction as a helical thing.
128140

129141
There is a literature on coupling of a stochastic particle with a "heat bath", somewhat like the [[zero-point]] field, and trying to understand the aggregate behavior of such a system. [[@^DunkelHanggi05a]], [[@DunkelHanggi05]] provide a relatively accessible treatment, building on foundational work ([[@Dudley65]], [[@Dudley73]], [[@GuerraRuggiero78]], [[@Nakagomi88]]). This all builds on Langevin equations, which are stochastic equations of motion, with connections to Ornstein-Ullenbach and Fokker-Planck etc. The specific restriction to heat bath dynamics vs. some kind of other intrinsic stochastic process is perhaps overly restrictive, but they nevertheless have a four-vector representation that seems to involve a conservation of energy between the time and momentum factors, which is really the essential calculus for the SHO model.
130142

131-
One key "no-go" finding from [[@^Dudley65]] is that a purely markovian position-based system doesn't capture particle motion -- you _need_ an additional momentum / velocity vector as part of the state. This is definitely key.
143+
One key "no-go" finding from [[@^Dudley65]] is that a purely Markovian position-based system doesn't capture particle motion -- you _need_ an additional momentum / velocity vector as part of the state. This is definitely key.
132144

133145
* compton wavelength as function of rest mass -- does this fall out?
134146
* $\nu$ is already 0-c normalized -- v/c

content/waves-simulation.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ bibfile = "mechphys.json"
88
wavesim.Embed(b,
99
func(sim *wavesim.Sim) { // config
1010
sim.Config.GPU = true
11-
sim.Config.Equation = wavesim.Wave1D
11+
sim.Params.C = 1
12+
sim.Params.ThreeD.SetBool(false)
13+
sim.Config.Equation = wavesim.Wave
1214
sim.Config.Size.Set(80, 1, 1)
1315
sim.ViewInit(wavesim.Wave1DViewAll)
16+
sim.WaveStats()
1417
},
1518
func(sim *wavesim.Sim) { // init
1619
sim.PosWavePacket(wavesim.WavePos, math32.X, math32.Vec3i(40, 0, 0), -1, 8, 8, 0, 1.5)

content/waves.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $$
4040
a = \frac{f}{m}
4141
$$
4242

43-
In the discrete time framework, we can simply increment a new *velocity* term *v* by this acceleration:
43+
In the discrete time framework, we can simply increment a new _velocity_ term _v_ by this acceleration:
4444

4545
{id="eq_" title="new velocity"}
4646
$$

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ go 1.25.6
44

55
require (
66
cogentcore.org/core v0.3.38
7-
github.com/WaveReality/waves v0.0.4
7+
github.com/WaveReality/waves v0.0.5
88
)
99

1010
require (
11-
cogentcore.org/lab v0.1.16 // indirect
11+
cogentcore.org/lab v0.1.18 // indirect
1212
github.com/Bios-Marcel/wastebasket/v2 v2.0.3 // indirect
1313
github.com/Masterminds/vcs v1.13.3 // indirect
1414
github.com/adrg/strutil v0.3.1 // indirect

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
codeberg.org/go-pdf/fpdf v0.11.1 h1:U8+coOTDVLxHIXZgGvkfQEi/q0hYHYvEHFuGNX2GzGs=
22
codeberg.org/go-pdf/fpdf v0.11.1/go.mod h1:Y0DGRAdZ0OmnZPvjbMp/1bYxmIPxm0ws4tfoPOc4LjU=
3-
cogentcore.org/core v0.3.37 h1:YZyUbeRTr/jpVjKyV6pHFfzsyHt/fPcsH787N3LDlVQ=
4-
cogentcore.org/core v0.3.37/go.mod h1:11/KD463R4oHAcGyCEi/BLrABrX14nOYO5O4qLI+Zzg=
5-
cogentcore.org/lab v0.1.16 h1:TL/6rxEyeb9t2D9juMB9herUqLkU69NCZXKOn+DTSXE=
6-
cogentcore.org/lab v0.1.16/go.mod h1:Jm1CU2TnOZPAtxl/33RBe8keqMpM1BELMT+yAzU+J90=
3+
cogentcore.org/core v0.3.38 h1:uJe9PbuGYOK0h6AO/YK/LLz/c3iyKD7IYXtUR0Yt608=
4+
cogentcore.org/core v0.3.38/go.mod h1:11/KD463R4oHAcGyCEi/BLrABrX14nOYO5O4qLI+Zzg=
5+
cogentcore.org/lab v0.1.18 h1:caI1Uc4J9ceEviI+HgslGmuovvlzgqdNeyCTzOf5Z/E=
6+
cogentcore.org/lab v0.1.18/go.mod h1:jyZAg/wP3WUOvfNzDjaV2LuYz258UQEIdVB72yQ/p1I=
77
git.sr.ht/~sbinet/overlayfs v0.1.1 h1:HvCHXT1cs8RMSjNLQXxPPosB2hgR3tRC8RniH0f3ESg=
88
git.sr.ht/~sbinet/overlayfs v0.1.1/go.mod h1:TmrIWKlxyPJJ7vchTqk85DUcW6IDsIa7ONLvSGIw438=
99
github.com/Bios-Marcel/wastebasket/v2 v2.0.3 h1:TkoDPcSqluhLGE+EssHu7UGmLgUEkWg7kNyHyyJ3Q9g=
1010
github.com/Bios-Marcel/wastebasket/v2 v2.0.3/go.mod h1:769oPCv6eH7ugl90DYIsWwjZh4hgNmMS3Zuhe1bH6KU=
1111
github.com/Masterminds/vcs v1.13.3 h1:IIA2aBdXvfbIM+yl/eTnL4hb1XwdpvuQLglAix1gweE=
1212
github.com/Masterminds/vcs v1.13.3/go.mod h1:TiE7xuEjl1N4j016moRd6vezp6e6Lz23gypeXfzXeW8=
13-
github.com/WaveReality/waves v0.0.3 h1:JsDhFCAEuaIW0gEIzqYg4/9GX6rQGpygV8qU5W4+LbE=
14-
github.com/WaveReality/waves v0.0.3/go.mod h1:KGk0G9rcpVP/lWMnMN4jmX9tcLZjGiMwIFMUfkDz8/8=
13+
github.com/WaveReality/waves v0.0.5 h1:jugQLUs59Txft4OwapSTeyOGLuBKzV6DQs9vTpmqR2g=
14+
github.com/WaveReality/waves v0.0.5/go.mod h1:qVdxjX78Ea2rLOaBc89xgoOQp7EVEaNoLPrYV6ZPNAA=
1515
github.com/adrg/strutil v0.3.1 h1:OLvSS7CSJO8lBii4YmBt8jiK9QOtB9CzCzwl4Ic/Fz4=
1616
github.com/adrg/strutil v0.3.1/go.mod h1:8h90y18QLrs11IBffcGX3NW/GFBXCMcNg4M7H6MspPA=
1717
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=

mathcache.json.gz

27.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)