# Path: DiscEvolution/constants.py
# G = 1.
# AU = 1.496e13


import numpy as np
from scipy import optimize
from .constants import AU, sig_H2, m_H, yr, Msun
    def midplane_gas_density(self):
        return self.Sigma_G / (np.sqrt(2*np.pi) * self.H * AU)

    @property
    def midplane_density(self):
        return self.Sigma / (np.sqrt(2*np.pi) * self.H * AU)

    @property
    def column_density(self):
        n = self.midplane_gas_density / (self._eos._mu * m_H)
        Re = self.R_edge * AU
        ndR = n * (Re[1:] - Re[:-1])
        N = np.cumsum(ndR)
        return N

    @property
    def Ncells(self):
        return self._grid.Ncells

    @property
    def alpha(self):
        return self._eos.alpha

    @property
    def nu(self):
        return self._eos.nu
    
    @property
    def Re(self):
        """Reynolds number"""

# Path: DiscEvolution/constants.py
# G = 1.
# AU = 1.496e13


# Path: DiscEvolution/disc.py
import numpy as np
from scipy import optimize
from .constants import AU, sig_H2, m_H, yr, Msun

    def midplane_gas_density(self):
        return self.Sigma_G / (np.sqrt(2*np.pi) * self.H * AU)

    @property
    def midplane_density(self):
        return self.Sigma / (np.sqrt(2*np.pi) * self.H * AU)

    @property
    def column_density(self):
        n = self.midplane_gas_density / (self._eos._mu * m_H)
        Re = self.R_edge * AU
        ndR = n * (Re[1:] - Re[:-1])
        N = np.cumsum(ndR)
        return N

    @property
    def Ncells(self):
        return self._grid.Ncells

    @property
    def alpha(self):
        return self._eos.alpha

    @property
    def nu(self):
        return self._eos.nu
    
    @property
    def Re(self):
        """Reynolds number"""

        return (self.alpha*self.Sigma_G*sig_H2) / (2*self._eos.mu*m_H)