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

Extract custom surface for postprocessing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2022, 09:39
Default Extract custom surface for postprocessing
  #1
New Member
 
Ricardo Puente
Join Date: Nov 2020
Posts: 4
Rep Power: 5
rpuenter is on a distinguished road
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
rpuenter is offline   Reply With Quote

Old   August 29, 2022, 07:59
Default
  #2
New Member
 
Ricardo Puente
Join Date: Nov 2020
Posts: 4
Rep Power: 5
rpuenter is on a distinguished road
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));

}


);

// ************************************************** ********************* //
rpuenter is offline   Reply With Quote

Reply

Tags
internal field, internalcloud, paraview, post processing


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 07:58
[snappyHexMesh] surface feature extract fatal error Typ OpenFOAM Meshing & Mesh Conversion 0 July 21, 2020 16:32
[snappyHexMesh] Surface triangulation using snappyHexMesh shaileshbg OpenFOAM Meshing & Mesh Conversion 4 October 17, 2019 04:42
Heat Transfer - how to use a surface as custom control? Eike STAR-CCM+ 3 November 24, 2016 11:42
[waves2Foam] waveNGauges for extract surface elevation affected forces? hchen OpenFOAM Community Contributions 6 June 18, 2015 02:48


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