|December 28, 2015, 16:19||
Modifying CFD-Post macro to output a time-varying expression at every timestep
Join Date: Dec 2015
Posts: 1Rep Power: 0
I am running a TBR case whose solution file contains multiple timesteps, similar to a conventional true transient simulation.
I want to output an expression that varies with time at every timestep. What I've attempted so far:
1) record a session where I load timestep=0, create a table ("Table 1"), in field A1 enter the current time ("Time"), in B1 enter the time-varying expression ("modalF" in the following text), save the table to a .csv file;
2) stop recording and modify the .cse file into a macro and impose a for loop on the timestep;
3) load the macro (pasted in the end of the thread).
This doesn't really work. The .csv file I got after running the macro has only one row with "Time" and "modalF" at the timstep=1 recorded at the first and second column.
I'm guessing my syntax on the table fields ("A$i" and "B$i") might be wrong, but I don't know what the correct syntax is or how to fix it.
Can somebody more experienced in CFD-Post macros please help? Thank you!!
# Session file started: 2015/12/28 14:23:18
# CFX-17.0 build 2015.09.01-23.36-134860
# To avoid unnecessary file pre-processing and modifications, include
# COMMAND FILE at the top of your session file.
# If it is not included, the file is assumed to be older and will be
# modified for backward compatibility.
CFX Post Version = 17.0
CASE: Case trnExactTT_s1r2_02_timestep60_noHarFor_005
Current Timestep = 0
Timestep Sampling = Uniform
Number of Timesteps = 240
!$start = 1;
!$finish = 5;
> load timestep=$i
A$i = "=Time", False, False, False, Left, True, 0, Font Name, 1|1, %13.7e,\
True, ffffff, 000000, True
B$i = "=modalF", False, False, False, Left, True, 0, Font Name, 1|1, \
%13.7e, True, ffffff, 000000, True
Export Table Only = True
Table Export HTML Title =
Table Export HTML Caption Position = Bottom
Table Export HTML Caption =
Table Export HTML Border Width = 1
Table Export HTML Cell Padding = 5
Table Export HTML Cell Spacing = 1
Table Export Lines = All
Table Export Trailing Separators = True
Table Export Separator = Tab
>table save=N:/tmp_cfx_projects/test.csv, \
# Session file stopped: 2015/12/28 14:24:10
|Thread||Thread Starter||Forum||Replies||Last Post|
|outputTime in Swak function||immortality||OpenFOAM Post-Processing||16||February 14, 2016 17:02|
|Moving mesh||Niklas Wikstrom (Wikstrom)||OpenFOAM Running, Solving & CFD||122||June 15, 2014 06:20|
|High Courant Number @ icoFoam||Artex85||OpenFOAM Running, Solving & CFD||9||January 3, 2012 09:06|
|Could anybody help me see this error and give help||liugx212||OpenFOAM Running, Solving & CFD||3||January 4, 2006 19:07|
|Where do we go from here? CFD in 2001||John C. Chien||Main CFD Forum||36||January 24, 2001 22:10|