工程人员常通过对比设计软件与有限元软件的分析结果,以验算和校核结构设计的合理性。然而,由于软件分析内核的差异,设计软件与有限元软件之间的模型信息往往难以直接传递并转化。针对SAP2000结构设计分析软件向ANSYS有限元分析软件的...工程人员常通过对比设计软件与有限元软件的分析结果,以验算和校核结构设计的合理性。然而,由于软件分析内核的差异,设计软件与有限元软件之间的模型信息往往难以直接传递并转化。针对SAP2000结构设计分析软件向ANSYS有限元分析软件的模型转化问题,基于Python语言和APDL参数化设计语言,编译并开发了STAMT V1.0(SAP2000 To ANSYS Model Transformation V1.0)模型转化程序。相比已有转化程序,STAMT程序实现了更多单元类型、材料属性、截面类型、荷载形式的转化,提高了模型转化的通用性。其次,其涵盖了节点坐标系变换、梁单元坐标系变换、梁端自由度释放、创建刚性域等必备功能,进一步满足了模型转化过程中的功能性需求。然后,采用先建立几何模型后生成有限元模型的转化思路,实现了梁单元网格数量的自定义以及板壳荷载向梁的传递,软件操作界面简洁,便于工程人员的使用。最后,通过单层工业厂房和多层框架结构的两个算例分析,得到转化后模型的质量与原模型一致,前5阶周期的平均误差不超过3%,满足精度要求。研究分析验证了STAMT程序可实现SAP2000模型向ANSYS模型的准确、快速转化。展开更多
This paper presents the modeling and simulation of a suspension polymerization for methyl methacrylate in an isothermal reactor to produce poly methyl methacrylate using Python 3.5. The numeral solution to the stiff o...This paper presents the modeling and simulation of a suspension polymerization for methyl methacrylate in an isothermal reactor to produce poly methyl methacrylate using Python 3.5. The numeral solution to the stiff ordinary differential equations was performed by building a custom module which was used with the inbuilt NumPy and matplotlib modules that come with the Anaconda python distro. Python was used in order to obtain a realistic solution that considers the gel, glass and cage effects that affect the non-linear polymerization kinetics established in literature. The results showed that a maximum monomer conversion of about 92.8% at a minimum batch time of about 2.2 hours could be achieved at the specified conditions to obtain a polydisperse polymer with an index of 27. It is further concluded that Python can be employed to perform similar studies with equal success as any other programming language.展开更多
目的探索广义线性模型(generalized linear model,GLM)在Python软件中的实现方法,并比较其与其他常用统计软件在算法过程和结果方面的异同。方法分别利用Python软件statsmodles库中的GLM函数、Logit和Poisson函数,R软件GLM函数,SAS的PRO...目的探索广义线性模型(generalized linear model,GLM)在Python软件中的实现方法,并比较其与其他常用统计软件在算法过程和结果方面的异同。方法分别利用Python软件statsmodles库中的GLM函数、Logit和Poisson函数,R软件GLM函数,SAS的PROC GENMOD过程步,对二项分布和泊松分布的数据集进行分析,比较三种软件的算法过程和分析结果。结果三种软件构建GLM的逻辑相似,但在代码实现和模型拟合方法等方面稍有区别,各软件的结果基本相同。结论Python软件可采用不同的算法构建广义线性模型,并且能提供与其他主流统计软件相同的统计分析结论。展开更多
The purpose of this investigation was to use Python to model global city temperatures for 400+ cities for many decades. The process used a compilation of secondary data to find my renowned sources and use different re...The purpose of this investigation was to use Python to model global city temperatures for 400+ cities for many decades. The process used a compilation of secondary data to find my renowned sources and use different regression models to plot temperatures. Climate change is an impending crisis for our Earth, and modeling its changes using Machine Learning will be crucial to understanding the next steps to combat it. With this model, researchers can understand which area is most harshly affected by climate change leading to prioritization and solutions. They can also figure out the next sustainable solutions based on climate needs. By using KNeighbors and other regressors, we can see an increase in temperature worldwide. Although there is some error, which is inevitable, this is mitigated through several measures. This paper provides a simple yet critical understanding of how our global temperatures will increase, based on the last 200+ years.展开更多
文摘工程人员常通过对比设计软件与有限元软件的分析结果,以验算和校核结构设计的合理性。然而,由于软件分析内核的差异,设计软件与有限元软件之间的模型信息往往难以直接传递并转化。针对SAP2000结构设计分析软件向ANSYS有限元分析软件的模型转化问题,基于Python语言和APDL参数化设计语言,编译并开发了STAMT V1.0(SAP2000 To ANSYS Model Transformation V1.0)模型转化程序。相比已有转化程序,STAMT程序实现了更多单元类型、材料属性、截面类型、荷载形式的转化,提高了模型转化的通用性。其次,其涵盖了节点坐标系变换、梁单元坐标系变换、梁端自由度释放、创建刚性域等必备功能,进一步满足了模型转化过程中的功能性需求。然后,采用先建立几何模型后生成有限元模型的转化思路,实现了梁单元网格数量的自定义以及板壳荷载向梁的传递,软件操作界面简洁,便于工程人员的使用。最后,通过单层工业厂房和多层框架结构的两个算例分析,得到转化后模型的质量与原模型一致,前5阶周期的平均误差不超过3%,满足精度要求。研究分析验证了STAMT程序可实现SAP2000模型向ANSYS模型的准确、快速转化。
文摘This paper presents the modeling and simulation of a suspension polymerization for methyl methacrylate in an isothermal reactor to produce poly methyl methacrylate using Python 3.5. The numeral solution to the stiff ordinary differential equations was performed by building a custom module which was used with the inbuilt NumPy and matplotlib modules that come with the Anaconda python distro. Python was used in order to obtain a realistic solution that considers the gel, glass and cage effects that affect the non-linear polymerization kinetics established in literature. The results showed that a maximum monomer conversion of about 92.8% at a minimum batch time of about 2.2 hours could be achieved at the specified conditions to obtain a polydisperse polymer with an index of 27. It is further concluded that Python can be employed to perform similar studies with equal success as any other programming language.
文摘目的探索广义线性模型(generalized linear model,GLM)在Python软件中的实现方法,并比较其与其他常用统计软件在算法过程和结果方面的异同。方法分别利用Python软件statsmodles库中的GLM函数、Logit和Poisson函数,R软件GLM函数,SAS的PROC GENMOD过程步,对二项分布和泊松分布的数据集进行分析,比较三种软件的算法过程和分析结果。结果三种软件构建GLM的逻辑相似,但在代码实现和模型拟合方法等方面稍有区别,各软件的结果基本相同。结论Python软件可采用不同的算法构建广义线性模型,并且能提供与其他主流统计软件相同的统计分析结论。
文摘The purpose of this investigation was to use Python to model global city temperatures for 400+ cities for many decades. The process used a compilation of secondary data to find my renowned sources and use different regression models to plot temperatures. Climate change is an impending crisis for our Earth, and modeling its changes using Machine Learning will be crucial to understanding the next steps to combat it. With this model, researchers can understand which area is most harshly affected by climate change leading to prioritization and solutions. They can also figure out the next sustainable solutions based on climate needs. By using KNeighbors and other regressors, we can see an increase in temperature worldwide. Although there is some error, which is inevitable, this is mitigated through several measures. This paper provides a simple yet critical understanding of how our global temperatures will increase, based on the last 200+ years.
文摘源代码漏洞检测常使用代码指标、机器学习和深度学习等技术.但是这些技术存在无法保留源代码中的句法和语义信息、需要大量专家知识对漏洞特征进行定义等问题.为应对现有技术存在的问题,提出基于BERT(bidirectional encoder representations from transformers)模型的源代码漏洞检测模型.该模型将需要检测的源代码分割为多个小样本,将每个小样本转换成近似自然语言的形式,通过BERT模型实现源代码中漏洞特征的自动提取,然后训练具有良好性能的漏洞分类器,实现Python语言多种类型漏洞的检测.该模型在不同类型的漏洞中实现了平均99.2%的准确率、97.2%的精确率、96.2%的召回率和96.7%的F1分数的检测水平,对比现有的漏洞检测方法有2%~14%的性能提升.实验结果表明,该模型是一种通用的、轻量级的、可扩展的漏洞检测方法.