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
8137bec8
Commit
8137bec8
authored
Sep 14, 2009
by
graham
Browse files
Check patch type to be wall before moving face reference point.
parent
1f341194
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/basic/Particle/ParticleI.H
View file @
8137bec8
...
...
@@ -193,18 +193,24 @@ inline Foam::scalar Foam::Particle<ParticleType>::lambda
// move reference point for wall
if
(
!
cloud_
.
internalFace
(
facei
))
{
const
vector
&
C
=
mesh
.
cellCentres
()[
celli_
];
scalar
CCf
=
mag
((
C
-
Cf
)
&
Sf
);
// check if distance between cell centre and face centre
// is larger than wallImpactDistance
if
(
CCf
>
static_cast
<
const
ParticleType
&>
(
*
this
).
wallImpactDistance
(
Sf
)
)
label
patchi
=
mesh
.
boundaryMesh
().
whichPatch
(
facei
);
const
polyPatch
&
patch
=
mesh
.
boundaryMesh
()[
patchi
];
if
(
isA
<
wallPolyPatch
>
(
patch
))
{
Cf
-=
static_cast
<
const
ParticleType
&>
(
*
this
)
.
wallImpactDistance
(
Sf
)
*
Sf
;
const
vector
&
C
=
mesh
.
cellCentres
()[
celli_
];
scalar
CCf
=
mag
((
C
-
Cf
)
&
Sf
);
// check if distance between cell centre and face centre
// is larger than wallImpactDistance
if
(
CCf
>
static_cast
<
const
ParticleType
&>
(
*
this
).
wallImpactDistance
(
Sf
)
)
{
Cf
-=
static_cast
<
const
ParticleType
&>
(
*
this
)
.
wallImpactDistance
(
Sf
)
*
Sf
;
}
}
}
...
...
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