Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-dev-OpenCFD into develop

This commit is contained in:
mattijs
2015-11-26 10:47:59 +00:00
14 changed files with 43 additions and 175 deletions

View File

@ -1,9 +1,8 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/postProcessing/functionObjects/jobControl/lnInclude
EXE_LIBS = \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lfiniteVolume \
-lmeshTools
-ljobControl

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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,15 +26,19 @@ Application
Description
Application to generate the patch geometry (points and faces) for use
with the externalCoupled boundary condition.
with the externalCoupled functionObject.
Usage:
Usage
- createExternalCoupledPatchGeometry \<patchGroup\> [OPTION]
createExternalCoupledPatchGeometry \<fieldName\>
\param -commsDir \<commsDir\> \n
Specify an alternative communications directory (default is comms
in the case directory)
On execution, the field \<fieldName\> is read, and its boundary conditions
interrogated for the presence of an \c externalCoupled type. If found,
the patch geometry (points and faces) for the coupled patches are output
\param -region \<name\> \n
Specify an alternative mesh region.
On execution, the combined patch geometry (points and faces) are output
to the communications directory.
Note:
@ -42,12 +46,12 @@ Note:
used for face addressing starts at index 0.
SeeAlso
externalCoupledMixedFvPatchField
externalCoupledFunctionObject
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "createExternalCoupledPatchGeometryTemplates.H"
#include "externalCoupledFunctionObject.H"
#include "IOobjectList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -55,28 +59,25 @@ SeeAlso
int main(int argc, char *argv[])
{
#include "addRegionOption.H"
argList::validArgs.append("fieldName");
argList::validArgs.append("patchGroup");
argList::addOption
(
"commsDir",
"dir",
"specify alternate communications directory. default is 'comms'"
);
#include "setRootCase.H"
#include "createTime.H"
#include "createNamedMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
const word fieldName = args[1];
const wordRe patchGroup(args[1]);
IOobjectList objects(IOobjectList(mesh, mesh.time().timeName()));
fileName commsDir(runTime.path()/"comms");
args.optionReadIfPresent("commsDir", commsDir);
label processed = -1;
processField<scalar>(mesh, objects, fieldName, processed);
processField<vector>(mesh, objects, fieldName, processed);
processField<sphericalTensor>(mesh, objects, fieldName, processed);
processField<symmTensor>(mesh, objects, fieldName, processed);
processField<tensor>(mesh, objects, fieldName, processed);
if (processed == -1)
{
Info<< "Field " << fieldName << " not found" << endl;
}
externalCoupledFunctionObject::writeGeometry(mesh, commsDir, patchGroup);
Info<< "\nEnd\n" << endl;

View File

@ -1,90 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 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/>.
\*---------------------------------------------------------------------------*/
#include "createExternalCoupledPatchGeometryTemplates.H"
#include "externalCoupledMixedFvPatchField.H"
#include "IOobjectList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type>
void processField
(
const fvMesh& mesh,
const IOobjectList& objects,
const word& fieldName,
label& processed
)
{
if (processed != -1)
{
return;
}
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
const word timeName(mesh.time().timeName());
IOobjectList fieldObjbjects(objects.lookupClass(fieldType::typeName));
if (fieldObjbjects.lookup(fieldName) != NULL)
{
fieldType vtf(*fieldObjbjects.lookup(fieldName), mesh);
const typename fieldType::GeometricBoundaryField& bf =
vtf.boundaryField();
forAll(bf, patchI)
{
if (isA<externalCoupledMixedFvPatchField<Type> >(bf[patchI]))
{
Info<< "Generating external coupled geometry for field "
<< fieldName << endl;
const externalCoupledMixedFvPatchField<Type>& pf =
refCast<const externalCoupledMixedFvPatchField<Type> >
(
bf[patchI]
);
pf.writeGeometry();
processed = 1;
break;
}
}
if (processed != 1)
{
processed = 0;
Info<< "Field " << fieldName << " found, but does not have any "
<< externalCoupledMixedFvPatchField<Type>::typeName
<< " boundary conditions" << endl;
}
}
}
// ************************************************************************* //

View File

@ -1,49 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 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/>.
\*---------------------------------------------------------------------------*/
#ifndef createExternalCoupledPatchGeometryTemplates_H
#define createExternalCoupledPatchGeometryTemplates_H
#include "word.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
template<class Type>
void processField(bool& processed, const word& fieldName);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "createExternalCoupledPatchGeometryTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -162,7 +162,7 @@ public:
//- Return the set of times selected based on the argList options
// including support for \b -newTimes in which times are selected
// if the file <fName> does not exist in the time directory.
// if the file \<fName\> does not exist in the time directory.
// Also set the runTime to the first instance or the
// \c constant/ directory if no instances are specified or available
static instantList select

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -25,6 +25,7 @@ License
\defgroup grpCmpTurbulence Compressible turbulence
@{
\ingroup grpTurbulence
This group contains compressible turbulence models.
@}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -25,6 +25,7 @@ License
\defgroup grpIcoTurbulence Incompressible turbulence
@{
\ingroup grpTurbulence
This group contains incompressible turbulence models.
@}

View File

@ -30,6 +30,7 @@ readFields/readFields.C
readFields/readFieldsFunctionObject.C
streamLine/streamLine.C
streamLine/streamLineBase.C
streamLine/streamLineParticle.C
streamLine/streamLineParticleCloud.C
streamLine/streamLineFunctionObject.C

View File

@ -883,7 +883,8 @@ void Foam::streamLineBase::write()
)
);
Info(log_)<< " Writing data to " << vtkFile.path() << endl;
if (log_) Info
<< " Writing data to " << vtkFile.path() << endl;
scalarFormatterPtr_().write
(

View File

@ -47,7 +47,7 @@ Description
Property | Description | Required | Default value
type | Type name: yPlus | yes |
phiName | Name of flux field | no | phi
resultName | Name of y+ field | no | <function name>
resultName | Name of y+ field | no | \<function name\>
log | Log to standard output | no | yes
\endtable

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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -169,6 +169,7 @@ void Foam::faceOnlySet::calcSamples
// Set points and cell/face labels to empty lists
//Info<< "calcSamples : Both start_ and end_ outside domain"
// << endl;
const_cast<polyMesh&>(mesh()).moving(oldMoving);
return;
}

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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -276,6 +276,8 @@ void Foam::uniformSet::calcSamples
// (or is along edge)
// Set points and cell/face labels to empty lists
const_cast<polyMesh&>(mesh()).moving(oldMoving);
return;
}

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
radiationCoupledBase
Foam::radiationCoupledBase
Description
Common functions to emissivity. It gets supplied from lookup into a