mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'feature-lagrangian' into 'develop'
Feature lagrangian Minor adjustments to static information attached to lagrangian parcels/particles. Fixes #108 (duplicate of http://www.openfoam.org/mantisbt/view.php?id=1990), #109, #110, #111. Future reworking would require a better mechanism to also deal with dynamic information such as particle collisions etc. See merge request !34
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -69,14 +69,12 @@ class DSMCParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private member data
|
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
//- Class to hold DSMC particle constant properties
|
//- Class to hold DSMC particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -31,7 +31,7 @@ License
|
|||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::DSMCParcel<ParcelType>::sizeofFields_
|
const std::size_t Foam::DSMCParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(DSMCParcel<ParcelType>) - sizeof(ParcelType)
|
sizeof(DSMCParcel<ParcelType>) - sizeof(ParcelType)
|
||||||
);
|
);
|
||||||
@ -62,7 +62,7 @@ Foam::DSMCParcel<ParcelType>::DSMCParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&U_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&U_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.U_),
|
reinterpret_cast<const char*>(&p.U_),
|
||||||
DSMCParcel<ParcelType>::sizeofFields_
|
DSMCParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -85,12 +85,12 @@ class particle
|
|||||||
//- Size in bytes of the position data
|
//- Size in bytes of the position data
|
||||||
static const std::size_t sizeofPosition_;
|
static const std::size_t sizeofPosition_;
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
class TrackingData
|
class TrackingData
|
||||||
{
|
{
|
||||||
@ -319,6 +319,12 @@ public:
|
|||||||
"tetFaceI tetPtI origProc origId"
|
"tetFaceI tetPtI origProc origId"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
DefinePropertyTypes
|
||||||
|
(
|
||||||
|
"vector label label scalar label label label label"
|
||||||
|
);
|
||||||
|
|
||||||
//- Cumulative particle counter - used to provode unique ID
|
//- Cumulative particle counter - used to provode unique ID
|
||||||
static label particleCount_;
|
static label particleCount_;
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,14 +28,15 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::string Foam::particle::propertyList_ = Foam::particle::propertyList();
|
Foam::string Foam::particle::propertyList_ = Foam::particle::propertyList();
|
||||||
|
Foam::string Foam::particle::propertyTypes_ = Foam::particle::propertyTypes();
|
||||||
|
|
||||||
const std::size_t Foam::particle::sizeofPosition_
|
const std::size_t Foam::particle::sizeofPosition_
|
||||||
(
|
(
|
||||||
offsetof(particle, faceI_) - offsetof(particle, position_)
|
offsetof(particle, faceI_) - offsetof(particle, position_)
|
||||||
);
|
);
|
||||||
|
|
||||||
const std::size_t Foam::particle::sizeofFields_
|
const std::size_t Foam::particle::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(particle) - offsetof(particle, position_)
|
sizeof(particle) - offsetof(particle, position_)
|
||||||
);
|
);
|
||||||
@ -73,7 +74,7 @@ Foam::particle::particle(const polyMesh& mesh, Istream& is, bool readFields)
|
|||||||
{
|
{
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&position_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&position_), sizeofFields);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -120,7 +121,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const particle& p)
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.position_),
|
reinterpret_cast<const char*>(&p.position_),
|
||||||
particle::sizeofFields_
|
particle::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -39,6 +39,9 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
//- Define a static 'propertyList' for particle properties
|
||||||
|
// The property list is space-delimited with brackets for vector groupings
|
||||||
|
// \sa AddToPropertyList
|
||||||
#define DefinePropertyList(str) \
|
#define DefinePropertyList(str) \
|
||||||
\
|
\
|
||||||
static string propertyList_; \
|
static string propertyList_; \
|
||||||
@ -49,6 +52,9 @@ namespace Foam
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Add to existing static 'propertyList' for particle properties
|
||||||
|
// The property list is space-delimited with brackets for vector groupings
|
||||||
|
// \sa DefinePropertyList
|
||||||
#define AddToPropertyList(ParcelType, str) \
|
#define AddToPropertyList(ParcelType, str) \
|
||||||
\
|
\
|
||||||
static string propertyList_; \
|
static string propertyList_; \
|
||||||
@ -59,6 +65,30 @@ namespace Foam
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Define a static 'propertyTypes' for the types of particle properties
|
||||||
|
// \sa AddToPropertyTypes
|
||||||
|
#define DefinePropertyTypes(str) \
|
||||||
|
\
|
||||||
|
static string propertyTypes_; \
|
||||||
|
\
|
||||||
|
static string propertyTypes() \
|
||||||
|
{ \
|
||||||
|
return str; \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Add to existing static 'propertyTypes' for the types of particle properties
|
||||||
|
// \sa AddToPropertyTypes
|
||||||
|
#define AddToPropertyTypes(ParcelType, str) \
|
||||||
|
\
|
||||||
|
static string propertyTypes_; \
|
||||||
|
\
|
||||||
|
static string propertyTypes() \
|
||||||
|
{ \
|
||||||
|
return ParcelType::propertyTypes() + str; \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -72,14 +72,12 @@ class CollidingParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private member data
|
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
//- Class to hold thermo particle constant properties
|
//- Class to hold thermo particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
:
|
:
|
||||||
@ -160,6 +158,14 @@ public:
|
|||||||
+ " (collisionRecordsWallData)"
|
+ " (collisionRecordsWallData)"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
static string propertyTypes()
|
||||||
|
{
|
||||||
|
// TODO: collision information types
|
||||||
|
NotImplemented;
|
||||||
|
return string::null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ Foam::string Foam::CollidingParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::CollidingParcel<ParcelType>::propertyList();
|
Foam::CollidingParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::CollidingParcel<ParcelType>::sizeofFields_
|
const std::size_t Foam::CollidingParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
offsetof(CollidingParcel<ParcelType>, collisionRecords_)
|
offsetof(CollidingParcel<ParcelType>, collisionRecords_)
|
||||||
- offsetof(CollidingParcel<ParcelType>, f_)
|
- offsetof(CollidingParcel<ParcelType>, f_)
|
||||||
@ -67,7 +67,7 @@ Foam::CollidingParcel<ParcelType>::CollidingParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&f_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&f_), sizeofFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
is >> collisionRecords_;
|
is >> collisionRecords_;
|
||||||
@ -297,7 +297,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.f_),
|
reinterpret_cast<const char*>(&p.f_),
|
||||||
CollidingParcel<ParcelType>::sizeofFields_
|
CollidingParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
os << p.collisionRecords();
|
os << p.collisionRecords();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -80,15 +80,15 @@ class KinematicParcel
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
//- Number of particle tracking attempts before we assume that it stalls
|
//- Number of particle tracking attempts before we assume that it stalls
|
||||||
static label maxTrackAttempts;
|
static label maxTrackAttempts;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
//- Class to hold kinematic particle constant properties
|
//- Class to hold kinematic particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
{
|
{
|
||||||
@ -234,7 +234,8 @@ protected:
|
|||||||
// Parcel properties
|
// Parcel properties
|
||||||
|
|
||||||
//- Active flag - tracking inactive when active = false
|
//- Active flag - tracking inactive when active = false
|
||||||
bool active_;
|
// Store as label for data alignment, but only has bool states
|
||||||
|
label active_;
|
||||||
|
|
||||||
//- Parcel type id
|
//- Parcel type id
|
||||||
label typeId_;
|
label typeId_;
|
||||||
@ -309,7 +310,7 @@ public:
|
|||||||
+ " typeId"
|
+ " typeId"
|
||||||
+ " nParticle"
|
+ " nParticle"
|
||||||
+ " d"
|
+ " d"
|
||||||
+ " dTarget "
|
+ " dTarget"
|
||||||
+ " (Ux Uy Uz)"
|
+ " (Ux Uy Uz)"
|
||||||
+ " rho"
|
+ " rho"
|
||||||
+ " age"
|
+ " age"
|
||||||
@ -317,6 +318,22 @@ public:
|
|||||||
+ " (UTurbx UTurby UTurbz)"
|
+ " (UTurbx UTurby UTurbz)"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" label"
|
||||||
|
+ " label"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " vector"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " vector"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
@ -442,8 +459,8 @@ public:
|
|||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
//- Return const access to active flag
|
//- Set active flag to the specified state
|
||||||
inline bool& active();
|
inline void active(const bool state);
|
||||||
|
|
||||||
//- Return access to type id
|
//- Return access to type id
|
||||||
inline label& typeId();
|
inline label& typeId();
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -265,9 +265,9 @@ inline Foam::scalar Foam::KinematicParcel<ParcelType>::muc() const
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline bool& Foam::KinematicParcel<ParcelType>::active()
|
inline void Foam::KinematicParcel<ParcelType>::active(const bool state)
|
||||||
{
|
{
|
||||||
return active_;
|
active_ = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -35,7 +35,11 @@ Foam::string Foam::KinematicParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::KinematicParcel<ParcelType>::propertyList();
|
Foam::KinematicParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::KinematicParcel<ParcelType>::sizeofFields_
|
Foam::string Foam::KinematicParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::KinematicParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
const std::size_t Foam::KinematicParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
offsetof(KinematicParcel<ParcelType>, rhoc_)
|
offsetof(KinematicParcel<ParcelType>, rhoc_)
|
||||||
- offsetof(KinematicParcel<ParcelType>, active_)
|
- offsetof(KinematicParcel<ParcelType>, active_)
|
||||||
@ -84,7 +88,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&active_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&active_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +233,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
if (os.format() == IOstream::ASCII)
|
if (os.format() == IOstream::ASCII)
|
||||||
{
|
{
|
||||||
os << static_cast<const ParcelType&>(p)
|
os << static_cast<const ParcelType&>(p)
|
||||||
<< token::SPACE << p.active()
|
<< token::SPACE << bool(p.active())
|
||||||
<< token::SPACE << p.typeId()
|
<< token::SPACE << p.typeId()
|
||||||
<< token::SPACE << p.nParticle()
|
<< token::SPACE << p.nParticle()
|
||||||
<< token::SPACE << p.d()
|
<< token::SPACE << p.d()
|
||||||
@ -246,7 +250,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.active_),
|
reinterpret_cast<const char*>(&p.active_),
|
||||||
KinematicParcel<ParcelType>::sizeofFields_
|
KinematicParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -73,14 +73,13 @@ class MPPICParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
|
//- Tracking data
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
class TrackingData
|
class TrackingData
|
||||||
:
|
:
|
||||||
@ -175,7 +174,14 @@ public:
|
|||||||
AddToPropertyList
|
AddToPropertyList
|
||||||
(
|
(
|
||||||
ParcelType,
|
ParcelType,
|
||||||
"(UCorrectx UCorrecty UCorrectz)"
|
" (UCorrectx UCorrecty UCorrectz)"
|
||||||
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" vector"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -34,7 +34,11 @@ Foam::string Foam::MPPICParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::MPPICParcel<ParcelType>::propertyList();
|
Foam::MPPICParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::MPPICParcel<ParcelType>::sizeofFields_
|
Foam::string Foam::MPPICParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::MPPICParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
const std::size_t Foam::MPPICParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(MPPICParcel<ParcelType>) - sizeof(ParcelType)
|
sizeof(MPPICParcel<ParcelType>) - sizeof(ParcelType)
|
||||||
);
|
);
|
||||||
@ -61,7 +65,7 @@ Foam::MPPICParcel<ParcelType>::MPPICParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&UCorrect_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&UCorrect_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,7 +150,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.UCorrect_),
|
reinterpret_cast<const char*>(&p.UCorrect_),
|
||||||
MPPICParcel<ParcelType>::sizeofFields_
|
MPPICParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -66,14 +66,12 @@ class ReactingMultiphaseParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
// IDs of phases in ReacingParcel phase list (Y)
|
// IDs of phases in ReacingParcel phase list (Y)
|
||||||
|
|
||||||
static const label GAS;
|
static const label GAS;
|
||||||
@ -267,6 +265,15 @@ public:
|
|||||||
+ " nSolid(Y1..YN)"
|
+ " nSolid(Y1..YN)"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" List<scalar>"
|
||||||
|
+ " List<scalar>"
|
||||||
|
+ " List<Scalar>"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -33,7 +33,11 @@ Foam::string Foam::ReactingMultiphaseParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::ReactingMultiphaseParcel<ParcelType>::propertyList();
|
Foam::ReactingMultiphaseParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::ReactingMultiphaseParcel<ParcelType>::sizeofFields_
|
Foam::string Foam::ReactingMultiphaseParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::ReactingMultiphaseParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
const std::size_t Foam::ReactingMultiphaseParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,14 +67,12 @@ class ReactingParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
//- Class to hold reacting parcel constant properties
|
//- Class to hold reacting parcel constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
:
|
:
|
||||||
@ -221,6 +219,14 @@ public:
|
|||||||
+ " nPhases(Y1..YN)"
|
+ " nPhases(Y1..YN)"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" scalar"
|
||||||
|
+ " List<scalar>"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -33,7 +33,11 @@ Foam::string Foam::ReactingParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::ReactingParcel<ParcelType>::propertyList();
|
Foam::ReactingParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::ReactingParcel<ParcelType>::sizeofFields_
|
Foam::string Foam::ReactingParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::ReactingParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
const std::size_t Foam::ReactingParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(scalar)
|
sizeof(scalar)
|
||||||
);
|
);
|
||||||
@ -64,7 +68,7 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&mass0_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&mass0_), sizeofFields);
|
||||||
is >> Ymix;
|
is >> Ymix;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,7 +255,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.mass0_),
|
reinterpret_cast<const char*>(&p.mass0_),
|
||||||
ReactingParcel<ParcelType>::sizeofFields_
|
ReactingParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
os << p.Y();
|
os << p.Y();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,14 +67,12 @@ class ThermoParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
//- Class to hold thermo particle constant properties
|
//- Class to hold thermo particle constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
:
|
:
|
||||||
@ -277,6 +275,14 @@ public:
|
|||||||
+ " Cp"
|
+ " Cp"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" scalar"
|
||||||
|
+ " scalar"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -33,7 +33,11 @@ Foam::string Foam::ThermoParcel<ParcelType>::propertyList_ =
|
|||||||
Foam::ThermoParcel<ParcelType>::propertyList();
|
Foam::ThermoParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::ThermoParcel<ParcelType>::sizeofFields_
|
Foam::string Foam::ThermoParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::ThermoParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
const std::size_t Foam::ThermoParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
offsetof(ThermoParcel<ParcelType>, Tc_)
|
offsetof(ThermoParcel<ParcelType>, Tc_)
|
||||||
- offsetof(ThermoParcel<ParcelType>, T_)
|
- offsetof(ThermoParcel<ParcelType>, T_)
|
||||||
@ -65,7 +69,7 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&T_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&T_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +158,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.T_),
|
reinterpret_cast<const char*>(&p.T_),
|
||||||
ThermoParcel<ParcelType>::sizeofFields_
|
ThermoParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -181,7 +181,6 @@ bool Foam::LocalInteraction<CloudType>::correct
|
|||||||
if (patchI >= 0)
|
if (patchI >= 0)
|
||||||
{
|
{
|
||||||
vector& U = p.U();
|
vector& U = p.U();
|
||||||
bool& active = p.active();
|
|
||||||
|
|
||||||
typename PatchInteractionModel<CloudType>::interactionType it =
|
typename PatchInteractionModel<CloudType>::interactionType it =
|
||||||
this->wordToInteractionType
|
this->wordToInteractionType
|
||||||
@ -196,7 +195,7 @@ bool Foam::LocalInteraction<CloudType>::correct
|
|||||||
scalar dm = p.mass()*p.nParticle();
|
scalar dm = p.mass()*p.nParticle();
|
||||||
|
|
||||||
keepParticle = false;
|
keepParticle = false;
|
||||||
active = false;
|
p.active(false);
|
||||||
U = Zero;
|
U = Zero;
|
||||||
nEscape_[patchI]++;
|
nEscape_[patchI]++;
|
||||||
massEscape_[patchI] += dm;
|
massEscape_[patchI] += dm;
|
||||||
@ -213,7 +212,7 @@ bool Foam::LocalInteraction<CloudType>::correct
|
|||||||
scalar dm = p.mass()*p.nParticle();
|
scalar dm = p.mass()*p.nParticle();
|
||||||
|
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
active = false;
|
p.active(false);
|
||||||
U = Zero;
|
U = Zero;
|
||||||
nStick_[patchI]++;
|
nStick_[patchI]++;
|
||||||
massStick_[patchI] += dm;
|
massStick_[patchI] += dm;
|
||||||
@ -228,7 +227,7 @@ bool Foam::LocalInteraction<CloudType>::correct
|
|||||||
case PatchInteractionModel<CloudType>::itRebound:
|
case PatchInteractionModel<CloudType>::itRebound:
|
||||||
{
|
{
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
active = true;
|
p.active(true);
|
||||||
|
|
||||||
vector nw;
|
vector nw;
|
||||||
vector Up;
|
vector Up;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -69,7 +69,7 @@ bool Foam::Rebound<CloudType>::correct
|
|||||||
vector& U = p.U();
|
vector& U = p.U();
|
||||||
|
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
p.active() = true;
|
p.active(true);
|
||||||
|
|
||||||
vector nw;
|
vector nw;
|
||||||
vector Up;
|
vector Up;
|
||||||
|
|||||||
@ -112,8 +112,6 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
|||||||
{
|
{
|
||||||
vector& U = p.U();
|
vector& U = p.U();
|
||||||
|
|
||||||
bool& active = p.active();
|
|
||||||
|
|
||||||
if (isA<wallPolyPatch>(pp))
|
if (isA<wallPolyPatch>(pp))
|
||||||
{
|
{
|
||||||
switch (interactionType_)
|
switch (interactionType_)
|
||||||
@ -121,7 +119,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
|||||||
case PatchInteractionModel<CloudType>::itEscape:
|
case PatchInteractionModel<CloudType>::itEscape:
|
||||||
{
|
{
|
||||||
keepParticle = false;
|
keepParticle = false;
|
||||||
active = false;
|
p.active(false);
|
||||||
U = Zero;
|
U = Zero;
|
||||||
nEscape_++;
|
nEscape_++;
|
||||||
massEscape_ += p.nParticle()*p.mass();
|
massEscape_ += p.nParticle()*p.mass();
|
||||||
@ -130,7 +128,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
|||||||
case PatchInteractionModel<CloudType>::itStick:
|
case PatchInteractionModel<CloudType>::itStick:
|
||||||
{
|
{
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
active = false;
|
p.active(false);
|
||||||
U = Zero;
|
U = Zero;
|
||||||
nStick_++;
|
nStick_++;
|
||||||
massStick_ += p.nParticle()*p.mass();
|
massStick_ += p.nParticle()*p.mass();
|
||||||
@ -139,7 +137,7 @@ bool Foam::StandardWallInteraction<CloudType>::correct
|
|||||||
case PatchInteractionModel<CloudType>::itRebound:
|
case PatchInteractionModel<CloudType>::itRebound:
|
||||||
{
|
{
|
||||||
keepParticle = true;
|
keepParticle = true;
|
||||||
active = true;
|
p.active(true);
|
||||||
|
|
||||||
vector nw;
|
vector nw;
|
||||||
vector Up;
|
vector Up;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -58,17 +58,15 @@ class molecule
|
|||||||
:
|
:
|
||||||
public particle
|
public particle
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
// Values of special that are less than zero are for built-in functionality.
|
// Values of special that are less than zero are for built-in functionality.
|
||||||
// Values greater than zero are user specifiable/expandable (i.e. test
|
// Values greater than zero are user specifiable/expandable
|
||||||
// special_ >= SPECIAL_USER)
|
// (i.e. test special_ >= SPECIAL_USER)
|
||||||
|
|
||||||
enum specialTypes
|
enum specialTypes
|
||||||
{
|
{
|
||||||
@ -78,6 +76,7 @@ public:
|
|||||||
SPECIAL_USER = 1
|
SPECIAL_USER = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//- Class to hold molecule constant properties
|
//- Class to hold molecule constant properties
|
||||||
class constantProperties
|
class constantProperties
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -29,7 +29,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const std::size_t Foam::molecule::sizeofFields_
|
const std::size_t Foam::molecule::sizeofFields
|
||||||
(
|
(
|
||||||
offsetof(molecule, siteForces_) - offsetof(molecule, Q_)
|
offsetof(molecule, siteForces_) - offsetof(molecule, Q_)
|
||||||
);
|
);
|
||||||
@ -77,7 +77,7 @@ Foam::molecule::molecule
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&Q_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&Q_), sizeofFields);
|
||||||
is >> siteForces_ >> sitePositions_;
|
is >> siteForces_ >> sitePositions_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const molecule& mol)
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&mol.Q_),
|
reinterpret_cast<const char*>(&mol.Q_),
|
||||||
molecule::sizeofFields_
|
molecule::sizeofFields
|
||||||
);
|
);
|
||||||
os << mol.siteForces_ << mol.sitePositions_;
|
os << mol.siteForces_ << mol.sitePositions_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -61,9 +61,6 @@ class solidParticle
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
//- Diameter
|
//- Diameter
|
||||||
scalar d_;
|
scalar d_;
|
||||||
|
|
||||||
@ -116,6 +113,12 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Static data members
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
|
|||||||
@ -28,7 +28,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const std::size_t Foam::solidParticle::sizeofFields_
|
const std::size_t Foam::solidParticle::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(solidParticle) - sizeof(particle)
|
sizeof(solidParticle) - sizeof(particle)
|
||||||
);
|
);
|
||||||
@ -54,7 +54,7 @@ Foam::solidParticle::solidParticle
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&d_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&d_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const solidParticle& p)
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.d_),
|
reinterpret_cast<const char*>(&p.d_),
|
||||||
solidParticle::sizeofFields_
|
solidParticle::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -25,7 +25,7 @@ Class
|
|||||||
Foam::SprayParcel
|
Foam::SprayParcel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Reacing spray parcel, with added functionality for atomization and breakup
|
Reacting spray parcel, with added functionality for atomization and breakup
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -59,12 +59,6 @@ class SprayParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Size in bytes of the fields
|
|
||||||
static const std::size_t sizeofFields_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Class to hold reacting particle constant properties
|
//- Class to hold reacting particle constant properties
|
||||||
@ -178,6 +172,9 @@ public:
|
|||||||
|
|
||||||
// Static data members
|
// Static data members
|
||||||
|
|
||||||
|
//- Size in bytes of the fields
|
||||||
|
static const std::size_t sizeofFields;
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("SprayParcel");
|
TypeName("SprayParcel");
|
||||||
|
|
||||||
@ -185,7 +182,7 @@ public:
|
|||||||
AddToPropertyList
|
AddToPropertyList
|
||||||
(
|
(
|
||||||
ParcelType,
|
ParcelType,
|
||||||
+ " d0"
|
" d0"
|
||||||
+ " position0"
|
+ " position0"
|
||||||
+ " sigma"
|
+ " sigma"
|
||||||
+ " mu"
|
+ " mu"
|
||||||
@ -200,6 +197,25 @@ public:
|
|||||||
+ " user"
|
+ " user"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- String representation of property types
|
||||||
|
AddToPropertyTypes
|
||||||
|
(
|
||||||
|
ParcelType,
|
||||||
|
" scalar"
|
||||||
|
+ " vector"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
+ " scalar"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -32,9 +32,13 @@ template<class ParcelType>
|
|||||||
Foam::string Foam::SprayParcel<ParcelType>::propertyList_ =
|
Foam::string Foam::SprayParcel<ParcelType>::propertyList_ =
|
||||||
Foam::SprayParcel<ParcelType>::propertyList();
|
Foam::SprayParcel<ParcelType>::propertyList();
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
Foam::string Foam::SprayParcel<ParcelType>::propertyTypes_ =
|
||||||
|
Foam::SprayParcel<ParcelType>::propertyTypes();
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
const std::size_t Foam::SprayParcel<ParcelType>::sizeofFields_
|
const std::size_t Foam::SprayParcel<ParcelType>::sizeofFields
|
||||||
(
|
(
|
||||||
sizeof(SprayParcel<ParcelType>) - sizeof(ParcelType)
|
sizeof(SprayParcel<ParcelType>) - sizeof(ParcelType)
|
||||||
);
|
);
|
||||||
@ -85,7 +89,7 @@ Foam::SprayParcel<ParcelType>::SprayParcel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
is.read(reinterpret_cast<char*>(&d0_), sizeofFields_);
|
is.read(reinterpret_cast<char*>(&d0_), sizeofFields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,7 +315,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
os.write
|
os.write
|
||||||
(
|
(
|
||||||
reinterpret_cast<const char*>(&p.d0_),
|
reinterpret_cast<const char*>(&p.d0_),
|
||||||
SprayParcel<ParcelType>::sizeofFields_
|
SprayParcel<ParcelType>::sizeofFields
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user