三层蒸发模型编程示例

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

#include<>

#include<>

void main()

{

float P[18] = { 0,0,,0,0,,0,0,0,0,0,,0,0,0,,,0 };

float Ep[18] = { ,,,,,,,,,,,,,,,,, };

float Eu[18] = { 0 }, El[18] = { 0 }, Ed[18] = { 0 }, E[18], WU[18] = { 0 }, WL[18] = { }, WD[18] = { }, C = / 6;

int WUM = 20, WLM = 60, WDM = 40;

for (int i = 0;i <= 17;i++)

{

if (WU[i] + P[i] >= Ep[i])

{

Eu[i] = Ep[i];

El[i] = 0;

Ed[i] = 0;

}

else Eu[i] = WU[i] + P[i];

if (WU[i] + P[i] < Ep[i] && WL[i] >= C*WLM)

{

El[i] = (Ep[i] - Eu[i])*WL[i] / WLM;

Ed[i] = 0;

}

if (WU[i] + P[i] < Ep[i] && WL[i] < C*WLM&& WL[i] >= C*(Ep[i] - Eu[i]))

{

El[i] = C*(Ep[i] - Eu[i]);

Ed[i] = 0;

}

if (WU[i] + P[i] < Ep[i] && WL[i] < C*(Ep[i] - Eu[i])) {

El[i] = WL[i];

Ed[i] = C*(Ep[i] - Eu[i]) - El[i];

}

if ((P[i] + WU[i] - Eu[i]) >= 0)

WU[i + 1] = P[i] + WU[i] - Eu[i];

else WU[i + 1] = 0;

if ((WL[i] - El[i]) >= 0)

WL[i + 1] = WL[i] - El[i];

else WL[i + 1] = 0;

if ((WD[i] - Ed[i]) >= 0)

WD[i + 1] = WD[i] - Ed[i];

else WD[i + 1] = 0;

E[i] = Eu[i] + El[i] + Ed[i];

if ((WL[i] - El[i]) >= 0)

WL[i + 1] = WL[i] - El[i];

else WL[i + 1] = 0;

if ((WD[i] - Ed[i]) >= 0)

WD[i + 1] = WD[i] - Ed[i];

else WD[i + 1] = 0;

E[i] = Eu[i] + El[i] + Ed[i];

printf(".%d:Eu=%.3f,El=%.3f,Ed=%.3f,E=%.3f,WU=%.3f,WL=%.3f,WD=%.3f\n",8+i,Eu[i], El[i], Ed[i], E[i], WU[i], WL[i], WD[i]);

}

system("pause");

}

相关文档
最新文档