学生联盟网为您提供优质参考范文! 体会工作报告法律咨询精彩演讲各类材料
当前位置: 学生联盟网 > 试题综合 > 小学数学 > 相变传热与流体流动数值分析作业1

相变传热与流体流动数值分析作业1

时间:2021-10-11 14:01:05 来源:学生联盟网

相变传热与流体流动数值分析作业1学 院(系)能源与动力学院 专 业 能源与环境工程 学 生 姓 名 学 号 指 导 教 师 完 成 日 期 大连理工大学Dalian University of TechnologyThe Finite Volume for Diffusion ProblemsSubjectsI.Consider the problem of source-free heat conduction in an insulated rod.The equation governing one-dimensional steady state conductive heat transfer is ddxkdTdx0,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 L2cm,the thermal conductivity k0.5 W/m/K,uni heat generation q1000kW/m3.The face A and B are at temperatures of 100and200 respectively.The governing equation is ddxkdTdxq0.III.There is a cylindrical fin with uni 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-hpT-T0.And mhp/kA25m-2,L1m.Solution// 王佳琪-作业1.cpp 定义控制台应用程序的入口点。//include stdafx.hinclude iostreamincludemath.hincludestdlib.husing namespace std;define N 5 void maindouble 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; //边界变量coutj ;cinj;ifj1||j2 coutk ,L ,A ,TA ,TB ,q endl; //边界初始化 cinkLATATBq; xL/N; fori0;iN-1;i //定义数aaw,cae ai-k*A/x,ci-k*A/x; fori0;iN;i //定义数组Sp ifi0||iN-1 Spi-2*k*A/x; else Spi0; fori0;iN;i //定义数组bap ifi0 bi-Spi-ci; else ifiN-1 bi-Spi-ai-1; else bi-Spi-ci-ai-1; fori0;iN;i //定义数组fSu ifi0 fi2*k*A*TA/xq*A*x; else ifiN-1 fi2*k*A*TB/xq*A*x; else fiq*A*x; else coutm ,L ,TA,TB endl; //边界初始化cinmLTATB;xL/N; fori0;iN-1;i //定义数组aaw,cae ai-1/x,ci-1/x; fori0;iN;i //定义数组Sp ifi0 Spi-2/x-m*x; else Spi-m*x; fori0;iN;i //定义数组bap ifi0 bi-Spi-ci; else ifiN-1 bi-Spi-ai-1; else bi-Spi-ci-ai-1; fori0;iN;i //定义数组fSu ifi0 fi2*TB/xm*x*TA; else fim*x*TA; u0b0;fori1;iN;i //追赶法求解三对角矩阵 li-1ai-1/ui-1; uibi-li-1*ci-1; y0f0;fori1;iN;i //求解数组y,T yifi-li-1*yi-1; TN-1yN-1/uN-1; foriN-2;i0;i-- Tiyi-ci*Ti1/ui;cout计算结果x;fori0;iN;i //输出数组T coutTi ;The result Subject I.Subject II.Subject III.DiscussionThe 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 solution.But the subject 3 is a little diverged from the ideal solution.This may be caused by the grid number and the central diffusion scheme.7做事做实