CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Easy way to export monitor data from CFX out file (https://www.cfd-online.com/Forums/cfx/104522-easy-way-export-monitor-data-cfx-out-file.html)

jonny_b July 11, 2012 13:02

Easy way to export monitor data from CFX out file
 
Hey guys,

I would like to do an FFT analysis to determine the frequency spectrum in my solution. I know that I should be able to export time dependent variable data from CFD-Post, but the problem is the time step interval for which I've captured data in trn files is too large to extract a meaningful frequency analysis. I've set up monitors of pressure and I know that this information is contained in my monitors for every time step. Is there an easy way to extract monitor information so that I can import it into Matlab and do my FFT analysis there? I can't seem to find out how to get this data in CFD-Post.

Thanks,
Jonathan

jonny_b July 11, 2012 13:20

Nevermind found out how to extract monitor info from a .res file.
Quote:

After the CFX-Solver has finished, the monitor point data (if the monitor point information is required) is extracted from a .res file using the cfx5dfile command. The following syntax is used:

cfx5dfile <file> -read-monitor

where <file> is a CFX-Solver input or results file containing monitor point information. The output is sent to standard output (you may want to add a redirect to write the output to a text file, for example:

cfx5dfile <file> -read-monitor > out.txt

The output is produced as a list of variable names, followed by a comma-delimited list of values that correspond to the order of variable names. One line of these values is produced for every iteration that has been carried out.

monkey1 July 12, 2012 03:00

Can do it even easier. If you're using the solver manager of ansys, then just open your case in the manager (open completed run). As you sepcified Monitors for the run you will then see a monitors tab. Within this tab just right click on the graph and select "Export Plot Data". It will then write a .csv file with all the data in the monitor graph.

jonny_b July 17, 2012 14:53

Holy cow Monkey! I didn't even think about that. That is easy! Thanks for the advice. You just made my life a lot easier.

monkey1 July 18, 2012 05:08

Always glad when I can help :)

jonny_b August 2, 2012 08:34

I also found another usefull CFX command although I still think that monkey1's suggestion may be the quickest. This terminal command looks like it provides a lot of options however :

Quote:


Name: cfx5mondata


Purpose:


Run the CFX Monitor Data Exporter. Monitor data will be output in
Excel-compatible CSV (comma-separated values) format


Synopsis:


cfx5mondata -res <file> | -dir <directory> | -mon <file>
[-showvars] [-nocoeffloops] [-lastvalueonly]
[-varlist <variables>] [-varrule <rule>]
[-out <file>] [-help] [-v]


Badi April 24, 2013 07:22

Sorry for exhuming this old thread.
When I try to export my data into csv all I got are the timesteps and not my mesh movement. Is this a common problem?

monkey1 April 24, 2013 08:00

Hi Badi!
I do not exactly understand what you want to do. If you are exporting Monitor Point data you will always get only the time steps with the corresponding values of the monitored data without any info about the mesh. It's just exporting 2D Chart Data.
What exactly do you want to do?

Badi April 24, 2013 08:06

yeah I know, I had a monitor point on a moving wall. It did monitor the movement in y (periodic movement). I basically had a sinus curve.
The problem was i only got the data from the x curve and not the y curve.

I dont know if it is a bug but this only happens when you make a new monitor, while solving, with the new point.
If I export the data from the "standart" User points tab I get all the data... weird

monkey1 April 24, 2013 08:13

Weird...just tried it on a simulation that is running with the standard monitor point tab "User Points" and a newly created monitor tab "Plot Monitor 1" and for both the .csv file contained all the data displayed...

ghorrocks April 25, 2013 07:03

Just checking - it is not that you simply have to zoom in on the region of interest to see something happen? Also, have you checked the resolution of the numbers in the CSV file is sufficient to show the signal you expect to see?

bitak July 26, 2013 12:29

export point in CFX post
 
Helo all.
How I can export data from one point from CFX post?
in fact I define point in CFX post and my purpose is maximum value of special parameter.
How I can see result?

ghorrocks July 27, 2013 07:16

Have a look at the CFX reference guide for available CEL functions. The probe function is the one you want.

elaf_2003 September 26, 2013 19:51

point monitor
 
Hi mates
I ,d like to monitor the point with cluster for fluent case for instance Cm or velocity or residual, so how I can monitor these issues.
regard

ghorrocks September 26, 2013 20:05

Try the fluent forum.

elaf_2003 September 26, 2013 20:10

thanks mate
could you more explain.
regard

ghorrocks September 26, 2013 20:12

This is the CFX forum.

This is the link to the Fluent forum: http://www.cfd-online.com/Forums/fluent/

Lilienthal October 23, 2013 06:34

Hello all,

first post for me in this forum, so I hope I found the right thread.

Is there any way to monitor Expressions along a line in the CFX Solver Manager?
The manual tells me its only possible to monitor Expressions on a x,y,z-point or a mesh region like a boundary or inlet.
Is it possible to circumnavigate that restriction in user fortran i.e.?

Btw.: replacing a line with a huge number of monitor points is not what I want to do.

Any ideas would be appriciated...

ghorrocks October 23, 2013 07:01

What do you want to do with the line?

I know of no way to do stuff along a line in the solver. It is easy in post-processing.

Lilienthal October 23, 2013 08:01

I would like to monitor the fluid height in steady state stratified two-phase flow simulation.
It has to be at a certain line for comparison with experiment.

For comparison with the experimental data its sufficient to check the level in CFD Post. But for checking if its
really steady, it has to be monitored in the solver.

ghorrocks October 23, 2013 08:06

Rather than a true line you can do this with a long thin solid region, then use the volumeInt() function. That will work just fine, but you will need to generate a mesh with the long thin mesh region in it.

Lilienthal October 23, 2013 08:12

Thanks for your advice.
I believe the solid region would have an influence on the flow? Otherwise I should give this a try.

ghorrocks October 23, 2013 08:20

No, I did not say a solid region. I recommend a mesh region which is made contiguous with the rest of the mesh, and will be included in the fluid domain. It will have no affect on the flow. It is just putting a label on a mesh volume so you can calculate some values on it.

Lilienthal October 23, 2013 08:30

Actually you said solid region :) But lets not get stupid here. I think I get what you mean. So I'll define a mesh volume consisting of a line of cells in the grid generator and use that as a monitoring region in cfx. Thanks a lot!

ghorrocks October 23, 2013 17:13

I did, didn't I... I meant a solid region of mesh (which you define as part of the fluid domain), not a domain which you define as a solid. I did not state that very clearly at all.

But I think you get the idea. Give it a go and it should work.

vijayadityah January 15, 2018 05:08

monitor data from iterative runs
 
hello all,

I am running an optimization process using a steady state setting. I created a plane to monitor the mass flow through it. I want to export the data of the last few (30) iterations of the run, however I do not want to manually export the data for each run (as there are 100 runs in the optimization). Is there a possible way where I can automatically export the results?

ghorrocks January 15, 2018 16:31

Use the command line tools. I think the command line you are look for is "cfx5mondata" or something like that.

vijayadityah January 15, 2018 16:44

Hi Glenn,

Thanks for the reply. I have looked into it. However, I am running on RSM and a cluster. As there are more than 100 jobs it would be helpful if it is possible to automatically export the data.

ghorrocks January 15, 2018 16:57

If you want to do it automatically without thinking then use the parametric capabilities in ANSYS workbench. But it will be hard to get the last 20 iteration worth of values out in Workbench, it is easy to get it to automatically give results from the final iteration.

If you want the last 20 iteration worth of results I would do it using the command line as I suggested. If you have a large number of simulations then you can script it in a batch file (windows) or shell script (linux).

vijayadityah January 15, 2018 17:20

Quote:

Originally Posted by ghorrocks (Post 678223)
If you want the last 20 iteration worth of results I would do it using the command line as I suggested. If you have a large number of simulations then you can script it in a batch file (windows) or shell script (linux).

There is an option in CFX-Pre (using ANSYS 18.2) where I can mention the last number of iterations that I need to monitor different values (avg, std.dev). Now that I think of it, is there any way that I can make the monitor point values as an output parameter?

ghorrocks January 15, 2018 17:51

Yes, you just set them as a parameter and it will be visible in workbench. Have a look at the workbench tutorials for how to do this. This is not the CFX tutorials, workbench has its own tutorials on the use of parameters.


All times are GMT -4. The time now is 10:52.