CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   CFX average concentration possible? (https://www.cfd-online.com/Forums/cfx/69982-cfx-average-concentration-possible.html)

kingjewel1 November 11, 2009 07:02

CFX average concentration possible?
 
Hi there,

I have realeased a passive scalar (kg/kg) into a room of air and can use the probe in CFX post to individually sample the concentration at a point. How can I get CFX or Fluent (or other free post processing software you recommend) to give me an average concentration within the room? or could it print out say 1000 point's conc which I could put in excel?

Thanks and Best regards,
MFK

ghorrocks November 11, 2009 21:06

You can do this in post-processing using CFD-Post or as the simulation proceeds using a monitor point.

Both of these approaches can give you either values at a point or averaged values (and a lot more).

kingjewel1 November 12, 2009 03:53

Quote:

Originally Posted by ghorrocks (Post 235917)
You can do this in post-processing using CFD-Post or as the simulation proceeds using a monitor point.

Both of these approaches can give you either values at a point or averaged values (and a lot more).

Thanks ghorrocks,

I've tried both approaches but cannot find an average value only the specific value at the point. Could you clarify please.

MFK

ghorrocks November 12, 2009 06:17

Have a look in the CEL Expression Language in the reference manual. Functions like volumeInt(), volumeAve(), massAvg() will be of interest.

kingjewel1 November 12, 2009 18:47

Quote:

Originally Posted by ghorrocks (Post 235973)
Have a look in the CEL Expression Language in the reference manual. Functions like volumeInt(), volumeAve(), massAvg() will be of interest.

Thanks. I've readup CEL and managed to use VolumeAVE(concentration)@Default Domain effectively in POSTprocessor.

I need to be able to analyse 1000 intermediate files for a transient solution, doing it all in post seems a bit teadious. Can I set up in Pre a CEL (or otherwise) to print out the VolAve(conc)@Default for every time-step so I can graph the variable?

Best wishes,
MFK

ghorrocks November 13, 2009 04:37

If the results files already exist then do it in a CFD-Post session file. Make it read in a data file, export the result and loop to the next data file. If you are about to set the simulation up then make it a monitor point and it will automatically output to Solver Manager each timestep.

kingjewel1 November 13, 2009 04:42

Quote:

Originally Posted by ghorrocks (Post 236103)
If the results files already exist then do it in a CFD-Post session file. Make it read in a data file, export the result and loop to the next data file. If you are about to set the simulation up then make it a monitor point and it will automatically output to Solver Manager each timestep.

With monitor points don't they only output a variable at a single point instead of the volumeAve that I'm looking for as this is something I'd previously tried?

ghorrocks November 13, 2009 04:52

No. Monitor points can also be set to output CEL expressions, then you can use functions like volumeAve() to give averaged amounts.

kingjewel1 November 13, 2009 05:33

I created the expression in Pre as: volumeAve(Tracer)@Default Domain and it accepted it. But when I came to make a monitor point it did not appear in the list of variables and expressions.

Best regards,
MFK

kingjewel1 November 13, 2009 17:01

Quote:

Originally Posted by ghorrocks (Post 236108)
No. Monitor points can also be set to output CEL expressions, then you can use functions like volumeAve() to give averaged amounts.

I created the volumeAve(Tracer)@Default Domain within Pre and ran the transient simulation, saving every other timestep.
In Post I created a Chart; instead of using a Point I chose Expression vs time and chose the one I'd created earlier. Then exported the graph into excel. It worked once, but now no chart is produced, do you think this method is valid for what we are discussing? It seems simple but most other explanations appear complicated with scripts etc, what do you think?

NickFL November 13, 2009 17:24

kingjewel1- Set up a monitor point(s) in CFX-pre using an expression using volumeAve or probe. Then when running the solution the monitor points will appear in plot. Simply right-click in the plot area and chose Export Plot Data. This will allow you to save the data in a csv format which can be read into Excell so you can manipulate how you see fit. Also, if you already ran it from a run that has the monitor points and you have the res file, open it in the solver and then you can simply right-click in the user monitor plot to get the cvs file.

kingjewel1 November 14, 2009 08:06

Quote:

Originally Posted by NickFL (Post 236200)
kingjewel1- Set up a monitor point(s) in CFX-pre using an expression using volumeAve or probe. Then when running the solution the monitor points will appear in plot. Simply right-click in the plot area and chose Export Plot Data. This will allow you to save the data in a csv format which can be read into Excell so you can manipulate how you see fit. Also, if you already ran it from a run that has the monitor points and you have the res file, open it in the solver and then you can simply right-click in the user monitor plot to get the cvs file.

Thanks! The only problem I have is that Pre won't recognise the function volumeAve(Tracer)@Default Domain to apply it to a Monitor point despite being able to plot it in Post. Ie it accepts it in Pre without any complaints but it doesn't then come up in the Variables/Expressions list under Monitor points. Is this normal?

kingjewel1 November 14, 2009 13:07

Is there a reason why in Post: volumeAve(Tracer)@Default Domain expression passed from Pre should be different to the built in volumeAve by several orders of magnitude? If not then there's something strange going on.
Quote:

Originally Posted by ghorrocks
If the results files already exist then do it in a CFD-Post session file. Make it read in a data file, export the result and loop to the next data file. If you are about to set the simulation up then make it a monitor point and it will automatically output to Solver Manager each timestep.

ghorrocks would you explain please how to set up the session file in Post to read in the transient files sequentially to obtain the volumeAve?

ghorrocks November 15, 2009 03:57

The CEL should evaluate to the same value where ever you do it. Check that you are evaluating the same data set - does the dataset you are using in CFD-Post include the tracer variable? If not it will use the dataset already in it (I think, not sure what it does) it can calculate wildly incorrect values.

Set up and record a session file in CFD-Post. Do an example of what you want to do (say load one file, calculate something and export it, then load the next file) and stop the session file. You can then load the session file in a text editor and edit it to loop over all the files.


All times are GMT -4. The time now is 09:23.