Skip to content
Snippets Groups Projects
Commit c7cf4d9d authored by sergio's avatar sergio Committed by Andrew Heather
Browse files

Small changes to energyRegionCoupled BC

parent 222e4037
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -52,7 +52,6 @@ Foam::regionCoupledBaseGAMGInterface::regionCoupledBaseGAMGInterface
refCast<const regionCoupledLduInterface>(fineInterface)
)
{
/*
// Construct face agglomeration from cell agglomeration
{
// From coarse face to cell
......@@ -94,6 +93,7 @@ Foam::regionCoupledBaseGAMGInterface::regionCoupledBaseGAMGInterface
faceRestrictAddressing_.transfer(dynFaceRestrictAddressing);
}
/*
// On the owner side construct the AMI
if (fineRegionCoupledLduInterface_.owner())
{
......@@ -228,15 +228,14 @@ internalFieldTransfer
const labelUList& iF
) const
{
// WarningIn
// (
// "regionCoupledBaseGAMGInterface::internalFieldTransfer"
// "( const Pstream::commsTypes, const labelUList&)"
// " the internal field can not be transfered "
// " as the neighbFvPatch are in different meshes "
// );
/*
WarningIn
(
"regionCoupledBaseGAMGInterface::internalFieldTransfer"
"( const Pstream::commsTypes, const labelUList&)"
" the internal field can not be transfered "
" as the neighbFvPatch are in different meshes "
);
//const labelUList& nbrFaceCells = neighbPatch().faceCells();
const labelUList& nbrFaceCells = nbrLduInterface().faceCells();
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -308,6 +308,7 @@ energyRegionCoupledFvPatchScalarField
Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField::
snGrad() const
{
Debug("snGrad");
return
regionCoupledPatch_.patch().deltaCoeffs()
*(*this - patchInternalField());
......@@ -317,6 +318,7 @@ snGrad() const
Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField::
snGrad(const scalarField&) const
{
Debug("snGrad");
return snGrad();
}
......@@ -427,7 +429,6 @@ void Foam::energyRegionCoupledFvPatchScalarField::updateInterfaceMatrix
if (&psiInternal == &internalField())
{
label patchi = this->patch().index();
const scalarField& pp = thermoPtr_->p().boundaryField()[patchi];
const scalarField& Tp = thermoPtr_->T().boundaryField()[patchi];
......@@ -436,6 +437,8 @@ void Foam::energyRegionCoupledFvPatchScalarField::updateInterfaceMatrix
}
else
{
//NOTE: This is not correct for preconditioned solvers
// psiInternal is not the information needed of the slave
forAll(*this, facei)
{
myHE[facei] = psiInternal[regionCoupledPatch_.faceCells()[facei]];
......@@ -460,33 +463,15 @@ void Foam::energyRegionCoupledFvPatchScalarField::updateInterfaceMatrix
const Pstream::commsTypes
) const
{
setMethod();
scalarField myHE(this->size());
if (&psiInternal == &internalField())
{
label patchi = this->patch().index();
const scalarField& pp = thermoPtr_->p().boundaryField()[patchi];
const scalarField& Tp = thermoPtr_->T().boundaryField()[patchi];
myHE = thermoPtr_->he(pp, Tp, patchi);
}
else
{
forAll(*this, facei)
{
myHE[facei] = psiInternal[regionCoupledPatch_.faceCells()[facei]];
}
}
// Multiply the field by coefficients and add into the result
const labelUList& faceCells = regionCoupledPatch_.faceCells();
forAll(faceCells, elemI)
{
result[faceCells[elemI]] -= coeffs[elemI]*myHE[elemI];
}
notImplemented
(
"energyRegionCoupledFvPatchScalarField::updateInterfaceMatrix()"
"("
"Field<scalar>& "
"const Field<scalar>&"
"const scalarField& "
"const Pstream::commsTypes"
);
}
......
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