Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
sergio
2013-02-22 14:40:25 +00:00
136 changed files with 412 additions and 306 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -39,7 +39,7 @@ Description
\vartable
x_p | patch values
x_{ref} | refernce patch values
x_{ref} | reference patch values
n | time level
\alpha | fraction of new random component added to previous time value
C_{RMS} | RMS coefficient

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,12 +49,12 @@ bool Foam::InjectionModel<CloudType>::prepareForNextTimeStep
(
const scalar time,
label& newParcels,
scalar& newVolume
scalar& newVolumeFraction
)
{
// Initialise values
newParcels = 0;
newVolume = 0.0;
newVolumeFraction = 0.0;
bool validInjection = false;
// Return if not started injection event
@ -72,9 +72,9 @@ bool Foam::InjectionModel<CloudType>::prepareForNextTimeStep
newParcels = this->parcelsToInject(t0, t1);
// Volume of parcels to inject
newVolume = this->volumeToInject(t0, t1);
newVolumeFraction = this->volumeToInject(t0, t1)/volumeTotal_;
if (newVolume > 0)
if (newVolumeFraction > 0)
{
if (newParcels > 0)
{
@ -196,7 +196,7 @@ template<class CloudType>
Foam::scalar Foam::InjectionModel<CloudType>::setNumberOfParticles
(
const label parcels,
const scalar volume,
const scalar volumeFraction,
const scalar diameter,
const scalar rho
)
@ -206,10 +206,10 @@ Foam::scalar Foam::InjectionModel<CloudType>::setNumberOfParticles
{
case pbMass:
{
nP =
volume/volumeTotal_
*massTotal_/rho
/(parcels*pi/6.0*pow3(diameter));
scalar volumep = pi/6.0*pow3(diameter);
scalar volumeTot = massTotal_/rho;
nP = (volumeFraction*volumeTot + delayedVolume_)/(parcels*volumep);
break;
}
case pbNumber:
@ -501,11 +501,10 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
label parcelsAdded = 0;
scalar massAdded = 0.0;
label newParcels = 0;
scalar newVolume = 0.0;
scalar newVolumeFraction = 0.0;
if (prepareForNextTimeStep(time, newParcels, newVolume))
if (prepareForNextTimeStep(time, newParcels, newVolumeFraction))
{
newVolume += delayedVolume_;
scalar delayedVolume = 0;
const scalar trackTime = this->owner().solution().trackTime();
@ -580,7 +579,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
setNumberOfParticles
(
newParcels,
newVolume,
newVolumeFraction,
pPtr->d(),
pPtr->rho()
);
@ -644,7 +643,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState
for (label parcelI = 0; parcelI < newParcels; parcelI++)
{
// Volume to inject is split equally amongst all parcel streams
scalar newVolume = volumeTotal_/newParcels;
scalar newVolumeFraction = 1.0/scalar(newParcels);
// Determine the injection position and owner cell,
// tetFace and tetPt
@ -691,7 +690,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState
setNumberOfParticles
(
1,
newVolume,
newVolumeFraction,
pPtr->d(),
pPtr->rho()
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -150,7 +150,7 @@ protected:
(
const scalar time,
label& newParcels,
scalar& newVolume
scalar& newVolumeFraction
);
//- Find the cell that contains the supplied position
@ -169,7 +169,7 @@ protected:
virtual scalar setNumberOfParticles
(
const label parcels,
const scalar volume,
const scalar volumeFraction,
const scalar diameter,
const scalar rho
);

View File

@ -39,15 +39,16 @@ namespace Foam
template<>
const char*
NamedEnum<fieldValues::fieldValueDelta::operationType, 4>::names[] =
NamedEnum<fieldValues::fieldValueDelta::operationType, 5>::names[] =
{
"add",
"subtract",
"min",
"max"
"max",
"average"
};
const NamedEnum<fieldValues::fieldValueDelta::operationType, 4>
const NamedEnum<fieldValues::fieldValueDelta::operationType, 5>
fieldValues::fieldValueDelta::operationTypeNames_;
}