Write forces dat file
This commit is contained in:
parent
3143f456cc
commit
520b77015d
1 changed files with 6 additions and 1 deletions
|
@ -35,7 +35,6 @@ 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,6 +52,12 @@ for i in range(1,len(t)):
|
||||||
my[i] += mvy[i]
|
my[i] += mvy[i]
|
||||||
mz[i] += mvz[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
|
# plot forces
|
||||||
import pylab
|
import pylab
|
||||||
pylab.xlabel('iteration')
|
pylab.xlabel('iteration')
|
||||||
|
|
Reference in a new issue