NO_SHEAR_MODES not working properly in ns3d
There seem to be several problems with the NO_SHEAR_MODES
boolean parameter in ns3d
:
-
There are two
NO_SHEAR_MODES
boolean parameters: one inparams.NO_SHEAR_MODES
and one inparams.oper.NO_SHEAR_MODES
. They seem to be independant. -
Setting
params.oper.NO_SHEAR_MODES=True
before starting a simulation does not prevent energy from growing into shear modes. Opening such a simulation in ipython after starting and testing theNO_SHEAR_MODES
parameters give:
In [1]: from fluidsim import load_sim_for_plot
In [2]: sim = load_sim_for_plot()
*************************************
Program fluidsim
sim: <class 'fluidsim.solvers.ns3d.strat.solver.Simul'>
sim.oper: <class 'fluidsim.operators.operators3d.OperatorsPseudoSpectral3D'>
sim.output: <class 'fluidsim.solvers.ns3d.strat.output.Output'>
sim.state: <class 'fluidsim.solvers.ns3d.strat.state.StateNS3DStrat'>
sim.time_stepping: <class 'fluidsim.solvers.ns3d.time_stepping.TimeSteppingPseudoSpectralNS3D'>
sim.init_fields: <class 'fluidsim.solvers.ns3d.init_fields.InitFieldsNS3D'>
sim.forcing: <class 'fluidsim.solvers.ns3d.forcing.ForcingNS3D'>
solver ns3d.strat, RK4 and sequential,
type fft: fluidfft.fft3d.with_pyfftw
nx = 4 ; ny = 4 ; nz = 4
Lx = 6 ; Ly = 6 ; Lz = 1
path_run =
/.fsnet/project/watu/2019/19INTSIM/sim_data/waves_coriolis/ns3d.strat_ampl0.035_360x360x60_V6x6x1_2020-04-08_14-18-51
init_fields.type: constant
Initialization outputs:
sim.output.phys_fields: <class 'fluidsim.base.output.phys_fields3d.PhysFieldsBase3D'>
sim.output.spatial_means: <class 'fluidsim.solvers.ns3d.strat.output.spatial_means.SpatialMeansNS3DStrat'>
sim.output.spectra: <class 'fluidsim.solvers.ns3d.strat.output.spectra.SpectraNS3DStrat'>
sim.output.spect_energy_budg: <class 'fluidsim.solvers.ns3d.strat.output.spect_energy_budget.SpectralEnergyBudgetNS3DStrat'>
Memory usage at the end of init. (equiv. seq.): 181.51171875 Mo
Size of state_spect (equiv. seq.): 0.003072 Mo
In [3]: sim.params.oper.NO_SHEAR_MODES
Out[3]: False
In [4]: sim.params.NO_SHEAR_MODES
Out[4]: False
Using load_state_phys_file
instead of load_sim_for_plot
gives the same result.