HITRAN数据库的使用及平均吸收系数的计算(二)

目前已经发展出多个python第三方库可以对HITRAN数据库进行处理,比较有名的是RADIS库。详情请移步https://github.com/radis/radis
大家可以看RADIS开发者给我的回复。
https://github.com/radis/radis/issues/249
Q:I want to calculate Planck’s mean absorption coefficient using radis someday.
A:This would be very easy to implement in RADIS !

In the Planck’s mean absorption coefficient :

在这里插入图片描述

The only difficulty is to compute the absorption coefficient itself, and RADIS does it for you. You could have something like :

from radis import calc_spectrum
Tgas = 1000
s = calc_spectrum(100, 20000,  # cm-1 
              molecule=...,
              databank=...,
              Tgas=Tgas) 
w, k = s.get('abscoeff', wunit='cm-1', Iunit='cm-1')   # that's an absorption coefficient in cm-1 

And then derive the Planck-mean from that :

from numpy import trapz
from radis.phys.blackbody import planck_wn
planck_avg_k =  trapz(k * planck_wn(w, Tgas), x=w) / trapz(I, Tgas), x=w)        
Some warning points I can think about :

By default the absorption coefficient in RADIS is in cm-1, therefore it is not a molar absorption coefficient. You know which unit you’ll want for planck_avg_k anyway.

Performance-wise, RADIS may not be optimized to compute extremely large spectral ranges. It’s better to cut your spectrum in slots and combine then afterwards. Some people are working on it (@CorentinGrimaldi , also some Heat Transfer researchers at my Lab) and it may be fully automatized in the future. Or may not even be needed with the update of the algorithm we’re implementing ( @dcmvdbekerom @anandxkumar : allowing very-large-truncations and FFT-by-part )

If computing from the HITEMP database, CO2 and H2O are not downloading automatically at the moment. I expect they are gases you will be interested in ! They can be downloaded manually, of course, but #210 will help

If computing from the HITRAN database, lines are downloaded on-the-fly, and re-downloaded if you change the spectral range. This is not very efficient, downloads a lot of data, and not very environmentally-friendly 🌳. We’ll have to download HITRAN (and probably build something with the HAPI team, which already handles the database-download efficiently).

Finally, one interesting point :

If you look at this Zhang and Modest 2001 paper, you’ll find out that with a minor approximation, the Planck-mean can be computed as :

在这里插入图片描述

from the linestrengths Si, without having to actually resolve the lineshapes for each line. This make the computation thousands of times faster ⚡ , as the lineshape calculation is the bottleneck in any line-by-line code like RADIS or HAPI. Basically, you’d only have to compute the scaled linestrengths at the right temperature. You could use RADIS’s already implemented methods to download/load the database for you, scale the linestrengths, and then you could compute the Planck-mean absorption directly. Have a look at how eq_spectrum() is built, it would be a good starting point to build a “planck_mean_absorption()” function based on it. The get_optically_thin_power() method was based on this approach too, but for emission !

It would be interesting to compare the approximation with the ‘perfect’ value !

I assume you’ll also want to compute Rosseland-mean absorption coefficients, for optically thick cases ? Again, that would be very easy to implement here !

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值