用于计算空气中氧气摩尔数的 R 包
R package for calculating the moles of a oxygen in air
是否有包含计算空气中氧气摩尔数、给定温度、压力等的函数的 r 包
我正在寻找类似 marelac 的东西,但要寻找空气,而不是水
求解 n
:
的 PV = nRT
n = PV/RT
创建函数:
moles_n <- function( press, # in SI unit pascals
volume, # in SI unit cubic metres
R_const,
temp # degrees Kelvin
){
R_const = 8.3144598(48) # J⋅mol−1⋅K−1
press*vol/(R_const*temp) }
查看的单位和常量:https://en.wikipedia.org/wiki/Gas_constant. (I can remember some physical constants but this one went back to high-school chemistry class, more than half a century ago in my case.) I suppose if one were entirely scrupulous, one would put in the correction factors for different gases. See: https://en.wikipedia.org/wiki/Van_der_Waals_equation and http://chemed.chem.purdue.edu/genchem/topicreview/bp/ch4/deviation5.html
我想也许会有一个你要求的包(虽然你应该意识到 package-request 问题通常会被关闭。)我找到了两个,CHNOSZ
-包和 seacarb
-package,这确实表明了实例化“热力学”函数的努力”,但我对函数摘要的细读让我认为这些也主要用于水溶液:
http://finzi.psych.upenn.edu/R/library/CHNOSZ/html/00Index.html
最终我找到了包- IAPWS95
,你应该仔细检查:
http://finzi.psych.upenn.edu/R/library/IAPWS95/html/00Index.html
我发现最有效的搜索 R-way 是使用 sos::findFn:
findFn("pressure temperature gas")
found 89 matches; retrieving 5 pages
2 3 4 5
Downloaded 87 links in 21 packages.
是否有包含计算空气中氧气摩尔数、给定温度、压力等的函数的 r 包
我正在寻找类似 marelac 的东西,但要寻找空气,而不是水
求解 n
:
n = PV/RT
创建函数:
moles_n <- function( press, # in SI unit pascals
volume, # in SI unit cubic metres
R_const,
temp # degrees Kelvin
){
R_const = 8.3144598(48) # J⋅mol−1⋅K−1
press*vol/(R_const*temp) }
查看的单位和常量:https://en.wikipedia.org/wiki/Gas_constant. (I can remember some physical constants but this one went back to high-school chemistry class, more than half a century ago in my case.) I suppose if one were entirely scrupulous, one would put in the correction factors for different gases. See: https://en.wikipedia.org/wiki/Van_der_Waals_equation and http://chemed.chem.purdue.edu/genchem/topicreview/bp/ch4/deviation5.html
我想也许会有一个你要求的包(虽然你应该意识到 package-request 问题通常会被关闭。)我找到了两个,CHNOSZ
-包和 seacarb
-package,这确实表明了实例化“热力学”函数的努力”,但我对函数摘要的细读让我认为这些也主要用于水溶液:
http://finzi.psych.upenn.edu/R/library/CHNOSZ/html/00Index.html
最终我找到了包- IAPWS95
,你应该仔细检查:
http://finzi.psych.upenn.edu/R/library/IAPWS95/html/00Index.html
我发现最有效的搜索 R-way 是使用 sos::findFn:
findFn("pressure temperature gas")
found 89 matches; retrieving 5 pages
2 3 4 5
Downloaded 87 links in 21 packages.