|
[Sponsors] |
August 26, 2022, 10:39 |
Extract custom surface for postprocessing
|
#1 |
New Member
Ricardo Puente
Join Date: Nov 2020
Posts: 4
Rep Power: 6 |
I want to generate some surfaces for extracting flow field values from an OpenFOAM simulation. These surfaces are not boundaries of the domain.
In my specific case they should be a revolution surface defined by a line of which I know the x-r coordinates in a cylindric coordinate system. My first thought was to generate such a surface with paraview and extract it as a vtk, as its possible in other postprocessing software packages like Ensight and CFXPost, but it seems that is not possible. I am currently trying to generate an internalCloud to sample those points, whose coordinates I can compute elsewhere, but I can´t seem to find documentation describing the generation of the relevant dictionary files. The attempts I´ve tried have not been successful, for example: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object sampleDictUpstreamPlane; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // libs ( "libsampling.so" ); type internalCloud; // Name of the directory for probe data name upstreamPlane; // Fields to be probed fields ( p U k); probeLocations ( (x1 y1 z1) ... (xN yN zN) ); // ***** // But even if this worked, I understand it would write a sample per time step, which I do not want. I only need the data for the final iteration, and the rest would only use up disk space. I am fairly new to OpenFOAM, so I´m not sure if the -postProcessing function could be of help here by calling it at the end of the simulation copying these dictionary files from a place not visible to OpenFOAM during the simulation. Could anyone help with this internalCloud business or suggest an alternative way to achieve this that I´m missing? Thanks |
|
August 29, 2022, 08:59 |
|
#2 |
New Member
Ricardo Puente
Join Date: Nov 2020
Posts: 4
Rep Power: 6 |
Finally solved it with sets. I leave the solution in case it´s useful to anyone:
FoamFile { version 2.0; format ascii; class dictionary; object sampleDictSurfs; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // libs ( "libsampling.so" ); type sets; writeControl onEnd; interpolationScheme cellPoint; setFormat csv; // Name of the directory for probe data name planes; // Fields to be probed fields ( p U k); sets ( planeName { type cloud; axis xyz; points ((x1 y1 z1)....(x1 y1 z1)); } ); // ************************************************** ********************* // |
|
Tags |
internal field, internalcloud, paraview, post processing |
|
|
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 |
[snappyHexMesh] surface feature extract fatal error | Typ | OpenFOAM Meshing & Mesh Conversion | 0 | July 21, 2020 17:32 |
[snappyHexMesh] Surface triangulation using snappyHexMesh | shaileshbg | OpenFOAM Meshing & Mesh Conversion | 4 | October 17, 2019 05:42 |
Heat Transfer - how to use a surface as custom control? | Eike | STAR-CCM+ | 3 | November 24, 2016 12:42 |
[waves2Foam] waveNGauges for extract surface elevation affected forces? | hchen | OpenFOAM Community Contributions | 6 | June 18, 2015 03:48 |