Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

calculation the total emissivity of CO2-H2O mixtures at sub- and super-atmospheric pressure #635

Open
auroraaustralis6686122 opened this issue Nov 7, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@auroraaustralis6686122
Copy link

馃悰 Describe the bug

Greetings,

I am a newcomer to Radis and am currently engaged in total emissivity calculations for CO2-H2O mixtures under varying pressure conditions.I am following the conditions outlined in the referenced paper to reproduce the results. It appears that my calculations align with the findings in paper super-atmospheric (5 atm) and atmospheric (1 atm) pressures. However, a substantial disparity emerges at sub-atmospheric conditions (0.5 atm and 0.1 atm).

I sincerely appreciate your time and assistance.

Best regards.

from radis import *
from numpy import *

Sigma = 5.67e-8

for pressure in (0.101325, 0.506625, 1.01325, 5.06625):
    for Tags in range(300, 3100, 100):
        s = calc_spectrum(150, 25000,  # cm-1
                          isotope=1,
                          pressure=pressure,  # bar
                          Tgas=Tags,  # K
                          mole_fraction={'CO2': 0.5, 'H2O': 0.5},
                          path_length=1,  # cm
                          databank='hitemp',  # or 'hitemp', 'geisa', 'exomol'c
                          wstep='auto',
                          cutoff=0,
                          )
        I_L_nm = s.get_integral("radiance_noslit")
        E_L_nm = (I_L_nm * 10 * pi) / (Sigma * (Tags ** 4))
        filename = 'E:/sub_pressure/calculation_database/0.5CO2+0.5H2O.txt'
        with open(filename, 'a') as file_object:
            file_object.write(f'{pressure} {Tags} {1/100} {E_L_nm}\n')

        for path_length in (10,30,200,300,500,1000,1500,2000,3000,4500,6000):
            s.rescale_path_length(path_length)
            I_L_nm = s.get_integral("radiance_noslit")
            E_L_nm = (I_L_nm * 10 * pi) / (Sigma * (Tags ** 4))
            filename = 'E:/sub_pressure/calculation_database/0.5CO2+0.5H2O.txt'
            with open(filename, 'a') as file_object:
                file_object.write(f'{pressure} {Tags} {path_length/100} {E_L_nm}\n')

馃挕 Possible solutions

No response

馃幉 Radis version

0.15

馃捇 Operating system

Windows

@auroraaustralis6686122 auroraaustralis6686122 added the bug Something isn't working label Nov 7, 2023
@erwanp
Copy link
Member

erwanp commented Nov 7, 2023

(side note, if building opacity databases have a look at the SpecDatabase class which is basically a folder of precomputed .spec files. For instance if changing path lengths you don't need to recompute the full spectrum, just assemble from existing spectra)

Does the original paper mention the lineshape cutoff used as well as the step resolution?

@auroraaustralis6686122
Copy link
Author

auroraaustralis6686122 commented Nov 7, 2023

In the original paper, the lineshape cutoff appears to be 10e-9 cm^-1. The step resolution is 0.01 cm^-1 for atmospheric and high-pressure conditions and 0.005 cm^-1 for sub-atmospheric pressure.

1699362710923

1699362686274

1-s2.0-S0017931021003100-main.pdf

@auroraaustralis6686122
Copy link
Author

Greetings,

in the original paper, the Voigt profile is used at sub-atmospheric pressure (< 1 bar) and the Lorentz profile is used at atmospheric pressure and super-atmospheric pressure (>1 bar). Could this be the reason for the different calculation results?

Best regards.

1699843454621

@dcmvdbekerom
Copy link
Member

Hi, could you also show the disparity you're getting? Without seeing how they differ it's hard to say what's wrong. I don't see any obvious problems/omissions. Are you using the same databases as in the reference paper?

They say that they use a Lotentzian profile when the Lorentzian width is >=10x the Gaussian width, this is a decent approximation so I don't think this is the source of the disparity. Radis does not make this simplification so considering this difference in isolation, the radis output should be a little more accurate. It seems the 10e-9 cm is the cutoff below which they consider lineshapes to be infinitely narrow.

@auroraaustralis6686122
Copy link
Author

Greetings,

The disparity is shown in the figure. The database I used is the same as the one used in the reference paper, namely, HITEMP2010.

鍥剧墖7
鍥剧墖8

It seems like the potential cause could be related to an error in my calculations. Here is the code I used:

from radis import *
from numpy import *

Sigma = 5.67e-8

for pressure in (0.506625,1.01325,5.06625):
    for Tags in range(300, 3100, 100):
        s = calc_spectrum(150, 25000,  # cm-1
                          isotope=1,
                          pressure=pressure,  # bar
                          Tgas=Tags,  # K
                          mole_fraction={'CO2': 0.5, 'H2O': 0.5},
                          path_length=1,  # cm
                          databank='hitemp',  # or 'hitemp', 'geisa', 'exomol'c
                          wstep='auto',
                          cutoff=0,
                          )
        I_L_nm = s.get_integral("radiance_noslit")
        E_L_nm = (I_L_nm * 10 * pi) / (Sigma * (Tags ** 4))
        filename = 'E:/radis/sub_pressure/calculate_database/0.5CO2+0.5H2O.txt'
        with open(filename, 'a') as file_object:
            file_object.write(f'{pressure} {Tags} {1/100} {E_L_nm}\n')

        for path_length in (10,30,50,75,100,150,200,300,500,1000,1500,2000,3000,4500,6000):
            s.rescale_path_length(path_length)
            I_L_nm = s.get_integral("radiance_noslit")
            E_L_nm = (I_L_nm * 10 * pi) / (Sigma * (Tags ** 4))
            filename = 'E:/radis/sub_pressure/calculate_database/0.5CO2+0.5H2O.txt'
            with open(filename, 'a') as file_object:
                file_object.write(f'{pressure} {Tags} {path_length/100} {E_L_nm}\n')

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants