|
[Sponsors] |
April 28, 2020, 22:19 |
Volume sampling on the run
|
#1 |
Member
Join Date: May 2017
Posts: 41
Rep Power: 8 |
Hi,
is there any OpenFOAM function object similar to surfaceSampling but for the volume? I want to sample a volume region or the whole domain on the run. I don't want to do the reconstruction as it's time-consuming and I am only interested in a small region near the outlet. thanks in advance, Ryan Last edited by Ryan.; April 28, 2020 at 22:19. Reason: volume sampling, runtime sampling, VTK, Openfoam |
|
April 30, 2020, 10:34 |
|
#2 |
Senior Member
|
Hi,
I am not sure what you exactly want to do, but maybe the volFieldValue functionObject is of help? It uses a volRegion for doing some stuff. This means you would need a cellSet or cellZone and then probably you need to specify whatever you need in the volFieldValue part. I am not sure what the limitations are. Maybe you can make a small case to experiment on. Good luck, Tom |
|
May 4, 2020, 02:44 |
|
#3 |
Senior Member
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 11 |
Maybe you can try this:
https://github.com/StachuraMichal/Op...sampleCellZone
__________________
https://openfoam.top |
|
May 6, 2020, 19:02 |
|
#4 | |
Member
Join Date: May 2017
Posts: 41
Rep Power: 8 |
Quote:
|
||
January 31, 2022, 10:39 |
|
#5 |
Senior Member
Lukas Fischer
Join Date: May 2018
Location: Germany, Munich
Posts: 117
Rep Power: 7 |
Hi Ryan,
have you found a solution to sample volumes and to visualize those with paraview? Happy for any help. Lukas |
|
January 31, 2022, 18:02 |
|
#6 | |
Member
Al Csc
Join Date: Jul 2018
Posts: 30
Rep Power: 7 |
Quote:
Code:
functions { type sets; libs (sampling); log on; enabled true; writeControl timeStep; writeInterval 1; setFormat raw; //or vtk for Paraview interpolationScheme cell; fields ( U ); sets ( centres { type cellCentre; bounds (0 0 0) (0.1 0.1 0.1); } ); } Paste it at the end of your controlDict and adjust it for your case. Cheers! |
||
February 2, 2022, 09:21 |
|
#7 | |
Senior Member
Lukas Fischer
Join Date: May 2018
Location: Germany, Munich
Posts: 117
Rep Power: 7 |
Quote:
thank you. I works. However, when I want to visualize the .vtk files with ParaView I do not like the way the file is displayed. Somehow, it only consists out of points. Hence, I prefer this way: Code:
volFieldValue1 { type volFieldValue; libs ("libfieldFunctionObjects.so"); log false; //true; writeControl adjustableRunTime; writeFormat ascii; //binary; writeInterval 1e-5; writeFields true;//writes the fields of the volume //timeStart 0; //timeEnd 1000; regionType cellSet; //cellZone; name box; // box is the cellSet or cellZone defined by the topoSetDict operation none; fields ( U T p ); } One receives a file in postProcessing/volFieldValue1 which is not important. The volume field is directly written to the time directories or time directories of the processor0. In this directory I run this command. Code:
foamToVTK -cellSet box -useTimeName -excludePatches '(".*")' -noFaceZones Moreover, I source a non ESI openfoam Version for the foamToVTK command because this way the "-useTimeName" is available which I prefer. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SU2-7.0.1 on ubuntu 18.04 | hyunko | SU2 Installation | 7 | March 16, 2020 04:37 |
surface sampling during simulation run | moh-farmani | OpenFOAM Programming & Development | 1 | July 18, 2016 02:19 |
Stuck in a Rut- interDyMFoam! | xoitx | OpenFOAM Running, Solving & CFD | 14 | March 25, 2016 07:09 |
[Commercial meshers] CuBit | t42 | OpenFOAM Meshing & Mesh Conversion | 6 | July 10, 2008 07:51 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 14:00 |