mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
minor clean-up
This commit is contained in:
@ -63,7 +63,7 @@ int main(int argc, char *argv[])
|
||||
if (!mesh.write())
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
<< "Failed writing moleculeCloud."
|
||||
<< "Failed writing dsmcCloud."
|
||||
<< nl << exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -274,7 +274,8 @@ void Foam::DsmcCloud<ParcelType>::collisions()
|
||||
|
||||
scalar sigmaTcRMax = sigmaTcRMax_[celli];
|
||||
|
||||
scalar selectedPairs = collisionSelectionRemainder_[celli]
|
||||
scalar selectedPairs =
|
||||
collisionSelectionRemainder_[celli]
|
||||
+ 0.5*nC*(nC-1)*nParticle_*sigmaTcRMax*deltaT
|
||||
/mesh_.cellVolumes()[celli];
|
||||
|
||||
@ -764,7 +765,9 @@ Foam::vector Foam::DsmcCloud<ParcelType>::equipartitionLinearVelocity
|
||||
scalar mass
|
||||
)
|
||||
{
|
||||
return sqrt(kb*temperature/mass)*vector
|
||||
return
|
||||
sqrt(kb*temperature/mass)
|
||||
*vector
|
||||
(
|
||||
rndGen_.GaussNormal(),
|
||||
rndGen_.GaussNormal(),
|
||||
@ -782,11 +785,7 @@ Foam::scalar Foam::DsmcCloud<ParcelType>::equipartitionInternalEnergy
|
||||
{
|
||||
scalar Ei = 0.0;
|
||||
|
||||
if
|
||||
(
|
||||
iDof < 2.0 + SMALL
|
||||
&& iDof > 2.0 - SMALL
|
||||
)
|
||||
if (iDof < 2.0 + SMALL && iDof > 2.0 - SMALL)
|
||||
{
|
||||
// Special case for iDof = 2, i.e. diatomics;
|
||||
Ei = -log(rndGen_.scalar01())*kb*temperature;
|
||||
|
||||
@ -35,7 +35,8 @@ Foam::BinaryCollisionModel<CloudType>::BinaryCollisionModel
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
)
|
||||
: dict_(dict),
|
||||
:
|
||||
dict_(dict),
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs"))
|
||||
{}
|
||||
|
||||
@ -51,8 +51,14 @@ Foam::FreeStream<CloudType>::FreeStream
|
||||
|
||||
if (patchIndex_ == -1)
|
||||
{
|
||||
FatalErrorIn("Foam::DsmcCloud<ParcelType>::initialise")
|
||||
<< "patch " << patchName << " not found." << nl
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::FreeStream<CloudType>::FreeStream"
|
||||
"("
|
||||
"const dictionary&, "
|
||||
"CloudType&"
|
||||
")"
|
||||
) << "patch " << patchName << " not found." << nl
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -78,8 +84,14 @@ Foam::FreeStream<CloudType>::FreeStream
|
||||
|
||||
if (moleculeTypeIds_[i] == -1)
|
||||
{
|
||||
FatalErrorIn("Foam::DsmcCloud<ParcelType>::initialise")
|
||||
<< "typeId " << molecules[i] << "not defined in cloud." << nl
|
||||
FatalErrorIn
|
||||
(
|
||||
"Foam::FreeStream<CloudType>::FreeStream"
|
||||
"("
|
||||
"const dictionary&, "
|
||||
"CloudType&"
|
||||
")"
|
||||
) << "typeId " << molecules[i] << "not defined in cloud." << nl
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,7 +50,6 @@ class FreeStream
|
||||
:
|
||||
public InflowBoundaryModel<CloudType>
|
||||
{
|
||||
|
||||
// Private data
|
||||
|
||||
//- Index of patch to introduce particles across
|
||||
@ -73,6 +72,7 @@ class FreeStream
|
||||
// across.
|
||||
List<Field<scalar> > particleFluxAccumulators_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
|
||||
@ -35,7 +35,8 @@ Foam::InflowBoundaryModel<CloudType>::InflowBoundaryModel
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
)
|
||||
: dict_(dict),
|
||||
:
|
||||
dict_(dict),
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs"))
|
||||
{}
|
||||
|
||||
@ -124,7 +124,6 @@ public:
|
||||
|
||||
//- Introduce particles
|
||||
virtual void inflow() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -36,10 +36,7 @@ Foam::InflowBoundaryModel<CloudType>::New
|
||||
CloudType& owner
|
||||
)
|
||||
{
|
||||
word InflowBoundaryModelType
|
||||
(
|
||||
dict.lookup("InflowBoundaryModel")
|
||||
);
|
||||
word InflowBoundaryModelType(dict.lookup("InflowBoundaryModel"));
|
||||
|
||||
Info<< "Selecting InflowBoundaryModel " << InflowBoundaryModelType << endl;
|
||||
|
||||
|
||||
@ -49,7 +49,6 @@ class MaxwellianThermal
|
||||
:
|
||||
public WallInteractionModel<CloudType>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
|
||||
@ -35,7 +35,8 @@ Foam::WallInteractionModel<CloudType>::WallInteractionModel
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
)
|
||||
: dict_(dict),
|
||||
:
|
||||
dict_(dict),
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs"))
|
||||
{}
|
||||
|
||||
@ -163,7 +163,13 @@ Foam::forces::forces
|
||||
active_ = false;
|
||||
WarningIn
|
||||
(
|
||||
"forces::forces(const objectRegistry& obr, const dictionary& dict)"
|
||||
"Foam::forces::forces"
|
||||
"("
|
||||
"const word&, "
|
||||
"const objectRegistry&, "
|
||||
"const dictionary&, "
|
||||
"const bool"
|
||||
")"
|
||||
) << "No fvMesh available, deactivating."
|
||||
<< endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user