sim.output.phys_fields.plot not good enough
phys_fields.plot
raises too many errors (in particular in 3D).
from fluidsim import load_state_phys_file as load; sim=load()
# this works
sim.output.phys_fields.plot()
# but this raises a ValueError
sim.output.phys_fields.plot(time=200)
ValueError: key "rotz" not in state.keys_state_phys (['vx', 'vy', 'vz']).
The quantity cannot be computed because time is not None.
-
When needed, a state
can be added to contain data for a particular time and compute variables (we already have the operator).
Similarly,
from fluidsim import load_sim_for_plot as load; sim=load()
sim.output.phys_fields.plot()
raises
ValueError: key "rotz" not in state.keys_state_phys (['vx', 'vy', 'vz']).
"rotz" in sim.state.keys_computable but sim.params.ONLY_COARSE_OPER is True
(and sim.output.phys_fields.plot("vx")
works).
-
by default, a variable that we can get should be plotted. -
also check sim.output.phys_fields.animate
Edited by Pierre Augier