diff --git a/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.C b/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.C index 7c4c072067..cef33f7e1e 100644 --- a/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.C +++ b/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -138,25 +138,26 @@ void Foam::fv::heatExchangerSource::addHeatSource } -void Foam::fv::heatExchangerSource::calculateTotalArea(scalar& var) +void Foam::fv::heatExchangerSource::calculateTotalArea(scalar& area) { - var = 0; + area = 0; forAll(faceId_, i) { label faceI = faceId_[i]; if (facePatchId_[i] != -1) { label patchI = facePatchId_[i]; - var += mesh_.magSf().boundaryField()[patchI][faceI]; + area += mesh_.magSf().boundaryField()[patchI][faceI]; } else { - var += mesh_.magSf()[faceI]; + area += mesh_.magSf()[faceI]; } } - reduce(var, sumOp()); + reduce(area, sumOp()); } + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::fv::heatExchangerSource::heatExchangerSource @@ -189,10 +190,10 @@ Foam::fv::heatExchangerSource::heatExchangerSource ( "heatExchangerSource::heatExchangerSource" "(" - " const word& name," - " const word& modelType," - " const dictionary& dict," - " const fvMesh& mesh" + "const word&, " + "const word&, " + "const dictionary&, " + "const fvMesh&" ")" ) << type() << " " << this->name() << ": " @@ -224,7 +225,7 @@ void Foam::fv::heatExchangerSource::addSup const basicThermo& thermo = mesh_.lookupObject("thermophysicalProperties"); - const surfaceScalarField Cpf = fvc::interpolate(thermo.Cp()); + const surfaceScalarField Cpf(fvc::interpolate(thermo.Cp())); const surfaceScalarField& phi = mesh_.lookupObject(phiName_); @@ -241,7 +242,7 @@ void Foam::fv::heatExchangerSource::addSup CpfMean += Cpf.boundaryField()[patchI][faceI] - * mesh_.magSf().boundaryField()[patchI][faceI]; + *mesh_.magSf().boundaryField()[patchI][faceI]; } else { @@ -254,8 +255,8 @@ void Foam::fv::heatExchangerSource::addSup scalar Qt = eTable_()(mag(totalphi), secondaryMassFlowRate_) - * (secondaryInletT_ - primaryInletT_) - * (CpfMean/faceZoneArea_)*mag(totalphi); + *(secondaryInletT_ - primaryInletT_) + *(CpfMean/faceZoneArea_)*mag(totalphi); const volScalarField& T = mesh_.lookupObject(TName_); const scalarField TCells(T, cells_); diff --git a/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.H b/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.H index 6194bdfb62..0a620433e0 100644 --- a/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.H +++ b/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -179,7 +179,7 @@ private: void init(); //- Calculate total area of faceZone accross procesors - void calculateTotalArea(scalar& var); + void calculateTotalArea(scalar& area);