Added dat file for forces and moments
Conflicts: bin/plotForces.py
This commit is contained in:
parent
dfaf6e71da
commit
17129062cd
1 changed files with 10 additions and 2 deletions
|
@ -35,6 +35,7 @@ for line in lines:
|
||||||
mvy.append(float(match.group(12)))
|
mvy.append(float(match.group(12)))
|
||||||
mvz.append(float(match.group(13)))
|
mvz.append(float(match.group(13)))
|
||||||
|
|
||||||
|
|
||||||
# combine pressure and viscous forces and moments
|
# combine pressure and viscous forces and moments
|
||||||
fx = fpx
|
fx = fpx
|
||||||
fy = fpy
|
fy = fpy
|
||||||
|
@ -53,10 +54,17 @@ for i in range(1,len(t)):
|
||||||
mz[i] += mvz[i]
|
mz[i] += mvz[i]
|
||||||
|
|
||||||
# write clean data file
|
# write clean data file
|
||||||
outfile=open('forces.dat','w')
|
outForces=open('forces.dat','w')
|
||||||
|
|
||||||
for data in zip(t,fx,fy,fz):
|
for data in zip(t,fx,fy,fz):
|
||||||
outfile.write(' '.join([str(d) for d in data])+'\n')
|
outForces.write(' '.join([str(d) for d in data])+'\n')
|
||||||
|
outForces.close()
|
||||||
|
|
||||||
|
outMoments=open('moments.dat','w')
|
||||||
|
|
||||||
|
for data in zip(t,mx,my,mz):
|
||||||
|
outMoments.write(' '.join([str(d) for d in data])+'\n')
|
||||||
|
outMoments.close()
|
||||||
|
|
||||||
# plot forces
|
# plot forces
|
||||||
import pylab
|
import pylab
|
||||||
|
|
Reference in a new issue