CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Obtain monitor points in real time

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Gert-Jan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 28, 2024, 19:07
Default Obtain monitor points in real time
  #1
mfb
New Member
 
Join Date: Aug 2024
Posts: 8
Rep Power: 2
mfb is on a distinguished road
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
Attached Images
File Type: png image.png (31.5 KB, 11 views)
mfb is offline   Reply With Quote

Old   August 28, 2024, 19:50
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   August 28, 2024, 20:00
Default
  #3
mfb
New Member
 
Join Date: Aug 2024
Posts: 8
Rep Power: 2
mfb is on a distinguished road
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
mfb is offline   Reply With Quote

Old   August 28, 2024, 20:03
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   August 28, 2024, 22:17
Default
  #5
mfb
New Member
 
Join Date: Aug 2024
Posts: 8
Rep Power: 2
mfb is on a distinguished road
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?
mfb is offline   Reply With Quote

Old   August 29, 2024, 01:14
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   August 29, 2024, 06:00
Default
  #7
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,929
Rep Power: 28
Gert-Jan will become famous soon enough
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".
Opaque likes this.
Gert-Jan is offline   Reply With Quote

Old   August 29, 2024, 12:51
Default
  #8
mfb
New Member
 
Join Date: Aug 2024
Posts: 8
Rep Power: 2
mfb is on a distinguished road
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!
mfb is offline   Reply With Quote

Old   August 29, 2024, 16:19
Default
  #9
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
Quote:
Originally Posted by mfb View Post
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!
Everything you see in the SolverManager is in the monitor (mon) file in the running directory.
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.
Opaque is offline   Reply With Quote

Old   August 29, 2024, 16:33
Default
  #10
mfb
New Member
 
Join Date: Aug 2024
Posts: 8
Rep Power: 2
mfb is on a distinguished road
Quote:
Originally Posted by Opaque View Post
Everything you see in the SolverManager is in the monitor (mon) file in the running directory.
Every column is a value in a row, and names are listed upfront.

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!
Attached Images
File Type: png image (3).png (85.2 KB, 7 views)
mfb is offline   Reply With Quote

Old   August 29, 2024, 17:04
Default
  #11
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
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.
Opaque is offline   Reply With Quote

Old   August 29, 2024, 23:26
Default
  #12
mfb
New Member
 
Join Date: Aug 2024
Posts: 8
Rep Power: 2
mfb is on a distinguished road
Quote:
Originally Posted by Opaque View Post
That is the header of the file, the data is appended as the run progresses.
i am not sure if its because my simulation is too small but that is the only content that i obtain from mon file, and i've run it multiple times
mfb is offline   Reply With Quote

Old   August 30, 2024, 11:31
Default
  #13
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
Quote:
Originally Posted by mfb View Post
i am not sure if its because my simulation is too small but that is the only content that i obtain from mon file, and i've run it multiple times
Once the simulation finishes. Extract the mon file information with the command explained earlier.

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.
Opaque is offline   Reply With Quote

Old   August 30, 2024, 12:33
Default
  #14
mfb
New Member
 
Join Date: Aug 2024
Posts: 8
Rep Power: 2
mfb is on a distinguished road
Quote:
Originally Posted by Opaque View Post
Once the simulation finishes. Extract the mon file information with the command explained earlier.

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.

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
Attached Images
File Type: png image (4).png (40.4 KB, 2 views)
mfb is offline   Reply With Quote

Old   August 30, 2024, 13:27
Default
  #15
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
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.
Opaque is offline   Reply With Quote

Old   August 30, 2024, 13:42
Default
  #16
mfb
New Member
 
Join Date: Aug 2024
Posts: 8
Rep Power: 2
mfb is on a distinguished road
Quote:
Originally Posted by Opaque View Post
cfx5mondata -res MyResults.res > MyMonFile

That file contains everything. If yours does not, you have set something out of the normal for your simulation.
thank you, but the problem is that said command uses the results, and what i need is the user points values in real time meaning while my simulation is running, not to wait until the simulation finishes and i get the results

I was wondering if thats posible in some way

Thank you!!
mfb is offline   Reply With Quote

Old   August 30, 2024, 14:09
Default
  #17
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
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.
Opaque is offline   Reply With Quote

Old   August 30, 2024, 21:02
Default
  #18
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Reply

Tags
cfx, monitor point, real time


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 04:21.