CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Is it possible to export Geometry from *.trn file? (https://www.cfd-online.com/Forums/cfx/112733-possible-export-geometry-trn-file.html)

zxin February 4, 2013 07:44

Is it possible to export Geometry from *.trn file?
 
A friend of mine has received a CFX *.trn file (transient result file), but actually what he wants is the geometry.... is there any way to extract the geometry from that? I tried to export the geometry information, but only the *.csv file is generated which I could not use.

Thank you !

Far February 4, 2013 08:21

Do you have .res file? You can extract geomtry from mesh in ICEM CFD.

zxin February 6, 2013 08:48

Quote:

Originally Posted by Far (Post 405909)
Do you have .res file? You can extract geomtry from mesh in ICEM CFD.

No, only a trn file is available. It seems impossible to do it. Thanks.

ghorrocks February 6, 2013 16:19

If it is a trn file which includes the mesh then it can be recovered. If no mesh then it cannot be recovered.

abubakarizhar September 18, 2018 02:09

How to eXport geometry file from .res file. I have used FE Modeler but was not able to generate geometry is there any other way.

Gert-Jan September 18, 2018 03:47

A .res-file is a file containing volume elements and a CFD-solution. THere is no geometry.

What you can try is to 1) go to Export, 2) select all walls, and 3) export the coordinates x,y,z to a csv-file. This gives you the coordinates of all elements on all walls, i.e. some sort of representation of the geometry.

If you manage to import this into a piece of software as a STL-file or similar, then you might be in business. If you manage to do so, please inform us all........

Lance September 18, 2018 04:11

Quote:

Originally Posted by Gert-Jan (Post 706653)
A .res-file is a file containing volume elements and a CFD-solution. THere is no geometry.

What you can try is to 1) go to Export, 2) select all walls, and 3) export the coordinates x,y,z to a csv-file. This gives you the coordinates of all elements on all walls, i.e. some sort of representation of the geometry.

If you manage to import this into a piece of software as a STL-file or similar, then you might be in business. If you manage to do so, please inform us all........

If you only have a .res file (and no .def file) do like this:
for a .res file called resfile.res, copy the following code to a text file called res2def.pre
Code:

COMMAND FILE:
CFX Pre Version = 19.0
END
>load filename=resfile.res, mode=def, recoverSession=no, replaceFlow=yes, overwrite=yes
> update
>writeCaseFile filename=cfxmesh.def, operation=write solver file
> update
> update

then, run

Code:

cfx5pre -batch res2def.pre
it will produce a .def file called cfxmesh.def.
open ICEM/import mesh/from CFX --> will give you a file called tmpdomain.uns.

File/mesh/close mesh
File/import geometry/faceted/ICEM CFD mesh:tmpdomain.uns
Done! You should now have all the geometry in ICEM, with all surfaces names based on the boundary conditions.



OR, if you really want to use an .stl file, CFD-post can export surfaces to .stl (file/export/type:STL)

Gert-Jan September 18, 2018 04:20

Interesting. As seen more often: ICEM is a lifesaver.

Will It also work if you load the res file into pre, and then save a def-file? I guess so.

For people who can't find the command line...

Lance September 18, 2018 04:33

Quote:

Originally Posted by Gert-Jan (Post 706660)
Will It also work if you load the res file into pre, and then save a def-file? I guess so.
For people who can't find the command line...

yeah, but who doesnt like the command line? ;)
I have automated this and use it in combination with ICEM .rpl scripts to do automagic remeshing in CFX. Works like a charm.


All times are GMT -4. The time now is 01:29.