Steady compressible solver updates, MRF and jump conditions. Gregor Cvijetic
This commit is contained in:
parent
7b2137f0e9
commit
7c2fb83e9c
32 changed files with 752 additions and 99 deletions
|
@ -231,10 +231,10 @@ void ggiFvPatchField<Type>::initEvaluate
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void ggiFvPatchField<Type>::evaluate
|
void ggiFvPatchField<Type>::evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes
|
const Pstream::commsTypes commsTypes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fvPatchField<Type>::evaluate();
|
coupledFvPatchField<Type>::evaluate(commsTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
@ -38,7 +39,6 @@ Note on parallelisation
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "jumpGgiFvPatchField.H"
|
#include "jumpGgiFvPatchField.H"
|
||||||
//#include "symmTransformField.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -122,44 +122,46 @@ void jumpGgiFvPatchField<Type>::initInterfaceMatrixUpdate
|
||||||
const unallocLabelList& sfc = this->ggiPatch().shadow().faceCells();
|
const unallocLabelList& sfc = this->ggiPatch().shadow().faceCells();
|
||||||
|
|
||||||
scalarField sField(sfc.size());
|
scalarField sField(sfc.size());
|
||||||
|
|
||||||
|
forAll (sField, i)
|
||||||
|
{
|
||||||
|
sField[i] = psiInternal[sfc[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
Field<Type> pnf = this->ggiPatch().interpolate(sField);
|
||||||
|
|
||||||
|
|
||||||
|
// Multiply the field by coefficients and add into the result
|
||||||
|
const unallocLabelList& fc = this->ggiPatch().faceCells();
|
||||||
|
|
||||||
|
const Field<scalar> jf = jump()().component(cmpt);
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
reinterpret_cast<const void*>(&psiInternal)
|
reinterpret_cast<const void*>(&psiInternal)
|
||||||
== reinterpret_cast<const void*>(&this->internalField())
|
== reinterpret_cast<const void*>(&this->internalField())
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const scalarField jf = jump()().component(cmpt);
|
forAll(pnf, elemI)
|
||||||
|
|
||||||
forAll (sField, i)
|
|
||||||
{
|
{
|
||||||
sField[i] = psiInternal[sfc[i]] + jf[i];
|
pnf[elemI] += jf[elemI];
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
forAll (sField, i)
|
|
||||||
{
|
|
||||||
sField[i] = psiInternal[sfc[i]];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scalarField pnf = this->ggiPatch().interpolate(sField);
|
multiply(pnf, coeffs, pnf);
|
||||||
|
|
||||||
// Multiply the field by coefficients and add into the result
|
|
||||||
const unallocLabelList& fc = this->ggiPatch().faceCells();
|
|
||||||
|
|
||||||
if (switchToLhs)
|
if (switchToLhs)
|
||||||
{
|
{
|
||||||
forAll(fc, elemI)
|
forAll(fc, elemI)
|
||||||
{
|
{
|
||||||
result[fc[elemI]] += coeffs[elemI]*pnf[elemI];
|
result[fc[elemI]] += pnf[elemI];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
forAll(fc, elemI)
|
forAll(fc, elemI)
|
||||||
{
|
{
|
||||||
result[fc[elemI]] -= coeffs[elemI]*pnf[elemI];
|
result[fc[elemI]] -= pnf[elemI];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
@ -109,7 +110,7 @@ jumpMixingPlaneFvPatchField<Type>::patchNeighbourField() const
|
||||||
if (this->mixing() == mixingPlaneInterpolation::AREA_AVERAGING)
|
if (this->mixing() == mixingPlaneInterpolation::AREA_AVERAGING)
|
||||||
{
|
{
|
||||||
// Area-weighted averaging
|
// Area-weighted averaging
|
||||||
return this->mixingPlanePatch().interpolate(sField);
|
return this->mixingPlanePatch().interpolate(sField) + jump();
|
||||||
}
|
}
|
||||||
else if (this->mixing() == mixingPlaneInterpolation::FLUX_AVERAGING)
|
else if (this->mixing() == mixingPlaneInterpolation::FLUX_AVERAGING)
|
||||||
{
|
{
|
||||||
|
@ -134,11 +135,12 @@ jumpMixingPlaneFvPatchField<Type>::patchNeighbourField() const
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
+ this->mixingPlanePatch().fromProfile(1 - mask)*
|
+ this->mixingPlanePatch().fromProfile(1 - mask)*
|
||||||
this->patchInternalField();
|
this->patchInternalField()
|
||||||
|
+ jump();
|
||||||
}
|
}
|
||||||
else if (this->mixing() == mixingPlaneInterpolation::ZERO_GRADIENT)
|
else if (this->mixing() == mixingPlaneInterpolation::ZERO_GRADIENT)
|
||||||
{
|
{
|
||||||
return this->patchInternalField();
|
return this->patchInternalField() + jump();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -195,6 +197,32 @@ void jumpMixingPlaneFvPatchField<Type>::initInterfaceMatrixUpdate
|
||||||
|
|
||||||
scalarField pnf = this->mixingPlanePatch().interpolate(sField);
|
scalarField pnf = this->mixingPlanePatch().interpolate(sField);
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
reinterpret_cast<const void*>(&psiInternal)
|
||||||
|
== reinterpret_cast<const void*>(&this->internalField())
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const Field<scalar> jf = jump()().component(cmpt);
|
||||||
|
|
||||||
|
// Multiply the field by coefficients and add into the result
|
||||||
|
if (switchToLhs)
|
||||||
|
{
|
||||||
|
forAll(fc, elemI)
|
||||||
|
{
|
||||||
|
result[fc[elemI]] += coeffs[elemI]*(pnf[elemI] + jf[elemI]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
forAll(fc, elemI)
|
||||||
|
{
|
||||||
|
result[fc[elemI]] -= coeffs[elemI]*(pnf[elemI] + jf[elemI]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// Multiply the field by coefficients and add into the result
|
// Multiply the field by coefficients and add into the result
|
||||||
if (switchToLhs)
|
if (switchToLhs)
|
||||||
{
|
{
|
||||||
|
@ -211,6 +239,7 @@ void jumpMixingPlaneFvPatchField<Type>::initInterfaceMatrixUpdate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (this->mixing() == mixingPlaneInterpolation::ZERO_GRADIENT)
|
else if (this->mixing() == mixingPlaneInterpolation::ZERO_GRADIENT)
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
|
|
|
@ -32,6 +32,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,199 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | foam-extend: Open Source CFD
|
||||||
|
\\ / O peration | Version: 4.0
|
||||||
|
\\ / A nd | Web: http://www.foam-extend.org
|
||||||
|
\\/ M anipulation | For copyright notice see file Copyright
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of foam-extend.
|
||||||
|
|
||||||
|
foam-extend is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
foam-extend is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Author
|
||||||
|
Ilaria De Dominicis, General Electric Power, (March 2016)
|
||||||
|
|
||||||
|
Contributor
|
||||||
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
|
||||||
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "jumpOverlapGgiFvPatchField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
jumpOverlapGgiFvPatchField<Type>::jumpOverlapGgiFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
overlapGgiFvPatchField<Type>(p, iF)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
jumpOverlapGgiFvPatchField<Type>::jumpOverlapGgiFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
overlapGgiFvPatchField<Type>(p, iF, dict)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
jumpOverlapGgiFvPatchField<Type>::jumpOverlapGgiFvPatchField
|
||||||
|
(
|
||||||
|
const jumpOverlapGgiFvPatchField<Type>& ptf,
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
|
const fvPatchFieldMapper& mapper
|
||||||
|
)
|
||||||
|
:
|
||||||
|
overlapGgiFvPatchField<Type>(ptf, p, iF, mapper)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
jumpOverlapGgiFvPatchField<Type>::jumpOverlapGgiFvPatchField
|
||||||
|
(
|
||||||
|
const jumpOverlapGgiFvPatchField<Type>& ptf
|
||||||
|
)
|
||||||
|
:
|
||||||
|
overlapGgiFvPatchField<Type>(ptf)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
jumpOverlapGgiFvPatchField<Type>::jumpOverlapGgiFvPatchField
|
||||||
|
(
|
||||||
|
const jumpOverlapGgiFvPatchField<Type>& ptf,
|
||||||
|
const DimensionedField<Type, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
overlapGgiFvPatchField<Type>(ptf, iF)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<Field<Type> >
|
||||||
|
jumpOverlapGgiFvPatchField<Type>::patchNeighbourField() const
|
||||||
|
{
|
||||||
|
return overlapGgiFvPatchField<Type>::patchNeighbourField() + jump();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void jumpOverlapGgiFvPatchField<Type>::initInterfaceMatrixUpdate
|
||||||
|
(
|
||||||
|
const scalarField& psiInternal,
|
||||||
|
scalarField& result,
|
||||||
|
const lduMatrix&,
|
||||||
|
const scalarField& coeffs,
|
||||||
|
const direction cmpt,
|
||||||
|
const Pstream::commsTypes commsType,
|
||||||
|
const bool switchToLhs
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
|
||||||
|
// Get shadow face-cells and assemble shadow field
|
||||||
|
const unallocLabelList& sfc = this->overlapGgiPatch().shadow().faceCells();
|
||||||
|
|
||||||
|
scalarField sField(sfc.size());
|
||||||
|
|
||||||
|
forAll (sField, i)
|
||||||
|
{
|
||||||
|
sField[i] = psiInternal[sfc[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
scalarField pnf = this->overlapGgiPatch().interpolate(sField);
|
||||||
|
|
||||||
|
// Multiply the field by coefficients and add into the result
|
||||||
|
const unallocLabelList& fc = this->overlapGgiPatch().faceCells();
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
reinterpret_cast<const void*>(&psiInternal)
|
||||||
|
== reinterpret_cast<const void*>(&this->internalField())
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const Field<scalar> jf = jump()().component(cmpt);
|
||||||
|
|
||||||
|
if (switchToLhs)
|
||||||
|
{
|
||||||
|
forAll(fc, elemI)
|
||||||
|
{
|
||||||
|
result[fc[elemI]] += coeffs[elemI]*(pnf[elemI] + jf[elemI]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
forAll(fc, elemI)
|
||||||
|
{
|
||||||
|
result[fc[elemI]] -= coeffs[elemI]*(pnf[elemI] + jf[elemI]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (switchToLhs)
|
||||||
|
{
|
||||||
|
forAll(fc, elemI)
|
||||||
|
{
|
||||||
|
result[fc[elemI]] += coeffs[elemI]*(pnf[elemI]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
forAll(fc, elemI)
|
||||||
|
{
|
||||||
|
result[fc[elemI]] -= coeffs[elemI]*(pnf[elemI]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void jumpOverlapGgiFvPatchField<Type>::updateInterfaceMatrix
|
||||||
|
(
|
||||||
|
const scalarField& psiInternal,
|
||||||
|
scalarField& result,
|
||||||
|
const lduMatrix&,
|
||||||
|
const scalarField& coeffs,
|
||||||
|
const direction cmpt,
|
||||||
|
const Pstream::commsTypes,
|
||||||
|
const bool switchToLhs
|
||||||
|
) const
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -0,0 +1,170 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | foam-extend: Open Source CFD
|
||||||
|
\\ / O peration | Version: 4.0
|
||||||
|
\\ / A nd | Web: http://www.foam-extend.org
|
||||||
|
\\/ M anipulation | For copyright notice see file Copyright
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of foam-extend.
|
||||||
|
|
||||||
|
foam-extend is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
foam-extend is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
jumpOverlapGgiFvPatchField
|
||||||
|
|
||||||
|
Description
|
||||||
|
OverlapGgi interface patch field with a jump condition
|
||||||
|
|
||||||
|
Author
|
||||||
|
Ilaria De Dominicis, General Electric Power, (March 2016)
|
||||||
|
|
||||||
|
Contributor
|
||||||
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
|
||||||
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
jumpOverlapGgiFvPatchField.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef jumpOverlapGgiFvPatchField_H
|
||||||
|
#define jumpOverlapGgiFvPatchField_H
|
||||||
|
|
||||||
|
#include "overlapGgiFvPatchField.H"
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class jumpOverlapGgiFvPatchField Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class jumpOverlapGgiFvPatchField
|
||||||
|
:
|
||||||
|
public overlapGgiFvPatchField<Type>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("jumpOverlapGgi");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from patch and internal field
|
||||||
|
jumpOverlapGgiFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from patch, internal field and dictionary
|
||||||
|
jumpOverlapGgiFvPatchField
|
||||||
|
(
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&,
|
||||||
|
const dictionary&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct by mapping given jumpOverlapGgiFvPatchField
|
||||||
|
// onto a new patch
|
||||||
|
jumpOverlapGgiFvPatchField
|
||||||
|
(
|
||||||
|
const jumpOverlapGgiFvPatchField<Type>&,
|
||||||
|
const fvPatch&,
|
||||||
|
const DimensionedField<Type, volMesh>&,
|
||||||
|
const fvPatchFieldMapper&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct as copy
|
||||||
|
jumpOverlapGgiFvPatchField
|
||||||
|
(
|
||||||
|
const jumpOverlapGgiFvPatchField&
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct as copy setting internal field reference
|
||||||
|
jumpOverlapGgiFvPatchField
|
||||||
|
(
|
||||||
|
const jumpOverlapGgiFvPatchField<Type>&,
|
||||||
|
const DimensionedField<Type, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
//- Return the interface type
|
||||||
|
virtual const word& interfaceFieldType() const
|
||||||
|
{
|
||||||
|
return overlapGgiFvPatchField<Type>::type();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Return the "jump" across the patch as a "half" field
|
||||||
|
virtual tmp<Field<Type> > jump() const = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// Evaluation functions
|
||||||
|
|
||||||
|
//- Return neighbour patch field
|
||||||
|
virtual tmp<Field<Type> > patchNeighbourField() const;
|
||||||
|
|
||||||
|
//- Initialise neighbour matrix update
|
||||||
|
virtual void initInterfaceMatrixUpdate
|
||||||
|
(
|
||||||
|
const scalarField& psiInternal,
|
||||||
|
scalarField& result,
|
||||||
|
const lduMatrix& m,
|
||||||
|
const scalarField& coeffs,
|
||||||
|
const direction cmpt,
|
||||||
|
const Pstream::commsTypes commsType,
|
||||||
|
const bool switchToLhs
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Update result field based on interface functionality
|
||||||
|
virtual void updateInterfaceMatrix
|
||||||
|
(
|
||||||
|
const scalarField& psiInternal,
|
||||||
|
scalarField& result,
|
||||||
|
const lduMatrix&,
|
||||||
|
const scalarField& coeffs,
|
||||||
|
const direction cmpt,
|
||||||
|
const Pstream::commsTypes commsType,
|
||||||
|
const bool switchToLhs
|
||||||
|
) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "jumpOverlapGgiFvPatchField.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | foam-extend: Open Source CFD
|
||||||
|
\\ / O peration | Version: 4.0
|
||||||
|
\\ / A nd | Web: http://www.foam-extend.org
|
||||||
|
\\/ M anipulation | For copyright notice see file Copyright
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of foam-extend.
|
||||||
|
|
||||||
|
foam-extend is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
foam-extend is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Description
|
||||||
|
OverlapGgi patch field, providing coupling with a jump condition
|
||||||
|
between arbitrary patches
|
||||||
|
|
||||||
|
Author
|
||||||
|
Ilaria De Dominicis, General Electric Power, (March 2016)
|
||||||
|
|
||||||
|
Contributor
|
||||||
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
|
||||||
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "jumpOverlapGgiFvPatchFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePatchFieldsTypeName(jumpOverlapGgi);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -0,0 +1,67 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | foam-extend: Open Source CFD
|
||||||
|
\\ / O peration | Version: 4.0
|
||||||
|
\\ / A nd | Web: http://www.foam-extend.org
|
||||||
|
\\/ M anipulation | For copyright notice see file Copyright
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of foam-extend.
|
||||||
|
|
||||||
|
foam-extend is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
foam-extend is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
jumpOverlapGgiFvPatchFields
|
||||||
|
|
||||||
|
Description
|
||||||
|
OverlapGgi patch field, providing coupling with a jump condition
|
||||||
|
between arbitrary patches
|
||||||
|
|
||||||
|
Author
|
||||||
|
Ilaria De Dominicis, General Electric Power, (March 2016)
|
||||||
|
|
||||||
|
Contributor
|
||||||
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
|
||||||
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
jumpOverlapGgiFvPatchFields.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef jumpOverlapGgiFvPatchFields_H
|
||||||
|
#define jumpOverlapGgiFvPatchFields_H
|
||||||
|
|
||||||
|
#include "jumpOverlapGgiFvPatchField.H"
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
makePatchTypeFieldTypedefs(jumpOverlapGgi)
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -0,0 +1,65 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | foam-extend: Open Source CFD
|
||||||
|
\\ / O peration | Version: 4.0
|
||||||
|
\\ / A nd | Web: http://www.foam-extend.org
|
||||||
|
\\/ M anipulation | For copyright notice see file Copyright
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of foam-extend.
|
||||||
|
|
||||||
|
foam-extend is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
foam-extend is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
jumpOverlapGgiFvPatchField
|
||||||
|
|
||||||
|
Description
|
||||||
|
OverlapGgi patch field, providing coupling with a jump condition
|
||||||
|
between arbitrary patches
|
||||||
|
|
||||||
|
Author
|
||||||
|
Ilaria De Dominicis, General Electric Power, (March 2016)
|
||||||
|
|
||||||
|
Contributor
|
||||||
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
|
||||||
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef jumpOverlapGgiFvPatchFieldsFwd_H
|
||||||
|
#define jumpOverlapGgiFvPatchFieldsFwd_H
|
||||||
|
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type> class jumpOverlapGgiFvPatchField;
|
||||||
|
|
||||||
|
makePatchTypeFieldTypedefs(jumpOverlapGgi)
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -522,10 +522,10 @@ void mixingPlaneFvPatchField<Type>::initEvaluate
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void mixingPlaneFvPatchField<Type>::evaluate
|
void mixingPlaneFvPatchField<Type>::evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes
|
const Pstream::commsTypes commsTypes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
fvPatchField<Type>::evaluate();
|
coupledFvPatchField<Type>::evaluate(commsTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,14 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
//- Access
|
||||||
|
|
||||||
|
// Return overlapGgiFvPatch
|
||||||
|
const overlapGgiFvPatch& overlapGgiPatch() const
|
||||||
|
{
|
||||||
|
return overlapGgiPatch_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C
|
||||||
|
|
||||||
derivedFvPatchFields/ggiEnthalpyJump/ggiEnthalpyJumpFvPatchFields.C
|
derivedFvPatchFields/ggiEnthalpyJump/ggiEnthalpyJumpFvPatchFields.C
|
||||||
derivedFvPatchFields/mixingPlaneEnthalpyJump/mixingPlaneEnthalpyJumpFvPatchFields.C
|
derivedFvPatchFields/mixingPlaneEnthalpyJump/mixingPlaneEnthalpyJumpFvPatchFields.C
|
||||||
|
derivedFvPatchFields/overlapGgiEnthalpyJump/overlapGgiEnthalpyJumpFvPatchFields.C
|
||||||
|
|
||||||
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
|
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
|
||||||
|
|
||||||
|
|
|
@ -116,13 +116,15 @@ void Foam::fixedEnthalpyFvPatchScalarField::updateCoeffs()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Get access to relative and rotational velocity
|
// Get access to relative and rotational velocity
|
||||||
const word UrelName("Urel");
|
const word UName("U");
|
||||||
const word UrotName("Urot");
|
const word URotName("URot");
|
||||||
|
const word UThetaName("UTheta");
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!this->db().objectRegistry::found(UrelName)
|
!this->db().objectRegistry::found(URotName)
|
||||||
|| !this->db().objectRegistry::found(UrotName)
|
|| !this->db().objectRegistry::found(UName)
|
||||||
|
|| !this->db().objectRegistry::found(UThetaName)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Velocities not available, do not update
|
// Velocities not available, do not update
|
||||||
|
@ -130,8 +132,9 @@ void Foam::fixedEnthalpyFvPatchScalarField::updateCoeffs()
|
||||||
(
|
(
|
||||||
"void gradientEnthalpyFvPatchScalarField::"
|
"void gradientEnthalpyFvPatchScalarField::"
|
||||||
"updateCoeffs(const vectorField& Up)"
|
"updateCoeffs(const vectorField& Up)"
|
||||||
) << "Velocity fields " << UrelName << " or "
|
) << "Velocity fields " << UName << " or "
|
||||||
<< UrotName << " not found. "
|
<< URotName << " or "
|
||||||
|
<< UThetaName << " not found. "
|
||||||
<< "Performing enthalpy value update for field "
|
<< "Performing enthalpy value update for field "
|
||||||
<< this->dimensionedInternalField().name()
|
<< this->dimensionedInternalField().name()
|
||||||
<< " and patch " << patchi
|
<< " and patch " << patchi
|
||||||
|
@ -141,16 +144,20 @@ void Foam::fixedEnthalpyFvPatchScalarField::updateCoeffs()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const fvPatchVectorField& Urelp =
|
const fvPatchVectorField& Up =
|
||||||
lookupPatchField<volVectorField, vector>(UrelName);
|
lookupPatchField<volVectorField, vector>(UName);
|
||||||
|
|
||||||
const fvPatchVectorField& Urotp =
|
const fvPatchVectorField& URotp =
|
||||||
lookupPatchField<volVectorField, vector>(UrotName);
|
lookupPatchField<volVectorField, vector>(URotName);
|
||||||
|
|
||||||
|
const fvPatchScalarField& UThetap =
|
||||||
|
lookupPatchField<volScalarField, scalar>(UThetaName);
|
||||||
|
|
||||||
operator==
|
operator==
|
||||||
(
|
(
|
||||||
thermo.h(Tw, patchi)
|
thermo.h(Tw, patchi)
|
||||||
- 0.5*(magSqr(Urotp) - magSqr(Urelp))
|
+ 0.5*magSqr(Up)
|
||||||
|
- mag(UThetap)*mag(URotp)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
@ -58,13 +59,15 @@ void Foam::ggiEnthalpyJumpFvPatchField<Foam::scalar>::updateCoeffs()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get access to relative and rotational velocity
|
// Get access to relative and rotational velocity
|
||||||
const word UrelName("Urel");
|
const word URotName("URot");
|
||||||
const word UName("U");
|
const word UThetaName("UTheta");
|
||||||
|
|
||||||
|
jump_ = 0;
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!this->db().objectRegistry::found(UrelName)
|
!this->db().objectRegistry::found(URotName)
|
||||||
|| !this->db().objectRegistry::found(UName)
|
|| !this->db().objectRegistry::found(UThetaName)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Velocities not available, do not update
|
// Velocities not available, do not update
|
||||||
|
@ -72,31 +75,37 @@ void Foam::ggiEnthalpyJumpFvPatchField<Foam::scalar>::updateCoeffs()
|
||||||
(
|
(
|
||||||
"void gradientEnthalpyFvPatchScalarField::"
|
"void gradientEnthalpyFvPatchScalarField::"
|
||||||
"updateCoeffs(const vectorField& Up)"
|
"updateCoeffs(const vectorField& Up)"
|
||||||
) << "Velocity fields " << UrelName << " or "
|
) << "Velocity fields " << URotName << " or "
|
||||||
<< UName << " not found. "
|
<< UThetaName << " not found. "
|
||||||
<< "Performing enthalpy value update" << endl;
|
<< "Performing enthalpy value update" << endl;
|
||||||
|
|
||||||
jump_ = 0;
|
jump_ = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const fvPatchVectorField& Urelp =
|
const fvPatchVectorField& URotp =
|
||||||
lookupPatchField<volVectorField, vector>(UrelName);
|
lookupPatchField<volVectorField, vector>(URotName);
|
||||||
|
|
||||||
const fvPatchVectorField& Up =
|
const fvPatchScalarField& UThetap =
|
||||||
lookupPatchField<volVectorField, vector>(UName);
|
lookupPatchField<volScalarField, scalar>(UThetaName);
|
||||||
|
|
||||||
if (rotating_)
|
if (rotating_)
|
||||||
{
|
{
|
||||||
jump_ =
|
const scalarField UThetaIn = UThetap.patchInternalField();
|
||||||
mag(Up.patchInternalField())*mag(Urelp.patchInternalField())
|
|
||||||
- magSqr(Up.patchInternalField());
|
jump_ = - (
|
||||||
|
mag(UThetaIn)
|
||||||
|
*mag(URotp.patchInternalField())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
jump_ =
|
const scalarField UThetaIn = UThetap.patchNeighbourField();
|
||||||
mag(Up.patchNeighbourField())*mag(Urelp.patchNeighbourField())
|
|
||||||
- magSqr(Up.patchNeighbourField());
|
jump_ = (
|
||||||
|
mag(UThetaIn)
|
||||||
|
*mag(URotp.patchNeighbourField())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -122,13 +122,15 @@ void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Get access to relative and rotational velocity
|
// Get access to relative and rotational velocity
|
||||||
const word UrelName("Urel");
|
const word UName("U");
|
||||||
const word UrotName("Urot");
|
const word URotName("URot");
|
||||||
|
const word UThetaName("UTheta");
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!this->db().objectRegistry::found(UrelName)
|
!this->db().objectRegistry::found(UName)
|
||||||
|| !this->db().objectRegistry::found(UrotName)
|
|| !this->db().objectRegistry::found(URotName)
|
||||||
|
|| !this->db().objectRegistry::found(UThetaName)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Velocities not available, do not update
|
// Velocities not available, do not update
|
||||||
|
@ -136,8 +138,9 @@ void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs()
|
||||||
(
|
(
|
||||||
"void gradientEnthalpyFvPatchScalarField::"
|
"void gradientEnthalpyFvPatchScalarField::"
|
||||||
"updateCoeffs(const vectorField& Up)"
|
"updateCoeffs(const vectorField& Up)"
|
||||||
) << "Velocity fields " << UrelName << " or "
|
) << "Velocity fields " << UName << " or "
|
||||||
<< UrotName << " not found. "
|
<< URotName << " or "
|
||||||
|
<< UThetaName << " not found. "
|
||||||
<< "Performing enthalpy value update for field "
|
<< "Performing enthalpy value update for field "
|
||||||
<< this->dimensionedInternalField().name()
|
<< this->dimensionedInternalField().name()
|
||||||
<< " and patch " << patchi
|
<< " and patch " << patchi
|
||||||
|
@ -152,11 +155,14 @@ void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const fvPatchVectorField& Urelp =
|
const fvPatchVectorField& Up =
|
||||||
lookupPatchField<volVectorField, vector>(UrelName);
|
lookupPatchField<volVectorField, vector>(UName);
|
||||||
|
|
||||||
const fvPatchVectorField& Urotp =
|
const fvPatchVectorField& URotp =
|
||||||
lookupPatchField<volVectorField, vector>(UrotName);
|
lookupPatchField<volVectorField, vector>(URotName);
|
||||||
|
|
||||||
|
const fvPatchScalarField& UThetap =
|
||||||
|
lookupPatchField<volScalarField, scalar>(UThetaName);
|
||||||
|
|
||||||
gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad()
|
gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad()
|
||||||
+ patch().deltaCoeffs()*
|
+ patch().deltaCoeffs()*
|
||||||
|
@ -164,8 +170,8 @@ void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs()
|
||||||
thermo.h(Tw, patchi)
|
thermo.h(Tw, patchi)
|
||||||
- thermo.h(Tw, patch().faceCells())
|
- thermo.h(Tw, patch().faceCells())
|
||||||
)
|
)
|
||||||
- mag(Urotp)*mag(Urotp.snGrad())
|
+ 0.5*mag(Up)*mag(Up.snGrad())
|
||||||
+ mag(Urelp)*mag(Urelp.snGrad());
|
- mag(UThetap)*mag(URotp.snGrad());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -131,13 +131,15 @@ void Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Get access to relative and rotational velocity
|
// Get access to relative and rotational velocity
|
||||||
const word UrelName("Urel");
|
const word UName("U");
|
||||||
const word UrotName("Urot");
|
const word URotName("URot");
|
||||||
|
const word UThetaName("UTheta");
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!this->db().objectRegistry::found(UrelName)
|
!this->db().objectRegistry::found(UName)
|
||||||
|| !this->db().objectRegistry::found(UrotName)
|
|| !this->db().objectRegistry::found(URotName)
|
||||||
|
|| !this->db().objectRegistry::found(UThetaName)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Velocities not available, do not update
|
// Velocities not available, do not update
|
||||||
|
@ -145,8 +147,9 @@ void Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs()
|
||||||
(
|
(
|
||||||
"void gradientEnthalpyFvPatchScalarField::"
|
"void gradientEnthalpyFvPatchScalarField::"
|
||||||
"updateCoeffs(const vectorField& Up)"
|
"updateCoeffs(const vectorField& Up)"
|
||||||
) << "Velocity fields " << UrelName << " or "
|
) << "Velocity fields " << UName << " or "
|
||||||
<< UrotName << " not found. "
|
<< URotName << " or "
|
||||||
|
<< UThetaName << " not found. "
|
||||||
<< "Performing enthalpy value update for field "
|
<< "Performing enthalpy value update for field "
|
||||||
<< this->dimensionedInternalField().name()
|
<< this->dimensionedInternalField().name()
|
||||||
<< " and patch " << patchi
|
<< " and patch " << patchi
|
||||||
|
@ -162,14 +165,18 @@ void Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const fvPatchVectorField& Urelp =
|
const fvPatchVectorField& Up =
|
||||||
lookupPatchField<volVectorField, vector>(UrelName);
|
lookupPatchField<volVectorField, vector>(UName);
|
||||||
|
|
||||||
const fvPatchVectorField& Urotp =
|
const fvPatchVectorField& URotp =
|
||||||
lookupPatchField<volVectorField, vector>(UrotName);
|
lookupPatchField<volVectorField, vector>(URotName);
|
||||||
|
|
||||||
|
const fvPatchScalarField& UThetap =
|
||||||
|
lookupPatchField<volScalarField, scalar>(UThetaName);
|
||||||
|
|
||||||
refValue() = thermo.h(Tw.refValue(), patchi)
|
refValue() = thermo.h(Tw.refValue(), patchi)
|
||||||
- 0.5*(magSqr(Urotp) - magSqr(Urelp));
|
+ 0.5*magSqr(Up)
|
||||||
|
- mag(UThetap)*mag(URotp);
|
||||||
|
|
||||||
refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad()
|
refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad()
|
||||||
+ patch().deltaCoeffs()*
|
+ patch().deltaCoeffs()*
|
||||||
|
@ -177,8 +184,8 @@ void Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs()
|
||||||
thermo.h(Tw, patchi)
|
thermo.h(Tw, patchi)
|
||||||
- thermo.h(Tw, patch().faceCells())
|
- thermo.h(Tw, patch().faceCells())
|
||||||
)
|
)
|
||||||
- mag(Urotp)*mag(Urotp.snGrad())
|
+ 0.5*mag(Up)*mag(Up.snGrad())
|
||||||
+ mag(Urelp)*mag(Urelp.snGrad());
|
- mag(UThetap)*mag(URotp.snGrad());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
@ -58,13 +59,15 @@ void Foam::mixingPlaneEnthalpyJumpFvPatchField<Foam::scalar>::updateCoeffs()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get access to relative and rotational velocity
|
// Get access to relative and rotational velocity
|
||||||
const word UrelName("Urel");
|
const word URotName("URot");
|
||||||
const word UName("U");
|
const word UThetaName("UTheta");
|
||||||
|
|
||||||
|
jump_ = 0;
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!this->db().objectRegistry::found(UrelName)
|
!this->db().objectRegistry::found(URotName)
|
||||||
|| !this->db().objectRegistry::found(UName)
|
|| !this->db().objectRegistry::found(UThetaName)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Velocities not available, do not update
|
// Velocities not available, do not update
|
||||||
|
@ -72,31 +75,40 @@ void Foam::mixingPlaneEnthalpyJumpFvPatchField<Foam::scalar>::updateCoeffs()
|
||||||
(
|
(
|
||||||
"void gradientEnthalpyFvPatchScalarField::"
|
"void gradientEnthalpyFvPatchScalarField::"
|
||||||
"updateCoeffs(const vectorField& Up)"
|
"updateCoeffs(const vectorField& Up)"
|
||||||
) << "Velocity fields " << UrelName << " or "
|
) << "Velocity fields " << URotName << " or "
|
||||||
<< UName << " not found. "
|
<< UThetaName << " not found. "
|
||||||
<< "Performing enthalpy value update" << endl;
|
<< "Performing enthalpy value update" << endl;
|
||||||
|
|
||||||
jump_ = 0;
|
jump_ = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const fvPatchVectorField& Urelp =
|
const fvPatchVectorField& URotp =
|
||||||
lookupPatchField<volVectorField, vector>(UrelName);
|
lookupPatchField<volVectorField, vector>(URotName);
|
||||||
|
|
||||||
const fvPatchVectorField& Up =
|
const fvPatchScalarField& UThetap =
|
||||||
lookupPatchField<volVectorField, vector>(UName);
|
lookupPatchField<volScalarField, scalar>(UThetaName);
|
||||||
|
|
||||||
if (rotating_)
|
if (rotating_)
|
||||||
{
|
{
|
||||||
jump_ =
|
// We can either make jump_ on neighbour field and interpolate (in
|
||||||
mag(Up.patchInternalField())*mag(Urelp.patchInternalField())
|
// jumpOverlapGgi) or interpolate first, then add jump_ for
|
||||||
- magSqr(Up.patchInternalField());
|
// internalField
|
||||||
|
const scalarField UThetaIn = UThetap.patchInternalField();
|
||||||
|
|
||||||
|
jump_ = - (
|
||||||
|
mag(UThetaIn)
|
||||||
|
*mag(URotp.patchInternalField())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
jump_ =
|
const scalarField UThetaIn = UThetap.patchNeighbourField();
|
||||||
mag(Up.patchNeighbourField())*mag(Urelp.patchNeighbourField())
|
|
||||||
- magSqr(Up.patchNeighbourField());
|
jump_ = (
|
||||||
|
mag(UThetaIn)
|
||||||
|
*mag(URotp.patchNeighbourField())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Author
|
||||||
|
|
||||||
Contributor
|
Contributor
|
||||||
Hrvoje Jasak, Wikki Ltd.
|
Hrvoje Jasak, Wikki Ltd.
|
||||||
|
Gregor Cvijetic, FMENA Zagreb.
|
||||||
|
|
||||||
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved
|
||||||
|
|
||||||
|
|
Reference in a new issue