科技报告详细信息
Ellipt2d: a flexible finite element code written python.
Pletzer, A. ; Mollis, J. C.
Technical Information Center Oak Ridge Tennessee
关键词: Fortran;    Programming languages;    E codes;    Finite element method;    Boundary conditions;   
RP-ID  :  DE2001781479
学科分类:工程和技术(综合)
美国|英语
来源: National Technical Reports Library
PDF
【 摘 要 】

The use of the Python scripting language for scientific applications and in particular to solve partial differential equations is explored. It is shown that Python's rich data structure and object-oriented features can be exploited to write programs that are not only significantly more concise than their counter parts written in Fortran, C or C++, but are also numerically efficient. To illustrate this, a two-dimensional finite element code (ELLIPT2D) has been written. ELLIPT2D provides a flexible and easy-to-use framework for solving a large class of second-order elliptic problems. The program allows for structured or unstructured meshes. All functions defining the elliptic operator are user supplied and so are the boundary conditions, which can be of Dirichlet, Neumann or Robbins type. ELLIPT2D makes extensive use of dictionaries (hash tables) as a way to represent sparse matrices.Other key features of the Python language that have been widely used include: operator over loading, error handling, array slicing, and the Tkinter module for building graphical use interfaces. As an example of the utility of ELLIPT2D, a nonlinear solution of the Grad-Shafranov equation is computed using a Newton iterative scheme. A second application focuses on a solution of the toroidal Laplace equation coupled to a magnetohydrodynamic stability code, a problem arising in the context of magnetic fusion research.

【 预 览 】
附件列表
Files Size Format View
DE2001781479.pdf 205KB PDF download
  文献评价指标  
  下载次数:10次 浏览次数:13次