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
26ac7e11
Commit
26ac7e11
authored
Dec 14, 2016
by
Andrew Heather
Browse files
ENH: Lagrangian injection - cache volumeTotal for continuous restart
parent
43e45711
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C
View file @
26ac7e11
...
...
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation |
Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -262,8 +262,8 @@ Foam::InjectionModel<CloudType>::InjectionModel(CloudType& owner)
:
CloudSubModelBase
<
CloudType
>
(
owner
),
SOI_
(
0
.
0
),
volumeTotal_
(
0
.
0
),
massTotal_
(
0
.
0
),
volumeTotal_
(
this
->
template
getModelProperty
<
scalar
>
(
"volumeTotal"
)
),
massTotal_
(
0
),
massFlowRate_
(
owner
.
db
().
time
(),
"massFlowRate"
),
massInjected_
(
this
->
template
getModelProperty
<
scalar
>
(
"massInjected"
)),
nInjections_
(
this
->
template
getModelProperty
<
label
>
(
"nInjections"
)),
...
...
@@ -291,8 +291,8 @@ Foam::InjectionModel<CloudType>::InjectionModel
:
CloudSubModelBase
<
CloudType
>
(
modelName
,
owner
,
dict
,
typeName
,
modelType
),
SOI_
(
0
.
0
),
volumeTotal_
(
0
.
0
),
massTotal_
(
0
.
0
),
volumeTotal_
(
this
->
template
getModelProperty
<
scalar
>
(
"volumeTotal"
)
),
massTotal_
(
0
),
massFlowRate_
(
owner
.
db
().
time
(),
"massFlowRate"
),
massInjected_
(
this
->
template
getModelProperty
<
scalar
>
(
"massInjected"
)),
nInjections_
(
this
->
template
getModelProperty
<
scalar
>
(
"nInjections"
)),
...
...
@@ -438,7 +438,6 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
if
(
prepareForNextTimeStep
(
time
,
newParcels
,
newVolumeFraction
))
{
const
scalar
trackTime
=
this
->
owner
().
solution
().
trackTime
();
const
polyMesh
&
mesh
=
this
->
owner
().
mesh
();
typename
TrackData
::
cloudType
&
cloud
=
td
.
cloud
();
...
...
@@ -659,6 +658,7 @@ void Foam::InjectionModel<CloudType>::info(Ostream& os)
if
(
this
->
writeTime
())
{
this
->
setModelProperty
(
"volumeTotal"
,
volumeTotal_
);
this
->
setModelProperty
(
"massInjected"
,
massInjected_
);
this
->
setModelProperty
(
"nInjections"
,
nInjections_
);
this
->
setModelProperty
(
"parcelsAddedTotal"
,
parcelsAddedTotal_
);
...
...
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