def EvJ_uncoupled_vibrating_rotor(v1, v2, l2, v3, J, coeff_dict, gv1=1, gv2=1, gv3=1, remove_ZPE=True): """Rovibrational energy of an uncoupled vibrating rotor. Parameters ---------- v1: int vibrational state v2: int vibrational state l2: int vibrational state v3: int vibrational state J: int rotational state coeff_dict: dict dictionary of :py:data:`~radis.db.conventions.herzberg_coefficients`, which can be numbered for the different vibration modes. Example:: {'we1': 1333.93, 'we2': 667.47, 'we3': 2349.16, 'wexe1': 2.93, 'wexe2': -0.38, 'wexe3': 12.47, 'Be': 0.39022, 'De': 1.333e-07, 'He': 9e-15} gv1, gv2, gv3: int degeneracies of each vibrational mode. Default ``1, 1, 1``:: 1,2,1 for CO2 remove_ZPE: boolean if ``True``, removes energy of ground state vibrational level (zero-point-energy) Returns ------- E: float energy of state in cm-1 References ---------- Klarenaar et al, "Time evolution of vibrational temperatures in a CO 2 glow discharge measured with infrared absorption spectroscopy", doi 10.1088/1361-6595/aa902e, and the references there in. See Also -------- :py:func:`~radis.levels.energies_co2.EvJ_co2` """ coeff_dict = coeff_dict.copy() coeffs_vib = {"1": {}, "2": {}, "3": {}} coeffs_rot = {} # Split coeffs between the different vibration and rotation modes: for k, v in coeff_dict.items(): if k in herzberg_coefficients_rot: coeffs_rot[k] = v elif k[:-1] in herzberg_coefficients_vib: vib_mode = k[-1] coeffs_vib[vib_mode][k[:-1]] = v elif k in herzberg_coefficients_rovib: raise NotImplementedError( "Mixed term {0} not implemented for uncoupled rovib model". format(k)) else: raise KeyError("Unexpected coefficient: {0}".format(k)) coeffs_vib1 = coeffs_vib["1"] coeffs_vib2 = coeffs_vib["2"] coeffs_vib3 = coeffs_vib["3"] # Get rotational coeffs: coeffs_rot = { k: v for (k, v) in coeff_dict.items() if k in herzberg_coefficients_rot } # Energies G1 = Gv(v1, gv=gv1, **coeffs_vib1) G2 = Gv(v2, gv=gv2, **coeffs_vib2) G3 = Gv(v3, gv=gv3, **coeffs_vib3) G = G1 + G2 + G3 F = Fv(0, J, **coeffs_rot) # Uncoupled model: v dependance ignored if remove_ZPE: ZPE = Gv(0, **coeffs_vib1) + Gv(0, gv=2, **coeffs_vib2) + Gv( 0, **coeffs_vib3) else: ZPE = 0 return G + F - ZPE # cm-1
def _E_Herzberg(self, v, J, remove_ZPE=True): # TODO: move in levels.energies as was done for CO2 r"""Calculate rovibrational energy of molecule .. math:: E(v,J) = G(v) + F(v,J) Works with Herzberg convention for the spectroscopic coefficients used in :func:`~radis.levels.dunham.Gv`, :func:`~radis.levels.dunham.Fv` :: Only works for diatomic molecules. Method should be overwritten on molecule creation for other molecules Parameters ---------- v: int vibrational state J: int rotational state remove_ZPE: boolean if ``True``, removes energy of v=0,J=0 vibrational level (zero-point-energy) Default ``True`` Returns ------- energy of state in cm-1 See Also -------- :func:`~radis.levels.dunham.Gv`, :func:`~radis.levels.dunham.Fv` """ try: # Get from constants (hardcoded, see reference above) c = self.rovib_constants # Vibrational constants we = c["we"] # mandatory wexe = c.get("wexe", 0) # optional: 0 is default value weye = c.get("weye", 0) weze = c.get("weze", 0) weae = c.get("weae", 0) webe = c.get("webe", 0) # Rotational constants Be = c["Be"] De = c.get("De", 0) alpha_e = c.get("alpha_e", 0) beta_e = c.get("beta_e", 0) gamma_e = c.get("gamma_e", 0) delta_e = c.get("delta_e", 0) pi_e = c.get("pi_e", 0) He = c.get("He", 0) eta_e = c.get("eta_e", 0) # Energies # Te = c['Te'] # electronic energy G = Gv(v, we, wexe, weye, weze, weae, webe) # vibrational energy F = Fv( v, J, Be, De, alpha_e, beta_e, gamma_e, delta_e, pi_e=pi_e, He=He, eta_e=eta_e, ) # rotational energy if remove_ZPE: ZPE = Gv(0, we, wexe, weye, weze) else: ZPE = 0 E = G + F - ZPE # cm-1 except KeyError as err: raise KeyError( "Mandatory spectroscopic constant `{0}` ".format(err.args[0]) + "not defined for electronic state {0}".format( self.get_fullname()) + ". Check your ElectronicState definition") return E