Commit d152b520 authored by sergio's avatar sergio
Browse files

ENH: Adding maxDeltaxyzCubeRootLESDelta LES delta model

parent 287e311e
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -63,9 +63,6 @@ class cubeRootVolDelta
cubeRootVolDelta(const cubeRootVolDelta&);
void operator=(const cubeRootVolDelta&);
// Calculate the delta values
void calcDelta();
public:
......@@ -91,6 +88,10 @@ public:
// Member Functions
//- Calculate the delta values
void calcDelta();
//- Read the LESdelta dictionary
virtual void read(const dictionary&);
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -67,9 +67,6 @@ class maxDeltaxyz
maxDeltaxyz(const maxDeltaxyz&);
void operator=(const maxDeltaxyz&);
// Calculate the delta values
void calcDelta();
public:
......@@ -95,6 +92,9 @@ public:
// Member Functions
//- Calculate the delta values
void calcDelta();
//- Read the LESdelta dictionary
virtual void read(const dictionary&);
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenCFD ltd.
\\/ 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 <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "maxDeltaxyzCubeRootLESDelta.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace LESModels
{
defineTypeNameAndDebug(maxDeltaxyzCubeRootLESDelta, 0);
addToRunTimeSelectionTable
(
LESdelta,
maxDeltaxyzCubeRootLESDelta,
dictionary
);
}
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::LESModels::maxDeltaxyzCubeRootLESDelta::calcDelta()
{
maxDeltaxyz_.calcDelta();
cubeRootVolDelta_.calcDelta();
delta_ =
max
(
static_cast<const volScalarField&>(maxDeltaxyz_),
static_cast<const volScalarField&>(cubeRootVolDelta_)
);
// Handle coupled boundaries
delta_.correctBoundaryConditions();
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::LESModels::maxDeltaxyzCubeRootLESDelta::maxDeltaxyzCubeRootLESDelta
(
const word& name,
const turbulenceModel& turbulence,
const dictionary& dict
)
:
LESdelta(name, turbulence),
maxDeltaxyz_(name, turbulence, dict.subDict(typeName + "Coeffs")),
cubeRootVolDelta_(name, turbulence, dict.subDict(typeName + "Coeffs"))
{
calcDelta();
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::LESModels::maxDeltaxyzCubeRootLESDelta::read(const dictionary& dict)
{
maxDeltaxyz_.read(dict.subDict(typeName + "Coeffs"));
cubeRootVolDelta_.read(dict.subDict(typeName + "Coeffs"));
calcDelta();
}
void Foam::LESModels::maxDeltaxyzCubeRootLESDelta::correct()
{
if (turbulenceModel_.mesh().changing())
{
calcDelta();
}
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenCFD ltd.
\\/ 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 <http://www.gnu.org/licenses/>.
Class
Foam::maxDeltaxyzCubeRootLESDelta
Description
Maximum delta between maxDeltaxyz and cubeRootVolDelta.
SourceFiles
maxDeltaxyzCubeRootLESDelta.C
\*---------------------------------------------------------------------------*/
#ifndef maxDeltaxyzCubeRootLESDelta_H
#define maxDeltaxyzCubeRootLESDelta_H
#include "LESdelta.H"
#include "maxDeltaxyz.H"
#include "cubeRootVolDelta.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace LESModels
{
/*---------------------------------------------------------------------------*\
Class maxDeltaxyzCubeRootLESDelta Declaration
\*---------------------------------------------------------------------------*/
class maxDeltaxyzCubeRootLESDelta
:
public LESdelta
{
// Private Member Functions
//- Disallow default bitwise copy construct and assignment
maxDeltaxyzCubeRootLESDelta(const maxDeltaxyzCubeRootLESDelta&);
void operator=(const maxDeltaxyzCubeRootLESDelta&);
// Calculate the delta values
void calcDelta();
//- maxDeltaxyz model
maxDeltaxyz maxDeltaxyz_;
//- cubeRootVolDelta model
cubeRootVolDelta cubeRootVolDelta_;
public:
//- Runtime type information
TypeName("maxDeltaxyzCubeRoot");
// Constructors
//- Construct from name, turbulenceModel and dictionary
maxDeltaxyzCubeRootLESDelta
(
const word& name,
const turbulenceModel& turbulence,
const dictionary&
);
//- Destructor
virtual ~maxDeltaxyzCubeRootLESDelta()
{}
// Member Functions
//- Read the LESdelta dictionary
virtual void read(const dictionary&);
// Correct values
virtual void correct();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace LESModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
......@@ -10,6 +10,7 @@ $(LESdelta)/vanDriestDelta/vanDriestDelta.C
$(LESdelta)/smoothDelta/smoothDelta.C
$(LESdelta)/maxDeltaxyz/maxDeltaxyz.C
$(LESdelta)/IDDESDelta/IDDESDelta.C
$(LESdelta)/maxDeltaxyzCubeRootLESDelta/maxDeltaxyzCubeRootLESDelta.C
LESfilters = LES/LESfilters
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment