Check if a model is inside the reference band

2.8. Check if a model is inside the reference band#

In this tutorial, you will learn how to employ nucleardatapy to check if a model is inside the reference band.


Import the libraries that will be employed in this tutorial.

# Import numpy
import numpy as np
# Import matplotlib
import matplotlib.pyplot as plt
# Import nucleardatapy package
import nucleardatapy as nuda
%matplotlib inline

You can simply print out the properties of the nuda’s function that we will use:

# Explore the nucleardatapy module to find the correct attribute
print(dir(nuda.matter.setupCheck))
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'print_outputs']

Define a reference band: For instance the energy per particle in NM can be selected by fixing the variable matter = ‘NM’ in the class nuda.matter.setupMicroBand()

den = np.array([0.06,0.08,0.1,0.12,0.14,0.16])
models = [ '2016-MBPT-AM', '2016-QMC-NM', '2020-MBPT-AM' ]
band = nuda.matter.setupMicroBand( models, den=den, matter='NM' )
Band in NM
model ->  2016-MBPT-AM
flag_nm: True
flag_sm: True
flag_kf: False
flag_den: True
model ->  2016-QMC-NM
flag_nm: True
flag_sm: False
flag_kf: True
flag_den: False
model ->  2020-MBPT-AM
flag_nm: True
flag_sm: True
flag_kf: False
flag_den: True
model ->  2016-MBPT-AM
flag_nm: True
flag_sm: True
flag_kf: False
flag_den: True
model ->  2016-QMC-NM
flag_nm: True
flag_sm: False
flag_kf: True
flag_den: False
model ->  2020-MBPT-AM
flag_nm: True
flag_sm: True
flag_kf: False
flag_den: True

Choose a given microscopic model and instantiate the object micro with the model

model = '1998-VAR-AM-APR'
micro = nuda.matter.setupMicro( model = model )
model ->  1998-VAR-AM-APR
flag_nm: True
flag_sm: True
flag_kf: False
flag_den: True

Check if the microscopic model is inside the reference band in NM:

check = nuda.matter.setupCheck( eos = micro, band = band )
print('eos inside band?',check.isInside)
print('eos outside band?',check.isOutside)
eos inside band? True
eos outside band? False

Alternatively, choose a given phenomenological model and instantiate the object pheno with the model

model = 'Skyrme'
param = 'SLY5'
pheno = nuda.matter.setupPheno( model = model, param = param )

Check if the phenomenological model is inside the reference band in NM:

check = nuda.matter.setupCheck( eos = pheno, band = band )
print('eos inside band?',check.isInside)
print('eos outside band?',check.isOutside)
eos inside band? False
eos outside band? True

Plots: to be done