CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   vtkWrite fileName (https://www.cfd-online.com/Forums/openfoam-post-processing/221818-vtkwrite-filename.html)

yongxiang October 31, 2019 07:10

vtkWrite fileName
 
Hello OFers,


i am using the vtkWrite utility to write out part of the domain for postProcessing. It works, but the generated vtk file is assigned a name with number at end. In my case, I would prefer to identify the vtk file with time step. An expample is follows.



Re620eta1_Reference2D_00028984.vtk ( unrelevant number)

Re620eta1_Reference2D_1.1.vtk (prefered with time step 1.1s)


does anyone how to setup the vtkWrite file? My vtkwrite file is follows:


Code:


subset
{
    type    vtkWrite;
    libs    ("libutilityFunctionObjects.so");
    log    true;

    boundary    false;

    interpolate true;
    directory      "VTK1";
    // Fields to output (words or regex)
    fields      (U_TS);

    //- Write cell ids as field - Default=true
    writeIds    false;
    legacy  true;
    //- Write more frequent than fields
    writeControl    runTime;
    writeInterval  0.1;
   
    useTimeName true;  // does not work! This works with foamToVtk, but not working in runtime vtk write utility
    // Region of interest
    selection
    {

        DMDregion
        {
            action  add;
            source  box;
            box    (-0.1 0 -0.01) (1.95 0.1 0.01);
        }

    }
}



All times are GMT -4. The time now is 02:22.