含湿量\[d = 621 .945 ∗ p_{v}/ ( p− p_{v})\],其中p 为湿空气压力,pv 为水蒸气分压;
相对湿度\[\phi = p_{v}/p_{s}\],其中ps 为饱和水蒸气压力,有很多种估算模型,本例采用的公式为\[log p_{s} = 7 .07406 − 1657 .46/ ( T+ 227 .02) \];比焓\[h = 1 .006T+ 0 .001 d( 2501 + 1 .86T) \],
其中T 为温度。
结果比较粗糙,见笑啊。
- #自定义温度和比焓的含湿量函数
- dhtc <- function(tc, h) {
- 1000 * (h - 1.006 * tc) / (2501 + 1.86 * tc)#比焓公式的变形
- }
- #自定义温度和相对湿度的含湿量函数
- dphitc <- function(tc, phi) {
- P<-101.325#标准大气压
- Ps <- 10 ^ (7.07406 - 1657.46 / (tc + 227.02))#饱和水蒸气压力公式变形
- 621.945 * (phi / 100) * Ps / (P - (phi / 100) * Ps)#代入相对湿度的含湿量公式变形
- }
- tc <- seq(-10, 45, length.out = 56) #温度序列
- plot(NULL, xlim = c(0, 20), ylim = c(-10, 45),
- xlab = "", ylab = "温度", xaxt = "n",frame.plot = F)#空图
- axis(side = 3)#上边坐标
- mtext("含湿量g/kg",side=3,adj=0,line = 2)#横坐标名称
- abline(v = seq(0, 20, length.out = 21),
- h = seq(-10, 45, length.out = 12),
- col = "grey")#温度和含湿量线
- for (h in seq(0, 90, length.out = 10)) {
- lines(dhtc(tc, h), tc, col = "blue", lwd = 1.7)}#比焓线
- text(dphitc(c(-6, 1, 5, 10, 14, 18, 21, 24, 29, 36), c(rep(100, 8), 80, 55)),
- c(-6, 1, 5, 10, 14, 18, 21, 24, 29, 36),
- labels = as.character(seq(0, 90, length.out = 10)),
- col = "blue")#比焓梯度
- for (phi in seq(10, 100, length.out = 10)) {
- lines(dphitc(tc, phi), tc, col = "red", lwd = 1.7)}#相对湿度线
- text(c(dphitc(rep(45, 3), seq(10, 30, length.out = 3)), rep(20, 7)),
- c(rep(45, 3), 41, 37, 34, 31, 29, 27, 25),
- labels = as.character(seq(10, 100, length.out = 10)),
- col = "red")#相对湿度梯度
- polygon(c(dphitc(c(-10, 26), rep(100, 2)), 21),
- c(-10, 25, -10),
- border = "white",
- col = "white")
- mtext("相对湿度",side = 4, adj = 1,col = "red")
- text(12, 9, labels = "比焓", col = "blue")



雷达卡




京公网安备 11010802022788号







