Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NRTools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alejandra Gonzalez
NRTools
Commits
078fd85e
Commit
078fd85e
authored
1 year ago
by
Alejandra Gonzalez
Browse files
Options
Downloads
Patches
Plain Diff
added option for when the NS has Mb=1.4 and function to get lambda and kappa from ID
parent
5470cb41
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nrtools/initialdata/output.py
+46
-4
46 additions, 4 deletions
nrtools/initialdata/output.py
with
46 additions
and
4 deletions
nrtools/initialdata/output.py
+
46
−
4
View file @
078fd85e
import
os
import
os
import
numpy
as
np
import
numpy
as
np
from
..utils.utils
import
get_id_gw_frequency_Hz
,
get_id_gw_frequency_Momega22
from
..utils.utils
import
get_id_gw_frequency_Hz
,
get_id_gw_frequency_Momega22
,
get_kappa2t
########################################
########################################
# ID Output class
# ID Output class
...
@@ -133,12 +133,22 @@ class Output():
...
@@ -133,12 +133,22 @@ class Output():
For a NS with M_b = 1.6
For a NS with M_b = 1.6
'''
'''
eos
=
self
.
id_dic
[
'
NS_EoS_description
'
]
eos
=
self
.
id_dic
[
'
NS_EoS_description
'
]
mb
=
float
(
self
.
id_dic
[
'
NS_baryonic_mass_current
'
])
if
eos
==
'
SLy
'
:
if
eos
==
'
SLy
'
:
M_NS
=
1.4199062240028333
#grav mass
if
mb
>
1.5
:
# for mb=1.6
M_NS
=
1.4199062240028333
else
:
# for mb=1.4
M_NS
=
1.259943000559463
elif
eos
==
'
MS1b
'
:
elif
eos
==
'
MS1b
'
:
M_NS
=
1.4611674103103354
if
mb
>
1.5
:
# for mb=1.6
M_NS
=
1.4611674103103354
else
:
# for mb=1.4
M_NS
=
0
elif
eos
==
'
ALF2
'
:
elif
eos
==
'
ALF2
'
:
M_NS
=
1.441691281566144
if
mb
>
1.5
:
# for mb=1.6
M_NS
=
1.441691281566144
else
:
# for mb=1.4
M_NS
=
0
else
:
else
:
M_NS
=
0
M_NS
=
0
print
(
"
===> Error: EoS not recognized, please add to /nrtools/initialdata/output.py
"
)
print
(
"
===> Error: EoS not recognized, please add to /nrtools/initialdata/output.py
"
)
...
@@ -146,6 +156,38 @@ class Output():
...
@@ -146,6 +156,38 @@ class Output():
M_BH
=
float
(
self
.
id_dic
[
'
BH_Christodoulou_mass_current
'
])
M_BH
=
float
(
self
.
id_dic
[
'
BH_Christodoulou_mass_current
'
])
return
M_BH
,
M_NS
,
M_BH
+
M_NS
return
M_BH
,
M_NS
,
M_BH
+
M_NS
def
get_tidal_params
(
self
):
eos
=
self
.
id_dic
[
'
NS_EoS_description
'
]
mb
=
float
(
self
.
id_dic
[
'
NS_baryonic_mass_current
'
])
mbh
,
mg
,
_
=
self
.
get_msun_masses
()
if
eos
==
'
SLy
'
:
if
mb
>
1.5
:
# for mb=1.6
lam
=
276.48036295542073
kappa
=
get_kappa2t
(
lam
,
mbh
,
mg
)
else
:
# for mb=1.4
lam
=
599.2794774456522
kappa
=
get_kappa2t
(
lam
,
mbh
,
mg
)
elif
eos
==
'
MS1b
'
:
if
mb
>
1.5
:
# for mb=1.6
lam
=
1006.2885125921738
kappa
=
get_kappa2t
(
lam
,
mbh
,
mg
)
else
:
# for mb=1.4
lam
=
0
kappa
=
0
elif
eos
==
'
ALF2
'
:
if
mb
>
1.5
:
# for mb=1.6
lam
=
493.7973627693258
kappa
=
get_kappa2t
(
lam
,
mbh
,
mg
)
else
:
# for mb=1.4
lam
=
0
kappa
=
0
else
:
lam
=
0
kappa
=
0
print
(
"
===> Error: EoS not recognized, please add to /nrtools/initialdata/output.py
"
)
return
lam
,
kappa
def
get_ADM_qtys
(
self
):
def
get_ADM_qtys
(
self
):
'''
'''
Outputs
Outputs
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment