Bad implementation of hypoviscosity in pseudospectral ns3d
There seem to be a problem with the implementation of hypoviscosity in ns3d. Luaching a simulation with a finite value of params.nu_m4
leads to the error:
Traceback (most recent call last):
File "simul_idempotent_w6-7_Dirac_hypo.py", line 177, in <module>
sim = Simul(params)
File "/home/jason/Dev/fluidsim/fluidsim/base/solvers/base.py", line 161, in __init__
self.time_stepping = TimeStepping(self)
File "/home/jason/Dev/fluidsim/fluidsim/base/time_stepping/pseudo_spect.py", line 106, in __init__
self._init_freq_lin()
File "/home/jason/Dev/fluidsim/fluidsim/base/time_stepping/pseudo_spect.py", line 112, in _init_freq_lin
f_d, f_d_hypo = self.sim.compute_freq_diss()
File "/home/jason/Dev/fluidsim/fluidsim/base/solvers/pseudo_spect.py", line 178, in compute_freq_diss
f_d_hypo = self.params.nu_m4 / self.oper.K2_not0 ** 2
AttributeError: 'OperatorsPseudoSpectral3D' object has no attribute 'K2_not0'
The problem comes from oper.K2_not0
, which doesn't exist in 3d (though oper.inv_K_square_nozero
may be used for a similar purpose).
This error isn't raised when running tests, because hypoviscosity is not tested in 3d.