From 31052ff43733069c95a2678ecead2875ff87c89d Mon Sep 17 00:00:00 2001 From: Benoit Date: Tue, 5 Nov 2024 14:01:53 -0500 Subject: [PATCH 1/2] Changed the notation in xSM to match section 6.1 and manySinglets.py --- .../singletStandardModelZ2.py | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/Models/SingletStandardModel_Z2/singletStandardModelZ2.py b/Models/SingletStandardModel_Z2/singletStandardModelZ2.py index c6ef2545..92fabd66 100644 --- a/Models/SingletStandardModel_Z2/singletStandardModelZ2.py +++ b/Models/SingletStandardModel_Z2/singletStandardModelZ2.py @@ -59,7 +59,7 @@ class SingletSMZ2(GenericModel): Z2 symmetric SM + singlet model. The potential is given by: - V = msq |phi|^2 + lam |phi|^4 + 1/2 b2 S^2 + 1/4 b4 S^4 + 1/2 a2 |phi|^2 S^2 + V = 1/2 muHsq |phi|^2 + 1/4 lHH |phi|^4 + 1/2 muSsq S^2 + 1/4 lSS S^4 + 1/4 lHS |phi|^2 S^2 This class inherits from the GenericModel class and implements the necessary methods for the WallGo package. @@ -195,14 +195,14 @@ def calculateLagrangianParameters( # these are direct inputs: modelParameters["RGScale"] = inputParameters["RGScale"] - modelParameters["a2"] = inputParameters["a2"] - modelParameters["b4"] = inputParameters["b4"] + modelParameters["lHS"] = inputParameters["lHS"] + modelParameters["lSS"] = inputParameters["lSS"] - modelParameters["lambda"] = 0.5 * massh1**2 / v0**2 + modelParameters["lHH"] = 0.5 * massh1**2 / v0**2 # should be same as the following: - # modelParameters["msq"] = -massh1**2 / 2. - modelParameters["msq"] = -modelParameters["lambda"] * v0**2 - modelParameters["b2"] = massh2**2 - 0.5 * v0**2 * inputParameters["a2"] + # modelParameters["muHsq"] = -massh1**2 / 2. + modelParameters["muHsq"] = -modelParameters["lHH"] * v0**2 + modelParameters["muSsq"] = massh2**2 - 0.5 * v0**2 * inputParameters["lHS"] # Then the gauge and Yukawa sector massT = inputParameters["Mt"] @@ -352,19 +352,19 @@ def evaluate( fields = Fields(fields) v, x = fields.getField(0), fields.getField(1) - msq = self.modelParameters["msq"] - b2 = self.modelParameters["b2"] - lam = self.modelParameters["lambda"] - b4 = self.modelParameters["b4"] - a2 = self.modelParameters["a2"] + muHsq = self.modelParameters["muHsq"] + muSsq = self.modelParameters["muSsq"] + lHH = self.modelParameters["lHH"] + lSS = self.modelParameters["lSS"] + lHS = self.modelParameters["lHS"] # tree level potential potentialTree = ( - 0.5 * msq * v**2 - + 0.25 * lam * v**4 - + 0.5 * b2 * x**2 - + 0.25 * b4 * x**4 - + 0.25 * a2 * v**2 * x**2 + 0.5 * muHsq * v**2 + + 0.25 * lHH * v**4 + + 0.5 * muSsq * x**2 + + 0.25 * lSS * x**4 + + 0.25 * lHS * v**2 * x**2 ) # Particle masses and coefficients for the CW potential @@ -438,16 +438,16 @@ def bosonInformation( # pylint: disable=too-many-locals # Scalar masses, just diagonalizing manually. matrix (A C // C B) mass00 = ( - self.modelParameters["msq"] - + 0.5 * self.modelParameters["a2"] * x**2 - + 3 * self.modelParameters["lambda"] * v**2 + self.modelParameters["muHsq"] + + 0.5 * self.modelParameters["lHS"] * x**2 + + 3 * self.modelParameters["lHH"] * v**2 ) mass11 = ( - self.modelParameters["b2"] - + 0.5 * self.modelParameters["a2"] * v**2 - + 3 * self.modelParameters["b4"] * x**2 + self.modelParameters["muSsq"] + + 0.5 * self.modelParameters["lHS"] * v**2 + + 3 * self.modelParameters["lSS"] * x**2 ) - mass01 = self.modelParameters["a2"] * v * x + mass01 = self.modelParameters["lHS"] * v * x thingUnderSqrt = (mass00 - mass11) ** 2 + 4 * mass01**2 msqEig1 = 0.5 * (mass00 + mass11 - np.sqrt(thingUnderSqrt)) @@ -457,9 +457,9 @@ def bosonInformation( # pylint: disable=too-many-locals mZsq = mWsq + self.modelParameters["g1"] ** 2 * v**2 / 4 # Goldstones mGsq = ( - self.modelParameters["msq"] - + self.modelParameters["lambda"] * v**2 - + 0.5 * self.modelParameters["a2"] * x**2 + self.modelParameters["muHsq"] + + self.modelParameters["lHH"] * v**2 + + 0.5 * self.modelParameters["lHS"] * x**2 ) # h, s, chi, W, Z @@ -697,8 +697,8 @@ def getBenchmarkPoints(self) -> list[ExampleInputPoint]: "g3": 1.2279920495357861, "mh1": 125.0, "mh2": 120.0, - "a2": 0.9, - "b4": 1.0, + "lHS": 0.9, + "lSS": 1.0, }, WallGo.PhaseInfo( temperature=100.0, # nucleation temperature From c4b9999f3146010e83fad01b1db994a60f706bdc Mon Sep 17 00:00:00 2001 From: Benoit Date: Tue, 5 Nov 2024 14:19:28 -0500 Subject: [PATCH 2/2] Fixed the tests --- .../SingletStandardModel_Z2_Simple.py | 42 ++++---- .../SingletSM_Z2/Benchmarks_singlet.py | 16 +-- .../SingletSM_Z2/test_EffectivePotential.py | 98 +++++++++---------- .../SingletSM_Z2/test_FreeEnergy.py | 8 +- .../SingletSM_Z2/test_Thermodynamics.py | 10 +- 5 files changed, 87 insertions(+), 87 deletions(-) diff --git a/Models/SingletStandardModel_Z2/SingletStandardModel_Z2_Simple.py b/Models/SingletStandardModel_Z2/SingletStandardModel_Z2_Simple.py index ab6954b4..46067511 100644 --- a/Models/SingletStandardModel_Z2/SingletStandardModel_Z2_Simple.py +++ b/Models/SingletStandardModel_Z2/SingletStandardModel_Z2_Simple.py @@ -14,7 +14,7 @@ from .singletStandardModelZ2 import SingletSMZ2, EffectivePotentialxSMZ2 -# Z2 symmetric SM + singlet model. V = msq |phi|^2 + lam (|phi|^2)^2 + 1/2 b2 S^2 + 1/4 b4 S^4 + 1/2 a2 |phi|^2 S^2 +# Z2 symmetric SM + singlet model. V = muHsq |phi|^2 + lHH (|phi|^2)^2 + 1/2 muSsq S^2 + 1/4 lSS S^4 + 1/2 lHS |phi|^2 S^2 class SingletSM_Z2_Simple(SingletSMZ2): def __init__(self, initialInputParameters: dict[str, float]): @@ -48,19 +48,19 @@ def evaluate( # 4D units thermalParameters = self.getThermalParameters(temperature) - msq = thermalParameters["msq"] - lam = thermalParameters["lambda"] - b2 = thermalParameters["b2"] - b4 = thermalParameters["b4"] - a2 = thermalParameters["a2"] + muHsq = thermalParameters["muHsq"] + lHH = thermalParameters["lHH"] + muSsq = thermalParameters["muSsq"] + lSS = thermalParameters["lSS"] + lHS = thermalParameters["lHS"] # tree level potential V0 = ( - 0.5 * msq * v**2 - + 0.25 * lam * v**4 - + 0.5 * b2 * x**2 - + 0.25 * b4 * x**4 - + 0.25 * a2 * v**2 * x**2 + 0.5 * muHsq * v**2 + + 0.25 * lHH * v**4 + + 0.5 * muSsq * x**2 + + 0.25 * lSS * x**4 + + 0.25 * lHS * v**2 * x**2 ) return V0 + self.constantTerms(temperature) @@ -71,25 +71,25 @@ def constantTerms(self, temperature: float) -> float: # Calculates thermally corrected parameters to use in Veff. So basically 3D effective params but keeping 4D units def getThermalParameters(self, temperature: float) -> dict[str, float]: T = temperature - msq = self.modelParameters["msq"] - lam = self.modelParameters["lambda"] + muHsq = self.modelParameters["muHsq"] + lHH = self.modelParameters["lHH"] yt = self.modelParameters["yt"] g1 = self.modelParameters["g1"] g2 = self.modelParameters["g2"] - b2 = self.modelParameters["b2"] - a2 = self.modelParameters["a2"] - b4 = self.modelParameters["b4"] + muSsq = self.modelParameters["muSsq"] + lHS = self.modelParameters["lHS"] + lSS = self.modelParameters["lSS"] # LO matching: only masses get corrected thermalParameters = self.modelParameters.copy() - thermalParameters["msq"] = ( - msq - + T**2 / 16.0 * (3.0 * g2**2 + g1**2 + 4.0 * yt**2 + 8.0 * lam) - + T**2 * a2 / 24.0 + thermalParameters["muHsq"] = ( + muHsq + + T**2 / 16.0 * (3.0 * g2**2 + g1**2 + 4.0 * yt**2 + 8.0 * lHH) + + T**2 * lHS / 24.0 ) - thermalParameters["b2"] = b2 + T**2 * (1.0 / 6.0 * a2 + 1.0 / 4.0 * b4) + thermalParameters["muSsq"] = muSsq + T**2 * (1.0 / 6.0 * lHS + 1.0 / 4.0 * lSS) return thermalParameters diff --git a/tests/Benchmarks/SingletSM_Z2/Benchmarks_singlet.py b/tests/Benchmarks/SingletSM_Z2/Benchmarks_singlet.py index fcbf2786..7b07daf8 100644 --- a/tests/Benchmarks/SingletSM_Z2/Benchmarks_singlet.py +++ b/tests/Benchmarks/SingletSM_Z2/Benchmarks_singlet.py @@ -14,8 +14,8 @@ # scalar specific, choose Benoit benchmark values "mh1": 125.0, "mh2": 120.0, - "a2": 0.9, - "b4": 1.0, + "lHS": 0.9, + "lSS": 1.0, }, phaseInfo={ "Tn": 100.0, @@ -62,8 +62,8 @@ "g3": 1.2279920495357861, "mh1": 125.0, "mh2": 160.0, - "a2": 1.2, - "b4": 1.0, + "lHS": 1.2, + "lSS": 1.0, }, {}, ) @@ -81,8 +81,8 @@ # scalar specific, choose Benoit benchmark values "mh1": 125.0, "mh2": 160.0, - "a2": 1.6, - "b4": 1.0, + "lHS": 1.6, + "lSS": 1.0, }, {}, ) @@ -97,8 +97,8 @@ "g3": 1.2279920495357861, "mh1": 125.0, "mh2": 160.0, - "a2": 1.2, - "b4": 1.0, + "lHS": 1.2, + "lSS": 1.0, }, {}, ) diff --git a/tests/Benchmarks/SingletSM_Z2/test_EffectivePotential.py b/tests/Benchmarks/SingletSM_Z2/test_EffectivePotential.py index 430af113..1fba2e30 100644 --- a/tests/Benchmarks/SingletSM_Z2/test_EffectivePotential.py +++ b/tests/Benchmarks/SingletSM_Z2/test_EffectivePotential.py @@ -20,20 +20,20 @@ def test_effectivePotential_V_singletSimple( # parameters thermalParameters = Veff.getThermalParameters(T) - msq = thermalParameters["msq"] - b2 = thermalParameters["b2"] - lam = thermalParameters["lambda"] - a2 = thermalParameters["a2"] - b4 = thermalParameters["b4"] + muHsq = thermalParameters["muHsq"] + muSsq = thermalParameters["muSsq"] + lam = thermalParameters["lHH"] + lHS = thermalParameters["lHS"] + lSS = thermalParameters["lSS"] # fields - v = np.sqrt(2 * (-a2 * b2 + 2 * b4 * msq) / (a2**2 - 4 * b4 * lam)) - x = np.sqrt(2 * (-a2 * msq + 2 * lam * b2) / (a2**2 - 4 * b4 * lam)) + v = np.sqrt(2 * (-lHS * muSsq + 2 * lSS * muHsq) / (lHS**2 - 4 * lSS * lam)) + x = np.sqrt(2 * (-lHS * muHsq + 2 * lam * muSsq) / (lHS**2 - 4 * lSS * lam)) fields = WallGo.Fields(([v, x])) # exact results f0 = -107.75 * np.pi**2 / 90 * T**4 - VExact = (b4 * msq**2 - a2 * msq * b2 + lam * b2**2) / (a2**2 - 4 * b4 * lam) + VExact = (lSS * muHsq**2 - lHS * muHsq * muSsq + lam * muSsq**2) / (lHS**2 - 4 * lSS * lam) # tolerance Veff.dT = 1e-4 * T @@ -58,15 +58,15 @@ def test_effectivePotential_dVdField_singletSimple( # parameters thermalParameters = Veff.getThermalParameters(T) - msq = thermalParameters["msq"] - b2 = thermalParameters["b2"] - lam = thermalParameters["lambda"] - a2 = thermalParameters["a2"] - b4 = thermalParameters["b4"] + muHsq = thermalParameters["muHsq"] + muSsq = thermalParameters["muSsq"] + lam = thermalParameters["lHH"] + lHS = thermalParameters["lHS"] + lSS = thermalParameters["lSS"] # fields - v = np.sqrt(2 * (-a2 * b2 + 2 * b4 * msq) / (a2**2 - 4 * b4 * lam)) - x = np.sqrt(2 * (-a2 * msq + 2 * lam * b2) / (a2**2 - 4 * b4 * lam)) + v = np.sqrt(2 * (-lHS * muSsq + 2 * lSS * muHsq) / (lHS**2 - 4 * lSS * lam)) + x = np.sqrt(2 * (-lHS * muHsq + 2 * lam * muSsq) / (lHS**2 - 4 * lSS * lam)) fields = WallGo.Fields(([v, x])) # exact results @@ -96,25 +96,25 @@ def test_effectivePotential_dVdT_singletSimple( # parameters thermalParameters = Veff.getThermalParameters(T) - msq = thermalParameters["msq"] - b2 = thermalParameters["b2"] - lam = thermalParameters["lambda"] - a2 = thermalParameters["a2"] - b4 = thermalParameters["b4"] + muHsq = thermalParameters["muHsq"] + muSsq = thermalParameters["muSsq"] + lam = thermalParameters["lHH"] + lHS = thermalParameters["lHS"] + lSS = thermalParameters["lSS"] vacuumParameters = Veff.modelParameters - msq0 = vacuumParameters["msq"] - b20 = vacuumParameters["b2"] + muHsq0 = vacuumParameters["muHsq"] + muSsq0 = vacuumParameters["muSsq"] # fields - v = np.sqrt(2 * (-a2 * b2 + 2 * b4 * msq) / (a2**2 - 4 * b4 * lam)) - x = np.sqrt(2 * (-a2 * msq + 2 * lam * b2) / (a2**2 - 4 * b4 * lam)) + v = np.sqrt(2 * (-lHS * muSsq + 2 * lSS * muHsq) / (lHS**2 - 4 * lSS * lam)) + x = np.sqrt(2 * (-lHS * muHsq + 2 * lam * muSsq) / (lHS**2 - 4 * lSS * lam)) fields = WallGo.Fields(([v, x])) # exact results dVdTExact = ( -107.75 * np.pi**2 / 90 * 4 * T**3 - + (msq - msq0) / T * v**2 - + (b2 - b20) / T * x**2 + + (muHsq - muHsq0) / T * v**2 + + (muSsq - muSsq0) / T * x**2 ) # tolerance @@ -140,25 +140,25 @@ def test_effectivePotential_d2VdFielddT_singletSimple( # parameters thermalParameters = Veff.getThermalParameters(T) - msq = thermalParameters["msq"] - b2 = thermalParameters["b2"] - lam = thermalParameters["lambda"] - a2 = thermalParameters["a2"] - b4 = thermalParameters["b4"] + muHsq = thermalParameters["muHsq"] + muSsq = thermalParameters["muSsq"] + lam = thermalParameters["lHH"] + lHS = thermalParameters["lHS"] + lSS = thermalParameters["lSS"] vacuumParameters = Veff.modelParameters - msq0 = vacuumParameters["msq"] - b20 = vacuumParameters["b2"] + muHsq0 = vacuumParameters["muHsq"] + muSsq0 = vacuumParameters["muSsq"] # fields - v = np.sqrt(2 * (-a2 * b2 + 2 * b4 * msq) / (a2**2 - 4 * b4 * lam)) - x = np.sqrt(2 * (-a2 * msq + 2 * lam * b2) / (a2**2 - 4 * b4 * lam)) + v = np.sqrt(2 * (-lHS * muSsq + 2 * lSS * muHsq) / (lHS**2 - 4 * lSS * lam)) + x = np.sqrt(2 * (-lHS * muHsq + 2 * lam * muSsq) / (lHS**2 - 4 * lSS * lam)) fields = WallGo.Fields(([v, x])) # exact results d2VdFielddTExact = np.array( [ - 2 * (msq - msq0) / T * v, - 2 * (b2 - b20) / T * x, + 2 * (muHsq - muHsq0) / T * v, + 2 * (muSsq - muSsq0) / T * x, ] ) @@ -185,25 +185,25 @@ def test_effectivePotential_d2VdField2_singletSimple( # parameters thermalParameters = Veff.getThermalParameters(T) - msq = thermalParameters["msq"] - b2 = thermalParameters["b2"] - lam = thermalParameters["lambda"] - a2 = thermalParameters["a2"] - b4 = thermalParameters["b4"] + muHsq = thermalParameters["muHsq"] + muSsq = thermalParameters["muSsq"] + lam = thermalParameters["lHH"] + lHS = thermalParameters["lHS"] + lSS = thermalParameters["lSS"] # fields - v = np.sqrt(2 * (-a2 * b2 + 2 * b4 * msq) / (a2**2 - 4 * b4 * lam)) - x = np.sqrt(2 * (-a2 * msq + 2 * lam * b2) / (a2**2 - 4 * b4 * lam)) + v = np.sqrt(2 * (-lHS * muSsq + 2 * lSS * muHsq) / (lHS**2 - 4 * lSS * lam)) + x = np.sqrt(2 * (-lHS * muHsq + 2 * lam * muSsq) / (lHS**2 - 4 * lSS * lam)) fields = WallGo.Fields(([v, x])) # exact results - a = 4 * lam * (-(a2 * b2) + 2 * b4 * msq) / (a2**2 - 4 * b4 * lam) + a = 4 * lam * (-(lHS * muSsq) + 2 * lSS * muHsq) / (lHS**2 - 4 * lSS * lam) b = ( - (2 * a2) - * np.sqrt((2 * b2 * lam - a2 * msq) * (-(a2 * b2) + 2 * b4 * msq)) - / (a2**2 - 4 * b4 * lam) + (2 * lHS) + * np.sqrt((2 * muSsq * lam - lHS * muHsq) * (-(lHS * muSsq) + 2 * lSS * muHsq)) + / (lHS**2 - 4 * lSS * lam) ) - d = b4 * (8 * b2 * lam - 4 * a2 * msq) / (a2**2 - 4 * b4 * lam) + d = lSS * (8 * muSsq * lam - 4 * lHS * muHsq) / (lHS**2 - 4 * lSS * lam) d2VdField2 = np.array([[a, b], [b, d]]) diff --git a/tests/Benchmarks/SingletSM_Z2/test_FreeEnergy.py b/tests/Benchmarks/SingletSM_Z2/test_FreeEnergy.py index a9f017cc..e96e0a65 100644 --- a/tests/Benchmarks/SingletSM_Z2/test_FreeEnergy.py +++ b/tests/Benchmarks/SingletSM_Z2/test_FreeEnergy.py @@ -20,10 +20,10 @@ def test_freeEnergy_singletSimple( # exact results thermalParameters = freeEnergy1.effectivePotential.getThermalParameters(T) f0 = -107.75 * np.pi ** 2 / 90 * T ** 4 - vExact = np.sqrt(-thermalParameters["msq"] / thermalParameters["lambda"]) - VvExact = -0.25 * thermalParameters["msq"] ** 2 / thermalParameters["lambda"] - xExact = np.sqrt(-thermalParameters["b2"] / thermalParameters["b4"]) - VxExact = -0.25 * thermalParameters["b2"] ** 2 / thermalParameters["b4"] + vExact = np.sqrt(-thermalParameters["muHsq"] / thermalParameters["lHH"]) + VvExact = -0.25 * thermalParameters["muHsq"] ** 2 / thermalParameters["lHH"] + xExact = np.sqrt(-thermalParameters["muSsq"] / thermalParameters["lSS"]) + VxExact = -0.25 * thermalParameters["muSsq"] ** 2 / thermalParameters["lSS"] # tolerance rTol = 1e-5 diff --git a/tests/Benchmarks/SingletSM_Z2/test_Thermodynamics.py b/tests/Benchmarks/SingletSM_Z2/test_Thermodynamics.py index 75b7698a..c63a1f0b 100644 --- a/tests/Benchmarks/SingletSM_Z2/test_Thermodynamics.py +++ b/tests/Benchmarks/SingletSM_Z2/test_Thermodynamics.py @@ -34,14 +34,14 @@ def test_thermodynamics_Tc_singletSimple( Veff = thermodynamics.freeEnergyLow.effectivePotential p = Veff.modelParameters A = ( - p["a2"] / 24 - + (p["g1"] ** 2 + 3 * p["g2"] ** 2 + 8 * p["lambda"] + 4 * p["yt"] ** 2) / 16 + p["lHS"] / 24 + + (p["g1"] ** 2 + 3 * p["g2"] ** 2 + 8 * p["lHH"] + 4 * p["yt"] ** 2) / 16 ) - B = p["a2"] / 6 + p["b4"] / 4 + B = p["lHS"] / 6 + p["lSS"] / 4 expectedTc = np.sqrt( ( - (p["b2"] * np.sqrt(p["lambda"]) - p["msq"] * np.sqrt(p["b4"])) - / (A * np.sqrt(p["b4"]) - B * np.sqrt(p["lambda"])) + (p["muSsq"] * np.sqrt(p["lHH"]) - p["muHsq"] * np.sqrt(p["lSS"])) + / (A * np.sqrt(p["lSS"]) - B * np.sqrt(p["lHH"])) ) )