iteration in marco-Tecplot

tecplot

key codes

# set k as a variable,  3 iteration starts at 7
$!VarSet |k|=6
$!LOOP 3
$!VarSet |k|+=1
   $!ReadDataSet  '"STANDARDSYNTAX" "1.0" "FILELIST_Files" "2" "C:\Users\JAli_\Documents\CFD\Post\tecplot\modules\airfoil\naca_m16-1-0000|k|.cas.gz"
   $!EXPORTSETUP EXPORTFNAME = "C:\Users\JAli_\Documents\CFD\Post\tecplot\modules\airfoil\fig_|k|.png"
$!ENDLOOP

 

test code

#!MC 1410
# set k as a variable,  3 loops
$!VarSet |k|=6
$!LOOP 3
$!VarSet |k|+=1
    $!ReadDataSet  '"STANDARDSYNTAX" "1.0" "FILELIST_Files" "2" "C:\Users\JAli_\Documents\CFD\Post\tecplot\modules\airfoil\naca_m16-1-0000|k|.cas.gz" "C:\Users\JAli_\Documents\CFD\Post\tecplot\modules\airfoil\naca_m16-1-0000|k|.dat.gz" "LoadOption" "MultipleCaseAndData" "UnsteadyOption" "ReadTimeFromDataFiles" "AssignStrandIDs" "Yes" "LoadAdditionalQuantities" "Yes" "SaveUncompressedFiles" "No"'
  DataSetReader = 'Fluent Data Loader'
    $!View Zoom
      X1 = -1.22279014651
      Y1 = -2.64151304399
      X2 = 4.58060906049
      Y2 = 2.83339186826
    $!SetContourVar 
      Var = 3
      ContourGroup = 1
      LevelInitMode = ResetToNice
    $!FieldLayers ShowContour = Yes
    $!EXPORTSETUP EXPORTFORMAT = PNG
    $!EXPORTSETUP EXPORTFNAME = "C:\Users\JAli_\Documents\CFD\Post\tecplot\modules\airfoil\fig_|k|.png"
    $!EXPORT
$!ENDLOOP

 

outputs

fig_7.png, fig_8.png,fig_9.png,

 

posted @ 2020-09-02 18:31  kaiming_ai  阅读(158)  评论(0编辑  收藏  举报