BUG: Corrceted ambiguous construction from tmp and coding style updates

This commit is contained in:
andy
2013-02-18 14:20:02 +00:00
parent 739290cad4
commit 94c9d90959
2 changed files with 17 additions and 16 deletions

View File

@ -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<scalar>());
reduce(area, sumOp<scalar>());
}
// * * * * * * * * * * * * * * * * 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<basicThermo>("thermophysicalProperties");
const surfaceScalarField Cpf = fvc::interpolate(thermo.Cp());
const surfaceScalarField Cpf(fvc::interpolate(thermo.Cp()));
const surfaceScalarField& phi =
mesh_.lookupObject<surfaceScalarField>(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<volScalarField>(TName_);
const scalarField TCells(T, cells_);

View File

@ -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);