Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry Weller
2020-08-18 12:33:48 +01:00
37 changed files with 183 additions and 547 deletions

View File

@ -242,6 +242,7 @@ $(IOdictionary)/unwatchedIOdictionary.C
db/IOobjects/IOMap/IOMapName.C
db/IOobjects/decomposedBlockData/decomposedBlockData.C
db/IOobjects/GlobalIOList/GlobalIOLists.C
db/IOobjects/GlobalIOField/GlobalIOFields.C

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,42 +23,22 @@ License
\*---------------------------------------------------------------------------*/
#include "GlobalIOField.H"
#include "GlobalIOFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTemplateTypeNameAndDebugWithName
defineTemplateTypeNameWithName(labelGlobalIOField, "labelField");
defineTemplateTypeNameWithName(scalarGlobalIOField, "scalarField");
defineTemplateTypeNameWithName(vectorGlobalIOField, "vectorField");
defineTemplateTypeNameWithName
(
GlobalIOField<scalar>,
"scalarField",
0
);
defineTemplateTypeNameAndDebugWithName
(
GlobalIOField<vector>,
"vectorField",
0
);
defineTemplateTypeNameAndDebugWithName
(
GlobalIOField<sphericalTensor>,
"sphericalTensorField",
0
);
defineTemplateTypeNameAndDebugWithName
(
GlobalIOField<symmTensor>,
"symmTensorField",
0
);
defineTemplateTypeNameAndDebugWithName
(
GlobalIOField<tensor>,
"tensorField",
0
sphericalTensorGlobalIOField,
"sphericalTensorField"
);
defineTemplateTypeNameWithName(symmTensorGlobalIOField, "symmTensorField");
defineTemplateTypeNameWithName(tensorGlobalIOField, "tensorField");
}

View File

@ -0,0 +1,74 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "primitiveFields.H"
#include "GlobalIOField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef GlobalIOField<label> labelGlobalIOField;
typedef GlobalIOField<scalar> scalarGlobalIOField;
typedef GlobalIOField<vector> vectorGlobalIOField;
typedef GlobalIOField<sphericalTensor> sphericalTensorGlobalIOField;
typedef GlobalIOField<symmTensor> symmTensorGlobalIOField;
typedef GlobalIOField<tensor> tensorGlobalIOField;
//- Template function for obtaining global status
template<>
inline bool typeGlobal<labelGlobalIOField>()
{
return true;
}
template<>
inline bool typeGlobal<scalarGlobalIOField>()
{
return true;
}
template<>
inline bool typeGlobal<vectorGlobalIOField>()
{
return true;
}
template<>
inline bool typeGlobal<sphericalTensorGlobalIOField>()
{
return true;
}
template<>
inline bool typeGlobal<symmTensorGlobalIOField>()
{
return true;
}
template<>
inline bool typeGlobal<tensorGlobalIOField>()
{
return true;
}
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "globalIOLists.H"
#include "GlobalIOLists.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -39,6 +39,7 @@ namespace Foam
);
defineTemplateTypeNameWithName(symmTensorGlobalIOList, "symmTensorList");
defineTemplateTypeNameWithName(tensorGlobalIOList, "tensorList");
defineTemplateTypeNameWithName(wordGlobalIOList, "wordList");
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,16 +22,16 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::globalIOLists
Foam::GlobalIOLists
Description
Typedefs for globalIOLists of primitive types. These are fully compatible
Typedefs for GlobalIOLists of primitive types. These are fully compatible
with 'normal' IOLists except have global filePath() scope.
\*---------------------------------------------------------------------------*/
#ifndef globalIOLists_H
#define globalIOLists_H
#ifndef GlobalIOLists_H
#define GlobalIOLists_H
#include "primitiveFields.H"
#include "GlobalIOList.H"
@ -46,6 +46,7 @@ namespace Foam
typedef GlobalIOList<sphericalTensor> sphericalTensorGlobalIOList;
typedef GlobalIOList<symmTensor> symmTensorGlobalIOList;
typedef GlobalIOList<tensor> tensorGlobalIOList;
typedef GlobalIOList<word> wordGlobalIOList;
//- Template function for obtaining global status
template<>
@ -78,7 +79,11 @@ namespace Foam
{
return true;
}
template<>
inline bool typeGlobal<wordGlobalIOList>()
{
return true;
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -36,6 +36,7 @@ SourceFiles
#define findCellParticle_H
#include "particle.H"
#include "Cloud.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,6 +37,7 @@ SourceFiles
#define streamLineParticle_H
#include "particle.H"
#include "Cloud.H"
#include "autoPtr.H"
#include "interpolation.H"
#include "vectorList.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "IOPosition.H"
#include "polyMesh.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,6 +42,13 @@ SourceFiles
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class IOPositionName Declaration
\*---------------------------------------------------------------------------*/
TemplateName(IOPosition);
/*---------------------------------------------------------------------------*\
Class IOPosition Declaration
\*---------------------------------------------------------------------------*/
@ -49,7 +56,8 @@ namespace Foam
template<class CloudType>
class IOPosition
:
public regIOobject
public regIOobject,
public IOPositionName
{
// Private Data
@ -60,12 +68,13 @@ class IOPosition
public:
// Static data
//- Type information
using IOPositionName::typeName;
//- Runtime type name information. Use cloud type.
virtual const word& type() const
{
return Cloud<typename CloudType::particleType>::typeName;
return IOPositionName::typeName;
}

View File

@ -0,0 +1,36 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "IOPosition.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(IOPositionName, 0);
}
// ************************************************************************* //

View File

@ -1,5 +1,6 @@
particle/particle.C
particle/particleIO.C
IOPosition/IOPositionName.C
passiveParticle/passiveParticleCloud.C
indexedParticle/indexedParticleCloud.C

View File

@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "particle.H"
#include "mapPolyMesh.H"
#include "transform.H"
#include "treeDataCell.H"
#include "cubicEqn.H"

View File

@ -35,7 +35,6 @@ Description
#include "vector.H"
#include "barycentric.H"
#include "barycentricTensor.H"
#include "Cloud.H"
#include "IDLList.H"
#include "pointField.H"
#include "faceList.H"

View File

@ -23,6 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "particle.H"
#include "IOPosition.H"
#include "cyclicPolyPatch.H"

View File

@ -38,6 +38,7 @@ SourceFiles
#define molecule_H
#include "particle.H"
#include "Cloud.H"
#include "IOstream.H"
#include "autoPtr.H"
#include "diagTensor.H"

View File

@ -69,7 +69,8 @@ TemplateName(SprayCloud);
template<class CloudType>
class SprayCloud
:
public CloudType
public CloudType,
public SprayCloudName
{
public:

View File

@ -25,6 +25,7 @@ License
#include "parcelCloudList.H"
#include "extrapolatedCalculatedFvPatchFields.H"
#include "GlobalIOLists.H"
#include "fvMatrices.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -49,9 +50,9 @@ void Foam::parcelCloudList::initialise
IOobject::NO_WRITE
);
if (cloudsIO.typeHeaderOk<IOList<word>>(false))
if (cloudsIO.typeHeaderOk<wordGlobalIOList>(false))
{
IOList<word> cloudNames(cloudsIO);
wordGlobalIOList cloudNames(cloudsIO);
this->setSize(cloudNames.size());

View File

@ -231,25 +231,6 @@ public:
const label celli
);
//- Construct from components
inline CollidingParcel
(
const polyMesh& mesh,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const typename ParcelType::constantProperties& constProps
);
//- Construct from Istream
CollidingParcel
(

View File

@ -93,46 +93,6 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel
{}
template<class ParcelType>
inline Foam::CollidingParcel<ParcelType>::CollidingParcel
(
const polyMesh& owner,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const typename ParcelType::constantProperties& constProps
)
:
ParcelType
(
owner,
coordinates,
celli,
tetFacei,
tetPti,
typeId,
nParticle0,
d0,
dTarget0,
U0,
constProps
),
f_(f0),
angularMomentum_(angularMomentum0),
torque_(torque0),
collisionRecords_()
{}
// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
template<class ParcelType>

View File

@ -203,23 +203,6 @@ public:
const label celli
);
//- Construct from components
inline MPPICParcel
(
const polyMesh& mesh,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& UCorrect0,
const typename ParcelType::constantProperties& constProps
);
//- Construct from Istream
MPPICParcel
(

View File

@ -53,41 +53,6 @@ inline Foam::MPPICParcel<ParcelType>::MPPICParcel
{}
template<class ParcelType>
inline Foam::MPPICParcel<ParcelType>::MPPICParcel
(
const polyMesh& owner,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& UCorrect0,
const typename ParcelType::constantProperties& constProps
)
:
ParcelType
(
owner,
coordinates,
celli,
tetFacei,
tetPti,
typeId,
nParticle0,
d0,
dTarget0,
U0,
constProps
),
UCorrect_(UCorrect0)
{}
// * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * * //
template<class ParcelType>

View File

@ -335,22 +335,6 @@ public:
const label celli
);
//- Construct from components
inline MomentumParcel
(
const polyMesh& mesh,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const constantProperties& constProps
);
//- Construct from Istream
MomentumParcel
(

View File

@ -115,36 +115,6 @@ inline Foam::MomentumParcel<ParcelType>::MomentumParcel
{}
template<class ParcelType>
inline Foam::MomentumParcel<ParcelType>::MomentumParcel
(
const polyMesh& owner,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const constantProperties& constProps
)
:
ParcelType(owner, coordinates, celli, tetFacei, tetPti),
active_(true),
typeId_(typeId),
nParticle_(nParticle0),
d_(d0),
dTarget_(dTarget0),
U_(U0),
rho_(constProps.rho0()),
age_(0.0),
tTurb_(0.0),
UTurb_(Zero)
{}
// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
template<class ParcelType>

View File

@ -303,29 +303,6 @@ public:
const label celli
);
//- Construct from components
inline ReactingMultiphaseParcel
(
const polyMesh& mesh,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const scalarField& Y0,
const scalarField& YGas0,
const scalarField& YLiquid0,
const scalarField& YSolid0,
const constantProperties& constProps
);
//- Construct from Istream
ReactingMultiphaseParcel
(

View File

@ -98,54 +98,6 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
{}
template<class ParcelType>
inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
(
const polyMesh& mesh,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const scalarField& Y0,
const scalarField& YGas0,
const scalarField& YLiquid0,
const scalarField& YSolid0,
const constantProperties& constProps
)
:
ParcelType
(
mesh,
coordinates,
celli,
tetFacei,
tetPti,
typeId,
nParticle0,
d0,
dTarget0,
U0,
f0,
angularMomentum0,
torque0,
Y0,
constProps
),
YGas_(YGas0),
YLiquid_(YLiquid0),
YSolid_(YSolid0),
canCombust_(0)
{}
// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
template<class ParcelType>

View File

@ -117,7 +117,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
const wordList& stateLabels = compModel.stateLabels();
// Set storage for each Y... for each parcel
forAllIter(typename Cloud<ReactingMultiphaseParcel<ParcelType>>, c, iter)
forAllIter(typename CloudType, c, iter)
{
ReactingMultiphaseParcel<ParcelType>& p = iter();
p.YGas_.setSize(gasNames.size(), 0.0);
@ -139,12 +139,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
);
label i = 0;
forAllIter
(
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
c,
iter
)
forAllIter(typename CloudType, c, iter)
{
ReactingMultiphaseParcel<ParcelType>& p = iter();
p.YGas_[j] = YGas[i++]/(p.Y()[GAS] + rootVSmall);
@ -164,12 +159,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
);
label i = 0;
forAllIter
(
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
c,
iter
)
forAllIter(typename CloudType, c, iter)
{
ReactingMultiphaseParcel<ParcelType>& p = iter();
p.YLiquid_[j] = YLiquid[i++]/(p.Y()[LIQ] + rootVSmall);
@ -189,12 +179,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
);
label i = 0;
forAllIter
(
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
c,
iter
)
forAllIter(typename CloudType, c, iter)
{
ReactingMultiphaseParcel<ParcelType>& p = iter();
p.YSolid_[j] = YSolid[i++]/(p.Y()[SLD] + rootVSmall);
@ -242,12 +227,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
);
label i = 0;
forAllConstIter
(
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
c,
iter
)
forAllConstIter(typename CloudType, c, iter)
{
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
YGas[i++] = p0.YGas()[j]*p0.Y()[GAS];
@ -271,12 +251,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
);
label i = 0;
forAllConstIter
(
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
c,
iter
)
forAllConstIter(typename CloudType, c, iter)
{
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
YLiquid[i++] = p0.YLiquid()[j]*p0.Y()[LIQ];
@ -300,12 +275,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
);
label i = 0;
forAllConstIter
(
typename Cloud<ReactingMultiphaseParcel<ParcelType>>,
c,
iter
)
forAllConstIter(typename CloudType, c, iter)
{
const ReactingMultiphaseParcel<ParcelType>& p0 = iter();
YSolid[i++] = p0.YSolid()[j]*p0.Y()[SLD];

View File

@ -248,26 +248,6 @@ public:
const label celli
);
//- Construct from components
inline ReactingParcel
(
const polyMesh& mesh,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const scalarField& Y0,
const constantProperties& constProps
);
//- Construct from Istream
ReactingParcel
(

View File

@ -89,51 +89,6 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel
{}
template<class ParcelType>
inline Foam::ReactingParcel<ParcelType>::ReactingParcel
(
const polyMesh& mesh,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const scalarField& Y0,
const constantProperties& constProps
)
:
ParcelType
(
mesh,
coordinates,
celli,
tetFacei,
tetPti,
typeId,
nParticle0,
d0,
dTarget0,
U0,
f0,
angularMomentum0,
torque0,
constProps
),
mass0_(0.0),
Y_(Y0)
{
// Set initial parcel mass
mass0_ = this->mass();
}
// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
template<class ParcelType>

View File

@ -111,7 +111,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
c.checkFieldIOobject(c, mass0);
label i = 0;
forAllIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
forAllIter(typename CloudType, c, iter)
{
ReactingParcel<ParcelType>& p = iter();
p.mass0_ = mass0[i++];
@ -128,7 +128,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
// Set storage for each Y... for each parcel
forAllIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
forAllIter(typename CloudType, c, iter)
{
ReactingParcel<ParcelType>& p = iter();
p.Y_.setSize(nPhases, 0.0);
@ -148,7 +148,7 @@ void Foam::ReactingParcel<ParcelType>::readFields
);
label i = 0;
forAllIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
forAllIter(typename CloudType, c, iter)
{
ReactingParcel<ParcelType>& p = iter();
p.Y_[j] = Y[i++];
@ -181,7 +181,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::NO_READ), np);
label i = 0;
forAllConstIter(typename Cloud<ReactingParcel<ParcelType>>, c, iter)
forAllConstIter(typename CloudType, c, iter)
{
const ReactingParcel<ParcelType>& p = iter();
mass0[i++] = p.mass0_;
@ -208,12 +208,7 @@ void Foam::ReactingParcel<ParcelType>::writeFields
np
);
label i = 0;
forAllConstIter
(
typename Cloud<ReactingParcel<ParcelType>>,
c,
iter
)
forAllConstIter(typename CloudType, c, iter)
{
const ReactingParcel<ParcelType>& p = iter();
Y[i++] = p.Y()[j];

View File

@ -211,35 +211,6 @@ public:
const label celli
);
//- Construct from components
inline SprayParcel
(
const polyMesh& mesh,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const scalarField& Y0,
const scalar liquidCore,
const scalar KHindex,
const scalar y,
const scalar yDot,
const scalar tc,
const scalar ms,
const scalar injector,
const scalar tMom,
const scalar user,
const typename ParcelType::constantProperties& constProps
);
//- Construct from Istream
SprayParcel
(

View File

@ -155,69 +155,6 @@ inline Foam::SprayParcel<ParcelType>::SprayParcel
{}
template<class ParcelType>
inline Foam::SprayParcel<ParcelType>::SprayParcel
(
const polyMesh& mesh,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const scalarField& Y0,
const scalar liquidCore,
const scalar KHindex,
const scalar y,
const scalar yDot,
const scalar tc,
const scalar ms,
const scalar injector,
const scalar tMom,
const scalar user,
const typename ParcelType::constantProperties& constProps
)
:
ParcelType
(
mesh,
coordinates,
celli,
tetFacei,
tetPti,
typeId,
nParticle0,
d0,
dTarget0,
U0,
f0,
angularMomentum0,
torque0,
Y0,
constProps
),
d0_(d0),
position0_(this->position()),
sigma_(constProps.sigma0()),
mu_(constProps.mu0()),
liquidCore_(liquidCore),
KHindex_(KHindex),
y_(y),
yDot_(yDot),
tc_(tc),
ms_(ms),
injector_(injector),
tMom_(tMom),
user_(user)
{}
// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
template<class ParcelType>

View File

@ -197,7 +197,7 @@ void Foam::SprayParcel<ParcelType>::readFields
c.checkFieldIOobject(c, user);
label i = 0;
forAllIter(typename Cloud<SprayParcel<ParcelType>>, c, iter)
forAllIter(typename CloudType, c, iter)
{
SprayParcel<ParcelType>& p = iter();
p.d0_ = d0[i];
@ -265,7 +265,7 @@ void Foam::SprayParcel<ParcelType>::writeFields
IOField<scalar> user(c.fieldIOobject("user", IOobject::NO_READ), np);
label i = 0;
forAllConstIter(typename Cloud<SprayParcel<ParcelType>>, c, iter)
forAllConstIter(typename CloudType, c, iter)
{
const SprayParcel<ParcelType>& p = iter();
d0[i] = p.d0_;

View File

@ -310,25 +310,6 @@ public:
const label celli
);
//- Construct from components
inline ThermoParcel
(
const polyMesh& mesh,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const constantProperties& constProps
);
//- Construct from Istream
ThermoParcel
(

View File

@ -100,47 +100,6 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel
{}
template<class ParcelType>
inline Foam::ThermoParcel<ParcelType>::ThermoParcel
(
const polyMesh& mesh,
const barycentric& coordinates,
const label celli,
const label tetFacei,
const label tetPti,
const label typeId,
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const constantProperties& constProps
)
:
ParcelType
(
mesh,
coordinates,
celli,
tetFacei,
tetPti,
typeId,
nParticle0,
d0,
dTarget0,
U0,
f0,
angularMomentum0,
torque0,
constProps
),
T_(constProps.T0()),
Cp_(constProps.Cp0())
{}
// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
template<class ParcelType>

View File

@ -91,7 +91,7 @@ void Foam::ThermoParcel<ParcelType>::readFields(CloudType& c)
label i = 0;
forAllIter(typename Cloud<ThermoParcel<ParcelType>>, c, iter)
forAllIter(typename CloudType, c, iter)
{
ThermoParcel<ParcelType>& p = iter();
@ -114,7 +114,7 @@ void Foam::ThermoParcel<ParcelType>::writeFields(const CloudType& c)
IOField<scalar> Cp(c.fieldIOobject("Cp", IOobject::NO_READ), np);
label i = 0;
forAllConstIter(typename Cloud<ThermoParcel<ParcelType>>, c, iter)
forAllConstIter(typename CloudType, c, iter)
{
const ThermoParcel<ParcelType>& p = iter();

View File

@ -39,6 +39,7 @@ SourceFiles
#define solidParticle_H
#include "particle.H"
#include "Cloud.H"
#include "IOstream.H"
#include "autoPtr.H"
#include "interpolationCellPoint.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,6 +37,7 @@ SourceFiles
#define trackedParticle_H
#include "particle.H"
#include "Cloud.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //