mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
surfaceNormalFixedValueFvPatchVectorField: Update fixedValue field to handle mesh-motion
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1667
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,15 +26,10 @@ License
|
|||||||
#include "fixedMeanFvPatchField.H"
|
#include "fixedMeanFvPatchField.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
@ -46,7 +41,7 @@ fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
||||||
(
|
(
|
||||||
const fixedMeanFvPatchField<Type>& ptf,
|
const fixedMeanFvPatchField<Type>& ptf,
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
@ -60,7 +55,7 @@ fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
||||||
(
|
(
|
||||||
const fvPatch& p,
|
const fvPatch& p,
|
||||||
const DimensionedField<Type, volMesh>& iF,
|
const DimensionedField<Type, volMesh>& iF,
|
||||||
@ -73,7 +68,7 @@ fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
||||||
(
|
(
|
||||||
const fixedMeanFvPatchField<Type>& ptf
|
const fixedMeanFvPatchField<Type>& ptf
|
||||||
)
|
)
|
||||||
@ -84,7 +79,7 @@ fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
||||||
(
|
(
|
||||||
const fixedMeanFvPatchField<Type>& ptf,
|
const fixedMeanFvPatchField<Type>& ptf,
|
||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
@ -98,7 +93,7 @@ fixedMeanFvPatchField<Type>::fixedMeanFvPatchField
|
|||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void fixedMeanFvPatchField<Type>::updateCoeffs()
|
void Foam::fixedMeanFvPatchField<Type>::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (this->updated())
|
if (this->updated())
|
||||||
{
|
{
|
||||||
@ -127,7 +122,7 @@ void fixedMeanFvPatchField<Type>::updateCoeffs()
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void fixedMeanFvPatchField<Type>::write(Ostream& os) const
|
void Foam::fixedMeanFvPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<Type>::write(os);
|
fvPatchField<Type>::write(os);
|
||||||
os.writeKeyword("meanValue") << meanValue_ << token::END_STATEMENT << nl;
|
os.writeKeyword("meanValue") << meanValue_ << token::END_STATEMENT << nl;
|
||||||
@ -135,8 +130,4 @@ void fixedMeanFvPatchField<Type>::write(Ostream& os) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -132,6 +132,18 @@ void Foam::surfaceNormalFixedValueFvPatchVectorField::rmap
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::surfaceNormalFixedValueFvPatchVectorField::updateCoeffs()
|
||||||
|
{
|
||||||
|
if (updated())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fvPatchVectorField::operator=(refValue_*patch().nf());
|
||||||
|
fvPatchVectorField::updateCoeffs();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::surfaceNormalFixedValueFvPatchVectorField::write(Ostream& os) const
|
void Foam::surfaceNormalFixedValueFvPatchVectorField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchVectorField::write(os);
|
fvPatchVectorField::write(os);
|
||||||
|
|||||||
@ -175,6 +175,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Evaluation functions
|
||||||
|
|
||||||
|
//- Update the coefficients associated with the patch field
|
||||||
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user