Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2012-10-26 16:47:36 +01:00
13 changed files with 360 additions and 24 deletions

View File

@ -84,4 +84,13 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
Foam::tmp<Foam::Field<Type> > Foam::fanFvPatchField<Type>::jump() const
{
return uniformJumpFvPatchField<Type>::jump();
}
// ************************************************************************* //

View File

@ -172,6 +172,9 @@ public:
// Evaluation functions
//- Return the "jump" across the patch
tmp<Field<Type> > jump() const;
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
};
@ -185,6 +188,10 @@ fanFvPatchField<scalar>::fanFvPatchField
const DimensionedField<scalar, volMesh>&,
const dictionary&
);
template<>
tmp<Field<scalar> > fanFvPatchField<scalar>::jump() const;
template<>
void fanFvPatchField<scalar>::updateCoeffs();

View File

@ -30,18 +30,16 @@ License
#include "Tuple2.H"
#include "polynomial.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makeTemplatePatchTypeField
(
fvPatchScalarField,
fanFvPatchScalarField
);
makeTemplatePatchTypeField
(
fvPatchScalarField,
fanFvPatchScalarField
);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -115,15 +113,10 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
//- Specialisation of the jump-condition for the pressure
template<>
void Foam::fanFvPatchField<Foam::scalar>::updateCoeffs()
Foam::tmp<Foam::Field<Foam::scalar> >
Foam::fanFvPatchField<Foam::scalar>::jump() const
{
if (this->updated())
{
return;
}
if (this->cyclicPatch().owner())
{
const surfaceScalarField& phi =
@ -139,15 +132,33 @@ void Foam::fanFvPatchField<Foam::scalar>::updateCoeffs()
Un /= patch().lookupPatchField<volScalarField, scalar>("rho");
}
this->jump_ = this->jumpTable_->value(Un);
return this->jumpTable_->value(Un);
}
else
{
return refCast<const fanFvPatchField<scalar> >
(
this->neighbourPatchField()
).jump();
}
}
template<>
void Foam::fanFvPatchField<Foam::scalar>::updateCoeffs()
{
if (this->updated())
{
return;
}
if (this->cyclicPatch().owner())
{
this->jump_ = jump();
}
uniformJumpFvPatchField<scalar>::updateCoeffs();
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -138,7 +138,8 @@ template<class Type>
void Foam::fixedJumpFvPatchField<Type>::write(Ostream& os) const
{
fvPatchField<Type>::write(os);
os.writeKeyword("patchType") << "cyclic" << token::END_STATEMENT << nl;
os.writeKeyword("patchType") << this->interfaceFieldType()
<< token::END_STATEMENT << nl;
jump_.writeEntry("jump", os);
this->writeEntry("value", os);
}

View File

@ -141,7 +141,8 @@ template<class Type>
void Foam::fixedJumpAMIFvPatchField<Type>::write(Ostream& os) const
{
fvPatchField<Type>::write(os);
os.writeKeyword("patchType") << "cyclicAMI" << token::END_STATEMENT << nl;
os.writeKeyword("patchType") << this->interfaceFieldType()
<< token::END_STATEMENT << nl;
jump_.writeEntry("jump", os);
this->writeEntry("value", os);
}