Lua脚本在有限元分析中的应用
2020-01-11宋小鹏何秀锦古小敏吴国珊王斌武
宋小鹏 何秀锦 古小敏 吴国珊 王斌武



摘要:
针对复杂计算域有限元分析前处理过程中手动建模和边界条件设定烦琐和耗时的问题,以蓄热砖温度场分析为例,讨论Lua脚本在有限元前处理过程中的应用;开发温度场有限元分析程序,基于Lua/C API定义若干接口,使用特例的解析解验证温度场计算结果,基于Lua脚本对蓄热砖温度场进行计算。仿真结果表明,Lua脚本可简化有限元前处理过程,特别是几何建模过程,也便于对计算结果进行参数化分析。
关键词:
蓄热砖; 温度场; 前处理; 有限元
中图分类号: TU522.07; TB115.1
文献标志码: B
Application of Lua script in preprocessing
of finite element analysis
SONG Xiaopeng, HE Xiujin, GU Xiaoming, WU Guoshan, WANG Binwu
(
School of Energy and Building Environment, Guilin University of Aerospace Technology,
Guilin 541004, Guangxi, China)
Abstract:
As to the issue that the manual modeling and boundary condition setting are tedious and timeconsuming in the preprocessing of finite element analysis in complex computing domain, the application of Lua script in the preprocessing of finite element is studied
by taking temperature field analysis of thermal storage brick as an example. The finite element analysis program for temperature field of thermal storage brick is developed. The interfaces based on Lua/C API is defined, and the calculation results of temperature field are verified by the analytic solution of a special case. The temperature field of thermal storage brick is calculated based on Lua script. The simulation results show that the preprocessing of finite element, especially the geometric modeling process is simplified using the Lua script, and the parametric analysis on the computing results is easy to be completed.
Key words:
thermal storage brick; temperature field; preprocessing; finite element
0 引 言
Lua脚本程序具有跨平台性能好、执行速度快、支持热更新、可扩展性能好等优势,常用于程序配置。[12]陆乔[3]在不更新应用程序的前提下,基于Lua脚本实现动态增加程序功能的目标。程君[4]以Lua脚本作为移动互联网中间件,解决不同平台的编程接口差异导致信息传递不畅的问题。宋宏江等[5]基于Lua脚本编制验证程序,明显提升卫星综合测试过程中指令生成的效率。
大量科研工作者已对蓄热砖的蓄热特性进行分析,如:赵頔等[6]使用ANSYS软件分析蓄热砖蓄热特性,分析结果与实验研究结果较为一致;徐德玺等[7]基于有限元法计算蓄热砖孔道直径与其热效率之间的关系。蓄热砖的孔道形状和布置对其蓄热特性有显著影响:胡思科等[8]研究圆形与方形孔道固体蓄热砖的蓄热和放热特性;李晶晶等[9]研究固体蓄热装置的自然对流放热特性受圆形和椭圆形孔道布置的影响。……
