Skip to main content

A Python 3 client for odbAccess using pylife-odbserver

Project description

pylife-odbclient

A Python 3 client for odbAccess using pylife-odbserver

Purpose

Unfortunately Abaqus still comes with a python-2.x engine. So you can't access an Abaqus odb file from within modern python code. This python package is the client part of a client server setup to make odb files accessible from within python-3.x code in a transparent way.

Solution

The sibling package pylife-odbserver provides a slim server that as python-2.7 software, that can be run inside the Abaqus python engine. It accepts command via sys.stdin and according to the command is querying data from the odbAccess interface and returning them in a pickle object.

This package comes with a python class OdbClient that spawns the server in the background when an instance of OdbClient is instantiated. Then the client object can be used to transparently access data from the odb file via the server. Once the client object goes out of scope i.e. is deleted, the server process is stopped automatically.

Installation

  • Install the odbclient using pip with the command
pip install pylife-odbclient

Usage

Usually you only will see the OdbClient class interface when you access an odb file. The only point you care about the server is when you instantiate an OdbClient object. You need to know the following things

  • The path to the Abaqus executable

  • The path to the python environment pylife-server is installed into.

Then you can instantiate a OdbClient object using

import odbclient as CL

client = CL.OdbClient("yourodb.odb")

See the API docs of OdbClient for details.

Limitations

Limited functionality

Only a subset of Abaqus variable locations are supported. These are: nodal, element nodal, whole element and centroid. Integration point variables are extrapolated to element nodal.

You can only extract data from an odb file, not write to it.

String literals

So far only names made of ascii strings are supported. That means that instance names, node that names and the like containing non-ascii characters like German umlauts will not work.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylife_odbclient-2.1.3rc1.tar.gz (226.7 kB view details)

Uploaded Source

Built Distribution

pylife_odbclient-2.1.3rc1-py2.py3-none-any.whl (13.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pylife_odbclient-2.1.3rc1.tar.gz.

File metadata

  • Download URL: pylife_odbclient-2.1.3rc1.tar.gz
  • Upload date:
  • Size: 226.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.7

File hashes

Hashes for pylife_odbclient-2.1.3rc1.tar.gz
Algorithm Hash digest
SHA256 3baf4d4d19117e3a25ed46fa7d13688f972b9262ca1b87e5619403ec6a51fde2
MD5 529d541491a20ab5566ffbd823f8ebf1
BLAKE2b-256 9fcd140bbe932a5cce60be1d6a420f780b4632915a8e4f679ba8d91a918fb312

See more details on using hashes here.

File details

Details for the file pylife_odbclient-2.1.3rc1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pylife_odbclient-2.1.3rc1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 73e6b7db08de36ff837012bdf162c446f4cf39ab87bce9718e4ea4f9c91ff5f7
MD5 3a430a71da30a911eb10694b0d2f4dc5
BLAKE2b-256 5f19d33b42c505b734c2466b650f7824bc52ab4d462c7ac86ded52cc8f1a0cc9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page