def plot_ei_equation(self, LAXIS, bconv, tconv, xbl, xbr, ybu, ybd, ilg):
    'Plot internal energy equation in the model'
    if ((self.ig != 1) and (self.ig != 2)):
        print(('ERROR(InternalEnergyEquation.py):' + self.errorGeometry(self.ig)))
        sys.exit()
    grd1 = self.xzn0
    lhs0 = self.minus_dt_dd_fht_ei
    lhs1 = self.minus_div_dd_fht_ux_fht_ei
    rhs0 = self.minus_div_fei
    rhs1 = self.minus_div_ftt
    rhs2 = self.minus_pp_div_ux
    rhs3 = self.minus_eht_ppf_df
    rhs4 = self.plus_dd_fht_enuc
    rhs5 = self.plus_disstke
    res = self.minus_resEiEquation
    plt.figure(figsize=(7, 6))
    plt.gca().yaxis.get_major_formatter().set_powerlimits((0, 0))
    to_plot = [lhs0, lhs1, rhs0, rhs1, rhs2, rhs3, rhs4, rhs5, res]
    self.set_plt_axis(LAXIS, xbl, xbr, ybu, ybd, to_plot)
    plt.title('internal energy equation')
    if (self.ig == 1):
        plt.plot(grd1, lhs0, color='#FF6EB4', label='$-\\partial_t (\\overline{\\rho} \\widetilde{\\epsilon}_I )$')
        plt.plot(grd1, lhs1, color='k', label='$-\\nabla_x (\\overline{\\rho}\\widetilde{u}_x \\widetilde{\\epsilon}_I$)')
        plt.plot(grd1, rhs0, color='#FF8C00', label='$-\\nabla_x f_I $')
        plt.plot(grd1, rhs1, color='c', label='$-\\nabla_x f_T$ (not incl.)')
        plt.plot(grd1, rhs2, color='#802A2A', label='$-\\bar{P} \\bar{d}$')
        plt.plot(grd1, rhs3, color='r', label='$-W_P$')
        plt.plot(grd1, rhs4, color='b', label='$+\\overline{\\rho}\\widetilde{\\epsilon}_{nuc}$')
        plt.plot(grd1, rhs5, color='m', label='$+\\varepsilon_k$')
        plt.plot(grd1, res, color='k', linestyle='--', label='res $\\sim N_\\epsilon$')
    elif (self.ig == 2):
        plt.plot(grd1, lhs0, color='#FF6EB4', label='$-\\partial_t (\\overline{\\rho} \\widetilde{\\epsilon}_I )$')
        plt.plot(grd1, lhs1, color='k', label='$-\\nabla_r (\\overline{\\rho}\\widetilde{u}_r \\widetilde{\\epsilon}_I$)')
        plt.plot(grd1, rhs0, color='#FF8C00', label='$-\\nabla_r f_I $')
        plt.plot(grd1, rhs1, color='c', label='$-\\nabla_r f_T$ (not incl.)')
        plt.plot(grd1, rhs2, color='#802A2A', label='$-\\bar{P} \\bar{d}$')
        plt.plot(grd1, rhs3, color='r', label='$-W_P$')
        plt.plot(grd1, rhs4, color='b', label='$+\\overline{\\rho}\\widetilde{\\epsilon}_{nuc}$')
        plt.plot(grd1, rhs5, color='m', label='$+\\varepsilon_k$')
        plt.plot(grd1, res, color='k', linestyle='--', label='res $\\sim N_\\epsilon$')
    plt.axvline(bconv, linestyle='--', linewidth=0.7, color='k')
    plt.axvline(tconv, linestyle='--', linewidth=0.7, color='k')
    if (self.ig == 1):
        setxlabel = 'x (cm)'
        setylabel = 'erg cm$^{-3}$ s$^{-1}$'
        plt.xlabel(setxlabel)
        plt.ylabel(setylabel)
    elif (self.ig == 2):
        setxlabel = 'r (cm)'
        setylabel = 'erg cm$^{-3}$ s$^{-1}$'
        plt.xlabel(setxlabel)
        plt.ylabel(setylabel)
    plt.legend(loc=ilg, prop={'size': 10}, ncol=2)
    plt.show(block=False)
    if (self.fext == 'png'):
        plt.savefig((('RESULTS/' + self.data_prefix) + 'ei_eq.png'))
    elif (self.fext == 'eps'):
        plt.savefig((('RESULTS/' + self.data_prefix) + 'ei_eq.eps'))
Plot internal energy equation in the model
def plot_ei_equation(self, LAXIS, bconv, tconv, xbl, xbr, ybu, ybd, ilg):
    
    if ((self.ig != 1) and (self.ig != 2)):
        print(('ERROR(InternalEnergyEquation.py):' + self.errorGeometry(self.ig)))
        sys.exit()
    grd1 = self.xzn0
    lhs0 = self.minus_dt_dd_fht_ei
    lhs1 = self.minus_div_dd_fht_ux_fht_ei
    rhs0 = self.minus_div_fei
    rhs1 = self.minus_div_ftt
    rhs2 = self.minus_pp_div_ux
    rhs3 = self.minus_eht_ppf_df
    rhs4 = self.plus_dd_fht_enuc
    rhs5 = self.plus_disstke
    res = self.minus_resEiEquation
    plt.figure(figsize=(7, 6))
    plt.gca().yaxis.get_major_formatter().set_powerlimits((0, 0))
    to_plot = [lhs0, lhs1, rhs0, rhs1, rhs2, rhs3, rhs4, rhs5, res]
    self.set_plt_axis(LAXIS, xbl, xbr, ybu, ybd, to_plot)
    plt.title('internal energy equation')
    if (self.ig == 1):
        plt.plot(grd1, lhs0, color='#FF6EB4', label='$-\\partial_t (\\overline{\\rho} \\widetilde{\\epsilon}_I )$')
        plt.plot(grd1, lhs1, color='k', label='$-\\nabla_x (\\overline{\\rho}\\widetilde{u}_x \\widetilde{\\epsilon}_I$)')
        plt.plot(grd1, rhs0, color='#FF8C00', label='$-\\nabla_x f_I $')
        plt.plot(grd1, rhs1, color='c', label='$-\\nabla_x f_T$ (not incl.)')
        plt.plot(grd1, rhs2, color='#802A2A', label='$-\\bar{P} \\bar{d}$')
        plt.plot(grd1, rhs3, color='r', label='$-W_P$')
        plt.plot(grd1, rhs4, color='b', label='$+\\overline{\\rho}\\widetilde{\\epsilon}_{nuc}$')
        plt.plot(grd1, rhs5, color='m', label='$+\\varepsilon_k$')
        plt.plot(grd1, res, color='k', linestyle='--', label='res $\\sim N_\\epsilon$')
    elif (self.ig == 2):
        plt.plot(grd1, lhs0, color='#FF6EB4', label='$-\\partial_t (\\overline{\\rho} \\widetilde{\\epsilon}_I )$')
        plt.plot(grd1, lhs1, color='k', label='$-\\nabla_r (\\overline{\\rho}\\widetilde{u}_r \\widetilde{\\epsilon}_I$)')
        plt.plot(grd1, rhs0, color='#FF8C00', label='$-\\nabla_r f_I $')
        plt.plot(grd1, rhs1, color='c', label='$-\\nabla_r f_T$ (not incl.)')
        plt.plot(grd1, rhs2, color='#802A2A', label='$-\\bar{P} \\bar{d}$')
        plt.plot(grd1, rhs3, color='r', label='$-W_P$')
        plt.plot(grd1, rhs4, color='b', label='$+\\overline{\\rho}\\widetilde{\\epsilon}_{nuc}$')
        plt.plot(grd1, rhs5, color='m', label='$+\\varepsilon_k$')
        plt.plot(grd1, res, color='k', linestyle='--', label='res $\\sim N_\\epsilon$')
    plt.axvline(bconv, linestyle='--', linewidth=0.7, color='k')
    plt.axvline(tconv, linestyle='--', linewidth=0.7, color='k')
    if (self.ig == 1):
        setxlabel = 'x (cm)'
        setylabel = 'erg cm$^{-3}$ s$^{-1}$'
        plt.xlabel(setxlabel)
        plt.ylabel(setylabel)
    elif (self.ig == 2):
        setxlabel = 'r (cm)'
        setylabel = 'erg cm$^{-3}$ s$^{-1}$'
        plt.xlabel(setxlabel)
        plt.ylabel(setylabel)
    plt.legend(loc=ilg, prop={'size': 10}, ncol=2)
    plt.show(block=False)
    if (self.fext == 'png'):
        plt.savefig((('RESULTS/' + self.data_prefix) + 'ei_eq.png'))
    elif (self.fext == 'eps'):
        plt.savefig((('RESULTS/' + self.data_prefix) + 'ei_eq.eps'))