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
1a61449d
Commit
1a61449d
authored
Oct 25, 2010
by
Andrew Heather
Browse files
ENH: Code updates in lieu of cloud updates
parent
8c3ecd9b
Changes
34
Hide whitespace changes
Inline
Side-by-side
applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelDyMFoam/incompressibleUncoupledKinematicParcelDyMFoam.C
View file @
1a61449d
...
...
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
#include
"setRootCase.H"
#include
"createTime.H"
#
include "createDynamicFvMesh.H"
#include
"createDynamicFvMesh.H"
#include
"readGravitationalAcceleration.H"
#include
"createFields.H"
...
...
applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/UEqn.H
View file @
1a61449d
...
...
@@ -6,7 +6,7 @@
+
turbulence
->
divDevRhoReff
(
U
)
==
rho
.
dimensionedInternalField
()
*
g
+
parcels
.
SU
()
+
parcels
.
SU
(
U
)
+
momentumSource
.
Su
()
);
...
...
applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/YEqn.H
View file @
1a61449d
...
...
@@ -26,7 +26,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
+
mvConvection
->
fvmDiv
(
phi
,
Yi
)
-
fvm
::
laplacian
(
turbulence
->
muEff
(),
Yi
)
==
parcels
.
S
rho
(
i
)
parcels
.
S
Yi
(
i
,
Y
i
)
+
kappa
*
chemistry
.
RR
(
i
)().
dimensionedInternalField
()
+
massSource
.
Su
(
i
),
mesh
.
solver
(
"Yi"
)
...
...
applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H
View file @
1a61449d
...
...
@@ -37,7 +37,7 @@
-
fvm
::
laplacian
(
turbulence
->
alphaEff
(),
hs
)
==
pWork
()
+
parcels
.
Sh
()
+
parcels
.
Sh
(
hs
)
+
radiation
->
Shs
(
thermo
)
+
energySource
.
Su
()
+
chemistrySh
...
...
applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/rhoEqn.H
View file @
1a61449d
...
...
@@ -35,7 +35,7 @@ Description
fvm
::
ddt
(
rho
)
+
fvc
::
div
(
phi
)
==
parcels
.
Srho
()
parcels
.
Srho
(
rho
)
+
massSource
.
SuTot
()
);
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/UEqn.H
View file @
1a61449d
...
...
@@ -5,7 +5,7 @@
+
turbulence
->
divDevRhoReff
(
U
)
==
rho
.
dimensionedInternalField
()
*
g
+
parcels
.
SU
()
+
parcels
.
SU
(
U
)
);
UEqn
.
relax
();
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H
View file @
1a61449d
...
...
@@ -25,7 +25,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
+
mvConvection
->
fvmDiv
(
phi
,
Yi
)
-
fvm
::
laplacian
(
turbulence
->
muEff
(),
Yi
)
==
parcels
.
S
rho
(
i
)
parcels
.
S
Yi
(
i
,
Y
i
)
+
surfaceFilm
.
Srho
(
i
)
+
kappa
*
chemistry
.
RR
(
i
)().
dimensionedInternalField
(),
mesh
.
solver
(
"Yi"
)
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H
View file @
1a61449d
...
...
@@ -6,7 +6,7 @@
-
fvm
::
laplacian
(
turbulence
->
alphaEff
(),
hs
)
==
DpDt
+
parcels
.
Sh
()
+
parcels
.
Sh
(
hs
)
+
surfaceFilm
.
Sh
()
+
radiation
->
Shs
(
thermo
)
+
chemistrySh
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/rhoEqn.H
View file @
1a61449d
...
...
@@ -35,7 +35,7 @@ Description
fvm
::
ddt
(
rho
)
+
fvc
::
div
(
phi
)
==
parcels
.
Srho
()
parcels
.
Srho
(
rho
)
+
surfaceFilm
.
Srho
()
);
}
...
...
applications/solvers/lagrangian/reactingParcelFoam/UEqn.H
View file @
1a61449d
...
...
@@ -5,7 +5,7 @@
+
turbulence
->
divDevRhoReff
(
U
)
==
rho
.
dimensionedInternalField
()
*
g
+
parcels
.
SU
()
+
parcels
.
SU
(
U
)
);
UEqn
.
relax
();
...
...
applications/solvers/lagrangian/reactingParcelFoam/YEqn.H
View file @
1a61449d
...
...
@@ -25,7 +25,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
+
mvConvection
->
fvmDiv
(
phi
,
Yi
)
-
fvm
::
laplacian
(
turbulence
->
muEff
(),
Yi
)
==
parcels
.
S
rho
(
i
)
parcels
.
S
Yi
(
i
,
Y
i
)
+
kappa
*
chemistry
.
RR
(
i
)().
dimensionedInternalField
(),
mesh
.
solver
(
"Yi"
)
);
...
...
applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H
View file @
1a61449d
...
...
@@ -6,7 +6,7 @@
-
fvm
::
laplacian
(
turbulence
->
alphaEff
(),
hs
)
==
DpDt
+
parcels
.
Sh
()
+
parcels
.
Sh
(
hs
)
+
radiation
->
Shs
(
thermo
)
+
chemistrySh
);
...
...
applications/solvers/lagrangian/reactingParcelFoam/rhoEqn.H
View file @
1a61449d
...
...
@@ -35,7 +35,7 @@ Description
fvm
::
ddt
(
rho
)
+
fvc
::
div
(
phi
)
==
parcels
.
Srho
()
parcels
.
Srho
(
rho
)
);
}
...
...
src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C
View file @
1a61449d
...
...
@@ -327,7 +327,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
const
PtrList
<
PatchField
<
Type
>
>&
ptfl
)
:
DimensionedField
<
Type
,
GeoMesh
>
(
io
,
mesh
,
ds
,
iField
,
false
),
DimensionedField
<
Type
,
GeoMesh
>
(
io
,
mesh
,
ds
,
iField
),
timeIndex_
(
this
->
time
().
timeIndex
()),
field0Ptr_
(
NULL
),
fieldPrevIterPtr_
(
NULL
),
...
...
src/lagrangian/dieselSpray/parcel/parcel.C
View file @
1a61449d
...
...
@@ -94,14 +94,13 @@ Foam::parcel::parcel
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool
Foam
::
parcel
::
move
(
spray
&
sDB
)
bool
Foam
::
parcel
::
move
(
spray
&
sDB
,
const
scalar
trackTime
)
{
const
polyMesh
&
mesh
=
cloud
().
pMesh
();
const
polyBoundaryMesh
&
pbMesh
=
mesh
.
boundaryMesh
();
const
liquidMixture
&
fuels
=
sDB
.
fuels
();
scalar
deltaT
=
sDB
.
runTime
().
deltaTValue
();
label
Nf
=
fuels
.
components
().
size
();
label
Ns
=
sDB
.
composition
().
Y
().
size
();
...
...
@@ -156,12 +155,12 @@ bool Foam::parcel::move(spray& sDB)
pg
,
Yfg
,
m
()
*
fuels
.
Y
(
X
()),
deltaT
trackTime
);
// set the end-time for the track
scalar
tEnd
=
(
1
.
0
-
stepFraction
())
*
deltaT
;
scalar
tEnd
=
(
1
.
0
-
stepFraction
())
*
trackTime
;
// set the maximum time step for this parcel
scalar
dtMax
=
min
...
...
@@ -215,7 +214,7 @@ bool Foam::parcel::move(spray& sDB)
tEnd
-=
dt
;
// Set the current time-step fraction.
stepFraction
()
=
1
.
0
-
tEnd
/
deltaT
;
stepFraction
()
=
1
.
0
-
tEnd
/
trackTime
;
if
(
onBoundary
())
// hit face
{
...
...
src/lagrangian/dieselSpray/parcel/parcel.H
View file @
1a61449d
...
...
@@ -349,7 +349,7 @@ public:
// Parcel operations
bool
move
(
spray
&
sprayData
);
bool
move
(
spray
&
sprayData
,
const
scalar
trackTime
);
//- Transform the position and physical properties of the particle
// according to the given transformation tensor
...
...
src/lagrangian/dieselSpray/spray/sprayInject.C
View file @
1a61449d
...
...
@@ -159,7 +159,8 @@ void Foam::spray::inject()
(
runTime_
.
deltaTValue
()
-
dt
)
/
runTime_
.
deltaTValue
();
bool
keepParcel
=
pPtr
->
move
(
*
this
);
bool
keepParcel
=
pPtr
->
move
(
*
this
,
runTime_
.
deltaTValue
());
if
(
keepParcel
)
{
...
...
src/lagrangian/dieselSpray/spray/sprayOps.C
View file @
1a61449d
...
...
@@ -76,7 +76,7 @@ void Foam::spray::move()
srhos_
[
i
]
=
0
.
0
;
}
Cloud
<
parcel
>::
move
(
*
this
);
Cloud
<
parcel
>::
move
(
*
this
,
runTime_
.
deltaTValue
()
);
}
...
...
src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C
View file @
1a61449d
...
...
@@ -984,7 +984,7 @@ void Foam::DsmcCloud<ParcelType>::evolve()
this
->
inflowBoundary
().
inflow
();
// Move the particles ballistically with their current velocities
Cloud
<
ParcelType
>::
move
(
td
);
Cloud
<
ParcelType
>::
move
(
td
,
mesh_
.
time
().
deltaTValue
()
);
// Update cell occupancy
buildCellOccupancy
();
...
...
src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C
View file @
1a61449d
...
...
@@ -32,7 +32,8 @@ template<class ParcelType>
template
<
class
TrackData
>
bool
Foam
::
DsmcParcel
<
ParcelType
>::
move
(
TrackData
&
td
TrackData
&
td
,
const
scalar
trackTime
)
{
ParcelType
&
p
=
static_cast
<
ParcelType
&>
(
*
this
);
...
...
@@ -43,8 +44,7 @@ bool Foam::DsmcParcel<ParcelType>::move
const
polyMesh
&
mesh
=
td
.
cloud
().
pMesh
();
const
polyBoundaryMesh
&
pbMesh
=
mesh
.
boundaryMesh
();
const
scalar
deltaT
=
mesh
.
time
().
deltaTValue
();
scalar
tEnd
=
(
1
.
0
-
p
.
stepFraction
())
*
deltaT
;
scalar
tEnd
=
(
1
.
0
-
p
.
stepFraction
())
*
trackTime
;
const
scalar
dtMax
=
tEnd
;
// For reduced-D cases, the velocity used to track needs to be
...
...
@@ -71,7 +71,7 @@ bool Foam::DsmcParcel<ParcelType>::move
tEnd
-=
dt
;
p
.
stepFraction
()
=
1
.
0
-
tEnd
/
deltaT
;
p
.
stepFraction
()
=
1
.
0
-
tEnd
/
trackTime
;
if
(
p
.
onBoundary
()
&&
td
.
keepParticle
)
{
...
...
Prev
1
2
Next
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