sfepy.postprocess.time_history module

sfepy.postprocess.time_history.average_vertex_var_in_cells(ths_in)[source]

Average histories in the element nodes for each nodal variable originally requested in elements.

sfepy.postprocess.time_history.dump_to_vtk(filename, output_filename_trunk=None, step0=0, steps=None, fields=None, linearization=None)[source]

Dump a multi-time-step results file into a sequence of VTK files.

sfepy.postprocess.time_history.extract_time_history(filename, extract, verbose=True)[source]

Extract time history of a variable from a multi-time-step results file.

Parameters:
filenamestr

The name of file to extract from.

extractstr

The description of what to extract in a string of comma-separated description items. A description item consists of: name of the variable to extract, mode (‘e’ for elements, ‘n’ for nodes), ids of the nodes or elements (given by the mode). Example: ‘u n 10 15, p e 0’ means variable ‘u’ in nodes 10, 15 and variable ‘p’ in element 0.

verbosebool

Verbosity control.

Returns:
thsdict

The time histories in a dict with variable names as keys. If a nodal variable is requested in elements, its value is a dict of histories in the element nodes.

tsTimeStepper instance

The time stepping information.

sfepy.postprocess.time_history.extract_times(filename)[source]

Read true time step data from individual time steps.

Returns:
stepsarray

The time steps.

timesarray

The times of the time steps.

ntsarray

The normalized times of the time steps, in [0, 1].

dtsarray

The true time deltas.

sfepy.postprocess.time_history.guess_time_units(times)[source]

Given a vector of times in seconds, return suitable time units and new vector of times suitable for plotting.

Parameters:
timesarray

The vector of times in seconds.

Returns:
new_timesarray

The vector of times in units.

unitsstr

The time units.

sfepy.postprocess.time_history.save_time_history(ths, ts, filename_out)[source]

Save time history and time-stepping information in a HDF5 file.