Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
628f0860
Commit
628f0860
authored
Feb 28, 2018
by
Mark OLESEN
Browse files
BUG: faceOnlySet sampling does not stop at 'end' (closes
#745
)
parent
9f03511f
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/sampling/sampledSet/face/faceOnlySet.C
View file @
628f0860
...
...
@@ -54,6 +54,8 @@ bool Foam::faceOnlySet::trackToBoundary
DynamicList
<
scalar
>&
samplingCurveDist
)
const
{
const
vector
offset
=
(
end_
-
start_
);
particle
::
trackingData
td
(
particleCloud
);
point
trackPt
=
singleParticle
.
position
();
...
...
@@ -75,9 +77,10 @@ bool Foam::faceOnlySet::trackToBoundary
samplingCurveDist
.
append
(
mag
(
trackPt
-
start_
));
}
if
(
mag
(
trackPt
-
end_
)
<
smallDis
t
)
if
(
-
smallDist
<
(
(
trackPt
-
end_
)
&
offse
t
)
)
{
// End reached
// Projected onto sampling vector
// - done when we are near or past the end of the sampling vector
return
false
;
}
else
if
(
singleParticle
.
onBoundaryFace
())
...
...
tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/controlDict
View file @
628f0860
...
...
@@ -52,5 +52,6 @@ maxAlphaCo 1;
maxDeltaT 1;
#includeIfPresent "sampling"
// ************************************************************************* //
tutorials/multiphase/interFoam/laminar/damBreak/damBreak/system/sampling
0 → 100644
View file @
628f0860
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object sampling;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
functions
{
sampleSets
{
type sets;
libs ("libsampling.so");
writeControl timeStep;
writeInterval 1;
setFormat vtk;
interpolationScheme cellPointFace;
fields ( alpha.water );
sets
(
gauge_1
{
type face;
axis y;
start (0.02 0.20 0.005);
end (0.02 0.25 0.005);
nPoints 100;
}
gauge_2
{
type face;
axis y;
start (0.2 0.03 0.005);
end (0.2 0.55 0.005);
nPoints 100;
}
);
}
}
// ************************************************************************* //
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment