|
[Sponsors] |
August 28, 2024, 19:07 |
Obtain monitor points in real time
|
#1 |
New Member
Join Date: Aug 2024
Posts: 8
Rep Power: 2 |
Hello everyone
I am trying to obtain the values in my monitor points for each time step in real time, i am aware that with the "export plot coordinates" function i am able to store those values on a csv file, but this just works when the simulation ends, but what i am wondering is, if it is possible to obtain those values maybe with a python script to obtain thoose values by each time step in real time |
|
August 28, 2024, 19:50 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
Yes, this can be done:
CFX usually runs in a temporary directory. You will need to find the temp directory. Then use the "cfx5mondata" command line to extract the data being plotted in Solver Manager. This works during a run as well.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 28, 2024, 20:00 |
|
#3 |
New Member
Join Date: Aug 2024
Posts: 8
Rep Power: 2 |
thank you for answering,
yes i've been monitoring the temporary directory but i am not sure how should i use the cfx5mondata, hope you can help me |
|
August 28, 2024, 20:03 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
Try "cfx5mondata -help" or search for it in the CFX documentation.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 28, 2024, 22:17 |
|
#5 |
New Member
Join Date: Aug 2024
Posts: 8
Rep Power: 2 |
thank you, but my question is where should i use said command, does cfx has a integrated terminal?, or should i open a windows terminal from the directory where i have my simulation?
|
|
August 29, 2024, 01:14 |
|
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
Yes, CFX has an integrated command line which sets up all the paths and everything to make the CFX command line tools work. From the CFX Launcher go Tools/Command Line.
You cannot access this from Workbench. You need the CFX Launcher.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 29, 2024, 06:00 |
|
#7 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,913
Rep Power: 28 |
Wouldn't it be enough for you to plot the real time in the solver manager instead of the confusing Accumlated Time Step?
You can do this using: 1. press <crtl> w 2. Global Plot Settings 3. Select Plot Data By "Simulation Time", instead of default "Time Step". |
|
August 29, 2024, 12:51 |
|
#8 |
New Member
Join Date: Aug 2024
Posts: 8
Rep Power: 2 |
i couldn't open the terminal on cfx but no problem because i could do it with my windows cmd, and use the cfx5mondata -help command, and as i read the information given, i understood that its purpose is to obtain monitor data, but from the results.
What i want to know if its posible with cfx5mondata to obtain those monitor points for each time step for example in a txt file or with a python script and have them printed in the terminal but in real time, or if i am going to the wrong direction i tried evaluating with a python script the temporary "mon" file that gets created and deleted in the temporal directory but the information was basically coordinates that i dont need, what i need is the values of each time step Hope you can help me, thank you! |
|
August 29, 2024, 16:19 |
|
#9 | |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
Quote:
Every column is a value in a row, and names are listed upfront.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
||
August 29, 2024, 16:33 |
|
#10 | |
New Member
Join Date: Aug 2024
Posts: 8
Rep Power: 2 |
Quote:
the information in the picture is what i obtain from the mon file, that is just a part of its content but its basically that structure, so i would like to now of which file you are referring to because i dont see the structure you mention on my mon file Thank you! |
||
August 29, 2024, 17:04 |
|
#11 |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
That is the header of the file, the data is appended as the run progresses.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 29, 2024, 23:26 |
|
#12 |
New Member
Join Date: Aug 2024
Posts: 8
Rep Power: 2 |
||
August 30, 2024, 11:31 |
|
#13 | |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
Quote:
That file MUST contain everything for the Ansys CFX Solver Manager Once you have seen a complete file, you can decide what to do during the simulation.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
||
August 30, 2024, 12:33 |
|
#14 | |
New Member
Join Date: Aug 2024
Posts: 8
Rep Power: 2 |
Quote:
Yes thats what i am doing, basically my python script uses a library called watch dog that monitores files, and in this script i am monitoring if the mon file changes and capture its changes, and as i showed on a previous image the only data that i get from the mon file are those kind of coordinates, but those arent the values of my monitor points. What i would like to obtain are the values that i show you on this image, that i know i can obtain in run time with the "export plot coordinates" function, but i want to obtain them as they get calculated, not to be clicking on the export plot coordinates function a lot of times |
||
August 30, 2024, 13:27 |
|
#15 |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
cfx5mondata -res MyResults.res > MyMonFile
That file contains everything. If yours does not, you have set something out of the normal for your simulation.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 30, 2024, 13:42 |
|
#16 | |
New Member
Join Date: Aug 2024
Posts: 8
Rep Power: 2 |
Quote:
I was wondering if thats posible in some way Thank you!! |
||
August 30, 2024, 14:09 |
|
#17 |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
You are not reading, and you seem stuck in your ways.
First, you need to understand the format. Then, you figure out why the file does not look as you expect, and the why. You are jumping into "I know better, something else wrong".
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 30, 2024, 21:02 |
|
#18 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
To get the data from a completed run:
cfx5mondata -res MyResults.res > MyMonFile To get the data from a run currently underway: cfx5mondata -res .tempdir_name > MyMonFile
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
Tags |
cfx, monitor point, real time |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[General] Extracting ParaView Data into Python Arrays | Jeffzda | ParaView | 30 | November 6, 2023 22:00 |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
LES, Courant Number, Crash, Sudden | Alhasan | OpenFOAM Running, Solving & CFD | 5 | November 22, 2019 03:05 |
How to export time series of variables for one point? | mary mor | OpenFOAM Post-Processing | 8 | July 19, 2017 11:54 |
pressure in incompressible solvers e.g. simpleFoam | chrizzl | OpenFOAM Running, Solving & CFD | 13 | March 28, 2017 06:49 |