CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

OF2006 Surface sampling problem : VTP to VTK format

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By olesen
  • 1 Post By frantov

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 20, 2021, 12:34
Smile OF2006 Surface sampling problem : VTP to VTK format
  #1
Senior Member
 
alainislas's Avatar
 
Alain Islas
Join Date: Nov 2019
Location: Mexico
Posts: 142
Rep Power: 7
alainislas is on a distinguished road
Hello ,



I am using OF2006 release and I want to sample surface data for post-porcessing. Here is my file:



Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2006                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
 
surfaces
{
    type        surfaces;
    libs        (sampling);
    writeControl    timeStep;
    writeInterval    10;

    surfaceFormat    vtk;
    fields       (p U T k epsilon);

    surfaces
    {

        zNormal
        {
            type    cuttingPlane;
            planeType    pointAndNormal;
            pointAndNormalDict
            
            {
                point    (0 0.126 0); // Overrides default basePoint (0 0 0)
                normal       (0 0 1);      // $z: macro for (0 0 1)
                
                interpolate        true;
            }
            
        }


    }
}
Somehow while running the case, the surface files are saved as .vtp and not as .vtk. When I open paraview, I can't read these files. (Also the time doesn't seem to be included). Does anyone know how to overcome this?
alainislas is offline   Reply With Quote

Old   February 9, 2021, 15:39
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by alainislas View Post
Hello ,



I am using OF2006 release and I want to sample surface data for post-porcessing. Here is my file:



Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2006                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
 
surfaces
{
    type        surfaces;
    libs        (sampling);
    writeControl    timeStep;
    writeInterval    10;

    surfaceFormat    vtk;
    fields       (p U T k epsilon);

    surfaces
    {

        zNormal
        {
            type    cuttingPlane;
            planeType    pointAndNormal;
            pointAndNormalDict
            
            {
                point    (0 0.126 0); // Overrides default basePoint (0 0 0)
                normal       (0 0 1);      // $z: macro for (0 0 1)
                
                interpolate        true;
            }
            
        }


    }
}
Somehow while running the case, the surface files are saved as .vtp and not as .vtk. When I open paraview, I can't read these files. (Also the time doesn't seem to be included). Does anyone know how to overcome this?
This is a feature, not a bug. What you are looking for are the additional format options. Eg,
Code:
formatOptions
{
    vtk
    {
        legacy true;
        // format ascii;
    } 
}
Kraneberger likes this.
olesen is offline   Reply With Quote

Old   February 9, 2021, 15:40
Default
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
If they still cannot be read, it could actually be a bug. Would be useful to know if it is broken in v2012.
olesen is offline   Reply With Quote

Old   March 2, 2022, 02:27
Default
  #4
Member
 
Francisco T
Join Date: Nov 2011
Location: Melbourne, Australia
Posts: 64
Blog Entries: 1
Rep Power: 15
frantov is on a distinguished road
You can also type in the terminal (or save it on an AllRun file)


foamToVTK -legacy


this will save it as vtk instead of vtp
alainislas likes this.
frantov is offline   Reply With Quote

Reply

Tags
paraview 4.2, vtk files


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
[Gmsh] gmshToFoam generates patches with 0 faces and 0 points Simurgh OpenFOAM Meshing & Mesh Conversion 4 August 25, 2023 08:58
OpenFOAM error Vinay Kumar V Main CFD Forum 0 February 20, 2020 10:17
[General] Paraview data format conversion from vtk to parallel prog data format. odho ParaView 0 September 20, 2016 08:01
Problem with surface monitor position jf90cl FLUENT 0 April 28, 2016 12:41
[ICEM] Automatic mesh generation script surface intersection problem stuart23 ANSYS Meshing & Geometry 0 May 13, 2011 02:10


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