diff --git a/src/ODE/ODESolvers/KRR4/KRR4.C b/src/ODE/ODESolvers/KRR4/KRR4.C index 2f6d724545..bdfca457df 100644 --- a/src/ODE/ODESolvers/KRR4/KRR4.C +++ b/src/ODE/ODESolvers/KRR4/KRR4.C @@ -164,8 +164,21 @@ void Foam::KRR4::solve if (x == xTemp) { - FatalErrorIn("ODES::KRR4") - << "stepsize not significant" + FatalErrorIn + ( + "void Foam::KRR4::solve" + "(" + "const ODE&, " + "scalar&, " + "scalarField&, " + "scalarField&, " + "const scalar, " + "const scalarField&, " + "const scalar, " + "scalar&, " + "scalar&" + ") const" + ) << "solver stalled: step size = 0" << exit(FatalError); } @@ -189,8 +202,21 @@ void Foam::KRR4::solve } } - FatalErrorIn("ODES::KRR4") - << "exceeded maxtry" + FatalErrorIn + ( + "void Foam::KRR4::solve" + "(" + "const ODE&, " + "scalar&, " + "scalarField&, " + "scalarField&, " + "const scalar, " + "const scalarField&, " + "const scalar, " + "scalar&, " + "scalar&" + ") const" + ) << "Maximum number of solver iterations exceeded" << exit(FatalError); } diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H index 61e202fd23..126f8a8512 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingMultiphaseParcelInjectionModels.H @@ -44,6 +44,7 @@ License makeInjectionModel(CloudType); \ makeInjectionModelType(CellZoneInjection, CloudType); \ makeInjectionModelType(ConeInjection, CloudType); \ + makeInjectionModelType(ConeNozzleInjection, CloudType); \ makeInjectionModelType(FieldActivatedInjection, CloudType); \ makeInjectionModelType(ManualInjection, CloudType); \ makeInjectionModelType(NoInjection, CloudType); \ diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.C index bcbfe09525..e907b2d599 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.C @@ -31,32 +31,6 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -template -void Foam::FacePostProcessing::applyToFace -( - const label faceIn, - label& zoneI, - label& faceI -) const -{ - const faceZoneMesh& fzm = this->owner().mesh().faceZones(); - - forAll(faceZoneIDs_, i) - { - const faceZone& fz = fzm[faceZoneIDs_[i]]; - forAll(fz, j) - { - if (fz[j] == faceIn) - { - zoneI = i; - faceI = j; - return; - } - } - } -} - - template void Foam::FacePostProcessing::makeLogFile ( @@ -93,7 +67,7 @@ void Foam::FacePostProcessing::makeLogFile << "# Face zone : " << zoneName << nl << "# Faces : " << nFaces << nl << "# Area : " << totArea << nl - << "# Time" << tab << "mass" << tab << "massFlux" << endl; + << "# Time" << tab << "mass" << tab << "massFlowRate" << endl; } } } @@ -105,25 +79,27 @@ void Foam::FacePostProcessing::write() const fvMesh& mesh = this->owner().mesh(); const Time& time = mesh.time(); const faceZoneMesh& fzm = mesh.faceZones(); - const scalar dt = time.deltaTValue(); + scalar timeNew = time.value(); + scalar timeElapsed = timeNew-timeOld_; - totalTime_ += dt; + totalTime_ += timeElapsed; - const scalar alpha = (totalTime_ - dt)/totalTime_; - const scalar beta = dt/totalTime_; + const scalar alpha = (totalTime_ - timeElapsed)/totalTime_; + const scalar beta = timeElapsed/totalTime_; //correct forAll(faceZoneIDs_, zoneI) { + massFlowRate_[zoneI] = + alpha*massFlowRate_[zoneI] + beta*mass_[zoneI]/timeElapsed; massTotal_[zoneI] += mass_[zoneI]; - massFlux_[zoneI] = alpha*massFlux_[zoneI] + beta*mass_[zoneI]/dt; } const label procI = Pstream::myProcNo(); - Info<< "particleFaceFlux output:" << nl; + Info<< "particleFaceFlowRate output:" << nl; List zoneMassTotal(mass_.size()); - List zoneMassFlux(massFlux_.size()); + List zoneMassFlowRate(massFlowRate_.size()); forAll(faceZoneIDs_, zoneI) { const word& zoneName = fzm[faceZoneIDs_[zoneI]].name(); @@ -138,26 +114,26 @@ void Foam::FacePostProcessing::write() ); const scalar sumMassTotal = sum(zoneMassTotal[zoneI]); - scalarListList allProcMassFlux(Pstream::nProcs()); - allProcMassFlux[procI] = massFlux_[zoneI]; - Pstream::gatherList(allProcMassFlux); - zoneMassFlux[zoneI] = + scalarListList allProcMassFlowRate(Pstream::nProcs()); + allProcMassFlowRate[procI] = massFlowRate_[zoneI]; + Pstream::gatherList(allProcMassFlowRate); + zoneMassFlowRate[zoneI] = ListListOps::combine ( - allProcMassFlux, accessOp() + allProcMassFlowRate, accessOp() ); - const scalar sumMassFlux = sum(zoneMassFlux[zoneI]); + const scalar sumMassFlowRate = sum(zoneMassFlowRate[zoneI]); Info<< " " << zoneName << ": total mass = " << sumMassTotal - << "; average mass flux = " << sumMassFlux + << "; average mass flow rate = " << sumMassFlowRate << nl; if (outputFilePtr_.set(zoneI)) { OFstream& os = outputFilePtr_[zoneI]; os << time.timeName() << token::TAB << sumMassTotal << token::TAB - << sumMassFlux<< endl; + << sumMassFlowRate<< endl; } } @@ -235,8 +211,8 @@ void Foam::FacePostProcessing::write() fZone.name(), allPoints, allFaces, - "massFlux", - zoneMassFlux[zoneI], + "massFlowRate", + zoneMassFlowRate[zoneI], false ); } @@ -248,8 +224,9 @@ void Foam::FacePostProcessing::write() { forAll(faceZoneIDs_, zoneI) { - massFlux_[zoneI] = 0.0; + massFlowRate_[zoneI] = 0.0; } + timeOld_ = timeNew; totalTime_ = 0.0; } @@ -278,15 +255,16 @@ Foam::FacePostProcessing::FacePostProcessing totalTime_(0.0), mass_(), massTotal_(), - massFlux_(), + massFlowRate_(), log_(this->coeffDict().lookup("log")), outputFilePtr_(), - outputDir_(owner.mesh().time().path()) + outputDir_(owner.mesh().time().path()), + timeOld_(owner.mesh().time().value()) { wordList faceZoneNames(this->coeffDict().lookup("faceZones")); mass_.setSize(faceZoneNames.size()); massTotal_.setSize(faceZoneNames.size()); - massFlux_.setSize(faceZoneNames.size()); + massFlowRate_.setSize(faceZoneNames.size()); outputFilePtr_.setSize(faceZoneNames.size()); @@ -317,7 +295,7 @@ Foam::FacePostProcessing::FacePostProcessing const faceZone& fz = fzm[zoneI]; mass_[i].setSize(fz.size(), 0.0); massTotal_[i].setSize(fz.size(), 0.0); - massFlux_[i].setSize(fz.size(), 0.0); + massFlowRate_[i].setSize(fz.size(), 0.0); label nFaces = returnReduce(fz.size(), sumOp