Xara
Nonlinear finite element analysis.
Install / Use
/learn @peer-open-source/XaraREADME
xara is a Python package that provides an intuitive and performant API for nonlinear finite element analysis, implemented in C++ through the OpenSeesRT framework. OpenSees features state-of-the-art finite element formulations and solution algorithms, including mixed formulations for beams and solids, over 200 material models, and an extensive collection of continuation algorithms to solve highly nonlinear problems.
This package may be used as a drop-in replacement for both OpenSees.exe and
OpenSeesPy (see Getting Started below), and generally provides a substantial performance boost.
Getting Started
The xara package can be installed into a Python environment
in the standard manner. For example, using pip:
pip install xara
There are several ways to use the xara package:
-
The standard way to use
xarafrom Python is to create axara.Model, and invoke its methods:model = xara.Model(ndm=2, ndf=2) # Create a 2D model with 2 DOFs per node model.node(1, 2.0, 3.0) ...Most of the functions from the OpenSeesPy library can be invoked directly as methods of a
xara.Modelwithout any changes in syntax, although it is generally encouraged to use the safer variants supported byxara. For example:# BAD model.pattern("Plain", 1, "Linear") model.load(1, 2.0, 3.0) # GOOD model.pattern("Plain", 1, "Linear") model.load(1, 2.0, 3.0, pattern=1) -
To start an interactive Tcl interpreter run the shell command:
python -m openseesTo quit the interpreter, just run
exit:opensees > exit -
To execute Tcl procedures programmatically from Python, create an instance of the
xara.Modelclass and call itseval()method to evaluate Tcl code:model = xara.Model() model.eval("model Basic -ndm 2") model.eval("print -json") -
The
xarapackage exposes a compatibility layer that exactly reproduces the OpenSeesPy functions, but does so without mandating a single global program state. To run OpenSeesPy scripts, just change the import:import openseespy.openseesto
import opensees.openseespyFor true stateless modeling, the
Modelclass should be used instead of the legacymodelfunction; see the documentation here.
Development
To compile the project see about/compiling
Support
<table align="center" style="border: 0;"> <tr> <td> <a href="https://peer.berkeley.edu"> <img src="https://raw.githubusercontent.com/claudioperez/sdof/master/docs/assets/peer-black-300.png" alt="PEER Logo" width="200"/> </a> </td> <td> <a href="https://dot.ca.gov/"> <img src="https://raw.githubusercontent.com/claudioperez/sdof/master/docs/assets/Caltrans.svg.png" alt="Caltrans Logo" width="200"/> </a> </td> </tr> </table>Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
106.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
345.9kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
