diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/VoFphaseCompressibleTurbulenceModels.C b/applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/VoFphaseCompressibleTurbulenceModels.C
index 6fcff95bb8..6b7c4c4010 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/VoFphaseCompressibleTurbulenceModels.C
+++ b/applications/solvers/multiphase/compressibleInterFoam/VoFphaseCompressibleTurbulenceModels/VoFphaseCompressibleTurbulenceModels.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -75,6 +75,9 @@ makeLaminarModel(Stokes);
#include "Maxwell.H"
makeLaminarModel(Maxwell);
+#include "Giesekus.H"
+makeLaminarModel(Giesekus);
+
#include "kEpsilon.H"
makeRASModel(kEpsilon);
diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C
index 1c7a597c05..c4521f5345 100644
--- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C
+++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -51,6 +51,9 @@ makeLaminarModel(generalizedNewtonian);
#include "Maxwell.H"
makeLaminarModel(Maxwell);
+#include "Giesekus.H"
+makeLaminarModel(Giesekus);
+
// -------------------------------------------------------------------------- //
// RAS models
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C
index d1a4ec52f3..da34651977 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -50,6 +50,9 @@ makeLaminarModel(generalizedNewtonian);
#include "Maxwell.H"
makeLaminarModel(Maxwell);
+#include "Giesekus.H"
+makeLaminarModel(Giesekus);
+
// -------------------------------------------------------------------------- //
// RAS models
diff --git a/src/TurbulenceModels/turbulenceModels/laminar/Giesekus/Giesekus.C b/src/TurbulenceModels/turbulenceModels/laminar/Giesekus/Giesekus.C
new file mode 100644
index 0000000000..d15a8cf332
--- /dev/null
+++ b/src/TurbulenceModels/turbulenceModels/laminar/Giesekus/Giesekus.C
@@ -0,0 +1,107 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration | Website: https://openfoam.org
+ \\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+\*---------------------------------------------------------------------------*/
+
+#include "Giesekus.H"
+#include "addToRunTimeSelectionTable.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace laminarModels
+{
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+template
+Giesekus::Giesekus
+(
+ const alphaField& alpha,
+ const rhoField& rho,
+ const volVectorField& U,
+ const surfaceScalarField& alphaRhoPhi,
+ const surfaceScalarField& phi,
+ const transportModel& transport,
+ const word& propertiesName,
+ const word& type
+)
+:
+ Maxwell
+ (
+ alpha,
+ rho,
+ U,
+ alphaRhoPhi,
+ phi,
+ transport,
+ propertiesName,
+ type
+ ),
+
+ alphaG_("alphaG", dimless, this->coeffDict_)
+{
+ if (type == typeName)
+ {
+ this->printCoeffs(type);
+ }
+}
+
+
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+
+template
+bool Giesekus::read()
+{
+ if (Maxwell::read())
+ {
+ alphaG_.read(this->coeffDict());
+
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+
+template
+tmp
+Giesekus::sigmaSource() const
+{
+ return fvm::Su
+ (
+ this->alpha_*this->rho_
+ *alphaG_*innerSqr(this->sigma_)/this->nuM_, this->sigma_
+ );
+}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace laminarModels
+} // End namespace Foam
+
+// ************************************************************************* //
diff --git a/src/TurbulenceModels/turbulenceModels/laminar/Giesekus/Giesekus.H b/src/TurbulenceModels/turbulenceModels/laminar/Giesekus/Giesekus.H
new file mode 100644
index 0000000000..6feb6ec9fa
--- /dev/null
+++ b/src/TurbulenceModels/turbulenceModels/laminar/Giesekus/Giesekus.H
@@ -0,0 +1,141 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration | Website: https://openfoam.org
+ \\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Class
+ Foam::laminarModels::Giesekus
+
+Description
+ Giesekus model for viscoelasticity.
+
+ Reference:
+ \verbatim
+ Giesekus, H., 1982.
+ A simple constitutive equation for polymer fluids based on the
+ concept of deformation-dependent tensional mobility.
+ J. Non-Newton. Fluid. 11, 69–109.
+ \endverbatim
+
+See also
+ Foam::laminarModels::Maxwell
+
+SourceFiles
+ Giesekus.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef Giesekus_H
+#define Giesekus_H
+
+#include "Maxwell.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace laminarModels
+{
+
+/*---------------------------------------------------------------------------*\
+ Class Giesekus Declaration
+\*---------------------------------------------------------------------------*/
+
+template
+class Giesekus
+:
+ public Maxwell
+{
+ // Private Member Functions
+
+ // Disallow default bitwise copy construct and assignment
+ Giesekus(const Giesekus&);
+ void operator=(const Giesekus&);
+
+
+protected:
+
+ // Protected data
+
+ // Model coefficients
+
+ dimensionedScalar alphaG_;
+
+ // Protected Member Functions
+
+ virtual tmp sigmaSource() const;
+
+
+public:
+
+ typedef typename BasicTurbulenceModel::alphaField alphaField;
+ typedef typename BasicTurbulenceModel::rhoField rhoField;
+ typedef typename BasicTurbulenceModel::transportModel transportModel;
+
+
+ //- Runtime type information
+ TypeName("Giesekus");
+
+
+ // Constructors
+
+ //- Construct from components
+ Giesekus
+ (
+ const alphaField& alpha,
+ const rhoField& rho,
+ const volVectorField& U,
+ const surfaceScalarField& alphaRhoPhi,
+ const surfaceScalarField& phi,
+ const transportModel& transport,
+ const word& propertiesName = turbulenceModel::propertiesName,
+ const word& type = typeName
+ );
+
+
+ //- Destructor
+ virtual ~Giesekus()
+ {}
+
+
+ // Member Functions
+
+ //- Re-read model coefficients if they have changed
+ virtual bool read();
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace laminarModels
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#ifdef NoRepository
+ #include "Giesekus.C"
+#endif
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.C b/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.C
index f65d9fa6a6..e667f43a9f 100644
--- a/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.C
+++ b/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -34,6 +34,22 @@ namespace Foam
namespace laminarModels
{
+// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
+
+template
+tmp Maxwell::sigmaSource() const
+{
+ return tmp
+ (
+ new fvSymmTensorMatrix
+ (
+ sigma_,
+ dimVolume*this->rho_.dimensions()*sigma_.dimensions()/dimTime
+ )
+ );
+}
+
+
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
@@ -223,6 +239,7 @@ void Maxwell::correct()
+ fvm::Sp(alpha*rho*rLambda, sigma)
==
alpha*rho*P
+ + sigmaSource()
+ fvOptions(alpha, rho, sigma)
);
diff --git a/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.H b/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.H
index a49e68858e..9b9494e47b 100644
--- a/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.H
+++ b/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.H
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
- \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -93,6 +93,8 @@ protected:
return this->nu() + nuM_;
}
+ virtual tmp sigmaSource() const;
+
public:
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarContraction/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/laminar/planarContraction/constant/turbulenceProperties
index 5c4a398b40..843b011bda 100644
--- a/tutorials/incompressible/pimpleFoam/laminar/planarContraction/constant/turbulenceProperties
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarContraction/constant/turbulenceProperties
@@ -18,7 +18,7 @@ simulationType laminar;
laminar
{
- laminarModel Maxwell;
+ laminarModel Maxwell; // Giesekus;
MaxwellCoeffs
{
@@ -26,6 +26,13 @@ laminar
lambda 0.03;
}
+ GiesekusCoeffs
+ {
+ nuM 0.002;
+ lambda 0.03;
+ alphaG 0.1;
+ }
+
printCoeffs on;
}
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarContraction/system/controlDict b/tutorials/incompressible/pimpleFoam/laminar/planarContraction/system/controlDict
index 6056aa75b3..e7f7eabeea 100644
--- a/tutorials/incompressible/pimpleFoam/laminar/planarContraction/system/controlDict
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarContraction/system/controlDict
@@ -16,7 +16,7 @@ FoamFile
application pimpleFoam;
-startFrom latestTime;
+startFrom startTime;
startTime 0;
diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/constant/turbulenceProperties.liquid b/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/constant/turbulenceProperties.liquid
index 1c7132bc23..d98449eb9a 100644
--- a/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/constant/turbulenceProperties.liquid
+++ b/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/constant/turbulenceProperties.liquid
@@ -19,10 +19,13 @@ simulationType laminar;
laminar
{
- laminarModel Maxwell;
+ laminarModel Maxwell; // Giesekus;
nuM 0.01476;
lambda 0.018225;
+
+ // Giesekus coefficient
+ alphaG 0.1;
}