fluidsim.base.output.phys_fields2d

Physical fields output 2d

Provides:

class fluidsim.base.output.phys_fields2d.MoviesBasePhysFields2D(output, phys_fields)[source]

Bases: MoviesBasePhysFields

Methods required to animate physical fields HDF5 files.

_init_fig(field, time, vec_xaxis=None, vec_yaxis=None, **kwargs)[source]

Initialize only the figure and related matplotlib objects. This method is shared by both animate and online_plot functionalities.

update_animation(frame, **fargs)[source]

Loads data and updates figure.

_get_spatial_means(key_spatial='E')[source]

Get field for the inset plot.

class fluidsim.base.output.phys_fields2d.PhysFieldsBase2D(output)[source]

Bases: PhysFieldsBase

_cls_movies

alias of MoviesBasePhysFields2D

_init_skip_quiver()[source]
set_skip_quiver(skip)[source]
get_vector_for_plot(from_state=False, time=None, interpolate_time=True)[source]
_set_title(ax, key, time, vmax=None)[source]
_init_online_plot()[source]
_online_plot()[source]

Online plot.

plot(field=None, time=None, QUIVER=True, vecx='ux', vecy='uy', nb_contours=20, type_plot='pcolor', vmin=None, vmax=None, cmap=None, numfig=None, skip_quiver=None)[source]

Plot a field.

This function is surely buggy! It has to be fixed.

Parameters:
field{str, np.ndarray}, optional
timenumber, optional
QUIVERTrue
vecx‘ux’
vecy‘uy’
nb_contours20
type_plot“pcolor” or “contourf”
vminNone
vmaxNone
cmapNone (usually ‘viridis’)
numfigNone
_quiver_plot(ax, vecx='ux', vecy='uy', XX=None, YY=None, skip=None, normalize_vectors=True, **kwargs)[source]

Superimposes a quiver plot of velocity vectors with a given axis object corresponding to a 2D contour plot.

Classes

MoviesBasePhysFields2D(output, phys_fields)

Methods required to animate physical fields HDF5 files.

PhysFieldsBase2D(output)