Skip to content
Snippets Groups Projects
Commit 42821a0a authored by andy's avatar andy
Browse files

ENH: Updated effectivenessHeatExchangerSource fvOption

parent 8f4683c8
Branches
Tags
No related merge requests found
......@@ -51,7 +51,7 @@ namespace fv
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::fv::effectivenessHeatExchangerSource::init()
void Foam::fv::effectivenessHeatExchangerSource::initialise()
{
const faceZone& fZone = mesh_.faceZones()[zoneID_];
......@@ -186,20 +186,23 @@ Foam::fv::effectivenessHeatExchangerSource::effectivenessHeatExchangerSource
<< nl << exit(FatalError);
}
coeffs_.lookup("fieldNames") >> fieldNames_;
applied_.setSize(fieldNames_.size(), false);
fieldNames_.setSize(1, "energy");
applied_.setSize(1, false);
eTable_.reset(new interpolation2DTable<scalar>(coeffs_));
init();
Info<< " - creating effectivenessHeatExchangerSource: "
<< this->name() << endl;
initialise();
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::fv::effectivenessHeatExchangerSource::alwaysApply() const
{
return true;
}
void Foam::fv::effectivenessHeatExchangerSource::addSup
(
fvMatrix<scalar>& eqn,
......@@ -209,6 +212,11 @@ void Foam::fv::effectivenessHeatExchangerSource::addSup
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
if (eqn.psi().name() != thermo.he().name())
{
return;
}
const surfaceScalarField Cpf(fvc::interpolate(thermo.Cp()));
const surfaceScalarField& phi =
......
......@@ -72,7 +72,6 @@ Description
effectivenessHeatExchangerSourceCoeffs
{
fieldNames (e);
secondaryMassFlowRate 1.0;
secondaryInletT 336;
primaryInletT 293;
......@@ -178,10 +177,10 @@ private:
//- Disallow default bitwise assignment
void operator=(const effectivenessHeatExchangerSource&);
//- Init heat exchanger source model
void init();
//- Initialise heat exchanger source model
void initialise();
//- Calculate total area of faceZone accross procesors
//- Calculate total area of faceZone accross processors
void calculateTotalArea(scalar& area);
......@@ -210,6 +209,8 @@ public:
// Member Functions
virtual bool alwaysApply() const;
// Public Functions
......
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