CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   export scalars from a surface (https://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!

Thomasbr September 13, 2016 10:06

@monkey1: thanks for the .cse file you've written, I modified it in order for it to fit my case. I don't know if it works though: I can't seem to read the .cse file :confused:
Under 'Session' I only have

  • New Session
  • Start Recording
  • Stop Recording

monkey1 September 13, 2016 10:19

That's confusing.
When I open CFX POST and click on "Session" I have:
Play Session
------------
New Session
Start Recording
Stop Recording

Dunno where the difference may come from....

Thomasbr September 13, 2016 10:47

Thanks for your answer:

when I open the .res file through ANSYS Workbench, I don't get 'Play Session', like I said. But if I open the .res file directly through CFD Post, it's ok :)

Now I'm trying to make it work but I got lots of errors. I will work on this and if it still does not work, I will try to post it here.

hand90 November 13, 2018 11:03

Quote:

Originally Posted by ghorrocks (Post 385921)
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.

Dear Glenn
I know this is a pretty old post but I would still be interested in how you export a variable of interest from its node points in CFD-Post for a transient simulation. Unfortunately I have no experience in writing a perl scrips.

ghorrocks November 13, 2018 16:55

You don't need perl to do this.

I was referring to the File/Export function. If you want to automate it record a session file and have a look at the text file it generates. You might be able to edit it to automate the functions you want.

schmarf June 22, 2023 07:53

Quote:

Originally Posted by hand90 (Post 715136)
Dear Glenn
I know this is a pretty old post but I would still be interested in how you export a variable of interest from its node points in CFD-Post for a transient simulation. Unfortunately I have no experience in writing a perl scrips.

same problem here. Is this still working and also for ansys fluent?

ghorrocks June 22, 2023 18:20

It should work fine for fluent data.


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