そこで, 形式変換はしないけどparaviewでも表示可能な, inpに書き換えるスクリプトを書いてみた. やっつけなのでp, u, v, w と wallshear stressの場合しか動きません.
#!/usr/bin/python
#------------------------------------------
# inp file converter:
#------------------------------------------
#
# convert fluent output for paraview
#
import sys
argvs = sys.argv
argc = len( argvs )
if( argc != 3 ):
print ' Usage python %s {inp_file.inp} {out_file.inp}'
quit()
inp_file = argvs[1]
out_file = argvs[2]
fin = open( inp_file )
in_lines = fin.readlines()
fin.close()
fout = open( out_file, 'w' )
for line in in_lines:
if line == "5 1 1 1 1 1\n":
fout.write( "3 1 3 1\n" )
elif line == "x-velocity, si\n":
fout.write( "velocity, si\n" )
elif line == "y-velocity, si\n" or line == "z-velocity, si\n":
0
else:
fout.write( line )
#------------------------------------------
# inp file converter:
#------------------------------------------
#
# convert fluent output for paraview
#
import sys
argvs = sys.argv
argc = len( argvs )
if( argc != 3 ):
print ' Usage python %s {inp_file.inp} {out_file.inp}'
quit()
inp_file = argvs[1]
out_file = argvs[2]
fin = open( inp_file )
in_lines = fin.readlines()
fin.close()
fout = open( out_file, 'w' )
for line in in_lines:
if line == "5 1 1 1 1 1\n":
fout.write( "3 1 3 1\n" )
elif line == "x-velocity, si\n":
fout.write( "velocity, si\n" )
elif line == "y-velocity, si\n" or line == "z-velocity, si\n":
0
else:
fout.write( line )
0 件のコメント:
コメントを投稿