|
[Sponsors] |
July 5, 2012, 07:47 |
post processing on a specified surface
|
#1 |
New Member
Matteo Longoni
Join Date: Jul 2011
Location: Monza
Posts: 3
Rep Power: 15 |
Hi,
I was wondering if anybody knows how to generate fields output (p,U,k) on surfaces that do not belong to boundaries, from a 3D simpleFoam calculation. I'm thinking on something like the cuttingPlane post processing function, but restricted to a user defined surface, someway given. I had a look at sampleDict and sampleSurfaceDict, but I couldn't manage to make them work. Matteo |
|
July 7, 2012, 06:12 |
sample on a surface
|
#2 |
Member
|
Hi Matteo
that is actually easily done. You will need a STL-File of your surface. Put that in the directory: "constant/trisurface/" Then create a "sampleDict"-File in the "system/" folder e.g. like the one below. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object sampleDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // setFormat raw; surfaceFormat vtk; interpolationScheme cellPoint; // Fields to sample. fields ( p U ); surfaces ( triSurfaceSampling { // Sampling on triSurface type sampledTriSurfaceMesh; surface YOURSURFACE.stl; source boundaryFaces; // sample cells or boundaryFaces interpolate true; } ); // *********************************************************************** // change "YOURSURFACE.stl" to the name of your surface. Finally put the fields of interest under "fields to sample". In the example I was interested in U (velocity) and p (pressure). You can then create that field after (!) you ran the simulation. Make sure the case is reconstructed if you use parallel processing. Then use the following for a surfacefield of the last computed timestep: Code:
sample -latestTime Hope that helps! Greetings, Jan
__________________
~~~_/)~~~ |
|
July 9, 2012, 04:15 |
|
#3 |
New Member
Matteo Longoni
Join Date: Jul 2011
Location: Monza
Posts: 3
Rep Power: 15 |
Thanks Jan for your detailed reply,
it worked perfectly. Cheers, Matteo |
|
November 12, 2012, 04:45 |
|
#4 |
New Member
Falko Kunze
Join Date: Nov 2012
Location: Dahlum, Germany
Posts: 3
Rep Power: 14 |
Hi Jan,
I tried your advice. It works very well. But I´ve one more question. First my sampleDict looks like yours. So I get in /surfaces two files with the results of my stl. But I want the results averaged over the face and not for every cell. How does that work? Greets |
|
November 12, 2012, 07:41 |
|
#5 |
Member
|
Hi Falko,
have a look at Bernhard post in this thread: http://www.cfd-online.com/Forums/ope...gnitude-u.html Instead of the built-in functions, you'll have to use swak4foam. But thats almost as easily done! G Jan
__________________
~~~_/)~~~ |
|
November 13, 2012, 04:22 |
|
#6 |
New Member
Falko Kunze
Join Date: Nov 2012
Location: Dahlum, Germany
Posts: 3
Rep Power: 14 |
Hi Jan,
thanks for your answer. But I can´t use swak4foam because I´m not allowed to install something. So I´ve to use the standard options. Greets |
|
November 13, 2012, 17:44 |
|
#7 |
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 17 |
you can use http://www.openfoam.org/version2.0.0...me-control.php
See the controlDict in tutorials/incompressible/pisoFoam/les/pitzDaily/system You will find a bunch of stuff you can do without swak Also see this: http://openfoamwiki.net/index.php/Ca...nction_Objects |
|
May 1, 2013, 14:46 |
sampleDict interpolates solution at STL, how to minimize interpolation errors?
|
#8 |
Senior Member
Jose Rey
Join Date: Oct 2012
Posts: 134
Rep Power: 18 |
Hi Jan, thank you very much for your recipe. I generated planes with paraview (changing the resolution, applying the triangulate filter, and saving as STL-text). Then, I used your recipe, works wonderfully. I had more than one STL surface, and for some reason, the cells interpolation was better than boundaryFaces.
However, the interpolation by the sample postprocessing utility is not that clean. To overcome this, I tried adding the same STL files to my snappyHexMeshDict as refinementSurfaces but simpleFoam expects a patch and gives me an error. The best I could do was to use the STLs as refinementRegions with the type distance option to get a bit better resolution in the area; in other words: Is there a way to get snappyHexMesh to generate mesh vertices at the STL edges/cells, so that interpolation is minimal and results have less errors? sampleDict: Code:
. . . surfaces ( mySurface1 { // Sampling on triSurface type sampledTriSurfaceMesh; surface mySurface1.stl; source cells; // sample cells or boundaryFaces interpolate true; } mySurface2 { // Sampling on triSurface type sampledTriSurfaceMesh; surface mySurface2.stl; source cells; // sample cells or boundaryFaces interpolate true; } . . . ); . . . |
|
July 15, 2019, 10:42 |
|
#9 |
Member
George Pichurov
Join Date: Jul 2010
Posts: 52
Rep Power: 16 |
What if I want to create a surface by coordinates? I have a case and I want to create an internal plane, whose boundary coordinates I know. Regards.
|
|
April 12, 2020, 17:07 |
|
#10 | |
New Member
Joseph Tipton
Join Date: Jun 2010
Posts: 27
Rep Power: 16 |
Quote:
Pressure difference across 2 internal faces |
||
March 31, 2021, 12:02 |
difference between cell and boundaryFaces
|
#11 | |
New Member
zein elserfy
Join Date: May 2018
Posts: 25
Rep Power: 8 |
Quote:
|
||
Tags |
sampledict, samplesurfacedict |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ansys Post processing | ano999 | ANSYS | 1 | May 27, 2011 17:24 |
NO model vs post processing in coal combustion,CFX | sakalido | CFX | 1 | April 15, 2011 15:07 |
Post Processing free surface flows | Chris Wetton | CFX | 2 | February 14, 2008 09:14 |
Tecplot for CFX post processing | pantangi goud | CFX | 2 | August 24, 2005 17:42 |
post processing in CFD | MANISH BHARGAVA | Main CFD Forum | 0 | October 17, 1998 21:51 |