相变传热与流体流动数值分析作业1_第1页
相变传热与流体流动数值分析作业1_第2页
相变传热与流体流动数值分析作业1_第3页
相变传热与流体流动数值分析作业1_第4页
相变传热与流体流动数值分析作业1_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、.相变传热与流体流动数值分析作业1学 院(系): 能源与动力学院 专 业: 能源与环境工程 学 生 姓 名: 学 号: 指 导 教 师: 完 成 日 期: 大连理工大学Dalian University of TechnologyThe Finite Volume Method for Diffusion ProblemsSubjects:I.Consider the problem of source-free heat conduction in an insulated rod.The equation governing one-dimensional steady state con

2、ductive heat transfer is ddxkdTdx=0, where k equals 1000W/m/K. The ends are maintained at constant temperatures of 100 and 500,the cross-section area A is 0.01.II.A large plate of thickness L=2cm,the thermal conductivity k=0.5 W/m/K, uniform heat generation q=1000kW/m3.The face A and B are at temper

3、atures of 100and200 respectively. The governing equation is ddxkdTdx+q=0.III.There is a cylindrical fin with uniform cross-section area A.The base is at a temperature of 100 and the end is insulated. The fin is exposed to an ambient temperature of 20. The governing equation is ddxkAdTdx-hp(T-T)=0.An

4、d m=hp/(kA)=25m-2,L=1m.Solution:/ 王佳琪-作业1.cpp : 定义控制台应用程序的入口点。/#include <stdafx.h>#include <iostream>#include<math.h>#include<stdlib.h>using namespace std;#define N 5 void main()double aN-1,bN,cN-1,SpN,lN-1,uN,fN,yN,TN; /追赶法使用的数组int i,j; /j 题号double k,L,A,TA,TB,q,m,x; /边界变量co

5、ut<<"j= "cin>>j;if(j=1|j=2) cout<<"k= ,L= ,A= ,TA= ,TB= ,q= "<<endl; /边界初始化 cin>>k>>L>>A>>TA>>TB>>q; x=L/N; for(i=0;i<N-1;i+) /定义数a=aw,c=ae ai=-k*A/x, ci=-k*A/x; for(i=0;i<N;i+) /定义数组Sp if(i=0|i=N-1) Spi=-2*k*A/x;

6、else Spi=0; for(i=0;i<N;i+) /定义数组b=ap if(i=0) bi=-Spi-ci; else if(i=N-1) bi=-Spi-ai-1; else bi=-Spi-ci-ai-1; for(i=0;i<N;i+) /定义数组f=Su if(i=0) fi=2*k*A*TA/x+q*A*x; else if(i=N-1) fi=2*k*A*TB/x+q*A*x; else fi=q*A*x; else cout<<"m= ,L= ,TA=,TB= "<<endl; /边界初始化cin>>m&g

7、t;>L>>TA>>TB;x=L/N; for(i=0;i<N-1;i+) /定义数组a=aw, c=ae ai=-1/x, ci=-1/x; for(i=0;i<N;i+) /定义数组Sp if(i=0) Spi=-2/x-m*x; else Spi=-m*x; for(i=0;i<N;i+) /定义数组b=ap if(i=0) bi=-Spi-ci; else if(i=N-1) bi=-Spi-ai-1; else bi=-Spi-ci-ai-1; for(i=0;i<N;i+) /定义数组f=Su if(i=0) fi=2*TB/x

8、+m*x*TA; else fi=m*x*TA; u0=b0;for(i=1;i<N;i+) /追赶法求解三对角矩阵 li-1=ai-1/ui-1; ui=bi-li-1*ci-1; y0=f0;for(i=1;i<N;i+) /求解数组y,T yi=fi-li-1*yi-1; TN-1=yN-1/uN-1; for(i=N-2;i>=0;i-) Ti=(yi-ci*Ti+1)/ui;cout<<"计算结果x="for(i=0;i<N;i+) /输出数组T cout<<Ti<<" "The result: Subject I.Subject II.Subject III.Discussion:The subjects 1 2 and 3 all can be dealing with 1D problem. But the subject 1 does not have a source term, subject 2 have a real source term and subject 3 have an equivalent source term. The subjects 1and 2 are coincided with the analytical solutio

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论