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

Problem with circle sampling type, of Sample utility

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2013, 03:17
Default Problem with circle sampling type, of Sample utility
  #1
nik
New Member
 
nicolas
Join Date: Oct 2009
Posts: 24
Rep Power: 16
nik is on a distinguished road
Hi,

I am trying to use the sample utility to extract data along a circular line. To do so, I am using the "circle" sampling type. The problem that I have is that in the first column of the output file, where theta should be, I always get zeros. This "circle" type is not listed in the users guide, so the following dictionary that I am using is a result of trial and error, and by looking at the source sampleSet.H. So I am not sure if I am using all the right parameters.

This is the sampleDict that I am using:

Code:
interpolationScheme cell;
setFormat           raw;

sets
(
    alongCircWall
    {
        type        circle;
        origin      (0 0 0);     // Origin (x, y, z) in global cartesian co-ordinates
        circleAxis  (1 0 0);     // Axis of the circle
        startPoint  (0 0 0.6);   // Defines start point on circle (x, y, z) in global cartesian co-ordinates 
        dTheta      2;           // Sampling interval in degrees about the origin
        axis        x;           // This I don't know why is needed, but needs to be defined as well?
    }
);

fields              ( T );
By the way, I am using OpenFOAM 2.2.x. Any help would be appreciated.

Regards,
Nicolas
nik is offline   Reply With Quote

Old   May 30, 2013, 08:14
Default Figured it out
  #2
nik
New Member
 
nicolas
Join Date: Oct 2009
Posts: 24
Rep Power: 16
nik is on a distinguished road
I have figured it out after all.

The problem was with the "axis x;" parameter. This parameter defines which coordinates are to be written in the output file for each point. You can select, x, y, z, for a single coordinate, or xyz for all coordinates. Since writing the angle theta is not an option, I used xyz to get the coordinates of each point along the circle, and some awk commands to calculate the angle.

It is also worth notting that this sampling type writes out the data along the circle in a weird order. So before plotting the values of a field versus the angle theta, you need to take a close look in the order in which the points are written.

Nicolas
nik is offline   Reply With Quote

Old   February 23, 2015, 11:01
Default Circle sampling on boundary patch
  #3
New Member
 
Join Date: Jun 2012
Posts: 2
Rep Power: 0
daniel54431 is on a distinguished road
Hello all,

i know this thread is a bit older but my question fits in this thread very well.
I try to use the circle sample to get circular distributed values from
a boundary patch (e.g. wallheatflux) from a pipe.
The problem is when I set dTheta=1 for example I do not receive
360 values from 360 points, I just get around 50 values from 50 points.
For the remaining points I get the message:

Code:
--> FOAM Warning : 
    From function void circleSet::calcSamples(DynamicList<point>&, DynamicList<label>&, DynamicList<label>&, DynamicList<label>&, DynamicList<scalar>&) const
    in file sampledSet/circle/circleSet.C at line 128
    Unable to find cell at point id 45 at location (0.0248137 0.00304673 0.5)
The points are definitely in the domain.
So how could it be, that OF finds no cells for interpolation
at most points?


Thanks for help.

Regards,

Daniel

Last edited by daniel54431; February 24, 2015 at 05:51.
daniel54431 is offline   Reply With Quote

Old   May 5, 2016, 08:01
Default
  #4
New Member
 
Cenk
Join Date: Apr 2016
Posts: 4
Rep Power: 10
Cenk20 is on a distinguished road
Quote:
Originally Posted by daniel54431 View Post
Hello all,

i know this thread is a bit older but my question fits in this thread very well.
I try to use the circle sample to get circular distributed values from
a boundary patch (e.g. wallheatflux) from a pipe.
The problem is when I set dTheta=1 for example I do not receive
360 values from 360 points, I just get around 50 values from 50 points.
For the remaining points I get the message:

Code:
--> FOAM Warning : 
    From function void circleSet::calcSamples(DynamicList<point>&, DynamicList<label>&, DynamicList<label>&, DynamicList<label>&, DynamicList<scalar>&) const
    in file sampledSet/circle/circleSet.C at line 128
    Unable to find cell at point id 45 at location (0.0248137 0.00304673 0.5)
The points are definitely in the domain.
So how could it be, that OF finds no cells for interpolation
at most points?


Thanks for help.

Regards,

Daniel
Hi, do you find a solution for your problem. I have the same problem now...

Regards,
Cenk
Cenk20 is offline   Reply With Quote

Old   May 29, 2017, 05:27
Default circularDistribution
  #5
New Member
 
Niranjan Prabhu
Join Date: Sep 2016
Location: chennai
Posts: 8
Rep Power: 9
niran is on a distinguished road
surfaceElevation1
{
type waveGauge;

pointDistribution circularDistribution;
N 36;

centre (-0.5657 -0.2 0);
add (0 0.4 0);
radius 0.23;
axis y;
}

it is working in waves2Foam
depth in Y direction
N number of WaveGauge
niran is offline   Reply With Quote

Reply


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
simpleFoam: problem with the U file samiam1000 OpenFOAM Running, Solving & CFD 5 November 10, 2015 15:47
sample utility problem And OpenFOAM Post-Processing 36 May 20, 2014 08:50
Floating Point Exception - wrong boundaries or general PC problem? – OF 1.6 extend - A.Wendy OpenFOAM 0 February 27, 2013 04:50
turbulent jet simulation antonio_ing OpenFOAM Running, Solving & CFD 5 September 16, 2010 02:31
buoyantSimpleRadiationFoam msarkar OpenFOAM 0 February 15, 2010 06:22


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