fix(gas.py): 修复理想气体定律温度项重复相加错误
gas_density() 函数第 36 行: - 原代码: (local_temperature_kelvin + standard_temperature) / standard_temperature 物理错误:T_K 已在第32行完成 °C→K 转换(+273.15),这里又加了一次 273.15, 导致体积修正因子偏大约 2 倍(对 7.4°C 数据:553.7/273.15≈2.03 而非正确的 280.55/273.15≈1.03) - 修复: local_temperature_kelvin / standard_temperature 符合理想气体定律 V₂ = V₁ × (P₁/P₂) × (T₂/T₁) 影响范围:所有通过 gas_flux_column() 计算的通量值,修复后通量约为原值的 2 倍
This commit is contained in:
17
.idea/dataSources.xml
generated
Normal file
17
.idea/dataSources.xml
generated
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="gasflux" uuid="bc1d152a-2bb7-4a37-b6db-376527f2decb">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:D:\111\office\ZHLduijie\6\UAV-CO2\web_api_data\outputs\gasflux.db</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
<libraries>
|
||||
<library>
|
||||
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.51.1/org/xerial/sqlite-jdbc/3.51.1.0/sqlite-jdbc-3.51.1.0.jar</url>
|
||||
</library>
|
||||
</libraries>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
||||
@ -33,7 +33,7 @@ def gas_density(local_pressure: float, local_temperature_celsius: float, gas: st
|
||||
local_volume = (
|
||||
gas_variables["standard_molar_volume"]
|
||||
* (gas_variables["standard_pressure"] / local_pressure)
|
||||
* ((local_temperature_kelvin + gas_variables["standard_temperature"]) / gas_variables["standard_temperature"])
|
||||
* (local_temperature_kelvin / gas_variables["standard_temperature"])
|
||||
) # m3⋅mol-1
|
||||
return mass(gas) / 1000 / local_volume
|
||||
|
||||
|
||||
Reference in New Issue
Block a user