Skip to content

Commit

Permalink
Improve Giese testing script
Browse files Browse the repository at this point in the history
  • Loading branch information
AgenttiX committed Dec 7, 2024
1 parent 2fe6f9b commit 1dd15db
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions examples/giese_testing3.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import matplotlib.pyplot as plt
import numpy as np

from pttools.bubble import Bubble, SolutionType
from pttools.models import ConstCSModel
Expand All @@ -8,14 +7,14 @@

from giese.lisa import kappaNuMuModel

css2 = 1/3
css2 = 1/4
csb2 = 1/4
# This is a problematic point
v_wall = 0.84
v_wall = 0.56734694
# 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_n = 0.01
model = ConstCSModel(a_s=5, a_b=1, css2=css2, csb2=csb2, V_s=1, alpha_n_min=0.01)
alpha_tbn = model.alpha_theta_bar_n_from_alpha_n(alpha_n)

bubble = Bubble(model, v_wall=v_wall, alpha_n=alpha_n)
Expand All @@ -26,34 +25,38 @@
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
w = wow * bubble.wn
# 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)
print("va_trace_anomaly_diff", 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)
print("kappa", 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)
print("e_K", ek_pttools, ek_giese)

kappa_tbn_pttools = bubble.kappa_giese
print(kappa_tbn_pttools, kappa_tbn_giese)
print("kappa_tbn", kappa_tbn_pttools, kappa_tbn_giese)

print("csb", model.csb)
print("v_mu2", bubble.v_mu)

# print(phase_pttools)
# print(phase_giese)
Expand Down

0 comments on commit 1dd15db

Please sign in to comment.