Skip to content
GitLab
Menu
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
cfce348b
Commit
cfce348b
authored
Oct 27, 2010
by
Andrew Heather
Browse files
ENH: Added particle hitFace() function
parent
1b168470
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/basic/Particle/Particle.C
View file @
cfce348b
...
...
@@ -499,6 +499,9 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
}
while
(
faceI_
<
0
);
ParticleType
&
p
=
static_cast
<
ParticleType
&>
(
*
this
);
p
.
hitFace
(
td
);
if
(
cloud_
.
internalFace
(
faceI_
))
{
// Change tet ownership because a tri face has been crossed,
...
...
@@ -527,8 +530,6 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
}
else
{
ParticleType
&
p
=
static_cast
<
ParticleType
&>
(
*
this
);
label
origFaceI
=
faceI_
;
label
patchI
=
patch
(
faceI_
);
...
...
@@ -641,9 +642,7 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
vector
nHat
=
wallTri
.
normal
();
nHat
/=
mag
(
nHat
);
const
ParticleType
&
p
=
static_cast
<
const
ParticleType
&>
(
*
this
);
scalar
r
=
p
.
wallImpactDistance
(
nHat
);
const
scalar
r
=
p
.
wallImpactDistance
(
nHat
);
// Removing (approximately) the wallTri normal
// component of the existing correction, to avoid the
...
...
@@ -694,6 +693,12 @@ void Foam::Particle<ParticleType>::transformProperties(const vector&)
{}
template
<
class
ParticleType
>
template
<
class
TrackData
>
void
Foam
::
Particle
<
ParticleType
>::
hitFace
(
TrackData
&
)
{}
template
<
class
ParticleType
>
template
<
class
TrackData
>
bool
Foam
::
Particle
<
ParticleType
>::
hitPatch
...
...
src/lagrangian/basic/Particle/Particle.H
View file @
cfce348b
...
...
@@ -219,6 +219,10 @@ protected:
// Patch interactions
//- Overridable function to handle the particle hitting a face
template
<
class
TrackData
>
void
hitFace
(
TrackData
&
td
);
//- Overridable function to handle the particle hitting a
// patch. Executed before other patch-hitting functions.
// trackFraction is passed in to allow mesh motion to
...
...
src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
View file @
cfce348b
...
...
@@ -243,6 +243,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
)
:
Particle
<
ParcelType
>
(
p
),
active_
(
p
.
active_
),
typeId_
(
p
.
typeId_
),
nParticle_
(
p
.
nParticle_
),
d_
(
p
.
d_
),
...
...
@@ -270,6 +271,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
)
:
Particle
<
ParcelType
>
(
p
,
c
),
active_
(
p
.
active_
),
typeId_
(
p
.
typeId_
),
nParticle_
(
p
.
nParticle_
),
d_
(
p
.
d_
),
...
...
@@ -393,6 +395,20 @@ bool Foam::KinematicParcel<ParcelType>::move
}
template
<
class
ParcelType
>
template
<
class
TrackData
>
void
Foam
::
KinematicParcel
<
ParcelType
>::
hitFace
(
TrackData
&
td
)
{
ParcelType
&
p
=
static_cast
<
ParcelType
&>
(
*
this
);
td
.
cloud
().
postProcessing
().
postFace
(
p
);
}
template
<
class
ParcelType
>
void
Foam
::
KinematicParcel
<
ParcelType
>::
hitFace
(
int
&
td
)
{}
template
<
class
ParcelType
>
template
<
class
TrackData
>
bool
Foam
::
KinematicParcel
<
ParcelType
>::
hitPatch
...
...
src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H
View file @
cfce348b
...
...
@@ -581,6 +581,14 @@ public:
// Patch interactions
//- Overridable function to handle the particle hitting a face
// without trackData
void
hitFace
(
int
&
td
);
//- Overridable function to handle the particle hitting a face
template
<
class
TrackData
>
void
hitFace
(
TrackData
&
td
);
//- Overridable function to handle the particle hitting a patch
// Executed before other patch-hitting functions
template
<
class
TrackData
>
...
...
Write
Preview
Supports
Markdown
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