viscosityModels: State virtual functions are virtual also in the derived classes

This commit is contained in:
Henry Weller
2016-08-17 09:37:37 +01:00
parent 79530dc8e3
commit 73cef20494
5 changed files with 30 additions and 30 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -95,32 +95,32 @@ public:
//- Destructor
~BirdCarreau()
virtual ~BirdCarreau()
{}
// Member Functions
//- Return the laminar viscosity
tmp<volScalarField> nu() const
virtual tmp<volScalarField> nu() const
{
return nu_;
}
//- Return the laminar viscosity for patch
tmp<scalarField> nu(const label patchi) const
virtual tmp<scalarField> nu(const label patchi) const
{
return nu_.boundaryField()[patchi];
}
//- Correct the laminar viscosity
void correct()
virtual void correct()
{
nu_ = calcNu();
}
//- Read transportProperties dictionary
bool read(const dictionary& viscosityProperties);
virtual bool read(const dictionary& viscosityProperties);
};

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -90,32 +90,32 @@ public:
//- Destructor
~CrossPowerLaw()
virtual ~CrossPowerLaw()
{}
// Member Functions
//- Return the laminar viscosity
tmp<volScalarField> nu() const
virtual tmp<volScalarField> nu() const
{
return nu_;
}
//- Return the laminar viscosity for patch
tmp<scalarField> nu(const label patchi) const
virtual tmp<scalarField> nu(const label patchi) const
{
return nu_.boundaryField()[patchi];
}
//- Correct the laminar viscosity
void correct()
virtual void correct()
{
nu_ = calcNu();
}
//- Read transportProperties dictionary
bool read(const dictionary& viscosityProperties);
virtual bool read(const dictionary& viscosityProperties);
};

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -91,32 +91,32 @@ public:
//- Destructor
~HerschelBulkley()
virtual ~HerschelBulkley()
{}
// Member Functions
//- Return the laminar viscosity
tmp<volScalarField> nu() const
virtual tmp<volScalarField> nu() const
{
return nu_;
}
//- Return the laminar viscosity for patch
tmp<scalarField> nu(const label patchi) const
virtual tmp<scalarField> nu(const label patchi) const
{
return nu_.boundaryField()[patchi];
}
//- Correct the laminar viscosity
void correct()
virtual void correct()
{
nu_ = calcNu();
}
//- Read transportProperties dictionary
bool read(const dictionary& viscosityProperties);
virtual bool read(const dictionary& viscosityProperties);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,30 +80,30 @@ public:
//- Destructor
~Newtonian()
virtual ~Newtonian()
{}
// Member Functions
//- Return the laminar viscosity
tmp<volScalarField> nu() const
virtual tmp<volScalarField> nu() const
{
return nu_;
}
//- Return the laminar viscosity for patch
tmp<scalarField> nu(const label patchi) const
virtual tmp<scalarField> nu(const label patchi) const
{
return nu_.boundaryField()[patchi];
}
//- Correct the laminar viscosity (not appropriate, viscosity constant)
void correct()
virtual void correct()
{}
//- Read transportProperties dictionary
bool read(const dictionary& viscosityProperties);
virtual bool read(const dictionary& viscosityProperties);
};

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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -91,32 +91,32 @@ public:
//- Destructor
~powerLaw()
virtual ~powerLaw()
{}
// Member Functions
//- Return the laminar viscosity
tmp<volScalarField> nu() const
virtual tmp<volScalarField> nu() const
{
return nu_;
}
//- Return the laminar viscosity for patch
tmp<scalarField> nu(const label patchi) const
virtual tmp<scalarField> nu(const label patchi) const
{
return nu_.boundaryField()[patchi];
}
//- Correct the laminar viscosity
void correct()
virtual void correct()
{
nu_ = calcNu();
}
//- Read transportProperties dictionary
bool read(const dictionary& viscosityProperties);
virtual bool read(const dictionary& viscosityProperties);
};