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:
filename : str

The name of file to extract from.

extract : str

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.

verbose : bool

Verbosity control.

Returns:
ths : dict

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.

ts : TimeStepper instance

The time stepping information.

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

Read true time step data from individual time steps.

Returns:
steps : array

The time steps.

times : array

The times of the time steps.

nts : array

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

dts : array

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:
times : array

The vector of times in seconds.

Returns:
new_times : array

The vector of times in units.

units : str

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.