def __init__(self):

        prmObj = Prm()
        conv_factors = prmObj.get_conv_factors()
        constants = prmObj.get_constants()

        '''Global constants.'''
        self.__mN = constants["mN"] #[gm]
        self.__c  = constants["c"]  #[cm/s]
        self.__pi = constants["pi"]
        self.__hbar = constants["hbar"] # [erg . s]
        self.__eN0 = self.__mN*self.__c**2 # ([erg])Rest mass energy of neutron.


        '''EoS specific constants.'''
        self.__A = 118.2 * conv_factors["MEV_TO_ERG"] # A[MeV] --> A[erg]
        self.__B = 65.39 * conv_factors["MEV_TO_ERG"] # B[MeV] --> B[erg]
        self.__sigma = 2.112 # dimension less
        self.__alpha = 0.0   # Dimension less
        self.__S0 = 30.0* conv_factors["MEV_TO_ERG"] #[erg]
        self.__n0 = 0.16/(10**(-13))**3 # [#/(fm^3)] --> [#/(cm^3)]
        self.u_lower = 0.0 # u = (n/n0)
        self.u_upper = 100.0

        self.__e0 = self.__mN**4*self.__c**5/(3.*self.__pi**2*self.__hbar**3) # [erg/cm^-3] # This quantity is arbitrary
        self.__EF0 = (
            (3.0/5.0)*(1.0/(2.0*self.__mN))
            *(3.0*self.__pi**2*self.__hbar**3*self.__n0/2.0)**(2.0/3.0)
            ) # [erg] # <KE> of a nucleon corresponding to k_F(n) = k_F(n0)
Esempio n. 2
0
    def get_star_central_values(self):

        prmObj = Prm()
        star_params = prmObj.get_constants()

        EoS_params = self.get_EoS_params()

        Ms = star_params["Ms"]
        c  = star_params["c"]
        pi = star_params["pi"]

        r0 = self.__r0
        dr =self.__dr


        '''Value of barM0 for given barP0 according to the EoS'''
        barM0 = (4.*pi*EoS_params["e0"]/(3.*Ms*c**2))*r0**3.*self.barE(self.barP0)

        star_central_vals = {
            "r0":r0,
            "dr":dr,
            "barM_init":barM0,
        }

        return star_central_vals
Esempio n. 3
0
    def dbarP_dr(self, r_i, barM_i, barP_i):
        '''
        RHS of the force balance eqn in the TOV eqns.
        '''
        prmObj  = Prm()
        params  = prmObj.get_constants()

        R0 = params["R0"]
        pi = params["pi"]
        c  = params["c"]
        Ms = params["Ms"]

       
        eosparams = self.get_EoS_params()
        e0 = eosparams["e0"]
        barE   = self.barE(barP_i)

        f1 = -R0*barM_i*barE/r_i**2
        f2 = 1.0 +(barP_i/barE)
        f3 = 1.0 + (4.0*pi*e0/(Ms*c**2))*(r_i**3)*(barP_i/barM_i)
        f4 = 1.0 - 2.0*R0*(barM_i/r_i)

        dbarP_dr = f1*f2*f3/f4

        return dbarP_dr
    def get_EoS_params(self):

        paramObj = Prm()
        params = paramObj.get_constants()

        mN = params["mN"]
        c = params["c"]
        pi = params["pi"]
        hbar = params["hbar"]
        e0 = mN**4 * c**5 / (3. * pi**2 * hbar**3)

        EoS_params = {
            "gamma_rl": self.__gamma_rl,
            "gamma_nrl": self.__gamma_nrl,
            "A_rl": self.__A_rl,
            "A_nrl": self.__A_nrl,
            "e0": e0,
        }
        return EoS_params
 def __init__(self):
     prmObj = Prm()
     constants = prmObj.get_constants()
     '''Global constants.'''
     self.__mE = constants["mE"]
     self.__mP = constants["mP"]
     self.__mN = constants["mN"]  #[gm]
     self.__c = constants["c"]  #[cm/s]
     self.__pi = constants["pi"]
     self.__hbar = constants["hbar"]  # [erg . s]
     self.__n0 = 0.16 / (10**(-13))**3  # [#/(fm^3)] --> [#/(cm^3)]
     self.__eN0 = self.__mN * self.__c**2  # ([erg])Rest mass energy of neutron.
     '''EoS specific constants.'''
     self.__sigma = 2.112
     self.__e0 = self.__mN**4 * self.__c**5 / (
         3. * self.__pi**2 * self.__hbar**3
     )  # [erg/cm^-3] # This quantity is arbitrary
     self.u_lower = 0.0  # u = (n/n0)
     self.u_upper = 100.0
Esempio n. 6
0
    def dbarM_dr(self, r_i, barP_i, barM_i):
        '''
        RHS of the mass balance equation in the TOV eqns.
        '''

        prmObj = Prm()
        params = prmObj.get_constants()

        Ms = params["Ms"]
        c  = params["c"]
        pi = params["pi"]

        eosparams = self.get_EoS_params()
        e0 = eosparams["e0"]

        barE = self.barE(barP_i)

        dbarMdr = (4.0*pi*e0/(Ms*c**2))*(r_i**2.0*barE)

        return dbarMdr
Esempio n. 7
0
    def get_star_central_values(self):

        prmObj = Prm()
        star_params = prmObj.get_constants()

        Ms = star_params["Ms"]
        pi = star_params["pi"]
        r0 = self.__r0
        dr = self.__dr
        '''Value of barM0 for given barP0 according to the EoS'''
        rho = self.get_density(self.barP0)
        barM0 = (1.0 / Ms) * ((4.0 / 3.0) * pi * r0**3.0) * rho

        star_central_vals = {
            "r0": r0,
            "dr": dr,
            "barP0": self.barP0,
            "barM0": barM0,
        }

        return star_central_vals
 def __init__(self):
     prmObj = Prm()
     conv_factors = prmObj.get_conv_factors()
     constants = prmObj.get_constants()
     '''Global constants.'''
     self.__mE = constants["mE"]
     self.__mP = constants["mP"]
     self.__mN = constants["mN"]  #[gm]
     self.__c = constants["c"]  #[cm/s]
     self.__pi = constants["pi"]
     self.__hbar = constants["hbar"]  # [erg . s]
     self.__eN0 = self.__mN * self.__c**2  # ([erg])Rest mass energy of neutron.
     '''EoS specific constants.'''
     self.__t0 = 1024.1 * conv_factors["MEV_TO_ERG"] * (10**-13)**3
     self.__t3 = 14600.8 * conv_factors["MEV_TO_ERG"] * (10**-13)**6
     self.__n0 = 0.16 / (10**(-13))**3  # [#/(fm^3)] --> [#/(cm^3)]
     self.__e0 = self.__mN**4 * self.__c**5 / (
         3. * self.__pi**2 * self.__hbar**3
     )  # [erg/cm^-3] # This quantity is arbitrary
     self.__EF0 = ((3.0 / 5.0) * (1.0 / (2.0 * self.__mN)) *
                   (3.0 * self.__pi**2 * self.__hbar**3 * self.__n0 / 2.0)
                   **(2.0 / 3.0))
     self.u_lower = 0.0  # u = (n/n0)
     self.u_upper = 200.0