Skip to content
Snippets Groups Projects
Commit ad0b4da5 authored by Chloe Mimeau's avatar Chloe Mimeau
Browse files

update energy dissipation post-porcessing

parent 5bcb2bf8
No related branches found
No related tags found
No related merge requests found
......@@ -94,24 +94,23 @@ class Energy_enstrophy(Monitoring):
enstrophy = enstrophy / (2.0 * np.pi) ** 3
print "enstrophy", enstrophy
# 1st order
# effectiveViscosity = - (energy - self.buffer_1) / (dt * enstrophy)
# energyDissipation = - (energy - self.buffer_1) / dt
# timeDerivativeEnergy = - (energy - self.buffer_1) / dt
# 2nd order
effectiveViscosity = - (3.0 * energy - 4.0 *
self.buffer_1 + 1.0 * self.buffer_2) / \
(2.0 * dt * enstrophy)
energyDissipation = - (3.0 * energy - 4.0 * self.buffer_1 + 1.0 *
timeDerivativeEnergy = - (3.0 * energy - 4.0 * self.buffer_1 + 1.0 *
self.buffer_2) / (2.0 * dt)
ratio = effectiveViscosity / self.viscosity
energyDissipation2 = self.viscosity * enstrophy
nuEnstrophy = self.viscosity * enstrophy
energyDissipation3 = effectiveViscosity * enstrophy
nu_effEnstrophy = effectiveViscosity * enstrophy
self.buffer_2 = self.buffer_1
self.buffer_1 = energy
......@@ -121,9 +120,9 @@ class Energy_enstrophy(Monitoring):
self.f.write("%s %s %s %s %s %s %s\n" % (t, energy,
enstrophy,
ratio,
energyDissipation,
energyDissipation2,
energyDissipation3))
timeDerivativeEnergy,
nuEnstrophy,
nu_effEnstrophy))
self.f.close()
def __str__(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment