mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user