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

No commit message

No commit message
parent dbdc175a
No related branches found
No related tags found
No related merge requests found
......@@ -204,7 +204,7 @@ class Compute_forces(object):
self.coef = 2. / (uinf ** 2 * PI * self.obstacle.radius ** 2)
def apply(self, dt, velo, vort, Re):
def apply(self, t, dt, velo, vort, Re):
"""
Computation of the drag according to the "impulsion" formula presented by
Noca et. al in Journal of Fluids and Structures, 1999
......@@ -239,10 +239,10 @@ class Compute_forces(object):
comm = MPI.COMM_WORLD
comm.Reduce([localForce, MPI.DOUBLE], [force, MPI.DOUBLE], op=MPI.SUM, root=0)
f = open('NocaForces.dat', 'w')
f.write(force, force / self.coef \n)
f.close()
if (self.topo.rank == 0):
f = open('NocaForces.dat', '+w')
f.write(t, force, force / self.coef '\n')
f.close()
def integrateOnBox(self, force, vort, chi, dvol, dt):
"""
......
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