哈工大-传热学虚拟仿真实验报告_第1页
哈工大-传热学虚拟仿真实验报告_第2页
哈工大-传热学虚拟仿真实验报告_第3页
哈工大-传热学虚拟仿真实验报告_第4页
哈工大-传热学虚拟仿真实验报告_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

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

文档简介

Harbin Institute of Technology 传热学虚拟仿真实验报告 院 系 能源科学与工程学院 班 级 设 计 者 学 号 指导教师 董士奎 设计时间 2016 11 7 传热学虚拟仿真实验报告 1 应用背景 数值热分析在核工业 铁道 石油化工 航空航天 机械制造 能源 汽车交通 国防军工 电 子 土木工程 造船 生物医学 轻工 地矿 水利 以及日用家电等各个领域都有广泛的应用 2 二维导热温度场的数值模拟 2 1 二维稳态导热实例 假设一用砖砌成的长方形截面的冷空气通道 其截面如图 2 1 所示 假设在垂直于纸面方向上冷空 气及砖墙的温度变化很小 可以近似地予以忽略 图 2 1 一用砖砌成的长方形截面的冷空气通道截面 2 2 二维数值模拟 基于模型的对称性 简化为如图所示的四分之一模型 图 2 2 二维数值模拟 2 3 建立离散方程 此时对于内部节点 如图 2 3 0 1 1 1 1 x y tt x y tt y x tt y x tt jtjijtjijtjijtji 对于平直边界上的节点 如图 2 4 0 222 1 1 1 wji jtjijtjijtji yq yxx y tt x y tt y x tt 对于外部和内部角点 如图 2 5 0 24 3 22 0 2422 1 1 1 1 1 1 wnm nmnmnmnmnmnmnmnm wnm nmnmnmnm q yxyxy x ttx y tt x y tt y x tt q yxyxx y tty x tt 图 2 3 内部节点 图 2 4 平直边界上的节点 图 2 5 内部角点和外部角点 对于对称边界 绝热边界 如图 2 6 0 1 1 1 1 x y tt x y tt y x tt y x tt jtjijtjijtjijtji 图 2 6 对称边界 绝热边界 图 2 7 建立离散方程 此时显示格式 隐式格式依次为 如图 2 7 2 4 C 程序 2 4 1 程序流程图如下图 2 8 所示 图 2 8 程序流程图 2 4 2 程序各变量含义如下图 2 9 所示 n L1 n L2 n L3 n L4 n thick1 n thick2 分别为对应边的网格数 2 1 1 11 1 1 2 11 1 2 2 x ttt a tt x ttt a tt i n i n i n i n i n i n i n i n i n i n 2 4 3 程序 include include int main float L1 L2 L3 L4 thick1 thick2 L1 外矩形宽 L2 外矩形长 L3 内矩形宽 L4 内矩形长 thick1 宽度方向厚度 thick1 长度方向厚度 int n L1 n L2 n L3 n L4 n thick1 n thick2 各边网格数 int i j n number n 迭代次数 double eps 5 0e 6 float delt y1 delt y2 delt x1 delt x2 float cond conv out conv in tout tin cond 导热系数 conv out 外部对流换热系数 conv in 内部对流换热系数 tout 外部环境温度 tin 内部环境温度 输入几何信息 printf 请输入 L1 scanf f printf 请输入 L2 scanf f printf 请输入 L3 scanf f printf 请输入 L4 scanf f 输入网格信息 printf 请输入边 L1 网格数 100 scanf d printf 请输入边 L2 网格数 100 scanf d printf 请输入边 L3 网格数 100 scanf d printf 请输入边 L4 网格数 100 scanf d 输入边界条件 printf 请输入材料导热系数 W m K scanf f printf 请输入外部环境温度 K scanf f printf 请输入内部环境温度 K scanf f printf 请输入外部对流换热系数 W m2 K scanf f printf 请输入内部对流换热系数 W m2 K scanf f thick1 L2 L4 thick2 L1 L3 n thick1 n L2 n L4 n thick2 n L1 n L3 网格大小 delt x1 thick1 n thick1 delt x2 L4 n L4 delt y1 thick2 n thick2 delt y2 L3 n L3 节点赋初值 double tem0 100 100 节点温度 tem0 上次迭代结果 tem 本次迭代结果 double tem 100 100 double x 100 100 double y 100 100 n 0 do 区域 1 内部节点温度 for i 1 i n thick1 i for j n L3 1 j n L1 j tem0 i j tem i 1 j tem i 1 j delt y1 delt y1 tem i j 1 tem i j 1 delt x1 delt x1 2 0 delt y1 delt y1 delt x1 delt x1 区域 2 内部节点温度 for i 1 i n thick1 i for j 1 j n L3 j tem0 i j tem i 1 j tem i 1 j delt y2 delt y2 tem i j 1 tem i j 1 delt x1 delt x1 2 0 delt x1 delt x1 delt y2 delt y2 区域 3 内部节点温度 for i n thick1 1 i n L2 i for j n L3 1 j n L1 j tem0 i j tem i 1 j tem i 1 j delt y1 delt y1 tem i j 1 tem i j 1 delt x2 delt x2 2 0 delt x2 delt x2 delt y1 delt y1 区域 1 与区域 2 边界线 for i 1 i n thick1 i j n L3 tem0 i j tem i 1 j tem i 1 j 2 0 delt y1 delt y2 delt y1 delt y2 tem i j 1 delt y2 delt x1 delt x1 tem i j 1 delt y1 delt x1 delt x1 delt y1 delt y2 delt y1 delt y2 delt y2 delt x1 delt x1 delt x1 delt x 1 delt y1 区域 1 与区域 3 边界线 for j n L3 1 j n L1 j i n thick1 tem0 i j tem i j 1 tem i j 1 2 0 delt x1 delt x2 delt x1 delt x2 tem i 1 j delt x2 delt y1 delt y1 tem i 1 j delt x1 delt y1 delt y1 delt x1 delt x2 delt x1 delt x2 delt x2 delt y1 delt y1 delt y1 delt y1 delt x1 边界条件 绝热边界条件 对称面 右边界 for j n L3 1 j n L1 j i n L2 tem0 i j 2 0 tem i 1 j delt y1 delt y1 tem i j 1 tem i j 1 delt x2 delt x2 2 0 delt x2 delt x2 delt y1 delt y1 下边界 for i 1 i n thick1 i j 0 tem0 i j delt y2 tem i 1 j 2 delt x1 delt x1 tem i j 1 delt y2 delt y2 tem i 1 j 2 delt x1 delt y2 2 delt x1 delt x1 delt y2 delt y2 2 delt x1 for i n thick1 1 i n L2 i j n L3 tem0 i j delt y1 tem i 1 j 2 delt x2 delt x2 tem i j 1 delt y2 delt y2 tem i 1 j 2 delt x2 delt x2 conv in tin del t y2 2 delt x2 delt x2 delt y2 delt y2 2 delt x2 delt x2 conv in 外部对流边界条件 上边界 for i 1 i n thick1 i j n L1 tem0 i j cond delt y1 delt y1 tem i 1 j tem i 1 j 2 0 cond delt x1 delt x1 tem i j 1 2 0 delt y1 delt x1 delt x1 conv out tout 2 0 cond delt y1 delt y1 2 0 cond delt x1 delt x1 2 0 delt y1 conv out delt x1 delt x1 for i n thick1 1 i n L2 i j n L1 tem0 i j cond delt y1 delt y1 tem i 1 j tem i 1 j 2 0 cond delt x2 delt x2 tem i j 1 2 0 delt y1 delt x2 delt x2 conv out tout 2 0 cond delt y1 delt y1 2 0 cond delt x2 delt x2 2 0 delt y1 conv out delt x2 delt x2 i n thick1 j n L1 tem0 i j cond delt y1 delt y1 delt x2 tem i 1 j cond delt y1 delt y1 delt x1 tem i 1 j cond delt x1 delt x2 delt x1 delt x2 tem i j 1 delt y1 delt x1 delt x2 delt x1 delt x2 conv out tout cond delt y1 delt y1 delt x2 cond delt y1 delt y1 delt x1 cond delt x1 delt x2 delt x1 delt x2 delt y1 conv out delt x1 delt x2 delt x1 delt x2 左边界 for j n L3 1 j n L1 j i 0 tem0 i j cond delt x1 tem i j 1 2 delt y1 cond delt y1 tem i 1 j delt x1 cond delt x1 tem i j 1 2 delt y1 delt y1 conv out tout cond delt x1 2 delt y1 cond delt y1 delt x1 cond delt x1 2 delt y1 delt y1 conv out for j 1 j n L3 j i 0 tem0 i j cond delt x1 tem i j 1 2 delt y2 cond delt y2 tem i 1 j delt x1 cond delt x1 tem i j 1 2 delt y2 delt y2 conv out tout cond delt x1 2 delt y2 cond delt y2 delt x1 cond delt x1 2 delt y2 delt y2 conv out i 0 j n L3 tem0 i j cond delt x1 tem i j 1 2 delt y1 cond delt y1 delt y2 2 tem i 1 j delt x1 cond delt x1 tem i j 1 2 delt y2 delt y1 delt y2 2 conv out tout cond delt x1 2 delt y1 cond delt y1 delt y2 2 delt x1 cond delt x1 2 delt y2 delt y1 delt y2 2 conv out 内部对流边界条件 上边界 for i n thick1 1 i n L2 i j n L3 tem0 i j cond delt y1 delt y1 tem i 1 j tem i 1 j 2 0 cond delt x2 delt x2 tem i j 1 2 0 delt y1 delt x2 delt x2 conv in tin 2 0 cond delt y1 delt y1 2 0 cond delt x2 delt x2 2 0 delt y1 conv in delt x2 delt x2 左边界 for j 1 j n L3 j i n thick1 tem0 i j cond delt x1 tem i j 1 2 delt y2 cond delt y2 tem i 1 j delt x1 cond delt x1 tem i j 1 2 delt y2 delt y2 conv in tin cond delt x1 2 delt y2 cond delt y2 delt x1 cond delt x1 2 d elt y2 delt y2 conv in 特殊点 左下角 tem0 0 0 cond delt x1 delt x1 tem 0 1 cond delt y2 delt y2 tem 1 0 delt y2 delt y2 delt x1 c onv out tout cond delt x1 delt x1 cond delt y2 delt y2 delt y2 delt y2 delt x1 conv out 右下角 tem0 n thick1 0 cond delt x1 delt x1 tem n thick1 1 cond delt y2 delt y2 tem n thick1 1 0 delt y2 delt y2 delt x1 conv in tin cond delt x1 delt x1 cond delt y2 delt y2 delt y2 delt y 2 delt x1 conv in 左上角 tem0 0 n L1 cond delt y1 delt y1 tem 1 n L1 cond delt x1 delt x1 tem 0 n L1 1 delt x1 delt y1 delt y1 delt x1 conv out tout cond delt y1 delt y1 cond delt x1 delt x1 delt x1 delt y1 delt y1 delt x1 conv out 右上角 1 tem0 n L2 n L1 cond delt y1 delt y1 tem n L2 1 n L1 cond delt x2 delt x2 tem n L2 n L1 1 delt x2 delt y1 delt x2 conv out tout cond delt y1 delt y1 cond delt x2 delt x2 delt y1 delt x 2 delt x2 conv out 右上角 2 tem0 n L2 n L3 cond delt y1 delt y1 tem n L2 1 n L3 cond delt x2 delt x2 tem n L2 n L3 1 delt x2 delt y1 delt x2 conv in tin cond delt y 1 delt y1 cond delt x2 delt x2 delt y1 delt x2 delt x2 conv in 内角点 tem0 n thick1 n L3 cond delt y1 delt y2 delt x1 tem n thick1 1 n L3 cond delt x1 delt x2 delt y1 tem n thick1 n L3 1 cond delt y1 delt x2 tem n thick1 1 n L3 cond delt x

温馨提示

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

评论

0/150

提交评论