-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import matplotlib.pyplot as plt | ||
import numpy as np | ||
|
||
from pttools.bubble import Bubble, SolutionType | ||
from pttools.models import ConstCSModel | ||
from pttools.bubble.props import find_phase | ||
from pttools.bubble.thermo import kappa, kinetic_energy_density, va_trace_anomaly_diff | ||
|
||
from giese.lisa import kappaNuMuModel | ||
|
||
css2 = 1/3 | ||
csb2 = 1/4 | ||
# This is a problematic point | ||
v_wall = 0.84 | ||
# v_wall = 0.85 | ||
# v_wall = 0.86 | ||
alpha_n = 0.3 | ||
model = ConstCSModel(a_s=2, a_b=1, css2=css2, csb2=csb2, V_s=1) | ||
alpha_tbn = model.alpha_theta_bar_n_from_alpha_n(alpha_n) | ||
|
||
bubble = Bubble(model, v_wall=v_wall, alpha_n=alpha_n) | ||
bubble_fig = bubble.plot() | ||
|
||
kappa_tbn_giese, v, wow, xi, mode = kappaNuMuModel(cs2b=csb2, cs2s=css2, al=alpha_tbn, vw=v_wall) | ||
|
||
phase_pttools = find_phase(bubble.xi, bubble.v_wall) | ||
phase_giese = find_phase(xi, v_wall) | ||
|
||
if bubble.sol_type == SolutionType.SUB_DEF: | ||
w = wow * bubble.wn | ||
# w = np.concatenate([bubble.w[0], w]) | ||
w[xi <= v_wall] = bubble.w[0] | ||
phase_giese[1] = 1 | ||
elif bubble.sol_type == SolutionType.DETON: | ||
w = wow * bubble.w.max() | ||
w[xi >= v_wall] = bubble.w[-1] | ||
elif bubble.sol_type == SolutionType.HYBRID: | ||
w = wow * bubble.wn | ||
# w[xi < v_wall] *= bubble.w[0] / wow[0] | ||
else: | ||
raise RuntimeError | ||
|
||
det_pttools = va_trace_anomaly_diff(model, bubble.w, bubble.xi, v_wall, phase=phase_pttools) | ||
det_giese = va_trace_anomaly_diff(model, w, xi, v_wall, phase=phase_giese) | ||
print(det_pttools, det_giese) | ||
|
||
kappa_pttools = kappa(model=model, v=bubble.v, w=bubble.w, xi=bubble.xi, v_wall=v_wall, delta_e_theta=det_pttools) | ||
kappa_giese = kappa(model=model, v=v, w=w, xi=xi, v_wall=v_wall, delta_e_theta=det_giese) | ||
print(kappa_pttools, kappa_giese) | ||
|
||
ek_pttools = kinetic_energy_density(bubble.v, bubble.w, bubble.xi, v_wall) | ||
ek_giese = kinetic_energy_density(v, w, xi, v_wall) | ||
print(ek_pttools, ek_giese) | ||
|
||
kappa_tbn_pttools = bubble.kappa_giese | ||
print(kappa_tbn_pttools, kappa_tbn_giese) | ||
|
||
# print(phase_pttools) | ||
# print(phase_giese) | ||
bubble_fig.axes[0].plot(phase_pttools) | ||
bubble_fig.axes[0].plot(phase_giese, ls="--") | ||
|
||
# bubble_fig.axes[0].plot(xi, v, ls="--") | ||
# bubble_fig.axes[1].plot(xi, w, ls="--") | ||
bubble_fig.axes[0].scatter(xi, v, c="r") | ||
bubble_fig.axes[1].scatter(xi, w, c="r") | ||
for ax in bubble_fig.axes: | ||
ax.set_xlim(0, 1) | ||
|
||
# save(bubble_fig, "const_cs_bubble.png") | ||
plt.show() |