diff --git a/bin/plotForces.py b/bin/plotForces.py index ff59ca41a..fd8ff938d 100755 --- a/bin/plotForces.py +++ b/bin/plotForces.py @@ -35,7 +35,6 @@ for line in lines: mvy.append(float(match.group(12))) mvz.append(float(match.group(13))) - # combine pressure and viscous forces and moments fx = fpx fy = fpy @@ -53,6 +52,12 @@ for i in range(1,len(t)): my[i] += mvy[i] mz[i] += mvz[i] +# write clean data file +outfile=open('forces.dat','w') + +for data in zip(t,fx,fy,fz): + outfile.write(' '.join([str(d) for d in data])+'\n') + # plot forces import pylab pylab.xlabel('iteration')