2D Structural Analysis

open-source CLI software

.inkfem File Format

The definition of a structure —for inkfem to solve— is stored in a plain-text file with the .inkfem extension. You can write these files by hand using any plain-text editor, but not from a rich text processor, such as Word or Google Docs. The calculation engine is unit-agnostic, so the units defined used as input are also the output units. Units need, nevertheless, to be congruent.

Inside the file, the first line should include the header:

inkfem vM.m

where M and m are the major and minor versions of the binary used to compute the structure. The current version is 1.0:

inkfem v1.1

You can find out what version of the application you're running with the following command:

$ inkfem -v

Then go the definition sections:

  • nodes: the structure nodes, referred by id
  • sections: the element's sections, referred by name
  • materials: the element's materials, referred by name
  • loads: the loads applied to the nodes and elements
  • bars: the structure bars (linear resistant elements), referred by id

The sections can appear in any order.

The Nodes

The nodes are defined under the header:

|nodes|

Each node is defined in its own line following the format:

<id> -> <xCoord> <yCoord> {[dx dy rz]}

where:

  • id: the node's unique id
  • xCoord: the node's position x-coordinate
  • yCoord: the node's position y-coordinate
  • dx, dy, rz: externally constrained degrees of freedom

Examples

Node with id 23, at position (120, 450) and no external constraints:

23 -> 120.0 450.0 { }

Node with id 48, at position (300, 50) and the displacement in the x and y directions externally constrained:

48 -> 300.0 50.0 { dx dy }

The Materials

The materials are defined under the header:

|materials|

Each material is defined in its own line following the format:

<name> -> <density> <young> <shear> <poisson> <yield> <ultimate>

where:

  • name: the material's unique name
  • density: the material's density
  • young: the material's Young or elasticity modulus
  • shear: the material's shear modulus posson: the material's poisson ratio
  • poisson: the material's poisson ratio
  • yield: the material's yield strength ultimate: the material's ultimate strength
  • ultimate: the material's ultimate strength

Examples

Standard steel 275:

'steel_275' -> 0.00000785 21000000 8100000 0.3 27500 43000

The Sections

The sections are defined under the header:

|sections|

Each section is defined in its own line following the format:

<name> -> <area> <iStrong> <iWeak> <sStrong> <sWeak>

where:

  • name: the section's unique name
  • area: the section's cross section area
  • iStrong: the strong axis' moment of inertia
  • iWeak: the weak axis' moment of inertia
  • sStrong: the strong axis' section modulus
  • sWeak: the weak axis' section modulus

Examples

Standard European IPE-100 section:

'ipe_100' -> 10.3 171.0 15.92 34.2 5.79

The Loads

The loads are defined under the header:

|loads|

Each load is defined in its own line.

There are two types of loads: distributed and concentrated. Both types are applied to bars (nodal loads are a feature that's not implemented yet, but will be at some point). To define a concentrated load on a node, choose a bar which contains the node, and add the concentrated load to that bar at position t = 0 (start node) or t = 1 (end node).

Distributed loads are defined following the format:

<term> <reference><type> <barId> <tStart> <valueStart> <tEnd> <valueEnd>

where:

  • term: is either:
    • fx: force in the x-axis direction
    • fy: force in the y-axis direction
    • mz: moment about the z-axis
  • reference: the reference frame in which the load is defined. Can be:
    • l: reference frame local to the element
    • g: global reference frame
  • type: must be d to signify this is a distributed load
  • barId: The id of the bar where the load is applied
  • tStart: the load start position in the bar's directrix (0 <= t <= 1)
  • valueStart: the value for the load at tStart
  • tEnd: the load end position in the bar's directrix (tStart <= t <= 1)
  • valueEnd: the value for the load at tEnd

Concentrated loads are defined following the format:

<term> <reference><type> <elementId> <t> <value>

where:

  • term: is either:
    • fx: force in the x-axis direction
    • fy: force in the y-axis direction
    • mz: moment about the z-axis
  • reference: the reference frame in which the load is defined. Can be:
    • l: reference frame local to the element
    • g: global reference frame
  • type: must be c to signify this is a concentrated load
  • elementId: The id of the bar where the load is applied
  • t: the load position in the bar's directrix (0 <= t <= 1)
  • value: the load's value

Examples

A distributed force in the bar's local y-axis direction, applied to a bar with id 4, starting at t = 0 with value -50 and ending at t = 1 with value -75.

fy ld 4 0.0 -50.0 1.0 -75.0

A distributed moment about the global z-axis, applied to a bar with id 12, starting at t = 0.25 with value 100 and ending at t = 0.75 with value 200.

mz gd 12 0.25 100 0.75 200

A concentrated force in the element with id 11 local y-axis direction, at position t = 0 (applied in the start node), with value -70.

fy lc 11 0.0 -70.0

The Bars

The bars are defined under the header:

|bars|

Each bar is defined in its own line, following the format:

<id> -> <sNodeId> <{[dx dy rz]}> <eNodeId> <{[dx dy rz]}> <material> <section>

Where:

  • id: the id of the bar
  • sNodeId: the id of the start node, followed by the degrees of freedom constrained by the union with the bar
  • eNodeId: the id of the end node, followed by the degrees of freedom constrained by the union with the bar
  • material: the name of the material for the bar
  • section: the name of the section for the bar

Examples

A bar with id b1 going from node n1 to node n2, with both unions being fixed (the three degrees of freedom are constrained by the unions), using the material named steel and the section ipe_120.

b1 -> n1 {dx dy rz} n2 {dx dy rz} 'steel' 'ipe_120'