CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   export scalars from a surface (http://www.cfd-online.com/Forums/cfx/107673-export-scalars-surface.html)

evcelica October 3, 2012 16:14

export scalars from a surface
 
Is there an easy way to export the numerical values of a scalar from a surface? Say I wanted temperature of a square flat region of a surface with a specified spacing between measurements.

Right now I just use 15 lines each with 15 samples each to give me my grid, but this seems very inefficient. Point clouds only work for vectors it seems?

monkey1 October 9, 2012 09:56

You could write a perl script that increments an "x" and "y" variable within the range desired and creates for each x,y Pair a point where you then will call the "probe" function for Temperature and then write it to a .csv output readable in Excel....

evcelica October 9, 2012 14:50

Thanks for the reply,
Is this process described in the documentation somewhere? I'll have to look it up.

monkey1 October 10, 2012 02:31

1 Attachment(s)
I don't know if it is described. But for sure not in detail. You will have to write a perl script by yourself, save it as a .cse file and then "run" the file in post by selecting "Session->Play Session".
Don't know how familiar you are with the CEL/CCL...here is a portion of CEL/PERL Code that is supposed to do what I suggested, although I just noticed there must be a Bug somewhere...but had no time to search for it. Hope you are somewhat familiar with Perl so you can find out by yourself...
Maybe this is of some help anyhow.

The Lines beginning with # are comments and will be ignored by the compiler/interpreter.

You can rename the file from .txt to .cse and play it in post (if you get rid of the bug ;) ).

ghorrocks October 10, 2012 06:22

And don't forget you could simply export the variable fromt he location directly, this uses the node points on the surface. They are only as regular as your mesh, and you cannot adjust the resolution of it, but it is easy and it is the resolution of the actual dataset.

monkey1 October 10, 2012 09:32

Of course Glenn is right and has found the easier way to export the scalars on a plane (as long as it is not mandatory to have specific positions). Cool just learned smth. new ;) Thx Glenn!


All times are GMT -4. The time now is 06:25.