Commit 29b76fa7 authored by mattijs's avatar mattijs
Browse files

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

parents 0bf15878 001c78e3
......@@ -67,11 +67,11 @@ void Foam::vtkPV3Foam::convertLagrangianField
{
const label nComp = pTraits<Type>::nComponents;
vtkFloatArray *pointData = vtkFloatArray::New();
pointData->SetNumberOfTuples( tf.size() );
pointData->SetNumberOfComponents( nComp );
pointData->Allocate( nComp*tf.size() );
pointData->SetName( tf.name().c_str() );
vtkFloatArray* pointData = vtkFloatArray::New();
pointData->SetNumberOfTuples(tf.size());
pointData->SetNumberOfComponents(nComp);
pointData->Allocate(nComp*tf.size());
pointData->SetName(tf.name().c_str());
if (debug)
{
......
......@@ -130,7 +130,7 @@ void Foam::vtkPV3Foam::updateInfoInternalMesh
// Determine mesh parts (internalMesh, patches...)
//- Add internal mesh as first entry
arrayRangeVolume_.reset( arraySelection->GetNumberOfArrays() );
arrayRangeVolume_.reset(arraySelection->GetNumberOfArrays());
arraySelection->AddArray
(
"internalMesh"
......@@ -173,7 +173,7 @@ void Foam::vtkPV3Foam::updateInfoLagrangian
readDir(dbPtr_->timePath()/lagrangianPrefix, fileName::DIRECTORY)
);
arrayRangeLagrangian_.reset( arraySelection->GetNumberOfArrays() );
arrayRangeLagrangian_.reset(arraySelection->GetNumberOfArrays());
int nClouds = 0;
forAll(cloudDirs, cloudI)
......@@ -209,7 +209,7 @@ void Foam::vtkPV3Foam::updateInfoPatches
<< " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl;
}
arrayRangePatches_.reset( arraySelection->GetNumberOfArrays() );
arrayRangePatches_.reset(arraySelection->GetNumberOfArrays());
int nPatches = 0;
if (meshPtr_)
......@@ -319,7 +319,7 @@ void Foam::vtkPV3Foam::updateInfoZones
namesLst = readZoneNames("cellZones");
}
arrayRangeCellZones_.reset( arraySelection->GetNumberOfArrays() );
arrayRangeCellZones_.reset(arraySelection->GetNumberOfArrays());
forAll(namesLst, elemI)
{
arraySelection->AddArray
......@@ -342,7 +342,7 @@ void Foam::vtkPV3Foam::updateInfoZones
namesLst = readZoneNames("faceZones");
}
arrayRangeFaceZones_.reset( arraySelection->GetNumberOfArrays() );
arrayRangeFaceZones_.reset(arraySelection->GetNumberOfArrays());
forAll(namesLst, elemI)
{
arraySelection->AddArray
......@@ -365,7 +365,7 @@ void Foam::vtkPV3Foam::updateInfoZones
namesLst = readZoneNames("pointZones");
}
arrayRangePointZones_.reset( arraySelection->GetNumberOfArrays() );
arrayRangePointZones_.reset(arraySelection->GetNumberOfArrays());
forAll(namesLst, elemI)
{
arraySelection->AddArray
......@@ -417,7 +417,7 @@ void Foam::vtkPV3Foam::updateInfoSets
}
arrayRangeCellSets_.reset( arraySelection->GetNumberOfArrays() );
arrayRangeCellSets_.reset(arraySelection->GetNumberOfArrays());
arrayRangeCellSets_ += addToSelection<cellSet>
(
arraySelection,
......@@ -425,7 +425,7 @@ void Foam::vtkPV3Foam::updateInfoSets
" - cellSet"
);
arrayRangeFaceSets_.reset( arraySelection->GetNumberOfArrays() );
arrayRangeFaceSets_.reset(arraySelection->GetNumberOfArrays());
arrayRangeFaceSets_ += addToSelection<faceSet>
(
arraySelection,
......@@ -433,7 +433,7 @@ void Foam::vtkPV3Foam::updateInfoSets
" - faceSet"
);
arrayRangePointSets_.reset( arraySelection->GetNumberOfArrays() );
arrayRangePointSets_.reset(arraySelection->GetNumberOfArrays());
arrayRangePointSets_ += addToSelection<pointSet>
(
arraySelection,
......
......@@ -81,7 +81,7 @@ void Foam::DsmcParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
return;
}
Particle<DsmcParcel<ParcelType> >::readFields(c);
Particle<ParcelType>::readFields(c);
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
c.checkFieldIOobject(c, U);
......
......@@ -551,7 +551,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::dQ() const
dimensionedScalar
(
"zero",
dimensionSet(1, -3, -1 , 0, 0, 0, 0),
dimensionSet(0, 2, -3 , 0, 0, 0, 0),
0.0
)
)
......@@ -561,20 +561,21 @@ Foam::ODEChemistryModel<CompType, ThermoType>::dQ() const
{
scalarField& dQ = tdQ();
scalarField cp(dQ.size(), 0.0);
scalarField rhoEff(dQ.size(), 0.0);
forAll(Y_, i)
{
forAll(dQ, cellI)
{
scalar Ti = this->thermo().T()[cellI];
cp[cellI] += Y_[i][cellI]*specieThermo_[i].Cp(Ti);
scalar hi = specieThermo_[i].h(Ti);
scalar pi = this->thermo().p()[cellI];
rhoEff[cellI] += Y_[i][cellI]*specieThermo_[i].rho(pi, Ti);
scalar hi = specieThermo_[i].H(Ti);
dQ[cellI] -= hi*RR_[i][cellI];
}
}
dQ /= cp;
dQ /= rhoEff;
}
return tdQ;
......
......@@ -90,7 +90,7 @@ protected:
//- Chemistry solver
autoPtr<chemistrySolver<CompType, ThermoType> > solver_;
//- Chemical source term
//- Chemical source term [kg/m3/s]
PtrList<scalarField> RR_;
......@@ -180,7 +180,7 @@ public:
//- Return the chemical time scale
virtual tmp<volScalarField> tc() const;
//- Return the heat release
//- Return the heat release, i.e. enthalpy/sec [m2/s3]
virtual tmp<volScalarField> dQ() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment