Commit 7112e71b authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

estimate dissipation for fixed kinetic energy

parent 737d2ae2
Pipeline #22386 passed with stage
in 6 minutes and 36 seconds
...@@ -685,6 +685,12 @@ class DNS(_code): ...@@ -685,6 +685,12 @@ class DNS(_code):
opt.ny = opt.n opt.ny = opt.n
if type(opt.nz) == type(None): if type(opt.nz) == type(None):
opt.nz = opt.n opt.nz = opt.n
if type(opt.fk0) == type(None):
opt.fk0 = self.parameters['fk0']
if type(opt.fk1) == type(None):
opt.fk1 = self.parameters['fk1']
if type(opt.injection_rate) == type(None):
opt.injection_rate = self.parameters['injection_rate']
self.parameters['nu'] = (opt.kMeta * 2 / opt.n)**(4./3) self.parameters['nu'] = (opt.kMeta * 2 / opt.n)**(4./3)
if opt.forcing_type == 'linear': if opt.forcing_type == 'linear':
# custom famplitude for 288 and 576 # custom famplitude for 288 and 576
...@@ -700,6 +706,16 @@ class DNS(_code): ...@@ -700,6 +706,16 @@ class DNS(_code):
self.parameters['nu'] = ( self.parameters['nu'] = (
self.parameters['injection_rate'] * self.parameters['injection_rate'] *
(opt.kMeta / kM)**4)**(1./3) (opt.kMeta / kM)**4)**(1./3)
elif opt.forcing_type == 'fixed_energy':
kM = opt.n * 0.5
if self.parameters['dealias_type'] == 1:
kM *= 0.8
kf = 1. / (1./self.parameters['fk0'] +
1./self.parameters['fk1'])
self.parameters['nu'] = (
(opt.kMeta / kM)**(4./3) *
(np.pi / kf)**(1./3) *
(2*self.parameters['energy'] / 3)**0.5)
if type(opt.checkpoints_per_file) == type(None): if type(opt.checkpoints_per_file) == type(None):
# hardcoded FFTW complex representation size # hardcoded FFTW complex representation size
field_size = 3*(opt.nx+2)*opt.ny*opt.nz*self.fluid_dtype.itemsize field_size = 3*(opt.nx+2)*opt.ny*opt.nz*self.fluid_dtype.itemsize
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment