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

This commit is contained in:
Henry Weller
2021-08-16 11:24:24 +01:00
58 changed files with 369 additions and 96 deletions

View File

@ -191,6 +191,13 @@ void Foam::fv::VoFSolidificationMeltingSource::updateMesh
}
bool Foam::fv::VoFSolidificationMeltingSource::movePoints()
{
set_.movePoints();
return true;
}
void Foam::fv::VoFSolidificationMeltingSource::correct()
{
if (debug)

View File

@ -193,6 +193,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
//- Correct the model
virtual void correct();

View File

@ -137,25 +137,33 @@ void rotateFields(const argList& args, const Time& runTime, const tensor& T)
int main(int argc, char *argv[])
{
const wordList supportedTransformations
argList::addNote
(
{"translate", "rotate", "Rx", "Ry", "Rz", "Ra", "scale"}
"Transforms a mesh by translation, rotation and/or scaling.\n"
"The <transformations> are listed comma-separated in a string "
"and executed in sequence.\n\n"
"transformations:\n"
" translate=<vector> "
"translation by vector, e.g. (1 2 3)\n"
" rotate=(<n1> <n2>) "
"rotation from unit vector n1 to n2\n"
" Rx=<angle> "
"rotation by given angle [deg], e.g. 90, about x-axis\n"
" Ry=<angle> "
"rotation by given angle [deg] about y-axis\n"
" Rz=<angle> "
"rotation by given angle [deg] about z-axis\n"
" Ra=<axis vector> <angle> "
"rotation by given angle [deg] about specified axis\n"
" scale=<vector> "
"scale by factors from vector in x, y, z directions,\n"
" "
"e.g. (0.001 0.001 0.001) to scale from mm to m\n\n"
"example:\n"
" transformPoints "
"\"translate=(1.2 0 0), Rx=90, translate=(-1.2 0 0)\""
);
{
OStringStream supportedTransformationsStr;
supportedTransformationsStr << supportedTransformations << endl;
argList::addNote
(
"Transforms a mesh e.g.\n"
"transformPoints "
"\"translate=(-0.586 0 -0.156), "
"Ry=3.485, "
"translate=(0.586 0 0.156)\"\n\n"
"Supported transformations " + supportedTransformationsStr.str()
);
}
argList::validArgs.append("transformations");

View File

@ -71,27 +71,34 @@ int main(int argc, char *argv[])
{
#include "removeCaseOptions.H"
const wordList supportedTransformations
argList::addNote
(
{"translate", "rotate", "Rx", "Ry", "Rz", "Ra", "scale"}
"Transforms a surface geometry "
"by translation, rotation and/or scaling.\n"
"The <transformations> are listed comma-separated in a string "
"and executed in sequence.\n\n"
"transformations:\n"
" translate=<vector> "
"translation by vector, e.g. (1 2 3)\n"
" rotate=(<n1> <n2>) "
"rotation from unit vector n1 to n2\n"
" Rx=<angle> "
"rotation by given angle [deg], e.g. 90, about x-axis\n"
" Ry=<angle> "
"rotation by given angle [deg] about y-axis\n"
" Rz=<angle> "
"rotation by given angle [deg] about z-axis\n"
" Ra=<axis vector> <angle> "
"rotation by given angle [deg] about specified axis\n"
" scale=<vector> "
"scale by factors from vector in x, y, z directions,\n"
" "
"e.g. (0.001 0.001 0.001) to scale from mm to m\n\n"
"example:\n"
" surfaceTransformPoints \"translate=(1.2 0 0), Rx=90\" "
"in.stl out.obj"
);
{
OStringStream supportedTransformationsStr;
supportedTransformationsStr << supportedTransformations << endl;
argList::addNote
(
"Transforms a surface e.g.\n"
"surfaceTransformPoints "
"\"translate=(-0.586 0 -0.156), "
"Ry=3.485, "
"translate=(0.586 0 0.156)\" "
"surf.stl tranformedSurf.obj\n\n"
"Supported transformations " + supportedTransformationsStr.str()
);
}
argList::noParallel();
argList::validArgs.append("transformations");
argList::validArgs.append("surface file");

View File

@ -179,6 +179,18 @@ void ${typeName}FvModel${SourceType}::addSup
}
void ${typeName}FvModel${SourceType}::updateMesh(const mapPolyMesh& mpm)
{
set_.updateMesh(mpm);
}
bool ${typeName}FvModel${SourceType}::movePoints()
{
set_.movePoints();
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

@ -110,6 +110,15 @@ public:
fvMatrix<${TemplateType}>& eqn,
const word& fieldName
) const;
// Mesh motion
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
};

View File

@ -49,7 +49,7 @@ namespace Foam
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::fvCellSet::setCellSet()
void Foam::fvCellSet::setCells()
{
Info<< incrIndent;
@ -119,7 +119,14 @@ void Foam::fvCellSet::setCellSet()
}
}
// Set volume information
Info<< decrIndent;
}
void Foam::fvCellSet::setV()
{
Info<< incrIndent;
V_ = 0;
forAll(cells_, i)
{
@ -162,7 +169,18 @@ Foam::fvCellSet::~fvCellSet()
void Foam::fvCellSet::updateMesh(const mapPolyMesh&)
{
setCellSet();
setCells();
setV();
}
void Foam::fvCellSet::movePoints()
{
if (selectionMode_ == selectionModeType::points)
{
setCells();
}
setV();
}
@ -202,7 +220,8 @@ bool Foam::fvCellSet::read(const dictionary& dict)
}
}
setCellSet();
setCells();
setV();
return true;
}

View File

@ -122,8 +122,11 @@ private:
//- Read the coefficients from the given dictionary
void readCoeffs(const dictionary& dict);
//- Set the cell set based on the user input selection mode
void setCellSet();
//- Set the cells
void setCells();
//- Set the sum of scalar volumes
void setV();
public:
@ -165,6 +168,9 @@ public:
//- Update for mesh changes
void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
void movePoints();
// IO

View File

@ -162,6 +162,13 @@ void Foam::fv::fixedTemperatureConstraint::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::fixedTemperatureConstraint::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::fixedTemperatureConstraint::read(const dictionary& dict)
{
if (fvConstraint::read(dict))

View File

@ -158,6 +158,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
//- Read dictionary
virtual bool read(const dictionary& dict);

View File

@ -126,6 +126,13 @@ void Foam::fv::fixedValueConstraint::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::fixedValueConstraint::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::fixedValueConstraint::read(const dictionary& dict)
{
if (fvConstraint::read(dict))

View File

@ -121,6 +121,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
//- Read source dictionary
virtual bool read(const dictionary& dict);
};

View File

@ -148,6 +148,13 @@ void Foam::fv::limitTemperature::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::limitTemperature::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::limitTemperature::read(const dictionary& dict)
{
if (fvConstraint::read(dict))

View File

@ -127,6 +127,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
//- Read dictionary
virtual bool read(const dictionary& dict);

View File

@ -134,6 +134,13 @@ void Foam::fv::limitVelocity::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::limitVelocity::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::limitVelocity::read(const dictionary& dict)
{
if (fvConstraint::read(dict))

View File

@ -121,6 +121,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
//- Read dictionary
virtual bool read(const dictionary& dict);

View File

@ -254,6 +254,13 @@ void Foam::fv::meanVelocityForce::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::meanVelocityForce::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::meanVelocityForce::read(const dictionary& dict)
{
if (fvConstraint::read(dict))

View File

@ -158,6 +158,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
//- Read source dictionary
virtual bool read(const dictionary& dict);

View File

@ -117,6 +117,13 @@ void Foam::fv::accelerationSource::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::accelerationSource::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::accelerationSource::read(const dictionary& dict)
{
if (fvModel::read(dict))

View File

@ -168,6 +168,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
// IO

View File

@ -175,6 +175,13 @@ void Foam::fv::actuationDiskSource::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::actuationDiskSource::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::actuationDiskSource::read(const dictionary& dict)
{
if (fvModel::read(dict))

View File

@ -198,6 +198,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
// IO

View File

@ -320,6 +320,13 @@ void Foam::fv::effectivenessHeatExchangerSource::updateMesh
}
bool Foam::fv::effectivenessHeatExchangerSource::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::effectivenessHeatExchangerSource::read(const dictionary& dict)
{
if (fvModel::read(dict))

View File

@ -220,6 +220,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
//- Read dictionary
virtual bool read(const dictionary& dict);

View File

@ -145,6 +145,13 @@ void Foam::fv::explicitPorositySource::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::explicitPorositySource::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::explicitPorositySource::read(const dictionary& dict)
{
if (fvModel::read(dict))

View File

@ -181,6 +181,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
// IO

View File

@ -150,6 +150,19 @@ void Foam::fv::heatSource::addSup
}
void Foam::fv::heatSource::updateMesh(const mapPolyMesh& mpm)
{
set_.updateMesh(mpm);
}
bool Foam::fv::heatSource::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::heatSource::read(const dictionary& dict)
{
if (fvModel::read(dict))

View File

@ -130,6 +130,15 @@ public:
) const;
// Mesh motion
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
// IO
//- Read dictionary

View File

@ -159,6 +159,19 @@ void Foam::fv::heatTransfer::correct()
}
void Foam::fv::heatTransfer::updateMesh(const mapPolyMesh& mpm)
{
set_.updateMesh(mpm);
}
bool Foam::fv::heatTransfer::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::heatTransfer::read(const dictionary& dict)
{
if (fvModel::read(dict))

View File

@ -173,6 +173,15 @@ public:
virtual void correct();
// Mesh motion
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
// IO
//- Read dictionary

View File

@ -300,6 +300,13 @@ void Foam::fv::massSource::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::massSource::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::massSource::read(const dictionary& dict)
{
if (fvModel::read(dict))

View File

@ -214,6 +214,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
// IO

View File

@ -636,6 +636,13 @@ void Foam::fv::rotorDiskSource::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::rotorDiskSource::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::rotorDiskSource::read(const dictionary& dict)
{
if (fvModel::read(dict))

View File

@ -341,6 +341,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
// IO

View File

@ -362,6 +362,13 @@ void Foam::fv::solidificationMeltingSource::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::solidificationMeltingSource::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::solidificationMeltingSource::read(const dictionary& dict)
{
if (fvModel::read(dict))

View File

@ -307,6 +307,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
// IO

View File

@ -233,7 +233,6 @@ Foam::fv::codedFvModel::codedFvModel
)
:
fvModel(name, modelType, dict, mesh),
set_(coeffs(), mesh),
fieldName_(word::null)
{
readCoeffs();
@ -259,7 +258,13 @@ FOR_ALL_FIELD_TYPES(IMPLEMENT_FV_MODEL_ADD_ALPHA_RHO_SUP, fv::codedFvModel);
void Foam::fv::codedFvModel::updateMesh(const mapPolyMesh& mpm)
{
set_.updateMesh(mpm);
redirectFvModel().updateMesh(mpm);
}
bool Foam::fv::codedFvModel::movePoints()
{
return redirectFvModel().movePoints();
}
@ -267,7 +272,6 @@ bool Foam::fv::codedFvModel::read(const dictionary& dict)
{
if (fvModel::read(dict))
{
set_.read(coeffs());
readCoeffs();
return true;
}

View File

@ -94,9 +94,6 @@ class codedFvModel
{
// Private data
//- The set of cells the fvConstraint applies to
fvCellSet set_;
//- The name of the field that this fvModel applies to
word fieldName_;
@ -208,6 +205,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
// IO

View File

@ -64,17 +64,6 @@ void Foam::fv::semiImplicitSource::readCoeffs()
// Get the volume mode
volumeMode_ = volumeModeNames_.read(coeffs().lookup("volumeMode"));
// Set volume normalisation
switch (volumeMode_)
{
case volumeMode::absolute:
VDash_ = set_.V();
break;
case volumeMode::specific:
VDash_ = 1;
break;
}
// Set field source terms
fieldSp_.clear();
fieldSu_.clear();
@ -142,9 +131,21 @@ void Foam::fv::semiImplicitSource::addSupType
false
);
// Set volume normalisation
scalar VDash = NaN;
switch (volumeMode_)
{
case volumeMode::absolute:
VDash = set_.V();
break;
case volumeMode::specific:
VDash = 1;
break;
}
// Explicit source function for the field
UIndirectList<Type>(Su, set_.cells()) =
fieldSu_[fieldName]->value<Type>(t)/VDash_;
fieldSu_[fieldName]->value<Type>(t)/VDash;
volScalarField::Internal Sp
(
@ -168,7 +169,7 @@ void Foam::fv::semiImplicitSource::addSupType
// Implicit source function for the field
UIndirectList<scalar>(Sp, set_.cells()) =
fieldSp_[fieldName]->value(t)/VDash_;
fieldSp_[fieldName]->value(t)/VDash;
eqn += Su + fvm::SuSp(Sp, psi);
}
@ -211,8 +212,7 @@ Foam::fv::semiImplicitSource::semiImplicitSource
:
fvModel(name, modelType, dict, mesh),
set_(coeffs(), mesh),
volumeMode_(volumeMode::absolute),
VDash_(1)
volumeMode_(volumeMode::absolute)
{
readCoeffs();
}
@ -251,6 +251,13 @@ void Foam::fv::semiImplicitSource::updateMesh(const mapPolyMesh& mpm)
}
bool Foam::fv::semiImplicitSource::movePoints()
{
set_.movePoints();
return true;
}
bool Foam::fv::semiImplicitSource::read(const dictionary& dict)
{
if (fvModel::read(dict))

View File

@ -137,9 +137,6 @@ private:
//- Volume mode
volumeMode volumeMode_;
//- Volume normalisation
scalar VDash_;
//- Explicit parts of the sources
HashPtrTable<objectFunction1> fieldSu_;
@ -226,6 +223,9 @@ public:
//- Update for mesh changes
virtual void updateMesh(const mapPolyMesh&);
//- Update for mesh motion
virtual bool movePoints();
// IO

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-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -169,7 +169,7 @@ void Foam::Cloud<ParticleType>::move
// Initialise the stepFraction moved for the particles
forAllIter(typename Cloud<ParticleType>, *this, pIter)
{
pIter().reset();
pIter().reset(0);
}
// List of lists of particles to be transferred for all of the

View File

@ -447,11 +447,11 @@ void Foam::particle::locate
const class face& f = mesh_.faces()[c[cellTetFacei]];
for (label tetPti = 1; tetPti < f.size() - 1; ++ tetPti)
{
reset();
coordinates_ = barycentric(1, 0, 0, 0);
tetFacei_ = c[cellTetFacei];
tetPti_ = tetPti;
facei_ = -1;
reset(1);
label tetTriI = -1;
const scalar f = trackToTri(displacement, 0, tetTriI);
@ -472,11 +472,11 @@ void Foam::particle::locate
// The particle must be (hopefully only slightly) outside the cell. Track
// into the tet which got the furthest.
reset();
coordinates_ = barycentric(1, 0, 0, 0);
tetFacei_ = minTetFacei;
tetPti_ = minTetPti;
facei_ = -1;
reset(1);
track(displacement, 0);
if (!onFace())

View File

@ -528,9 +528,9 @@ public:
// Track
//- Set step fraction and behind data to zero in preparation for a new
// track
inline void reset();
//- Set the step fraction and clear the behind data in preparation for
// a new track
inline void reset(const scalar stepFraction);
//- Track along the displacement for a given fraction of the overall
// step. End when the track is complete, or when a boundary is hit.

View File

@ -281,9 +281,9 @@ inline Foam::vector Foam::particle::position() const
}
inline void Foam::particle::reset()
inline void Foam::particle::reset(const scalar stepFraction)
{
stepFraction_ = 0;
stepFraction_ = stepFraction;
stepFractionBehind_ = 0;
nTracksBehind_ = 0;
}

View File

@ -274,7 +274,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
cloud,
td,
dt,
this->age_,
Ts,
d0,
T0,
@ -503,7 +502,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
TrackCloudType& cloud,
trackingData& td,
const scalar dt,
const scalar age,
const scalar Ts,
const scalar d,
const scalar T,
@ -557,12 +555,17 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
const CompositionModel<thermoCloudType>& composition =
cloud.composition();
const typename TrackCloudType::parcelType& p =
static_cast<const typename TrackCloudType::parcelType&>(*this);
typename TrackCloudType::parcelType::trackingData& ttd =
static_cast<typename TrackCloudType::parcelType::trackingData&>(td);
// Total mass of volatiles evolved
cloud.devolatilisation().calculate
(
p,
ttd,
dt,
age,
mass0,
mass,
T,

View File

@ -225,7 +225,6 @@ protected:
TrackCloudType& cloud,
trackingData& td,
const scalar dt, // timestep
const scalar age, // age
const scalar Ts, // surface temperature
const scalar d, // diameter
const scalar T, // temperature

View File

@ -93,8 +93,8 @@ template<class ParcelType>
template<class TrackCloudType>
void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
(
TrackCloudType& cloud,
trackingData& td,
const TrackCloudType& cloud,
const trackingData& td,
const scalar T,
scalar& Ts,
scalar& rhos,

View File

@ -414,8 +414,8 @@ public:
template<class TrackCloudType>
void calcSurfaceValues
(
TrackCloudType& cloud,
trackingData& td,
const TrackCloudType& cloud,
const trackingData& td,
const scalar T,
scalar& Ts,
scalar& rhos,

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-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -94,8 +94,9 @@ Foam::ConstantRateDevolatilisation<CloudType>::~ConstantRateDevolatilisation()
template<class CloudType>
void Foam::ConstantRateDevolatilisation<CloudType>::calculate
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar age,
const scalar mass0,
const scalar mass,
const scalar T,

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-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -103,8 +103,9 @@ public:
//- Update model
virtual void calculate
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar age,
const scalar mass0,
const scalar mass,
const scalar T,

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-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -119,8 +119,9 @@ public:
//- Update model
virtual void calculate
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar age,
const scalar mass0,
const scalar mass,
const scalar T,

View File

@ -60,7 +60,8 @@ Foam::NoDevolatilisation<CloudType>::~NoDevolatilisation()
template<class CloudType>
void Foam::NoDevolatilisation<CloudType>::calculate
(
const scalar,
const typename CloudType::parcelType&,
const typename CloudType::parcelType::trackingData&,
const scalar,
const scalar,
const scalar,

View File

@ -82,8 +82,9 @@ public:
//- Update model
virtual void calculate
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar age,
const scalar mass0,
const scalar mass,
const scalar T,

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-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -82,8 +82,9 @@ Foam::SingleKineticRateDevolatilisation<CloudType>::
template<class CloudType>
void Foam::SingleKineticRateDevolatilisation<CloudType>::calculate
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar age,
const scalar mass0,
const scalar mass,
const scalar T,

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-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -214,8 +214,9 @@ public:
//- Update model
virtual void calculate
(
const typename CloudType::parcelType& p,
const typename CloudType::parcelType::trackingData& td,
const scalar dt,
const scalar age,
const scalar mass0,
const scalar mass,
const scalar T,

View File

@ -56,6 +56,12 @@ void Foam::sampledSets::lineFace::calcSamples
DynamicList<scalar>& samplingCurveDist
)
{
// Ask for the tetBasePtIs and oldCellCentres to trigger all processors to
// build them, otherwise, if some processors have no particles then there
// is a comms mismatch.
mesh.tetBasePtIs();
mesh.oldCellCentres();
// Create lists of initial positions from which to track, the faces and
// cells associated with those positions, and whether the track propagates
// forward (true) or backward (false) along the line from start to end
@ -140,7 +146,7 @@ void Foam::sampledSets::lineFace::calcSamples
const vector s =
sign*(end - start)*(1 - dist/mag(end - start));
sampleParticle.reset();
sampleParticle.reset(1);
if
(

View File

@ -52,6 +52,12 @@ void Foam::sampledSets::lineUniform::calcSamples
DynamicList<scalar>& samplingCurveDist
) const
{
// Ask for the tetBasePtIs and oldCellCentres to trigger all processors to
// build them, otherwise, if some processors have no particles then there
// is a comms mismatch.
mesh().tetBasePtIs();
mesh().oldCellCentres();
label sampleSegmentI = 0, sampleI = 0;
scalar sampleT = 0;
@ -83,7 +89,7 @@ void Foam::sampledSets::lineUniform::calcSamples
if (++ sampleI < nPoints_)
{
sampleT = scalar(sampleI)/(nPoints_ - 1);
sampleParticle.reset();
sampleParticle.reset(1);
sampleParticle.track((end_ - start_)/(nPoints_ - 1), 0);
}
}

View File

@ -77,6 +77,12 @@ void Foam::sampledSets::points::calcSamplesOrdered
DynamicList<scalar>& samplingCurveDist
) const
{
// Ask for the tetBasePtIs and oldCellCentres to trigger all processors to
// build them, otherwise, if some processors have no particles then there
// is a comms mismatch.
mesh().tetBasePtIs();
mesh().oldCellCentres();
const label n = points_.size();
label sampleSegmentI = 0;
@ -112,7 +118,7 @@ void Foam::sampledSets::points::calcSamplesOrdered
{
const vector s = points_[sampleI] - points_[sampleI - 1];
sampleDist += mag(s);
sampleParticle.reset();
sampleParticle.reset(1);
sampleParticle.track(s, 0);
}
}