2D Structural Analysis

open-source CLI software

InkFEM (an application part of the InkStructure project) is an open source command line interface (CLI) application for 2D structural analysis written in the Go programming language. It's especially interesting for those students looking to learn how to program the Finite Element Method applied to linear two-dimensional structures and who need a working command line tool to solve structural analysis problems. InkFEM is available for MacOS, Windows and Linux users.

The documentation in this website —along with the source code— are a great way of learning about the Finite Element Method applied to two-dimensional structures.

Install

To install InkFEM, download the binary for your operating system from the downloads page. There are binaries compiled for MacOS (AMD64 and ARM64), Linux (AMD64 and ARM64) and Windows (x64) operating systems. You can alternatively build the binary from the source code. For this last option, refer to the README.md file in the code's repository.

Once you have the inkfem executable binary in your machine, you can run it from the command line (see usage below). It's recommended to move the binary to a directory in your executable path. For example, if you're running Linux or MacOS, /usr/local/bin would be a good choice:

$ mv inkfem /usr/local/bin

If you're under a Windows machine, you'll want to move it to C:\Program Files:

$ move inkfem "C:\Program Files"

You can check the binary is correctly located opening your terminal and entering:

$ inkfem -h

If you moved it correctly, you should see inkfem's help in the terminal.

Usage

Inkfem comes with several commands; to list them enter in you terminal:

$ inkfem -h

To see a command's help documentation, enter:

$ inkfem [command] -h

Lets take a look at the available commands and how to use them.

Solve command

Solves the structure given in an .inkfem or preprocessed .inkfempre file and saves the result in an .inkfemsol file.

$ inkfem solve [file_path] [flags]

Available flags:

  • -v, --verbose: use verbose output; logs the progress of the resolution (default false)
  • -p, --preprocess: dump the preprocessed structure to an .inkfempre file (default false)
  • -e, --error: maximum allowed displacement error (default 1e-5)
  • -w, --weight: include the weight of each bar as a distributed load (default false)

You can read more about the .inkfem file format here.

Example

Using a cantilever beam structure defined in a file named axial_beam.inkfem:

inkfem v1.1 |nodes|1 -> 0 0 {dx dy rz}2 -> 100 0 {} |materials|'steel' -> 1 20000000 1 1 25000 40000 |sections|'ipe_120' -> 14 318 28 53 9 |loads|fx ld 1 0 400 1 0 |bars|1 -> 1{dx dy rz} 2{dx dy rz} 'steel' 'ipe_120'

You can solve the structure like so:

$ inkfem solve axial_beam.inkfem

When the process is done (it'll take just a few milliseconds), you'll find a file named axial_beam.inkfemsol in the same directory where the .inkfem file is.