k_lorene2cu Function

public pure function k_lorene2cu(gam)

Compute the constant to convert the polytropic constant from the units used in \(\texttt{LORENE}\) for the single polytropic \(\mathrm{EOS}\), to the units used in \(\texttt{SPHINCS}\)

FT xx.xx.2020


Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: gam

Polytropic exponent

Return Value double precision


Called by

proc~~k_lorene2cu~~CalledByGraph proc~k_lorene2cu k_lorene2cu proc~print_bns_properties print_bns_properties proc~print_bns_properties->proc~k_lorene2cu proc~print_diffstar_properties print_diffstar_properties proc~print_diffstar_properties->proc~k_lorene2cu proc~read_bns_properties read_bns_properties proc~read_bns_properties->proc~k_lorene2cu interface~print_bns_properties print_bns_properties proc~read_bns_properties->interface~print_bns_properties proc~read_diffstar_properties read_diffstar_properties proc~read_diffstar_properties->proc~k_lorene2cu interface~print_diffstar_properties print_diffstar_properties proc~read_diffstar_properties->interface~print_diffstar_properties program~write_par_eos write_par_eos program~write_par_eos->proc~k_lorene2cu interface~print_bns_properties->proc~print_bns_properties interface~print_diffstar_properties->proc~print_diffstar_properties interface~read_bns_properties read_bns_properties interface~read_bns_properties->proc~read_bns_properties interface~read_diffstar_properties read_diffstar_properties interface~read_diffstar_properties->proc~read_diffstar_properties proc~construct_bnslorene construct_bnslorene proc~construct_bnslorene->interface~read_bns_properties proc~construct_diffstarlorene construct_diffstarlorene proc~construct_diffstarlorene->interface~read_diffstar_properties interface~construct_bnslorene construct_bnslorene interface~construct_bnslorene->proc~construct_bnslorene interface~construct_diffstarlorene construct_diffstarlorene interface~construct_diffstarlorene->proc~construct_diffstarlorene

Contents

Source Code


Source Code

  PURE FUNCTION k_lorene2cu( gam )

    !****************************************************************
    !
    !# Compute the constant to convert the polytropic constant \(K\)
    !  from the units used in |lorene| for the single polytropic |eos|,
    !  to the units used in |sphincs|
    !
    !  FT xx.xx.2020
    !
    !****************************************************************

    IMPLICIT NONE

    DOUBLE PRECISION, INTENT(IN) :: gam
    !! Polytropic exponent \(\gamma\)
    DOUBLE PRECISION :: k_lorene2cu

    ! LORENE's EOS is in terms on number density n = rho/m_nucleon:
    ! P = K n^Gamma
    ! to convert to SI units:
    ! K_SI(n) = K_LORENE rho_nuc c^2 / n_nuc^gamma
    ! Converting this to be in terms of the mass density rho = n m_nucleon gets
    ! changes n_nuc to rho_nuc:
    ! K_SI(rho) = K_LORENE c^2 / rho_nuc^(gamma-1)
    ! In SI units P has units of M / (L T^2) and rho has units of M/L^3 thus
    ! K_SI has units of (L^3/M)^Gamma M/(L T^2).
    ! In Cactus units P and rho have the same units thus K_Cactus is unitless.
    ! Conversion between K_SI and K_Cactus thus amounts to dividing out the
    ! units of the SI quantity.

    k_lorene2cu= ( (MSun*g2kg)/((MSun_geo*km2m)**3*(1.66D+17)) )**(gam - one)


  END FUNCTION k_lorene2cu