GIT: Initial commit after latest foundation merge

This commit is contained in:
andy
2016-04-25 11:40:48 +01:00
4003 changed files with 74634 additions and 37783 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -26,6 +26,7 @@ License
#include "CourantNo.H"
#include "surfaceFields.H"
#include "fvcSurfaceIntegrate.H"
#include "zeroGradientFvPatchFields.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -26,6 +26,7 @@ License
#include "gaussConvectionScheme.H"
#include "blendedSchemeBase.H"
#include "fvcCellReduce.H"
#include "zeroGradientFvPatchFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -49,16 +50,16 @@ void Foam::blendingFactor::calc()
const surfaceScalarField& phi =
mesh.lookupObject<surfaceScalarField>(phiName_);
tmp<fv::convectionScheme<Type> > cs =
tmp<fv::convectionScheme<Type>> cs =
fv::convectionScheme<Type>::New(mesh, phi, its);
const fv::gaussConvectionScheme<Type>& gcs =
refCast<const fv::gaussConvectionScheme<Type> >(cs());
refCast<const fv::gaussConvectionScheme<Type>>(cs());
const surfaceInterpolationScheme<Type>& interpScheme =
gcs.interpScheme();
if (!isA<blendedSchemeBase<Type> >(interpScheme))
if (!isA<blendedSchemeBase<Type>>(interpScheme))
{
FatalErrorInFunction
<< interpScheme.typeName << " is not a blended scheme"
@ -67,7 +68,7 @@ void Foam::blendingFactor::calc()
// Retrieve the face-based blending factor
const blendedSchemeBase<Type>& blendedScheme =
refCast<const blendedSchemeBase<Type> >(interpScheme);
refCast<const blendedSchemeBase<Type>>(interpScheme);
const surfaceScalarField factorf(blendedScheme.blendingFactor(field));
// Convert into vol field whose values represent the local face minima

View File

@ -1,49 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 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 <http://www.gnu.org/licenses/>.
Typedef
Foam::IOdsmcFields
Description
Instance of the generic IOOutputFilter for dsmcFields.
\*---------------------------------------------------------------------------*/
#ifndef IOdsmcFields_H
#define IOdsmcFields_H
#include "dsmcFields.H"
#include "IOOutputFilter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOOutputFilter<dsmcFields> IOdsmcFields;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -136,7 +136,7 @@ Foam::tmp<Foam::volScalarField> Foam::pressureTools::pDyn
{
const volVectorField& U = obr_.lookupObject<volVectorField>(UName_);
tpDyn() == rho(p)*0.5*magSqr(U);
tpDyn.ref() == rho(p)*0.5*magSqr(U);
}
return tpDyn;
@ -152,13 +152,13 @@ Foam::tmp<Foam::volScalarField> Foam::pressureTools::convertToCoeff
if (calcCoeff_)
{
tCoeff() -= dimensionedScalar("pInf", dimPressure, pInf_);
tCoeff.ref() -= dimensionedScalar("pInf", dimPressure, pInf_);
const dimensionedScalar p0("p0", dimPressure, SMALL);
const dimensionedVector U("U", dimVelocity, UInf_);
const dimensionedScalar rho("rho", dimDensity, rhoInf_);
tCoeff() /= 0.5*rho*magSqr(U) + p0;
tCoeff.ref() /= 0.5*rho*magSqr(U) + p0;
}
return tCoeff;
@ -187,7 +187,7 @@ Foam::pressureTools::pressureTools
pRef_(0.0),
calcCoeff_(false),
pInf_(0.0),
UInf_(vector::zero),
UInf_(Zero),
rhoInf_(0.0),
rhoInfInitialised_(false)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -109,12 +109,6 @@ protected:
// Private Member Functions
//- Disallow default bitwise copy construct
residuals(const residuals&);
//- Disallow default bitwise assignment
void operator=(const residuals&);
//- Output field header information
template<class Type>
void writeFileHeader(const word& fieldName);
@ -123,6 +117,17 @@ protected:
virtual void writeFileHeader(Ostream& os) const;
private:
// Private member functions
//- Disallow default bitwise copy construct
residuals(const residuals&);
//- Disallow default bitwise assignment
void operator=(const residuals&);
public:
//- Runtime type information
@ -190,7 +195,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "residualsTemplates.C"
#include "residualsTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -42,7 +42,7 @@ void Foam::residuals::writeResidual(const word& fieldName)
if (solverDict.found(fieldName))
{
const List<SolverPerformance<Type> > sp
const List<SolverPerformance<Type>> sp
(
solverDict.lookup(fieldName)
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -177,10 +177,9 @@ Foam::scalarTransport::scalarTransport
:
name_(name),
mesh_(refCast<const fvMesh>(obr)),
active_(true),
phiName_("phi"),
UName_("U"),
rhoName_("rho"),
phiName_(dict.lookupOrDefault<word>("phiName", "phi")),
UName_(dict.lookupOrDefault<word>("UName", "U")),
rhoName_(dict.lookupOrDefault<word>("rhoName", "rho")),
DT_(0.0),
userDT_(false),
resetOnStartUp_(false),
@ -212,6 +211,7 @@ Foam::scalarTransport::~scalarTransport()
void Foam::scalarTransport::read(const dictionary& dict)
{
<<<<<<< HEAD
if (active_)
{
log_.readIfPresent("log", dict);
@ -221,31 +221,50 @@ void Foam::scalarTransport::read(const dictionary& dict)
dict.readIfPresent("phiName", phiName_);
dict.readIfPresent("UName", UName_);
dict.readIfPresent("rhoName", rhoName_);
=======
Info<< type() << ":" << nl;
userDT_ = false;
if (dict.readIfPresent("DT", DT_))
{
userDT_ = true;
}
phiName_ = dict.lookupOrDefault<word>("phiName", "phi");
UName_ = dict.lookupOrDefault<word>("UName", "U");
rhoName_ = dict.lookupOrDefault<word>("rhoName", "rho");
>>>>>>> foundation
userDT_ = false;
if (dict.readIfPresent("DT", DT_))
{
userDT_ = true;
}
<<<<<<< HEAD
dict.readIfPresent("nCorr", nCorr_);
dict.lookup("resetOnStartUp") >> resetOnStartUp_;
dict.lookup("autoSchemes") >> autoSchemes_;
=======
dict.lookup("resetOnStartUp") >> resetOnStartUp_;
fvOptions_.reset(dict.subDict("fvOptions"));
}
dict.readIfPresent("nCorr", nCorr_);
dict.lookup("autoSchemes") >> autoSchemes_;
>>>>>>> foundation
fvOptions_.reset(dict.subDict("fvOptions"));
}
void Foam::scalarTransport::execute()
{
<<<<<<< HEAD
if (active_)
{
if (log_) Info<< type() << " " << name_ << " output:" << nl;
=======
Info<< type() << " output:" << endl;
>>>>>>> foundation
const surfaceScalarField& phi =
mesh_.lookupObject<surfaceScalarField>(phiName_);
const surfaceScalarField& phi =
mesh_.lookupObject<surfaceScalarField>(phiName_);
<<<<<<< HEAD
volScalarField& T = transportedField();
// calculate the diffusivity
@ -257,22 +276,34 @@ void Foam::scalarTransport::execute()
{
schemeVar = UName_;
}
=======
// calculate the diffusivity
volScalarField DT(this->DT(phi));
word divScheme("div(phi," + schemeVar + ")");
word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")");
// set schemes
word schemeVar = T_.name();
if (autoSchemes_)
{
schemeVar = UName_;
}
>>>>>>> foundation
// set under-relaxation coeff
scalar relaxCoeff = 0.0;
if (mesh_.relaxEquation(schemeVar))
{
relaxCoeff = mesh_.equationRelaxationFactor(schemeVar);
}
word divScheme("div(phi," + schemeVar + ")");
word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")");
if (phi.dimensions() == dimMass/dimTime)
{
const volScalarField& rho =
mesh_.lookupObject<volScalarField>(rhoName_);
// set under-relaxation coeff
scalar relaxCoeff = 0.0;
if (mesh_.relaxEquation(schemeVar))
{
relaxCoeff = mesh_.equationRelaxationFactor(schemeVar);
}
if (phi.dimensions() == dimMass/dimTime)
{
const volScalarField& rho =
mesh_.lookupObject<volScalarField>(rhoName_);
<<<<<<< HEAD
// solve
for (label i = 0; i <= nCorr_; i++)
{
@ -284,16 +315,33 @@ void Foam::scalarTransport::execute()
==
fvOptions_(rho, T)
);
TEqn.relax(relaxCoeff);
fvOptions_.constrain(TEqn);
TEqn.solve(mesh_.solverDict(schemeVar));
}
}
else if (phi.dimensions() == dimVolume/dimTime)
=======
// solve
for (label i = 0; i <= nCorr_; i++)
{
fvScalarMatrix TEqn
(
fvm::ddt(rho, T_)
+ fvm::div(phi, T_, divScheme)
- fvm::laplacian(DT, T_, laplacianScheme)
==
fvOptions_(rho, T_)
);
>>>>>>> foundation
TEqn.relax(relaxCoeff);
fvOptions_.constrain(TEqn);
TEqn.solve(mesh_.solverDict(schemeVar));
}
}
else if (phi.dimensions() == dimVolume/dimTime)
{
// solve
for (label i = 0; i <= nCorr_; i++)
{
<<<<<<< HEAD
// solve
for (label i = 0; i <= nCorr_; i++)
{
@ -305,43 +353,57 @@ void Foam::scalarTransport::execute()
==
fvOptions_(T)
);
=======
fvScalarMatrix TEqn
(
fvm::ddt(T_)
+ fvm::div(phi, T_, divScheme)
- fvm::laplacian(DT, T_, laplacianScheme)
==
fvOptions_(T_)
);
>>>>>>> foundation
TEqn.relax(relaxCoeff);
TEqn.relax(relaxCoeff);
fvOptions_.constrain(TEqn);
fvOptions_.constrain(TEqn);
TEqn.solve(mesh_.solverDict(schemeVar));
}
}
else
{
FatalErrorInFunction
<< "Incompatible dimensions for phi: " << phi.dimensions() << nl
<< "Dimensions should be " << dimMass/dimTime << " or "
<< dimVolume/dimTime << endl;
TEqn.solve(mesh_.solverDict(schemeVar));
}
<<<<<<< HEAD
if (log_) Info<< endl;
=======
>>>>>>> foundation
}
else
{
FatalErrorInFunction
<< "Incompatible dimensions for phi: " << phi.dimensions() << nl
<< "Dimensions should be " << dimMass/dimTime << " or "
<< dimVolume/dimTime << endl;
}
Info<< endl;
}
void Foam::scalarTransport::end()
{
<<<<<<< HEAD
// Do nothing
=======
execute();
>>>>>>> foundation
}
void Foam::scalarTransport::timeSet()
{
// Do nothing
}
{}
void Foam::scalarTransport::write()
{
// Do nothing
}
{}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -120,9 +120,6 @@ class scalarTransport
//- Reference to the mesh database
const fvMesh& mesh_;
//- On/off switch
bool active_;
//- Name of flux field (optional)
word phiName_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -120,7 +120,7 @@ bool Foam::setTimeStepFunctionObject::read(const dictionary& dict)
if (enabled_)
{
timeStepPtr_ = DataEntry<scalar>::New("deltaT", dict);
timeStepPtr_ = Function1<scalar>::New("deltaT", dict);
// Check that time has adjustTimeStep
const dictionary& controlDict = time_.controlDict();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,7 +62,7 @@ SourceFiles
#include "functionObject.H"
#include "dictionary.H"
#include "DataEntry.H"
#include "Function1.H"
#include "Switch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -71,7 +71,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class setTimeStepFunctionObject Declaration
Class setTimeStepFunctionObject Declaration
\*---------------------------------------------------------------------------*/
class setTimeStepFunctionObject
@ -90,7 +90,7 @@ class setTimeStepFunctionObject
Switch enabled_;
//- Time step
autoPtr<DataEntry<scalar> > timeStepPtr_;
autoPtr<Function1<scalar>> timeStepPtr_;
//- Disallow default bitwise copy construct

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -104,7 +104,7 @@ class timeActivatedFileUpdate
fileName fileToUpdate_;
//- List of times vs filenames
List<Tuple2<scalar, fileName> > timeVsFile_;
List<Tuple2<scalar, fileName>> timeVsFile_;
//- Index of last file copied
label lastIndex_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -32,9 +32,11 @@ Description
further manipulation.
Fields are stored as copies of the original, with the prefix
"tubulenceModel:", e.g.
"tubulenceModel:", e.g.:
turbulenceModel:R
\verbatim
turbulenceModel:R
\endverbatim
Example of function object specification:
\verbatim
@ -158,12 +160,6 @@ protected:
// Protected Member Functions
//- Disallow default bitwise copy construct
turbulenceFields(const turbulenceFields&);
//- Disallow default bitwise assignment
void operator=(const turbulenceFields&);
//- Return true if compressible turbulence model is identified
bool compressible();
@ -172,10 +168,21 @@ protected:
void processField
(
const word& fieldName,
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvalue
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvalue
);
private:
// Private member functions
//- Disallow default bitwise copy construct
turbulenceFields(const turbulenceFields&);
//- Disallow default bitwise assignment
void operator=(const turbulenceFields&);
public:
//- Runtime type information

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,7 +31,7 @@ template<class Type>
void Foam::turbulenceFields::processField
(
const word& fieldName,
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvalue
const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvalue
)
{
typedef GeometricField<Type, fvPatchField, volMesh> FieldType;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -81,7 +81,7 @@ Foam::vorticity::vorticity
IOobject::NO_WRITE
),
mesh,
dimensionedVector("0", dimless/dimTime, vector::zero)
dimensionedVector("0", dimless/dimTime, Zero)
)
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -137,7 +137,7 @@ Foam::wallShearStress::wallShearStress
(
"0",
sqr(dimLength)/sqr(dimTime),
vector::zero
Zero
)
)
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -136,6 +136,11 @@ protected:
volVectorField& shearStress
);
private:
// Private member functions
//- Disallow default bitwise copy construct
wallShearStress(const wallShearStress&);