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

CFX Output control - writing *.res each X Timesteps

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree7Likes
  • 2 Post By Opaque
  • 1 Post By Lance
  • 1 Post By Chris13
  • 1 Post By hand90
  • 1 Post By Chris13
  • 1 Post By hand90

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2016, 09:31
Question CFX Output control - writing *.res each X Timesteps
  #1
New Member
 
Join Date: Nov 2016
Posts: 10
Rep Power: 10
knixxor is on a distinguished road
Hi guys,

Do any of you know if it's possible to setup the output control in order to get *.res files each X timesteps? I have been looking for this function for hours but I could not find anything :/

Thank you for any help.

Knixxor
knixxor is offline   Reply With Quote

Old   November 22, 2016, 09:59
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,927
Rep Power: 34
Opaque will become famous soon enough
Look into Output Control / Transient Results / Output Frequency for transient simulations,

Alternatively, for steady state you can setup backup files in Output Control / Backup Results / Output Frequency. Once of these backup files is created, the previous one is removed. That is not the case, if the backup file is created from the ANSYS CFX Solver Manager.

Hope the above helps
aero_head and smhk like this.
Opaque is offline   Reply With Quote

Old   November 22, 2016, 12:29
Default
  #3
New Member
 
Join Date: Nov 2016
Posts: 10
Rep Power: 10
knixxor is on a distinguished road
Hey, thank you. It's working quite well
knixxor is offline   Reply With Quote

Old   November 23, 2016, 06:13
Default
  #4
New Member
 
Chris
Join Date: Nov 2016
Location: Germany
Posts: 27
Rep Power: 10
Chris13 is on a distinguished road
Since I have a similar problem, I dare to post it in here rather than opening a new thread...

Is it possible to define the .trn files to be written for certain timesteps only?
I'm simulating 8 revolutions of a radial fan and I only need the transient results lets say for the last 2 revolutions.
I know that it's possible to write a comma separated list with the "Time Step List" option in the output tab but it would be really annoying to do so for 720 time steps... is there a more convenient method?

Thanks in advance
Chris13 is offline   Reply With Quote

Old   November 23, 2016, 11:04
Default
  #5
Senior Member
 
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 23
Lance is on a distinguished road
If you can define a CEL expression for when you want to export data you can set that instead of a comma separated list.
aero_head likes this.
Lance is offline   Reply With Quote

Old   November 23, 2016, 11:47
Default
  #6
New Member
 
Chris
Join Date: Nov 2016
Location: Germany
Posts: 27
Rep Power: 10
Chris13 is on a distinguished road
Ok, thank you for the hint.
I'm going to find out how this CEL expression should look like and give it a try.
Thank you!
Chris13 is offline   Reply With Quote

Old   January 9, 2019, 07:30
Default
  #7
Member
 
Thomas
Join Date: Nov 2017
Posts: 37
Rep Power: 10
hand90 is on a distinguished road
Hi Chris

I have a very similar problem to you where I only want to save certain time steps towards the end of my simulation. Did you manage to create a CEL expression? If so would you mind to share it?

Thank you very much
hand90 is offline   Reply With Quote

Old   January 9, 2019, 08:03
Default
  #8
New Member
 
Chris
Join Date: Nov 2016
Location: Germany
Posts: 27
Rep Power: 10
Chris13 is on a distinguished road
Hi,


I found a solution given by Ansys in their support section which is exactly what I needed.
If you have access to the customer portal you will find it as "How to write trn files only during specific timestep intervals".
I'm not sure whether I am allowed to directly post solutions coming from Ansys support so I won't at this point.


The basic way is to choose time step list as output frequency and then edit
"Output Control" by rightclick -> "Edit in Command Editor". Search for transient results and put in a Pearl for-loop. Click "Process" and check if it worked.



I hope this will put you in the right direction.
aero_head likes this.
Chris13 is offline   Reply With Quote

Old   February 18, 2021, 07:36
Default
  #9
Member
 
Ashkan Kashani
Join Date: Apr 2016
Posts: 46
Rep Power: 11
Ashkan Kashani is on a distinguished road
Hi,

This is exactly what I need; I'm doing a transient simulation of the flow past a cylinder, for which I only need to capture one period of the flow variation after reaching the quasi-steady state.
I tried to apply your solution but couldn't make it work (I'm not a pro user of CFX). So I'd really appreciate it if you elaborate on your solution and describe the steps you took in more details.

Regards,
Armin
Ashkan Kashani is offline   Reply With Quote

Old   February 18, 2021, 07:57
Default
  #10
Member
 
Thomas
Join Date: Nov 2017
Posts: 37
Rep Power: 10
hand90 is on a distinguished road
I am not sure if I understand you correct, but you want to save a result file at every timestep after reaching a quasi-steady state?

If this is the case, you first have to run your simulation until the quasi-steady state is reached. This can be checked through the use of Monitor Points looking at the variables of interest.

When you are sure that you have reached a statistical steady state, you can then restart the simulation (continue run). When you specify the run, you need to know for how long you want to run the simulation (one period). In the result section you then have to look at the tab: Transient results. I advice not to save all variables but only the ones you need.

Hope this helps
Ashkan Kashani likes this.
hand90 is offline   Reply With Quote

Old   February 18, 2021, 08:27
Default
  #11
New Member
 
Chris
Join Date: Nov 2016
Location: Germany
Posts: 27
Rep Power: 10
Chris13 is on a distinguished road
Basically, what hand90 descripes is the best way. If you want to do it the way I did, you have to know the exact time steps at which you want to export data beforehand - in the end it's just a semi-automated way to put in a time step list. So you might want to go for the explained solution.
Ashkan Kashani likes this.
Chris13 is offline   Reply With Quote

Old   February 18, 2021, 11:54
Default
  #12
Member
 
Thomas
Join Date: Nov 2017
Posts: 37
Rep Power: 10
hand90 is on a distinguished road
I assume you know how to run a Transient simulation (Analysis Type).
Under the tab "Solver", "Output Control" you can set everything with respect to results, monitoring points etc.
To check if you have a quasi-steady state let the transient simulation run on until the quantity of interest reaches a quasi-steady state or your satisfaction. For this you need to set monitors. Select the monitor tab, add a monitor, set its coordinate and the output variable list (variables to be monitored). These will be available in the solver Manager during the run.
When you are satisfied, you can then continue the run but save transient results. For this you need to select the Trn Results tab and add a new transient result output. Again select all variables of interest. I highly recommend only only to save what you need e.g. Pressure, Density and the Velocity as Temperature can be calculated afterwards. Note that if you need mean quantities, not the instantaneous values at each time step but the mean, you have to select the Trn Stats.

You should be able to find all this in the help manual of ANSYS CFX. I highly recommend spending a bit of time trying to understand it all and not just follow the instructions I gave you as I do not know what your end goal is.

Hope this helps.
Ashkan Kashani likes this.
hand90 is offline   Reply With Quote

Old   February 21, 2021, 21:45
Default
  #13
Member
 
Ashkan Kashani
Join Date: Apr 2016
Posts: 46
Rep Power: 11
Ashkan Kashani is on a distinguished road
Thank you for your comments.
I would also appreciate any comments on the following problem.
I need to calculate mean fields (e.g. pressure, velocity, vorticity), for which I select Trn Stats. However, what I get is not as expected; the calculated Trnavg variables differ from one time step to another, as opposed to being independent of simulation time. I'm really confused about what these Trnavg (Arithmetic average) variables actually represent and how the solver calculates them.
Ashkan Kashani is offline   Reply With Quote

Old   February 21, 2021, 22:32
Default
  #14
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 18,001
Rep Power: 146
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
That depends on how you defined the transient statistics. Please attach your CCL file (or output file).
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   February 22, 2021, 00:09
Default
  #15
Member
 
Ashkan Kashani
Join Date: Apr 2016
Posts: 46
Rep Power: 11
Ashkan Kashani is on a distinguished road
Thank you ghorrocks.
To clarify, in the figure attached, I've indicated the mathematical expression I need to calculate for, let's say, the velocity field U(x,y,z,t). I was expecting the 'Arithmetic average' in CFX-Pre to do this for me. However, as I already said, it doesn't seem to work as the 'Trnavg' fields do change in the transient results. For your consideration, also attached is the CCL file. I appreciate your taking the time to have a look.
Attached Images
File Type: png Capture.PNG (10.0 KB, 23 views)
Attached Files
File Type: txt My_case.txt (23.0 KB, 14 views)
Ashkan Kashani is offline   Reply With Quote

Old   February 22, 2021, 00:27
Default
  #16
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 18,001
Rep Power: 146
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
You have not defined a start time step, or a range of time steps so I suspect that the start of the averaging time will be time = 0. This means that every new time step will cause the transient average to move. Is this what you are seeing?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   February 22, 2021, 07:38
Default
  #17
Member
 
Ashkan Kashani
Join Date: Apr 2016
Posts: 46
Rep Power: 11
Ashkan Kashani is on a distinguished road
Thanks, ghorrocks.
As shown in the modified CCL code attached, I specified the following:
Start Iteration List = 5
Stop Iteration List = 10
and now the 'Trnavg Pressure' field does not vary in time anymore, as expected.
However, the 'Trnavg Pressure' field does not seem to correspond to the instantaneous 'Pressure' field. To better clarify this, I have created an animation of my results (including 20 time steps with increments of 0.1 s) where the instantaneous and the average pressure fields with a close view of a given cell showing the corresponding values are shown in the top and the bottom rows, respectively. Examining the results, I could not figure out how CFX has calculated the average value and with what time interval it is associated. I've uploaded the video here: https://drive.google.com/file/d/1lOA...ew?usp=sharing
Again, I appreciate your help so much.
Attached Files
File Type: txt My_case_modified.txt (681 Bytes, 22 views)
Ashkan Kashani is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How do I output phase-average measurement in cfx post? YaX CFX 2 November 11, 2016 02:08
CFX FSI Fatal Error unbanana CFX 0 October 3, 2015 06:57
Fundamental output format control of field values and time dbxmcf OpenFOAM 1 January 12, 2011 11:50
CFX doesn't continue calculation... mactech001 CFX 6 November 15, 2009 22:25
can "output control " output Nu in expression? prayskyer CFX 3 July 7, 2006 20:37


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