|
[Sponsors] |
March 16, 2016, 11:30 |
Uniform surface sampling?
|
#1 |
New Member
Anon
Join Date: Mar 2016
Posts: 6
Rep Power: 10 |
Hello,
I would like to export field values from a nonuniform grid using a uniform sampling grid. Any suggestions? mapFields seems terribly inefficient since it only does one time step at a time (I have a few 100 time steps I want to export) the sample utility 'works' but I don't see how to specify uniform sampling for a surface. Thanks for your help! |
|
March 16, 2016, 11:45 |
|
#2 | |
Senior Member
Join Date: Jul 2009
Posts: 260
Rep Power: 17 |
Quote:
For the former you can't as far as I know. You need to change it to a patch then use sample. Once you've changed your solid object to a patch (in your processor/constant/polymesh/boundary files) use: Code:
*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.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 ); sets ( ); surfaces ( cubes { type patch; patches ("cubes"); } ); // *********************************************************************** // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object sampleDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // setFormat raw; surfaceFormat vtk; // optionally define extra controls for the output formats formatOptions { ensight { format ascii; } } sets ( ); surfaces ( constantPlane { type plane; // always triangulated basePoint (0 0 3.5); normalVector (0 0 1); } ); // *********************************************************************** // |
||
March 16, 2016, 12:14 |
|
#3 |
New Member
Anon
Join Date: Mar 2016
Posts: 6
Rep Power: 10 |
Hi kingjewel1. Thanks for the reply.
My goal is to export field values of a plane I define. I can do that using your second suggestion. My problem is that I want the exported results to be interpolated onto a uniform grid. When exporting a 1D line set, uniform distribution is a sampleDict option but I can not find similar functionality for 2D surfaces. Any other ideas? or even other post-processing suggestions? Thanks again! |
|
June 21, 2016, 07:56 |
|
#4 |
New Member
Lu ZHOU
Join Date: Jul 2014
Location: Lyon, France
Posts: 12
Rep Power: 11 |
Hello,
Have you got a solution for your question ? I am trying to do the same thing. Thanks ! Lu ZHOU |
|
June 21, 2016, 17:43 |
|
#5 |
New Member
Anon
Join Date: Mar 2016
Posts: 6
Rep Power: 10 |
One way I found to do so is to define a plane source (under source menu) and then use the filter Resample with Dataset. To setup the filter use your data as the "input" and the plane as the "source". Sample periodicity is set under the plane properties, X Resolution and Y Resolution.
Good luck and let me know if you have any further questions |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dsmcFoam setup | hherbol | OpenFOAM Pre-Processing | 1 | November 19, 2021 01:52 |
[Gmsh] Error : Self intersecting surface mesh, computing intersections & Error : Impossible | velan | OpenFOAM Meshing & Mesh Conversion | 3 | October 22, 2015 11:05 |
Is there a bug when running createBaffles in parallel??? | zfaraday | OpenFOAM Pre-Processing | 1 | May 12, 2015 13:32 |
Time continuity error & FAN patch | Zephiro88 | OpenFOAM Running, Solving & CFD | 4 | April 22, 2015 12:39 |
OpenFOAM solution is diverging for stress analysis in two-pahse microstructure. | Sargam05 | OpenFOAM | 16 | April 30, 2013 16:18 |