Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry
2013-11-19 15:27:25 +00:00
9 changed files with 77 additions and 29 deletions

View File

@ -123,12 +123,14 @@ inline Vector<Cmpt> Tensor<Cmpt>::x() const
return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]);
}
template<class Cmpt>
inline Vector<Cmpt> Tensor<Cmpt>::y() const
{
return Vector<Cmpt>(this->v_[YX], this->v_[YY], this->v_[YZ]);
}
template<class Cmpt>
inline Vector<Cmpt> Tensor<Cmpt>::z() const
{
@ -160,12 +162,14 @@ inline const Cmpt& Tensor<Cmpt>::xx() const
return this->v_[XX];
}
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::xy() const
{
return this->v_[XY];
}
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::xz() const
{
@ -179,12 +183,14 @@ inline const Cmpt& Tensor<Cmpt>::yx() const
return this->v_[YX];
}
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::yy() const
{
return this->v_[YY];
}
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::yz() const
{
@ -198,12 +204,14 @@ inline const Cmpt& Tensor<Cmpt>::zx() const
return this->v_[ZX];
}
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::zy() const
{
return this->v_[ZY];
}
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::zz() const
{
@ -217,12 +225,14 @@ inline Cmpt& Tensor<Cmpt>::xx()
return this->v_[XX];
}
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::xy()
{
return this->v_[XY];
}
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::xz()
{
@ -236,12 +246,14 @@ inline Cmpt& Tensor<Cmpt>::yx()
return this->v_[YX];
}
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::yy()
{
return this->v_[YY];
}
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::yz()
{
@ -255,12 +267,14 @@ inline Cmpt& Tensor<Cmpt>::zx()
return this->v_[ZX];
}
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::zy()
{
return this->v_[ZY];
}
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::zz()
{
@ -268,7 +282,6 @@ inline Cmpt& Tensor<Cmpt>::zz()
}
//- Return tensor transpose
template<class Cmpt>
inline Tensor<Cmpt> Tensor<Cmpt>::T() const
{
@ -320,7 +333,6 @@ inline void Tensor<Cmpt>::operator=(const Vector<Vector<Cmpt> >& tr)
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
//- Hodge Dual operator (tensor -> vector)
template<class Cmpt>
inline Vector<Cmpt> operator*(const Tensor<Cmpt>& t)
{
@ -328,7 +340,6 @@ inline Vector<Cmpt> operator*(const Tensor<Cmpt>& t)
}
//- Hodge Dual operator (vector -> tensor)
template<class Cmpt>
inline Tensor<Cmpt> operator*(const Vector<Cmpt>& v)
{
@ -341,7 +352,6 @@ inline Tensor<Cmpt> operator*(const Vector<Cmpt>& v)
}
//- Inner-product between two tensors
template<class Cmpt>
inline typename innerProduct<Tensor<Cmpt>, Tensor<Cmpt> >::type
operator&(const Tensor<Cmpt>& t1, const Tensor<Cmpt>& t2)
@ -363,7 +373,6 @@ operator&(const Tensor<Cmpt>& t1, const Tensor<Cmpt>& t2)
}
//- Inner-product between a tensor and a vector
template<class Cmpt>
inline typename innerProduct<Tensor<Cmpt>, Vector<Cmpt> >::type
operator&(const Tensor<Cmpt>& t, const Vector<Cmpt>& v)
@ -377,7 +386,6 @@ operator&(const Tensor<Cmpt>& t, const Vector<Cmpt>& v)
}
//- Inner-product between a vector and a tensor
template<class Cmpt>
inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type
operator&(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
@ -391,7 +399,6 @@ operator&(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
}
//- Outer-product between two vectors
template<class Cmpt>
inline typename outerProduct<Vector<Cmpt>, Vector<Cmpt> >::type
operator*(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
@ -405,7 +412,6 @@ operator*(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
}
//- Division of a vector by a tensor, i.e. dot-product with the tensor inverse
template<class Cmpt>
inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type
operator/(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
@ -690,6 +696,7 @@ operator&&(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
return(t1.xx()*st2.ii() + t1.yy()*st2.ii() + t1.zz()*st2.ii());
}
template<class Cmpt>
class typeOfSum<SphericalTensor<Cmpt>, Tensor<Cmpt> >
{
@ -698,6 +705,7 @@ public:
typedef Tensor<Cmpt> type;
};
template<class Cmpt>
class typeOfSum<Tensor<Cmpt>, SphericalTensor<Cmpt> >
{
@ -706,6 +714,7 @@ public:
typedef Tensor<Cmpt> type;
};
template<class Cmpt>
class innerProduct<SphericalTensor<Cmpt>, Tensor<Cmpt> >
{
@ -714,6 +723,7 @@ public:
typedef Tensor<Cmpt> type;
};
template<class Cmpt>
class innerProduct<Tensor<Cmpt>, SphericalTensor<Cmpt> >
{
@ -777,7 +787,7 @@ operator-(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
}
//- Inner-product between a spherical tensor and a tensor
//- Inner-product between a symmetric tensor and a tensor
template<class Cmpt>
inline Tensor<Cmpt>
operator&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
@ -799,7 +809,7 @@ operator&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
}
//- Inner-product between a tensor and a spherical tensor
//- Inner-product between a tensor and a symmetric tensor
template<class Cmpt>
inline Tensor<Cmpt>
operator&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
@ -821,7 +831,7 @@ operator&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
}
//- Double-dot-product between a spherical tensor and a tensor
//- Double-dot-product between a symmetric tensor and a tensor
template<class Cmpt>
inline Cmpt
operator&&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
@ -835,7 +845,7 @@ operator&&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
}
//- Double-dot-product between a tensor and a spherical tensor
//- Double-dot-product between a tensor and a symmetric tensor
template<class Cmpt>
inline Cmpt
operator&&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
@ -848,6 +858,7 @@ operator&&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
);
}
template<class Cmpt>
class typeOfSum<SymmTensor<Cmpt>, Tensor<Cmpt> >
{
@ -856,6 +867,7 @@ public:
typedef Tensor<Cmpt> type;
};
template<class Cmpt>
class typeOfSum<Tensor<Cmpt>, SymmTensor<Cmpt> >
{
@ -873,6 +885,7 @@ public:
typedef Tensor<Cmpt> type;
};
template<class Cmpt>
class innerProduct<Tensor<Cmpt>, SymmTensor<Cmpt> >
{

View File

@ -216,19 +216,39 @@ void Foam::fv::interRegionHeatTransferModel::addSup
{
if (h.dimensions() == dimEnergy/dimMass)
{
const fluidThermo& thermo =
mesh_.lookupObject<fluidThermo>("thermophysicalProperties");
eqn += htc_*Tmapped - fvm::SuSp(htc_/thermo.Cp(), h);
if (debug)
if (mesh_.foundObject<fluidThermo>("thermophysicalProperties"))
{
const dimensionedScalar energy =
fvc::domainIntegrate(htc_*(h/thermo.Cp() - Tmapped));
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
Info<< "Energy exchange from region " << nbrMesh.name()
<< " To " << mesh_.name() << " : " << energy.value()
<< endl;
eqn += htc_*Tmapped - fvm::SuSp(htc_/thermo.Cp(), h);
if (debug)
{
const dimensionedScalar energy =
fvc::domainIntegrate(htc_*(h/thermo.Cp() - Tmapped));
Info<< "Energy exchange from region " << nbrMesh.name()
<< " To " << mesh_.name() << " : " << energy.value()
<< endl;
}
}
else
{
FatalErrorIn
(
"void Foam::fv::interRegionHeatTransferModel::addSup"
"("
" fvMatrix<scalar>&, "
" const label "
")"
) << " on mesh " << mesh_.name()
<< " could not find object fluidThermo."
<< " The available objects : "
<< mesh_.names()
<< " The semi implicit option can only be used for "
<< "fluid-fluid inter region heat transfer models "
<< exit(FatalError);
}
}
else if (h.dimensions() == dimTemperature)

View File

@ -44,7 +44,12 @@ bool Foam::directMethod::intersect
const label tgtCellI
) const
{
return tgt_.pointInCell(src_.cellCentres()[srcCellI], tgtCellI);
return tgt_.pointInCell
(
src_.cellCentres()[srcCellI],
tgtCellI,
polyMesh::FACEPLANES
);
}
@ -191,7 +196,15 @@ void Foam::directMethod::appendToDirectSeeds
{
label tgtI = tgtNbr[j];
if (tgt_.pointInCell(srcCentre[srcI], tgtI))
if
(
tgt_.pointInCell
(
srcCentre[srcI],
tgtI,
polyMesh::FACEPLANES
)
)
{
// new match - append to lists
found = true;

View File

@ -26,10 +26,10 @@ License
#include "P1.H"
#include "fvmLaplacian.H"
#include "fvmSup.H"
#include "absorptionEmissionModel.H"
#include "scatterModel.H"
#include "constants.H"
#include "addToRunTimeSelectionTable.H"
using namespace Foam::constant;

View File

@ -28,6 +28,7 @@ License
#include "scatterModel.H"
#include "constants.H"
#include "fvm.H"
#include "addToRunTimeSelectionTable.H"
using namespace Foam::constant;
using namespace Foam::constant::mathematical;

View File

@ -28,6 +28,7 @@ License
#include "fvMesh.H"
#include "Time.H"
#include "volFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -28,6 +28,7 @@ License
#include "fvMesh.H"
#include "Time.H"
#include "volFields.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -45,7 +45,6 @@ SourceFiles
#include "IOdictionary.H"
#include "autoPtr.H"
#include "runTimeSelectionTables.H"
#include "addToRunTimeSelectionTable.H"
#include "volFieldsFwd.H"
#include "DimensionedField.H"
#include "fvMatricesFwd.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,7 +28,7 @@ License
#include "constants.H"
#include "greyDiffusiveViewFactorFixedValueFvPatchScalarField.H"
#include "typeInfo.H"
#include "addToRunTimeSelectionTable.H"
using namespace Foam::constant;