CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CD-adapco (http://www.cfd-online.com/Forums/cd-adapco/)
-   -   Export to ensight! (http://www.cfd-online.com/Forums/cd-adapco/52347-export-ensight.html)

Anders Jönson January 17, 2000 06:10

Export to ensight!
 
Hi everyone,

I have a question about the built in capability to export the results from StarCD to Ensight format. When I use this command I always get everything as one huge part in Ensight, i.e. I don't get separate parts for different walls, fluids etc. Any input on this?

Regards Anders

Joern Beilke January 17, 2000 08:55

Re: Export to ensight!
 
ENSIGHT, LF(case.GEO) (READ ONLY) ENSIGHT, OPTION (WRITE ONLY) Reads geometry data or writes out geometry and/or post data in a form which can be read by the Ensight post-processing visualization program. Post data can be either cell, vertex, boundary or wall data. A typical sequence of commands to write data might be:

cset news type 1

setwrite case.set

cset invert

setwrite case.set

load case.pst

ensi root

mymodel

ensi form bina

ensi all cell case.set

ensi done

The "setwrite" comand is used for this purpose.

philip March 29, 2000 06:03

Re: Export to ensight!
 
If you bring the parts into Prostar from ICEM then the names of the family are stored in the cell table name. I have an awk script that writes a prostar script to write out results in ensight format grouped by these wall names. If you have written out a part from icem with a name of bert then you get a bert.inp file. If you

awk -f icem2ensi.awk bert.inp

you get ensi.inp

ifile ensi.inp in prostar when you have a result LOADed.

Regards

Philip

File icem2ensi.awk follows:

================================================== ==========

BEGIN {casename=ARGV[1]

gsub(".inp",""i,casename)

print "setd,"casename".set,all" > "ensi.inp"

print "cset news fluid" > "ensi.inp"

print "setw,"casename".set,fluid_domain,last" > "ensi.inp"

}

{

# make up a script that groups cells into sets by name

if (substr($0,0,6)=="ctname")

{

gsub(","," ")

print "cset news name",$3 > "ensi.inp"

print "setw,"casename".set,"$3,"last" > "ensi.inp"

}

}

END {print "direction write" > "ensi.inp"

print "ensi root" > "ensi.inp"

print casename > "ensi.inp"

print "ensi form bina" > "ensi.inp"

print "ensi all vert "casename".set" > "ensi.inp"

print "ensi done" > "ensi.inp"

}

================================================== ==========


All times are GMT -4. The time now is 13:48.