nucleardatapy 0.2.0__py3-none-any.whl → 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nucleardatapy/__init__.py +3 -1
- nucleardatapy/astro/setup_gw.py +18 -18
- nucleardatapy/astro/setup_mr.py +9 -1
- nucleardatapy/astro/setup_mup.py +10 -10
- nucleardatapy/corr/setup_EsymDen.py +0 -5
- nucleardatapy/corr/setup_EsymLsym.py +50 -17
- nucleardatapy/corr/setup_KsatQsat.py +170 -69
- nucleardatapy/crust/setup_crust.py +403 -120
- nucleardatapy/data/astro/NICER/J0740+6620.dat +1 -0
- nucleardatapy/data/crust/2018-PCPFDDG-BSK22.dat +83 -0
- nucleardatapy/data/crust/2018-PCPFDDG-BSK24.dat +74 -0
- nucleardatapy/data/crust/2018-PCPFDDG-BSK25.dat +130 -0
- nucleardatapy/data/crust/2018-PCPFDDG-BSK26.dat +81 -0
- nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-NM.dat → 2006-BHF-Av18-E2A-NM.dat} +8 -8
- nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-SM.dat +11 -0
- nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-beta0.2.dat +11 -0
- nucleardatapy/data/matter/micro/2006-BHF/2006-BHF-Av18-effmass-beta0.4.dat +11 -0
- nucleardatapy/data/matter/nep/NEPESkyrme.dat +2 -3
- nucleardatapy/data/matter/nep/NEPGSkyrme.dat +7 -0
- nucleardatapy/data/matter/nep/NEPSkyrme.dat +4 -2
- nucleardatapy/data/matter/nep/NEPxEFT.dat +8 -0
- nucleardatapy/data/matter/nep/best67DDSkyrme.dat +28 -0
- nucleardatapy/data/matter/nep/best90DDSkyrme.dat +46 -0
- nucleardatapy/data/matter/nep/best95DDSkyrme.dat +54 -0
- nucleardatapy/data/matter/pheno/ESkyrme/BSk31-NM.dat +996 -996
- nucleardatapy/data/matter/pheno/ESkyrme/BSk31-SM.dat +991 -991
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-NM.dat +1002 -0
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG4-SM.dat +1002 -0
- nucleardatapy/data/matter/pheno/Skyrme/BSkG1-NM.dat +102 -0
- nucleardatapy/data/matter/pheno/Skyrme/BSkG1-SM.dat +102 -0
- nucleardatapy/data/matter/pheno/Skyrme/BSkG2-NM.dat +102 -0
- nucleardatapy/data/matter/pheno/Skyrme/BSkG2-SM.dat +102 -0
- nucleardatapy/data/nuclei/masses/Theory/2023-BSkG3.txt +0 -4
- nucleardatapy/data/nuclei/masses/Theory/2025-BSkG4.txt +0 -1
- nucleardatapy/env.py +1 -1
- nucleardatapy/eos/__init__.py +4 -3
- nucleardatapy/eos/setupCC.py +429 -0
- nucleardatapy/eos/setup_am.py +71 -34
- nucleardatapy/eos/setup_am_Beq.py +48 -17
- nucleardatapy/eos/setup_am_Leq.py +81 -50
- nucleardatapy/fig/__init__.py +29 -7
- nucleardatapy/fig/astro_setupGW_fig.py +5 -5
- nucleardatapy/fig/astro_setupMR_fig.py +12 -10
- nucleardatapy/fig/astro_setupMasses_fig.py +4 -4
- nucleardatapy/fig/astro_setupMtov_fig.py +4 -4
- nucleardatapy/fig/astro_setupMup_fig.py +5 -5
- nucleardatapy/fig/corr_setupEsymDen_fig.py +12 -5
- nucleardatapy/fig/corr_setupEsymLsym_fig.py +18 -5
- nucleardatapy/fig/corr_setupKsatQsat_fig.py +19 -15
- nucleardatapy/fig/crust_setupCrust_fig.py +7 -7
- nucleardatapy/fig/eos_setupAMBeq_fig.py +1338 -64
- nucleardatapy/fig/eos_setupAMLeq_fig.py +200 -68
- nucleardatapy/fig/eos_setupAM_asy_lep_fig.py +364 -0
- nucleardatapy/fig/eos_setupAM_asy_nuc_fig.py +337 -0
- nucleardatapy/fig/eos_setupAM_asy_tot_fig.py +343 -0
- nucleardatapy/fig/eos_setupAM_fig.py +470 -47
- nucleardatapy/fig/eos_setupCC_fig.py +240 -0
- nucleardatapy/fig/hnuc_setupChart_fig.py +2 -2
- nucleardatapy/fig/hnuc_setupRE1LExp_fig.py +4 -4
- nucleardatapy/fig/matter_all_fig.py +954 -0
- nucleardatapy/fig/matter_setupCheck_fig.py +103 -0
- nucleardatapy/fig/matter_setupFFGLep_fig.py +70 -0
- nucleardatapy/fig/matter_setupFFGNuc_fig.py +268 -104
- nucleardatapy/fig/matter_setupHIC_fig.py +98 -58
- nucleardatapy/fig/matter_setupMicroEsym_fig.py +267 -51
- nucleardatapy/fig/matter_setupMicro_LP_fig.py +175 -78
- nucleardatapy/fig/matter_setupMicro_band_fig.py +116 -47
- nucleardatapy/fig/matter_setupMicro_effmass_fig.py +264 -34
- nucleardatapy/fig/matter_setupMicro_err_NM_fig.py +41 -18
- nucleardatapy/fig/matter_setupMicro_fig.py +332 -98
- nucleardatapy/fig/matter_setupMicro_gap_fig.py +219 -92
- nucleardatapy/fig/matter_setupNEPStats_fig.py +96 -0
- nucleardatapy/fig/matter_setupPhenoEsym_fig.py +201 -61
- nucleardatapy/fig/matter_setupPheno_fig.py +392 -85
- nucleardatapy/fig/nuc_setupBEExp_chart_fig.py +286 -0
- nucleardatapy/fig/nuc_setupBEExp_fig.py +232 -70
- nucleardatapy/fig/nuc_setupBETheo_fig.py +344 -0
- nucleardatapy/fig/nuc_setupISGMRExp_fig.py +59 -0
- nucleardatapy/fig/nuc_setupRchExp_fig.py +139 -0
- nucleardatapy/fig/nuc_setupRchTheo_fig.py +143 -0
- nucleardatapy/fig/nuc_setupRnpExp_fig.py +88 -0
- nucleardatapy/fig/nuc_setupRnpTheo_fig.py +133 -0
- nucleardatapy/hello.py +6 -0
- nucleardatapy/hnuc/__init__.py +3 -3
- nucleardatapy/hnuc/{setup_be1L_exp.py → setup_re1L_exp.py} +6 -6
- nucleardatapy/hnuc/{setup_be1Xi_exp.py → setup_re1Xi_exp.py} +5 -5
- nucleardatapy/hnuc/{setup_be2L_exp.py → setup_re2L_exp.py} +6 -6
- nucleardatapy/matter/__init__.py +14 -13
- nucleardatapy/matter/setup_check.py +97 -0
- nucleardatapy/matter/setup_ffg.py +72 -38
- nucleardatapy/matter/setup_hic.py +91 -74
- nucleardatapy/matter/setup_micro.py +1698 -1019
- nucleardatapy/matter/setup_micro_band.py +11 -6
- nucleardatapy/matter/setup_micro_effmass.py +55 -2
- nucleardatapy/matter/setup_micro_esym.py +39 -34
- nucleardatapy/matter/setup_micro_gap.py +26 -19
- nucleardatapy/matter/setup_micro_lp.py +20 -19
- nucleardatapy/matter/setup_nep.py +175 -92
- nucleardatapy/matter/{setup_nep_model_dist.py → setup_nep_stat_model.py} +13 -8
- nucleardatapy/matter/{setup_nep_dist.py → setup_nep_stat_models.py} +12 -8
- nucleardatapy/matter/setup_pheno.py +121 -45
- nucleardatapy/matter/setup_pheno_esym.py +14 -19
- nucleardatapy/nuc/__init__.py +2 -2
- nucleardatapy/nuc/setup_be_exp.py +345 -333
- nucleardatapy/nuc/setup_be_theo.py +366 -178
- nucleardatapy/nuc/setup_isgmr_exp.py +4 -4
- nucleardatapy/nuc/setup_rch_exp.py +49 -6
- nucleardatapy/nuc/setup_rch_theo.py +72 -3
- nucleardatapy/nuc/{setup_nskin_exp.py → setup_rnp_exp.py} +59 -65
- nucleardatapy/nuc/{setup_nskin_theo.py → setup_rnp_theo.py} +35 -39
- nucleardatapy-1.0.0.dist-info/METADATA +553 -0
- {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info}/RECORD +156 -128
- {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info}/WHEEL +1 -1
- tests/test_corr_setupKsatQsat.py +3 -1
- tests/test_matter_setupMicro.py +37 -10
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-NM.dat +0 -1002
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG1-SM.dat +0 -1002
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-NM.dat +0 -1002
- nucleardatapy/data/matter/pheno/ESkyrme/BSkG2-SM.dat +0 -1002
- nucleardatapy/fig/matter_ENM_fig.py +0 -119
- nucleardatapy/fig/matter_ESM_fig.py +0 -119
- nucleardatapy/fig/matter_Esym_fig.py +0 -122
- nucleardatapy/fig/matter_setupNEPModelDist_fig.py +0 -68
- nucleardatapy-0.2.0.dist-info/METADATA +0 -115
- /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-NM-AV18.dat → 2006-EBHF-NM-AV18.dat} +0 -0
- /nucleardatapy/data/LandauParameters/micro/{2006-IBHF-SM-AV18.dat → 2006-EBHF-SM-AV18.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-BSK14.dat → 2022-GMRS-BSK14.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-BSK16.dat → 2022-GMRS-BSK16.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-DHSL59.dat → 2022-GMRS-DHSL59.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-DHSL69.dat → 2022-GMRS-DHSL69.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-F0.dat → 2022-GMRS-F0.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H1.dat → 2022-GMRS-H1.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H2.dat → 2022-GMRS-H2.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H3.dat → 2022-GMRS-H3.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H4.dat → 2022-GMRS-H4.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H5.dat → 2022-GMRS-H5.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-H7.dat → 2022-GMRS-H7.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-LNS5.dat → 2022-GMRS-LNS5.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-RATP.dat → 2022-GMRS-RATP.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-SGII.dat → 2022-GMRS-SGII.dat} +0 -0
- /nucleardatapy/data/crust/{2022-crustGMRS-SLY5.dat → 2022-GMRS-SLY5.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-AM.dat → 2006-BHF-Av18-E2A-AM.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-E2A-SM.dat → 2006-BHF-Av18-E2A-SM.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-Esym2-SM.dat → 2006-BHF-Av18-Esym2-SM.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-NM-FreeSpectrum.dat → 2006-BHF-Av18-GAP-NM-FreeSpectrum.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-NM-SelfEnergy.dat → 2006-BHF-Av18-GAP-NM-SelfEnergy.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-SM-FreeSpectrum.dat → 2006-BHF-Av18-GAP-SM-FreeSpectrum.dat} +0 -0
- /nucleardatapy/data/matter/micro/2006-BHF/{2006-BHF-GAP-SM-SelfEnergy.dat → 2006-BHF-Av18-GAP-SM-SelfEnergy.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2013-QMC-NM.dat → 2013-MBPT-NM.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2020-MBPT-NM-DHSL59.dat → 2019-MBPT-NM-DHSL59.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2020-MBPT-NM-DHSL69.dat → 2019-MBPT-NM-DHSL69.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2020-MBPT-SM-DHSL59.dat → 2019-MBPT-SM-DHSL59.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2020-MBPT-SM-DHSL69.dat → 2019-MBPT-SM-DHSL69.dat} +0 -0
- /nucleardatapy/data/matter/micro/{2023-MBPT-NM.csv → 2020-MBPT-NM.csv} +0 -0
- /nucleardatapy/data/matter/micro/{2023-MBPT-SM.csv → 2020-MBPT-SM.csv} +0 -0
- /nucleardatapy/data/nuclei/{nskin → rnp}/208Pb.dat +0 -0
- /nucleardatapy/data/nuclei/{nskin → rnp}/48Ca.dat +0 -0
- /nucleardatapy/data/{NeutronSkin/ddrhNskin-208Pb.dat → rnp/ddrhrnp-208Pb.dat} +0 -0
- /nucleardatapy/data/{NeutronSkin/ddrhNskin-48Ca.dat → rnp/ddrhrnp-48Ca.dat} +0 -0
- /nucleardatapy/data/{NeutronSkin/nlrhNskin-208Pb.dat → rnp/nlrhrnp-208Pb.dat} +0 -0
- /nucleardatapy/data/{NeutronSkin/nlrhNskin-48Ca.dat → rnp/nlrhrnp-48Ca.dat} +0 -0
- /nucleardatapy/data/{NeutronSkin/skyrmeNskin-208Pb.dat → rnp/skyrmernp-208Pb.dat} +0 -0
- /nucleardatapy/data/{NeutronSkin/skyrmeNskin-48Ca.dat → rnp/skyrmernp-48Ca.dat} +0 -0
- {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info/licenses}/LICENSE +0 -0
- {nucleardatapy-0.2.0.dist-info → nucleardatapy-1.0.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import math
|
|
2
|
+
import numpy as np # 1.15.0
|
|
3
|
+
from scipy.interpolate import CubicSpline
|
|
4
|
+
|
|
5
|
+
import nucleardatapy as nuda
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def denCC_emp(nsat, Esym, Lsym, Ksym, Qsym, emp):
|
|
9
|
+
varEsym = Esym / 30.0
|
|
10
|
+
varLsym = Lsym / 70.0
|
|
11
|
+
den_cc = 0.0
|
|
12
|
+
pre_cc = 0.0
|
|
13
|
+
x01 = (0.1 - nsat) / (3.0 * nsat)
|
|
14
|
+
if emp == "Simple":
|
|
15
|
+
den_cc = 0.5 * nsat
|
|
16
|
+
elif emp == "Ducoin":
|
|
17
|
+
den_cc = 0.0802 + 0.000323 * (Lsym + 0.426 * Ksym + (Ksym + 0.426 * Qsym) * x01)
|
|
18
|
+
pre_cc = -0.328 + 0.00959 * (Lsym - 0.343 * Ksym + (Ksym - 0.343 * Qsym) * x01)
|
|
19
|
+
elif emp == "Newton":
|
|
20
|
+
den_cc = (varEsym) * (0.135 - 0.098 * varLsym + 0.026 * varLsym**2)
|
|
21
|
+
pre_cc = -0.724 + 0.0157 * (
|
|
22
|
+
Lsym - 0.343 * Ksym**2 + (1 - 2 * 0.343 * Qsym) * x01 * Ksym
|
|
23
|
+
)
|
|
24
|
+
elif emp == "Steiner":
|
|
25
|
+
den_cc = (varEsym) * (0.1327 - 0.0898 * varLsym + 0.0228 * varLsym**2)
|
|
26
|
+
else:
|
|
27
|
+
print("setupCC, denCC_emp: `emp` is badly defined ", emp)
|
|
28
|
+
print("setupCC, denCC_emp: exit")
|
|
29
|
+
exit()
|
|
30
|
+
return den_cc, pre_cc # in fm-3 and MeV fm-3
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class setupCC:
|
|
34
|
+
"""
|
|
35
|
+
Instantiate the object with a full EoS for the crust and the core of neutron stars.
|
|
36
|
+
|
|
37
|
+
:param crust_model: Fix the name of model for the crust. Default value: '1998-VAR-AM-APR'.
|
|
38
|
+
:type crust_model: str, optional.
|
|
39
|
+
:param core_model: Fix the name of model. Default value: '1998-VAR-AM-APR'.
|
|
40
|
+
:type core_model: str, optional.
|
|
41
|
+
:param core_param: Fix the name of model. Default value: None.
|
|
42
|
+
:type core_param: str, optional.
|
|
43
|
+
:param core_kind: chose between 'micro' (default) and 'pheno'.
|
|
44
|
+
:type core_kind: str, optional.
|
|
45
|
+
:param connect: choose between 'density' in fm-3 (default), 'epsilon' in MeV fm-3 or 'pressure' in MeV fm-3.
|
|
46
|
+
:type connect: str, optional.
|
|
47
|
+
:param boundaries: list [ b_down, b_up ] containing the boundaries for the connection.
|
|
48
|
+
:type boundaries: list, optional.
|
|
49
|
+
:param emp: choose between different empirical formulae to localise the crust-core transition: None (default) in case of no use of empirical relations, 'simple' for the simple one and 'Steiner' for the empirical relation suggested by A. Steiner. note that if `emp' is taken to be another value that None, this choice will be considered above the boundary limits given in `boundary`.
|
|
50
|
+
:type emp: str, optional.
|
|
51
|
+
|
|
52
|
+
**Attributes:**
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
#
|
|
56
|
+
def __init__(
|
|
57
|
+
self,
|
|
58
|
+
crust_model,
|
|
59
|
+
core_model="1998-VAR-AM-APR",
|
|
60
|
+
core_param=None,
|
|
61
|
+
core_kind="micro",
|
|
62
|
+
connect="density",
|
|
63
|
+
boundaries=[0.016, 0.16],
|
|
64
|
+
emp=None,
|
|
65
|
+
):
|
|
66
|
+
"""
|
|
67
|
+
Parameters
|
|
68
|
+
----------
|
|
69
|
+
core_model : str, optional
|
|
70
|
+
The model to consider. Choose between: 1998-VAR-AM-APR (default), 2008-AFDMC-NM, ...
|
|
71
|
+
core_kind : chose between 'micro' or 'pheno'.
|
|
72
|
+
"""
|
|
73
|
+
#
|
|
74
|
+
if nuda.env.verb:
|
|
75
|
+
print("Enter setupCC()")
|
|
76
|
+
#
|
|
77
|
+
#: Attribute models.
|
|
78
|
+
self.crust_model = crust_model
|
|
79
|
+
self.core_model = core_model
|
|
80
|
+
if nuda.env.verb:
|
|
81
|
+
print("crust_model:", crust_model)
|
|
82
|
+
if nuda.env.verb:
|
|
83
|
+
print("core_model:", core_model)
|
|
84
|
+
#
|
|
85
|
+
self = setupCC.init_self(self)
|
|
86
|
+
#
|
|
87
|
+
if core_param is not None:
|
|
88
|
+
self.label = connect
|
|
89
|
+
# self.label = crust_model+' '+core_model+' '+core_param+' '+connect
|
|
90
|
+
else:
|
|
91
|
+
self.label = connect
|
|
92
|
+
# self.label = crust_model+' '+core_model+' '+connect
|
|
93
|
+
self.every = 1
|
|
94
|
+
self.linestyle = "solid"
|
|
95
|
+
self.marker = "o"
|
|
96
|
+
#
|
|
97
|
+
# Fixes the crust EoS
|
|
98
|
+
#
|
|
99
|
+
crust_models, crust_models_lower = nuda.crust.crust_models()
|
|
100
|
+
#
|
|
101
|
+
if crust_model.lower() not in crust_models_lower:
|
|
102
|
+
print(
|
|
103
|
+
"setupCC.py: The crust_model name ",
|
|
104
|
+
crust_model,
|
|
105
|
+
" is not in the list of models.",
|
|
106
|
+
)
|
|
107
|
+
print("setupCC.py: list of models:", crust_models)
|
|
108
|
+
print("setupCC.py: -- Exit the code --")
|
|
109
|
+
exit()
|
|
110
|
+
#
|
|
111
|
+
crust_eos = nuda.crust.setupCrust(model=crust_model)
|
|
112
|
+
if nuda.env.verb_output:
|
|
113
|
+
crust_eos.print_outputs()
|
|
114
|
+
#
|
|
115
|
+
# Fixes the core EoS at beta-equilibrium
|
|
116
|
+
#
|
|
117
|
+
if core_kind == "micro":
|
|
118
|
+
models, models_lower = nuda.matter.micro_esym_models()
|
|
119
|
+
models.remove("1998-VAR-AM-APR-fit")
|
|
120
|
+
models_lower.remove("1998-var-am-apr-fit")
|
|
121
|
+
elif core_kind == "pheno":
|
|
122
|
+
models, models_lower = nuda.matter.pheno_esym_models()
|
|
123
|
+
#
|
|
124
|
+
if core_model.lower() not in models_lower:
|
|
125
|
+
print(
|
|
126
|
+
"setupCC.py: The core_model name ",
|
|
127
|
+
core_model,
|
|
128
|
+
" is not in the list of models.",
|
|
129
|
+
)
|
|
130
|
+
print("setupCC.py: list of models:", models)
|
|
131
|
+
print("setupCC.py: -- Exit the code --")
|
|
132
|
+
exit()
|
|
133
|
+
#
|
|
134
|
+
core_eos = nuda.eos.setupAMBeq(
|
|
135
|
+
model=core_model, param=core_param, kind=core_kind
|
|
136
|
+
)
|
|
137
|
+
if nuda.env.verb_output:
|
|
138
|
+
core_eos.print_outputs()
|
|
139
|
+
#
|
|
140
|
+
print("crust:")
|
|
141
|
+
print("densities:", crust_eos.den)
|
|
142
|
+
print("eps:", crust_eos.eps_tot)
|
|
143
|
+
print("pre:", crust_eos.pre_tot)
|
|
144
|
+
print("cs2", crust_eos.cs2_tot)
|
|
145
|
+
print("core:")
|
|
146
|
+
print("densities:", core_eos.den)
|
|
147
|
+
print("eps:", core_eos.eps_tot)
|
|
148
|
+
print("pre:", core_eos.pre_tot)
|
|
149
|
+
print("cs2", core_eos.cs2_tot)
|
|
150
|
+
#
|
|
151
|
+
# connects crust and core, depending on the variable `connect`:
|
|
152
|
+
#
|
|
153
|
+
eos_den = []
|
|
154
|
+
eos_eps = []
|
|
155
|
+
eos_pre = []
|
|
156
|
+
eos_cs2 = []
|
|
157
|
+
corx_den = []
|
|
158
|
+
corx_eps = []
|
|
159
|
+
corx_pre = []
|
|
160
|
+
corx_cs2 = []
|
|
161
|
+
crux_den = []
|
|
162
|
+
crux_eps = []
|
|
163
|
+
crux_pre = []
|
|
164
|
+
crux_cs2 = []
|
|
165
|
+
#
|
|
166
|
+
print("CC connection:")
|
|
167
|
+
if connect == "density":
|
|
168
|
+
#
|
|
169
|
+
print("density")
|
|
170
|
+
#
|
|
171
|
+
if emp is not None:
|
|
172
|
+
nsat = crust_eos.nsat
|
|
173
|
+
Esym = crust_eos.Esym
|
|
174
|
+
Lsym = crust_eos.Lsym
|
|
175
|
+
Ksym = crust_eos.Ksym
|
|
176
|
+
Qsym = crust_eos.Qsym
|
|
177
|
+
# print('crust NEP:',nsat,Esym,Lsym)
|
|
178
|
+
# opens a small gap -+20% of the empirical density
|
|
179
|
+
b_lo = 0.8 * denCC_emp(nsat, Esym, Lsym, Ksym, Qsym, emp)[0]
|
|
180
|
+
b_up = 1.2 * b_lo / 0.8
|
|
181
|
+
else:
|
|
182
|
+
b_lo = boundaries[0]
|
|
183
|
+
b_up = boundaries[1]
|
|
184
|
+
print("Boundaries:", b_lo, b_up)
|
|
185
|
+
for ind, den in enumerate(crust_eos.den):
|
|
186
|
+
if den < b_lo:
|
|
187
|
+
eos_den.append(den)
|
|
188
|
+
eos_eps.append(crust_eos.eps_tot[ind])
|
|
189
|
+
eos_pre.append(crust_eos.pre_tot[ind])
|
|
190
|
+
eos_cs2.append(crust_eos.cs2_tot[ind])
|
|
191
|
+
else:
|
|
192
|
+
crux_den.append(den)
|
|
193
|
+
crux_eps.append(crust_eos.eps_tot[ind])
|
|
194
|
+
crux_pre.append(crust_eos.pre_tot[ind])
|
|
195
|
+
crux_cs2.append(crust_eos.cs2_tot[ind])
|
|
196
|
+
for ind, den in enumerate(core_eos.den):
|
|
197
|
+
if den > b_up:
|
|
198
|
+
eos_den.append(den)
|
|
199
|
+
eos_eps.append(core_eos.eps_tot[ind])
|
|
200
|
+
eos_pre.append(core_eos.pre_tot[ind])
|
|
201
|
+
eos_cs2.append(core_eos.cs2_tot[ind])
|
|
202
|
+
else:
|
|
203
|
+
corx_den.append(den)
|
|
204
|
+
corx_eps.append(core_eos.eps_tot[ind])
|
|
205
|
+
corx_pre.append(core_eos.pre_tot[ind])
|
|
206
|
+
corx_cs2.append(core_eos.cs2_tot[ind])
|
|
207
|
+
#
|
|
208
|
+
elif connect == "epsilon":
|
|
209
|
+
#
|
|
210
|
+
print("epsilon")
|
|
211
|
+
#
|
|
212
|
+
b_lo = boundaries[0]
|
|
213
|
+
b_up = boundaries[1]
|
|
214
|
+
print("Boundaries:", b_lo, b_up)
|
|
215
|
+
for ind, eps in enumerate(crust_eos.eps_tot):
|
|
216
|
+
if eps < b_lo:
|
|
217
|
+
eos_den.append(crust_eos.den[ind])
|
|
218
|
+
eos_eps.append(eps)
|
|
219
|
+
eos_pre.append(crust_eos.pre_tot[ind])
|
|
220
|
+
eos_cs2.append(crust_eos.cs2_tot[ind])
|
|
221
|
+
else:
|
|
222
|
+
crux_den.append(crust_eos.den[ind])
|
|
223
|
+
crux_eps.append(eps)
|
|
224
|
+
crux_pre.append(crust_eos.pre_tot[ind])
|
|
225
|
+
crux_cs2.append(crust_eos.cs2_tot[ind])
|
|
226
|
+
for ind, eps in enumerate(core_eos.eps_tot):
|
|
227
|
+
if eps > b_up:
|
|
228
|
+
eos_den.append(core_eos.den[ind])
|
|
229
|
+
eos_eps.append(eps)
|
|
230
|
+
eos_pre.append(core_eos.pre_tot[ind])
|
|
231
|
+
eos_cs2.append(core_eos.cs2_tot[ind])
|
|
232
|
+
else:
|
|
233
|
+
corx_den.append(core_eos.den[ind])
|
|
234
|
+
corx_eps.append(eps)
|
|
235
|
+
corx_pre.append(core_eos.pre_tot[ind])
|
|
236
|
+
corx_cs2.append(core_eos.cs2_tot[ind])
|
|
237
|
+
#
|
|
238
|
+
elif connect == "pressure":
|
|
239
|
+
#
|
|
240
|
+
print("pressure")
|
|
241
|
+
#
|
|
242
|
+
b_lo = boundaries[0]
|
|
243
|
+
b_up = boundaries[1]
|
|
244
|
+
print("Boundaries:", b_lo, b_up)
|
|
245
|
+
for ind, pre in enumerate(crust_eos.pre_tot):
|
|
246
|
+
if pre < b_lo:
|
|
247
|
+
eos_den.append(crust_eos.den[ind])
|
|
248
|
+
eos_eps.append(crust_eos.eps_tot[ind])
|
|
249
|
+
eos_pre.append(pre)
|
|
250
|
+
eos_cs2.append(crust_eos.cs2_tot[ind])
|
|
251
|
+
else:
|
|
252
|
+
crux_den.append(crust_eos.den[ind])
|
|
253
|
+
crux_eps.append(crust_eos.eps_tot[ind])
|
|
254
|
+
crux_pre.append(pre)
|
|
255
|
+
crux_cs2.append(crust_eos.cs2_tot[ind])
|
|
256
|
+
for ind, pre in enumerate(core_eos.pre_tot):
|
|
257
|
+
if pre > b_up:
|
|
258
|
+
eos_den.append(core_eos.den[ind])
|
|
259
|
+
eos_eps.append(core_eos.eps_tot[ind])
|
|
260
|
+
eos_pre.append(pre)
|
|
261
|
+
eos_cs2.append(core_eos.cs2_tot[ind])
|
|
262
|
+
else:
|
|
263
|
+
corx_den.append(core_eos.den[ind])
|
|
264
|
+
corx_eps.append(core_eos.eps_tot[ind])
|
|
265
|
+
corx_pre.append(pre)
|
|
266
|
+
corx_cs2.append(core_eos.cs2_tot[ind])
|
|
267
|
+
#
|
|
268
|
+
else:
|
|
269
|
+
print("setupCC.py: Issue with the connection.")
|
|
270
|
+
print("setupCC.py: connect:", connect)
|
|
271
|
+
print("setupCC.py: -- Exit the code --")
|
|
272
|
+
exit()
|
|
273
|
+
self.crust_den = np.array(crust_eos.den)
|
|
274
|
+
self.crust_pre = np.array(crust_eos.pre_tot)
|
|
275
|
+
self.crust_eps = np.array(crust_eos.eps_tot)
|
|
276
|
+
self.crust_cs2 = np.array(crust_eos.cs2_tot)
|
|
277
|
+
self.core_den = np.array(core_eos.den)
|
|
278
|
+
self.core_pre = np.array(core_eos.pre_tot)
|
|
279
|
+
self.core_eps = np.array(core_eos.eps_tot)
|
|
280
|
+
self.core_cs2 = np.array(core_eos.cs2_tot)
|
|
281
|
+
self.crux_den = np.array(crux_den)
|
|
282
|
+
self.crux_pre = np.array(crux_pre)
|
|
283
|
+
self.crux_eps = np.array(crux_eps)
|
|
284
|
+
self.crux_cs2 = np.array(crux_cs2)
|
|
285
|
+
self.corx_den = np.array(corx_den)
|
|
286
|
+
self.corx_pre = np.array(corx_pre)
|
|
287
|
+
self.corx_eps = np.array(corx_eps)
|
|
288
|
+
self.corx_cs2 = np.array(corx_cs2)
|
|
289
|
+
#
|
|
290
|
+
# perform a simple linear interpolation in log-log scale
|
|
291
|
+
#
|
|
292
|
+
log_den = np.log10(eos_den)
|
|
293
|
+
log_eps = np.log10(eos_eps)
|
|
294
|
+
log_pre = np.log10(eos_pre)
|
|
295
|
+
log_cs2 = np.log10(eos_cs2)
|
|
296
|
+
#
|
|
297
|
+
if connect == "density":
|
|
298
|
+
#
|
|
299
|
+
x = log_den
|
|
300
|
+
ye = log_eps
|
|
301
|
+
yp = log_pre
|
|
302
|
+
yc = log_cs2
|
|
303
|
+
# fix the density mesh for the output eos
|
|
304
|
+
print("min(den):", min(eos_den), min(log_den))
|
|
305
|
+
print("max(den):", max(eos_den), max(log_den))
|
|
306
|
+
eos_x = np.logspace(min(log_den), max(log_den), num=100)
|
|
307
|
+
log_x = np.log10(eos_x)
|
|
308
|
+
#
|
|
309
|
+
print("eos_x:", eos_x)
|
|
310
|
+
print("log_x:", log_x)
|
|
311
|
+
# cs_eps = CubicSpline(x, ye)
|
|
312
|
+
# cs_pre = CubicSpline(x, yp)
|
|
313
|
+
# cs_cs2 = CubicSpline(x, yc)
|
|
314
|
+
# cs_cs2_beta = CubicSpline(ye, yp)
|
|
315
|
+
self.den = eos_x
|
|
316
|
+
# self.eps = np.power(10,cs_eps(log_x))
|
|
317
|
+
# self.pre = np.power(10,cs_pre(log_x))
|
|
318
|
+
# self.cs2 = np.power(10,cs_cs2(log_x))
|
|
319
|
+
# self.cs2_beta = self.pre / self.eps * np.power(10,cs_cs2_beta( self.eps, 1 ) ) # to improve...
|
|
320
|
+
# linear interpolation in log-log scale
|
|
321
|
+
self.eps = np.power(10, np.interp(log_x, x, ye))
|
|
322
|
+
self.pre = np.power(10, np.interp(log_x, x, yp))
|
|
323
|
+
self.cs2 = np.power(10, np.interp(log_x, x, yc))
|
|
324
|
+
#
|
|
325
|
+
elif connect == "epsilon":
|
|
326
|
+
#
|
|
327
|
+
yn = log_den
|
|
328
|
+
x = log_eps
|
|
329
|
+
yp = log_pre
|
|
330
|
+
yc = log_cs2
|
|
331
|
+
# fix the density mesh for the output eos
|
|
332
|
+
print("min(eps):", min(eos_eps), min(log_eps))
|
|
333
|
+
print("max(eps):", max(eos_eps), max(log_eps))
|
|
334
|
+
eos_x = np.logspace(min(log_eps), max(log_eps), num=100)
|
|
335
|
+
log_x = np.log10(eos_x)
|
|
336
|
+
self.den = np.power(10, np.interp(log_x, x, yn))
|
|
337
|
+
self.eps = eos_x
|
|
338
|
+
self.pre = np.power(10, np.interp(log_x, x, yp))
|
|
339
|
+
self.cs2 = np.power(10, np.interp(log_x, x, yc))
|
|
340
|
+
#
|
|
341
|
+
elif connect == "pressure":
|
|
342
|
+
#
|
|
343
|
+
yn = log_den
|
|
344
|
+
ye = log_eps
|
|
345
|
+
x = log_pre
|
|
346
|
+
yc = log_cs2
|
|
347
|
+
# fix the density mesh for the output eos
|
|
348
|
+
print("min(pre):", min(eos_pre), min(log_pre))
|
|
349
|
+
print("max(pre):", max(eos_pre), max(log_pre))
|
|
350
|
+
eos_x = np.logspace(min(log_pre), max(log_pre), num=100)
|
|
351
|
+
log_x = np.log10(eos_x)
|
|
352
|
+
self.den = np.power(10, np.interp(log_x, x, yn))
|
|
353
|
+
self.eps = np.power(10, np.interp(log_x, x, ye))
|
|
354
|
+
self.pre = eos_x
|
|
355
|
+
self.cs2 = np.power(10, np.interp(log_x, x, yc))
|
|
356
|
+
#
|
|
357
|
+
self.den_unit = "fm$^{-3}$"
|
|
358
|
+
self.e2a_unit = "MeV"
|
|
359
|
+
self.eps_unit = "MeV fm$^{-3}$"
|
|
360
|
+
self.pre_unit = "MeV fm$^{-3}$"
|
|
361
|
+
#
|
|
362
|
+
if nuda.env.verb:
|
|
363
|
+
print("Exit setupCC()")
|
|
364
|
+
#
|
|
365
|
+
|
|
366
|
+
def print_outputs(self):
|
|
367
|
+
"""
|
|
368
|
+
Method which print outputs on terminal's screen.
|
|
369
|
+
"""
|
|
370
|
+
#
|
|
371
|
+
if nuda.env.verb:
|
|
372
|
+
print("Enter print_outputs()")
|
|
373
|
+
#
|
|
374
|
+
print("- Print output:")
|
|
375
|
+
print(" model:", self.model)
|
|
376
|
+
print(" ref: ", self.ref)
|
|
377
|
+
print(" label:", self.label)
|
|
378
|
+
print(" note: ", self.note)
|
|
379
|
+
# if any(self.sm_den): print(f" sm_den: {np.round(self.sm_den,3)} in {self.den_unit}")
|
|
380
|
+
if self.den is not None:
|
|
381
|
+
print(f" den: {np.round(self.den,3)} in {self.den_unit}")
|
|
382
|
+
if self.e2a is not None:
|
|
383
|
+
print(f" e2a: {np.round(self.e2a,3)} in {self.e2a_unit}")
|
|
384
|
+
if self.eps is not None:
|
|
385
|
+
print(f" eps: {np.round(self.eps,3)} in {self.eps_unit}")
|
|
386
|
+
if self.pre is not None:
|
|
387
|
+
print(f" pre: {np.round(self.pre,3)} in {self.pre_unit}")
|
|
388
|
+
if self.cs2 is not None:
|
|
389
|
+
print(f" cs2: {np.round(self.cs2,2)}")
|
|
390
|
+
#
|
|
391
|
+
if nuda.env.verb:
|
|
392
|
+
print("Exit print_outputs()")
|
|
393
|
+
#
|
|
394
|
+
|
|
395
|
+
def init_self(self):
|
|
396
|
+
"""
|
|
397
|
+
Initialize variables in self.
|
|
398
|
+
"""
|
|
399
|
+
#
|
|
400
|
+
if nuda.env.verb:
|
|
401
|
+
print("Enter init_self()")
|
|
402
|
+
#
|
|
403
|
+
#: Attribute providing the full reference to the paper to be citted.
|
|
404
|
+
self.ref = ""
|
|
405
|
+
#: Attribute providing additional notes about the data.
|
|
406
|
+
self.note = ""
|
|
407
|
+
#: Attribute the matter density.
|
|
408
|
+
self.den = None
|
|
409
|
+
#: Attribute the total energy density.
|
|
410
|
+
self.eps = None
|
|
411
|
+
#: Attribute the pressure.
|
|
412
|
+
self.pre = None
|
|
413
|
+
#: Attribute the sound speed.
|
|
414
|
+
self.cs2 = None
|
|
415
|
+
#: Attribute the sound speed at beta-equilibrium
|
|
416
|
+
self.cs2_beta = None
|
|
417
|
+
#: Attribute the plot linestyle.
|
|
418
|
+
self.linestyle = None
|
|
419
|
+
#: Attribute the plot label data.
|
|
420
|
+
self.label = ""
|
|
421
|
+
#: Attribute the plot marker.
|
|
422
|
+
self.marker = None
|
|
423
|
+
#: Attribute the plot every data.
|
|
424
|
+
self.every = 1
|
|
425
|
+
#
|
|
426
|
+
if nuda.env.verb:
|
|
427
|
+
print("Exit init_self()")
|
|
428
|
+
#
|
|
429
|
+
return self
|
nucleardatapy/eos/setup_am.py
CHANGED
|
@@ -56,9 +56,9 @@ class setupAM():
|
|
|
56
56
|
models, models_lower = nuda.matter.pheno_esym_models()
|
|
57
57
|
#
|
|
58
58
|
if model.lower() not in models_lower:
|
|
59
|
-
print('The model name ',model,' is not in the list of models.')
|
|
60
|
-
print('list of models:',models)
|
|
61
|
-
print('-- Exit the code --')
|
|
59
|
+
print('setup_am: The model name ',model,' is not in the list of models.')
|
|
60
|
+
print('setup_am: list of models:',models)
|
|
61
|
+
print('setup_am: -- Exit the code --')
|
|
62
62
|
exit()
|
|
63
63
|
#
|
|
64
64
|
if kind == 'micro':
|
|
@@ -75,37 +75,74 @@ class setupAM():
|
|
|
75
75
|
self.linestyle = esym.linestyle
|
|
76
76
|
self.marker = esym.marker
|
|
77
77
|
#print('type esym:',type(esym.esym))
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
78
|
+
if esym.esym is not None:
|
|
79
|
+
self.den = esym.den
|
|
80
|
+
self.nm_den = esym.den
|
|
81
|
+
self.sm_den = esym.den
|
|
82
|
+
self.nm_e2a_int = esym.esym_nm_e2a_int
|
|
83
|
+
self.sm_e2a_int = esym.esym_sm_e2a_int
|
|
84
|
+
self.esym = esym.esym
|
|
85
|
+
#print('esym:',self.esym)
|
|
86
|
+
self.x_n = ( 1.0 + self.asy ) / 2.0
|
|
87
|
+
self.x_p = ( 1.0 - self.asy ) / 2.0
|
|
88
|
+
self.x_mu = x_mu
|
|
89
|
+
self.x_el = self.x_p - self.x_mu
|
|
90
|
+
self.x_lep = self.x_el + self.x_mu
|
|
91
|
+
self.n_n = self.x_n * self.den
|
|
92
|
+
self.n_p = self.x_p * self.den
|
|
93
|
+
self.kfn = nuda.kf_n( self.n_n )
|
|
94
|
+
self.n_el = self.x_el * self.den
|
|
95
|
+
self.n_mu = self.x_mu * self.den
|
|
96
|
+
#
|
|
97
|
+
# Thermodynamical variables
|
|
98
|
+
# nucleons
|
|
99
|
+
self.rmass = self.x_n * nuda.cst.mnc2 + self.x_p * nuda.cst.mpc2
|
|
100
|
+
self.e2a_int_nuc = esym.esym_sm_e2a_int + esym.esym * self.asy**2
|
|
101
|
+
self.e2a_nuc = self.rmass + self.e2a_int_nuc
|
|
102
|
+
self.eps_int_nuc = self.e2a_int_nuc * self.den
|
|
103
|
+
self.eps_nuc = self.e2a_nuc * self.den
|
|
104
|
+
self.pre_nuc = esym.esym_sm_pre + esym.esym_sym_pre * self.asy**2
|
|
105
|
+
# leptons
|
|
106
|
+
lep = nuda.matter.setupFFGLep( den_el = self.n_el, den_mu = self.n_mu )
|
|
107
|
+
self.e2a_el = self.x_el * lep.e2n_el
|
|
108
|
+
self.e2a_int_el = self.e2a_el - self.x_el * nuda.cst.mec2
|
|
109
|
+
self.e2a_mu = self.x_mu * lep.e2n_mu
|
|
110
|
+
self.e2a_int_mu = self.e2a_mu - self.x_mu * nuda.cst.mmuc2
|
|
111
|
+
self.e2a_lep = self.x_lep * lep.e2n_lep
|
|
112
|
+
self.eps_lep = self.e2a_lep * self.den
|
|
113
|
+
self.pre_el = lep.pre_el
|
|
114
|
+
self.pre_mu = lep.pre_mu
|
|
115
|
+
self.pre_lep = lep.pre_el + lep.pre_mu
|
|
116
|
+
# total
|
|
117
|
+
self.e2a_int_tot = self.e2a_int_nuc + self.e2a_lep
|
|
118
|
+
self.e2a_tot = self.e2a_nuc + self.e2a_lep
|
|
119
|
+
self.eps_int_tot = self.eps_int_nuc + self.eps_lep
|
|
120
|
+
self.eps_tot = self.eps_nuc + self.eps_lep
|
|
121
|
+
self.pre_tot = self.pre_nuc + self.pre_lep
|
|
122
|
+
# enthalpy self.h2a
|
|
123
|
+
self.h2a_lep = self.e2a_lep + self.pre_lep / self.den
|
|
124
|
+
self.h2a_nuc = self.e2a_nuc + self.pre_nuc / self.den
|
|
125
|
+
self.h2a_tot = self.e2a_tot + self.pre_tot / self.den
|
|
126
|
+
# enthaply density self.h2v
|
|
127
|
+
self.h2v_lep = self.h2a_lep * self.den
|
|
128
|
+
self.h2v_nuc = self.h2a_nuc * self.den
|
|
129
|
+
self.h2v_tot = self.h2a_tot * self.den
|
|
130
|
+
# sound speed self.cs2
|
|
131
|
+
x = np.insert(self.den, 0, 0.0)
|
|
132
|
+
y = np.insert(self.pre_lep, 0, 0.0)
|
|
133
|
+
cs_pre = CubicSpline(x, y)
|
|
134
|
+
self.cs2_lep = cs_pre(self.den, 1) / self.h2a_lep
|
|
135
|
+
y = np.insert(self.pre_nuc, 0, 0.0)
|
|
136
|
+
cs_pre = CubicSpline(x, y)
|
|
137
|
+
self.cs2_nuc = cs_pre(self.den, 1) / self.h2a_nuc
|
|
138
|
+
y = np.insert(self.pre_tot, 0, 0.0)
|
|
139
|
+
cs_pre = CubicSpline(x, y)
|
|
140
|
+
self.cs2_tot = cs_pre(self.den, 1) / self.h2a_tot
|
|
141
|
+
#
|
|
105
142
|
self.den_unit = 'fm$^{-3}$'
|
|
106
|
-
self.kf_unit
|
|
143
|
+
self.kf_unit = 'fm$^{-1}$'
|
|
107
144
|
self.e2a_unit = 'MeV'
|
|
108
|
-
self.
|
|
145
|
+
self.eps_unit = 'MeV fm$^{-3}$'
|
|
109
146
|
self.pre_unit = 'MeV fm$^{-3}$'
|
|
110
147
|
self.gap_unit = 'MeV'
|
|
111
148
|
#
|
|
@@ -128,7 +165,7 @@ class setupAM():
|
|
|
128
165
|
if self.kfn is not None: print(f" kfn: {np.round(self.den,3)} in {self.kf_unit}")
|
|
129
166
|
if self.asy is not None: print(f" asy: {np.round(self.asy,3)}")
|
|
130
167
|
if self.e2a is not None: print(f" e2a: {np.round(self.e2a,3)} in {self.e2a_unit}")
|
|
131
|
-
if self.
|
|
168
|
+
if self.eps is not None: print(f" eps: {np.round(self.eps,3)} in {self.eps_unit}")
|
|
132
169
|
if self.pre is not None: print(f" pre: {np.round(self.pre,3)} in {self.pre_unit}")
|
|
133
170
|
if self.cs2 is not None: print(f" cs2: {np.round(self.cs2,2)}")
|
|
134
171
|
#
|
|
@@ -165,7 +202,7 @@ class setupAM():
|
|
|
165
202
|
#: Attribute the energy per particle.
|
|
166
203
|
self.e2a = None
|
|
167
204
|
#: Attribute the energy per unit volume.
|
|
168
|
-
self.
|
|
205
|
+
self.eps = None
|
|
169
206
|
#: Attribute the enthalpy per particle.
|
|
170
207
|
self.h2a = None
|
|
171
208
|
#: Attribute the enthalpy per unit volume.
|
|
@@ -90,6 +90,10 @@ class setupAMBeq():
|
|
|
90
90
|
#if isinstance(esym.esym, np.ndarray ):
|
|
91
91
|
if esym.esym is not None:
|
|
92
92
|
self.den = esym.den
|
|
93
|
+
self.nm_den = esym.den
|
|
94
|
+
self.sm_den = esym.den
|
|
95
|
+
self.nm_e2a_int = esym.esym_nm_e2a_int
|
|
96
|
+
self.sm_e2a_int = esym.esym_sm_e2a_int
|
|
93
97
|
self.esym = esym.esym
|
|
94
98
|
self.x_el = []
|
|
95
99
|
self.x_mu = []
|
|
@@ -104,6 +108,7 @@ class setupAMBeq():
|
|
|
104
108
|
self.x_mu.append( x_mu )
|
|
105
109
|
self.x_el = np.array( self.x_el, dtype = float )
|
|
106
110
|
self.x_mu = np.array( self.x_mu, dtype = float )
|
|
111
|
+
self.x_lep = self.x_el + self.x_mu
|
|
107
112
|
#print('x_el:',self.x_el)
|
|
108
113
|
#print('x_mu:',self.x_mu)
|
|
109
114
|
self.x_p = self.x_el + self.x_mu
|
|
@@ -115,31 +120,57 @@ class setupAMBeq():
|
|
|
115
120
|
self.kfn = nuda.kf_n( self.n_n )
|
|
116
121
|
self.n_el = self.x_el * self.den
|
|
117
122
|
self.n_mu = self.x_mu * self.den
|
|
123
|
+
self.x_lep = self.x_el + self.x_mu
|
|
118
124
|
#
|
|
119
125
|
# Thermodynamical variables
|
|
120
|
-
|
|
121
|
-
self.
|
|
122
|
-
self.
|
|
126
|
+
# nucleons
|
|
127
|
+
self.rmass = self.x_n * nuda.cst.mnc2 + self.x_p * nuda.cst.mpc2
|
|
128
|
+
self.e2a_int_nuc = esym.esym_sm_e2a_int + esym.esym * self.asy**2
|
|
129
|
+
self.e2a_nuc = self.rmass + self.e2a_int_nuc
|
|
130
|
+
self.eps_int_nuc = self.e2a_int_nuc * self.den
|
|
131
|
+
self.eps_nuc = self.e2a_nuc * self.den
|
|
132
|
+
self.pre_nuc = esym.esym_sm_pre + esym.esym_sym_pre * self.asy**2
|
|
133
|
+
# leptons
|
|
123
134
|
lep = nuda.matter.setupFFGLep( den_el = self.n_el, den_mu = self.n_mu )
|
|
124
|
-
self.e2a_el = lep.
|
|
125
|
-
self.
|
|
126
|
-
self.
|
|
127
|
-
self.
|
|
135
|
+
self.e2a_el = self.x_el * lep.e2n_el
|
|
136
|
+
self.e2a_int_el = self.e2a_el - self.x_el * nuda.cst.mec2
|
|
137
|
+
self.e2a_mu = self.x_mu * lep.e2n_mu
|
|
138
|
+
self.e2a_int_mu = self.e2a_mu - self.x_mu * nuda.cst.mmuc2
|
|
139
|
+
self.e2a_lep = self.x_lep * lep.e2n_lep
|
|
140
|
+
self.eps_lep = self.e2a_lep / self.den
|
|
128
141
|
self.pre_el = lep.pre_el
|
|
129
142
|
self.pre_mu = lep.pre_mu
|
|
130
|
-
self.pre_lep = lep.
|
|
131
|
-
#
|
|
143
|
+
self.pre_lep = lep.pre_el + lep.pre_mu
|
|
144
|
+
# total
|
|
145
|
+
self.e2a_int_tot = self.e2a_int_nuc + self.e2a_lep
|
|
132
146
|
self.e2a_tot = self.e2a_nuc + self.e2a_lep
|
|
133
|
-
self.
|
|
147
|
+
self.eps_int_tot = self.eps_int_nuc + self.eps_lep
|
|
148
|
+
self.eps_tot = self.eps_nuc + self.eps_lep
|
|
134
149
|
self.pre_tot = self.pre_nuc + self.pre_lep
|
|
135
|
-
# self.h2a
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
150
|
+
# enthalpy self.h2a
|
|
151
|
+
self.h2a_lep = self.e2a_lep + self.pre_lep / self.den
|
|
152
|
+
self.h2a_nuc = self.e2a_nuc + self.pre_nuc / self.den
|
|
153
|
+
self.h2a_tot = self.e2a_tot + self.pre_tot / self.den
|
|
154
|
+
# enthaply density self.h2v
|
|
155
|
+
self.h2v_lep = self.h2a_lep * self.den
|
|
156
|
+
self.h2v_nuc = self.h2a_nuc * self.den
|
|
157
|
+
self.h2v_tot = self.h2a_tot * self.den
|
|
158
|
+
# sound speed self.cs2
|
|
159
|
+
x = np.insert(self.den, 0, 0.0)
|
|
160
|
+
y = np.insert(self.pre_lep, 0, 0.0)
|
|
161
|
+
cs_pre = CubicSpline(x, y)
|
|
162
|
+
self.cs2_lep = cs_pre(self.den, 1) / self.h2a_lep
|
|
163
|
+
y = np.insert(self.pre_nuc, 0, 0.0)
|
|
164
|
+
cs_pre = CubicSpline(x, y)
|
|
165
|
+
self.cs2_nuc = cs_pre(self.den, 1) / self.h2a_nuc
|
|
166
|
+
y = np.insert(self.pre_tot, 0, 0.0)
|
|
167
|
+
cs_pre = CubicSpline(x, y)
|
|
168
|
+
self.cs2_tot = cs_pre(self.den, 1) / self.h2a_tot
|
|
169
|
+
# #
|
|
139
170
|
self.den_unit = 'fm$^{-3}$'
|
|
140
171
|
self.kf_unit = 'fm$^{-1}$'
|
|
141
172
|
self.e2a_unit = 'MeV'
|
|
142
|
-
self.
|
|
173
|
+
self.eps_unit = 'MeV fm$^{-3}$'
|
|
143
174
|
self.pre_unit = 'MeV fm$^{-3}$'
|
|
144
175
|
self.gap_unit = 'MeV'
|
|
145
176
|
#
|
|
@@ -162,7 +193,7 @@ class setupAMBeq():
|
|
|
162
193
|
if self.kfn is not None: print(f" kfn: {np.round(self.den,3)} in {self.kf_unit}")
|
|
163
194
|
if self.asy is not None: print(f" asy: {np.round(self.asy,3)}")
|
|
164
195
|
if self.e2a is not None: print(f" e2a: {np.round(self.e2a,3)} in {self.e2a_unit}")
|
|
165
|
-
if self.
|
|
196
|
+
if self.eps is not None: print(f" eps: {np.round(self.eps,3)} in {self.eps_unit}")
|
|
166
197
|
if self.pre is not None: print(f" pre: {np.round(self.pre,3)} in {self.pre_unit}")
|
|
167
198
|
if self.cs2 is not None: print(f" cs2: {np.round(self.cs2,2)}")
|
|
168
199
|
#
|
|
@@ -207,7 +238,7 @@ class setupAMBeq():
|
|
|
207
238
|
#: Attribute the energy per particle (total).
|
|
208
239
|
self.e2a = None
|
|
209
240
|
#: Attribute the energy per unit volume.
|
|
210
|
-
self.
|
|
241
|
+
self.eps = None
|
|
211
242
|
#: Attribute the enthalpy per particle.
|
|
212
243
|
self.h2a = None
|
|
213
244
|
#: Attribute the enthalpy per unit volume.
|