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
bd72d8c1
Commit
bd72d8c1
authored
Jan 17, 2011
by
Andrew Heather
Browse files
ENH: Added maxCo limit for tracking KinematicParcels
parent
8c212543
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C
View file @
bd72d8c1
...
...
@@ -308,6 +308,7 @@ bool Foam::KinematicParcel<ParcelType>::move
const
polyMesh
&
mesh
=
td
.
cloud
().
pMesh
();
const
polyBoundaryMesh
&
pbMesh
=
mesh
.
boundaryMesh
();
const
scalarField
&
V
=
mesh
.
cellVolumes
();
switch
(
td
.
part
())
{
...
...
@@ -336,7 +337,7 @@ bool Foam::KinematicParcel<ParcelType>::move
// Set the Lagrangian time-step
scalar
dt
=
min
(
dtMax
,
tEnd
);
// Remember which cell the
P
arcel is in since this
// Remember which cell the
p
arcel is in since this
// will change if a face is hit
const
label
cellI
=
p
.
cell
();
...
...
@@ -344,9 +345,11 @@ bool Foam::KinematicParcel<ParcelType>::move
if
(
p
.
active
()
&&
magU
>
ROOTVSMALL
)
{
const
scalar
d
=
dt
*
magU
;
const
vector
n
=
U_
/
magU
;
const
scalar
dCorr
=
min
(
d
,
mag
(
n
&
mesh
.
bounds
().
span
()));
dt
*=
dCorr
/
d
*
p
.
trackToFace
(
p
.
position
()
+
dCorr
*
n
,
td
);
const
scalar
maxCo
=
td
.
cloud
().
solution
().
maxCo
();
const
scalar
dCorr
=
min
(
d
,
maxCo
*
cbrt
(
V
[
cellI
]));
dt
*=
dCorr
/
d
*
p
.
trackToFace
(
p
.
position
()
+
dCorr
*
U_
/
magU
,
td
);
}
tEnd
-=
dt
;
...
...
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