|
[Sponsors] |
Modifying Session Files for CFD Post processing |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 1, 2012, 18:01 |
Modifying Session Files for CFD Post processing
|
#1 |
Senior Member
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 166
Rep Power: 14 |
Hi all,
I have only recently started to learn about CFD Post Session features and I managed to record actions in the following sequence - 1 Create a longitudinal, stream-wise plane. 2 Create a contour of stream-wise velocity for the selected time step, which I manually selected from the instance selection menu. (I have 50 time steps now just to understand the process) 3 Save the image into the directory. The main limitation of this is that everytime I want to replicate this sequence for each time step I have to manually select it. The file name also remains static and this causes previous images to simply be replaced with the new file in the same directory. Hence, I am currently making 50 folders (50 time-steps) and just altering the 'time-step' value at the top of the Session file re-running the sequence of actions. Is it possible to edit the session script so that all the time steps are automatically incremented and the images are saved with the respective time steps in the title? This will save me A LOT of time and I would really appreciate the help. Thank you |
|
November 1, 2012, 19:45 |
|
#2 | |
Senior Member
Join Date: Dec 2009
Posts: 131
Rep Power: 19 |
add some perl code in the cse to handle this.
Check the documentation on how to implement perl in your cse, ccl language. This is very powerful. Have fun. quick snippet Code:
! @steplist = ( 31..157, 159, 160, 161 ); ! foreach $curstep (@steplist) { > load timestep=$curstep ! ($solverstep, $units) = evaluate( "Accumulated Time Step" ); DO SOME STUFF ! } If you are using a TEXT feature, you can add the Expression "Accumulated Time Step" and this will change as the timesteps are loaded. Quote:
|
||
November 1, 2012, 21:48 |
|
#3 |
Senior Member
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 166
Rep Power: 14 |
Thanks so much for that informative post.
I have no experience with Perl language however, I know some basics of C and MATLAB. I will try to implement these ideas perhaps, with the aid of a friend and you report back on progress. At the very least, the current session file I created saves me about 50-60 separate mouse actions and this will hopefully save some significant time. This is OK for the preliminary stages however, when I switch to a fully transient study with a LES I will definitely need to try and implement automated capturing, hard-copy saving and appending of filenames. Does anyone else have any similar experiences or encounters they can share? |
|
November 2, 2012, 08:44 |
|
#4 |
Senior Member
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 166
Rep Power: 14 |
Code:
! @steplist = ( 31..157, 159, 160, 161 ); ! foreach $curstep (@steplist) { > load timestep=$curstep ! ($solverstep, $units) = evaluate( "Accumulated Time Step" ); DO SOME STUFF ! } This was implemented within your code snippet and I found that the time steps were actually being loaded iteratively as the for loop suggests. This is a very positive result. I verified the functionality by choosing time step 5 and then when the session is played back it reverts to the array {1,2} as documented in the session script. Thank you so much for your assistance. Now I will need to try and implement a feature which appends file names with the "Accumulated Time Step" which hasn't been successful yet. I have attached my current script. I welcome any suggestions and feedback. |
|
November 2, 2012, 12:11 |
|
#5 |
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 511
Rep Power: 21 |
Something like below? I havent checked it, so you will have to debug exact details.
# Load a transient file and read the time step list > load filename=myFile.res !$timestepList = getValue("DATA READER", "Timestep List"); !@timesteps = split(/, /, $timestepList ); ! foreach $ts ( @timesteps ) { > load timestep=$ts !$c="P".$ts."B.csv"; ! open(FH,">$c"); ! $val = ave("Pressure", "Point 1"); ! $time = getValue( "DATA READER", "Current Timevalue"); ! print FH "$ts $time $val\n"; !close FH; !} |
|
November 4, 2012, 22:17 |
|
#6 |
Senior Member
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 166
Rep Power: 14 |
I haven't had the chance to try this yet. I will implement this as soon as I can and report back on progress.
Thanks for your help Singer. |
|
November 11, 2012, 05:46 |
|
#7 |
Senior Member
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 166
Rep Power: 14 |
Thanks for you help so far everyone.
I have recently extracted some data from the flow domain I am analysing and I am finding it a little difficult to interpret the results. Please refer to the attached images including the line locations which were used for the profile data and I would really appreciate if someone is able to clarify the following areas of confusion for me - - The standard SST model which is present in Fluent is following Menter's formulation and is applicable in this case since the wall-y+ values are low enough. Hence, I assume that the blending feature is being used to resolve the free-stream and the near-wall region. - Exact same meshes were used for both simulation cases and all settings are identical except the low-Re correction. Why is Wall-y+ values are significantly higher for the low-Re model? - Is is reasonable to try and assess the length of the recirculation region and the point of reattachment from the 0 wall shear stress? I imagine that the shear stress values are dependent on the skin-friction coefficient, which is based on the vel. magnitudes. What could be an explanation for the variation between the two models here? A little off-topic from the session files however, I didn't necessarily think this required a new thread. Thanks for your guidance. Last edited by Crank-Shaft; November 11, 2012 at 07:00. Reason: Attachments included |
|
Tags |
cfd-post, cfx, fluent 14, post procesing, timestep cfx post, timestep selection cfx, unsteady flow |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Post Processing Transient Data | chrisoturner | FLUENT | 2 | August 18, 2017 03:53 |
CFX Post: .trn files bunching? | user_of_cfx | CFX | 9 | December 3, 2015 05:48 |
post processing field average in cht | moritzhoefert | OpenFOAM Pre-Processing | 0 | January 11, 2012 11:41 |
Ansys Post processing | ano999 | ANSYS | 1 | May 27, 2011 17:24 |
post processing in CFD | MANISH BHARGAVA | Main CFD Forum | 0 | October 17, 1998 21:51 |