Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D Heat Conduction: Rumyantsev FEM vs Ansys APDL

Русская версия README.ru.md.

Command-line tool in Rust for computing the steady-state temperature field in a 2D domain using the finite element method (according to Rumyantsev) and comparing the result with an Ansys APDL solution.
The program assembles the global stiffness matrix, solves the linear system (dense or sparse) and visualizes:

  • temperature distribution from the FEM implementation;
  • temperature distribution from Ansys APDL;
  • the difference field between the two solutions;
  • temperature plots versus node number.

Example result


Features

  • Reading input from Ansys APDL: files NLIST.lis, ELIST.lis, DLIST.lis, PRNSOL.lis are parsed via apdl-parser.
  • Rumyantsev FEM implementation:
    • construction of local stiffness matrices for triangular elements;
    • assembly of the global stiffness matrix;
    • application of temperature boundary conditions.
  • Two modes for solving the linear system:
    • classical LU factorization of a dense matrix (nalgebra);
    • sparse solvers (russell_sparse: KLU, UMFPACK, MUMPS).
  • Flexible thermal conductivity settings: lambda_xx, lambda_yy.
  • Result visualization:
    • HTML plot in the browser (plotly);
    • saving images in svg, png, webp, jpeg formats (configurable).
  • Logging with configurable level (info, debug, warn) via tracing.

Requirements

  • Installed Rust (stable) with cargo.
  • Presence of files generated by Ansys APDL:
    • NLIST.lis — node list;
    • ELIST.lis — finite element list (triangles);
    • DLIST.lis — boundary conditions / prescribed temperatures;
    • PRNSOL.lis — nodal temperature results.

Installation

Clone the repository and build the project:

git clone https://github.com/indraine/warm
cd warm
cargo build --release

The executable will be located at:

target/release/warm

Quick start

Place NLIST.lis, ELIST.lis, DLIST.lis, PRNSOL.lis in the same directory where the binary is executed and run:

./target/release/warm

By default:

  • input files NLIST.lis, ELIST.lis, DLIST.lis, PRNSOL.lis are read from the current directory;
  • sparse solver KLU is used;
  • thermal conductivities: lambda_xx = 0.0001, lambda_yy = 0.0001;
  • log level is info;
  • the resulting plot is opened in the browser.

Command-line interface

For details on all parameters, see the built-in help:

warm --help

Below is an example of a typical run via cargo with key settings:

cargo run --release -- \
  --nlist ./files/NLIST.lis \
  --elist ./files/ELIST.lis \
  --dlist ./files/DLIST.lis \
  --prnsol ./files/PRNSOL.lis \
  --lambda-xx 0.15 \
  --lambda-yy 0.12 \
  --decomposition umfpack \
  --image png \
  --log-lvl debug

Theoretical background

The implementation follows the classical steady-state heat conduction formulation and uses the finite element method according to Rumyantsev (triangular elements, linear approximation).


License

Dual-licensed under MIT OR Apache-2.0. See LICENSE-MIT and LICENSE-APACHE.

About

CLI tool for comparing the Rumyantsev FEM solution with results from Ansys APDL

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages