CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   If a sample line coincides with faces, the user should set the set the sample line?? (https://www.cfd-online.com/Forums/openfoam/145123-if-sample-line-coincides-faces-user-should-set-set-sample-line.html)

Hojae November 28, 2014 16:18

If a sample line coincides with faces, the user should set the set the sample line??
 
Hi, all

I am trying to calculate lift and drag of airflow over an airfoil in wind tunnel using the data collected on the walls.
But, when I run the sample, velocity is not even close to zero, which should be zero because of no-sliip condition. It's almost like the velocity at the center of the wind tunnel. The data collecting range is pretty small(8m long), but velocity is fast(maximum 70m/s) Would that matter to the data collection on the walls?

Or, is that because of a bug described on http://www.foamcfd.org/Nabla/guides/UserGuidese31.html ??

On the link, it is written "Known bug: At present, the user may experience problems if a sample line coincides with a set of cell vertices, edges or faces; the user should set the sample line accordingly."

Also, can anyone explain the "the user should set the sample line accordingly."? I don't know what to do with that.


My sampleDict file is detailed below.
I tried both cell and cellpoint, but the results were the same.

Also, can anyone explain to me what the somePoints and somePatchPoints represent?

Please share your ideas. Any thought must be helpful.
Thank you in advance.

Hojae
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
setFormat raw;
surfaceFormat vtk;
formatOptions
{
ensight
{
format ascii;
}
}

interpolationScheme cell;

fields
(
p
U
);

sets
(
star
{
type uniform;
axis x;
start (-4 0 0.915);
end (4 0 0.915);
nPoints 40;
}
port
{
type uniform;
axis x;
start (-4 0 -0.915);
end (4 0 -0.915);
nPoints 40;
}

somePoints
{
type cloud;
axis xyz;
points ((0.049 0.049 0.00501)(0.051 0.049 0.00501));
}
somePatchPoints
{
// Sample nearest points on selected patches. Looks only up to
// maxDistance away. Any sampling point not found will get value
// pTraits<Type>::max (usually VGREAT)
// Use with interpolations:
// - cell (cell value)
// - cellPatchConstrained (boundary value)
// - cellPoint (interpolated boundary value)
type patchCloud;
axis xyz;
points ((0.049 0.099 0.005)(0.051 0.054 0.005));
maxDistance 0.1; // maximum distance to search
patches (".*Wall.*");
}
);

alexeym November 28, 2014 16:48

Hi,

What's your interpolation?

In general "the user should set the sample line accordingly" means move your line points so there's no "sample line coincides with a set of cell vertices, edges or faces".

Also it'll be easier for everyone if you post your case and sampleDict so people can investigate your case, your sampleDict etc.

Hojae November 28, 2014 18:37

I just modified the original post. Please take a look at it and share your ideas. Thank you!!

alexeym November 29, 2014 05:48

So change this

Code:

start (-4 0 0.915);
end (4 0 0.915);

to something like

Code:

start (-4 1e-4 0.9151);
end (4 1e-4 0.9151);

so the line goes through the cells and not along cell edges. Adapt the modifications for your mesh density.


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