Recorder class

A Recorder object takes care of recording time-history data during load-stepping, displacement-control, arc-length, creep, or dynamic analyses.

That data can be exported as text, CSV, JSON, or Excel files for further processing outside of FEM.edu.

Abstract Recorder class
class femedu.recorder.Recorder.Recorder(**kwargs)

A time history recorder

Parameters:

**kwargs – additional parameters passed through to specialized recorders. See below for more details.

Keyword Arguments:
  • variable (list of str or All) – Extra stuff

  • nodes (list of Node ptrs or All) – nodes for which those variables shall be recorded. Use nodes=All to apply to all nodes.

  • elements (list of Element ptrs or All) – elements for which those variables shall be recorded. Use elements=All to apply to all elements.

addData(dta)

For internal use only.

Parameters:

dta (dict) – variable code as key and scalar value pairs.

disable()

Disables the recorder. You may resume data collection without loss of previous data by calling enable()

Note: This method should not be called by the user. Use System.pauseRecorder() or System.stopRecorder() instead.

enable()

Enables the recorder. You may suspend data collection without loss of previous data by calling disable()

Note: This method should not be called by the user. Use System.startRecorder() instead.

export(filename='unknown.txt')
Parameters:

filename (str) –

full path to file where recorded data shall be written to. The file type will be determined from the given extension. Recognized file types are

.txt

tab-separated text file

.csv

comma-separated text file

.hdf

HDF5 file

.json, .jsn

comma-separated text file

.xlsx

MicroSoft Excel file (see the pandas package for more detail)

export_csv(filename)

Warning

This method is has not yet been implemented.

export_excel(filename)

Warning

This method is has not yet been implemented.

export_hdf(filename)

Warning

This method is has not yet been implemented.

export_json(filename)

Warning

This method is has not yet been implemented.

export_text(filename)

Warning

This method is has not yet been implemented.

fetchRecord(keys=None, source=None)

Request recorded time history data for the listed keys.

Parameters:
  • keys – If a single key is given as a string, a single np.array() is returned. If a list of keys is given, a list of np.array() is returned.

  • source – If a single Node is given, pick record from that node. If a list of Node objects is given, match keys and nodes based on order in lists. source and keys list must match in shape. If a value should be picked from the model domain instead of a node, enter None in the respective slot.

Returns:

time history data for the listed keys.

isActive()
Returns:

True if recording is on, False otherwise.

reset()

This will reset the data recorder to a disabled state and wipe all previously collected data.

Derived classes
Helper classes