snek5000.output.phys_fields#

Interface for Nek5000 field files.

PhysFields usually instantiated as sim.output.phys_fields provides a common interface for plotting and reading arrays from the solution field files. Loading of data files are managed by the classes in the snek5000.output.readers.

Classes

PhysFields([output])

Class for loading, plotting simulation files.

class snek5000.output.phys_fields.PhysFields(output=None)[source]#

Class for loading, plotting simulation files.

property data#
load#

Reader method which loads a particular file into memory and returns it.

get_var#

Reader method which returns a particular array from memory.

get_field_to_plot(key=None, time=None, idx_time=None, equation=None, interpolate_time=True, skip_vars=())#

Get the field to be plotted in process 0.

get_key_field_to_plot(forbid_compute=False, key_prefered=None)#

Get the key corresponding to the field to be plotted

get_vector_for_plot(from_state=False, time=None, interpolate_time=True, skip_vars=())#

Get the vector components

init_reader()[source]#

Initializes the reader instance following the value in params.output.phys_fields.reader. This would also “initialize” load() and get_var().

set_equation_crosssection(equation)#

Set the equation defining the cross-section.

Parameters

equation (str) – The equation can be of the shape ‘iz=2’, ‘z=1’, …

set_of_phys_files: SetOfPhysFieldFilesABC#
change_reader(reader_key)[source]#

Changes the reader following which reader_key is provided.

Parameters

reader_key (str) – String denoting the reader class. Should be one of params.output.phys_fields.available_readers.