Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
512bfcfd
Commit
512bfcfd
authored
Jan 13, 2017
by
Henry Weller
Browse files
CloudFunctionObjects::ParticleCollector: Corrected handling of "concentricCircle" mode
Patch contributed by Karl Meredith, FM Global.
parent
47bd8e13
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C
View file @
512bfcfd
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-201
6
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-201
7
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -171,7 +171,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
}
else
{
//
s
et 4 quadrants for single sector cases
//
S
et 4 quadrants for single sector cases
nS
=
4
;
vector
tangent
=
Zero
;
...
...
@@ -200,7 +200,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
label
nPoint
=
radius_
.
size
()
*
nPointPerRadius
;
label
nFace
=
radius_
.
size
()
*
nS
;
//
a
dd origin
//
A
dd origin
nPoint
++
;
points_
.
setSize
(
nPoint
);
...
...
@@ -213,7 +213,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
points_
[
0
]
=
origin
;
//
p
oints
//
P
oints
forAll
(
radius_
,
radI
)
{
label
pointOffset
=
radI
*
nPointPerRadius
+
1
;
...
...
@@ -226,7 +226,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
}
}
//
f
aces
//
F
aces
DynamicList
<
label
>
facePts
(
2
*
nPointPerSector
);
forAll
(
radius_
,
radI
)
{
...
...
@@ -236,7 +236,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
{
facePts
.
clear
();
//
a
ppend origin point
//
A
ppend origin point
facePts
.
append
(
0
);
for
(
label
ptI
=
0
;
ptI
<
nPointPerSector
;
ptI
++
)
...
...
@@ -304,16 +304,16 @@ void Foam::ParticleCollector<CloudType>::collectParcelPolygon
if
(
sign
(
d1
)
==
sign
(
d2
))
{
//
d
id not cross polygon plane
//
D
id not cross polygon plane
continue
;
}
//
i
ntersection point
//
I
ntersection point
const
point
pIntersect
=
p1
+
(
d1
/
(
d1
-
d2
))
*
(
p2
-
p1
);
const
List
<
face
>&
tris
=
faceTris_
[
facei
];
//
i
dentify if point is within poly bounds
//
I
dentify if point is within poly bounds
forAll
(
tris
,
triI
)
{
const
face
&
tri
=
tris
[
triI
];
...
...
@@ -347,11 +347,11 @@ void Foam::ParticleCollector<CloudType>::collectParcelConcentricCircles
if
(
sign
(
d1
)
==
sign
(
d2
))
{
//
d
id not cross plane
//
D
id not cross plane
return
;
}
//
i
ntersection point in cylindrical co-ordinate system
//
I
ntersection point in cylindrical co-ordinate system
const
point
pCyl
=
coordSys_
.
localPosition
(
p1
+
(
d1
/
(
d1
-
d2
))
*
(
p2
-
p1
));
scalar
r
=
pCyl
[
0
];
...
...
@@ -381,7 +381,10 @@ void Foam::ParticleCollector<CloudType>::collectParcelConcentricCircles
}
}
hitFaceIDs_
.
append
(
secI
);
if
(
secI
!=
-
1
)
{
hitFaceIDs_
.
append
(
secI
);
}
}
...
...
@@ -651,7 +654,7 @@ void Foam::ParticleCollector<CloudType>::postMove
return
;
}
//
s
lightly extend end position to avoid falling within tracking tolerances
//
S
lightly extend end position to avoid falling within tracking tolerances
const
point
position1
=
position0
+
1
.
0001
*
(
p
.
position
()
-
position0
);
hitFaceIDs_
.
clear
();
...
...
@@ -669,8 +672,7 @@ void Foam::ParticleCollector<CloudType>::postMove
break
;
}
default:
{
}
{}
}
...
...
@@ -681,15 +683,33 @@ void Foam::ParticleCollector<CloudType>::postMove
if
(
negateParcelsOppositeNormal_
)
{
scalar
Unormal
=
0
;
vector
Uhat
=
p
.
U
();
switch
(
mode_
)
{
case
mtPolygon
:
{
Unormal
=
Uhat
&
normal_
[
facei
];
break
;
}
case
mtConcentricCircle
:
{
Unormal
=
Uhat
&
normal_
[
0
];
break
;
}
default:
{}
}
Uhat
/=
mag
(
Uhat
)
+
ROOTVSMALL
;
if
((
Uhat
&
normal_
[
facei
])
<
0
)
if
(
Unormal
<
0
)
{
m
*
=
-
1
.
0
;
m
=
-
m
;
}
}
//
a
dd mass contribution
//
A
dd mass contribution
mass_
[
facei
]
+=
m
;
if
(
nSector_
==
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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