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