Skip to content
Snippets Groups Projects
Commit f355d6b2 authored by andy's avatar andy
Browse files

ENH: Updated R utility: added compatibility BCs and converted to use postCalc

parent b2cb1001
Branches
Tags
No related merge requests found
R.C R.C
compatibilityFvPatchFields/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchSymmTensorField.C
EXE = $(FOAM_APPBIN)/R EXE = $(FOAM_APPBIN)/R
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/postProcessing/postCalc \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
$(FOAM_LIBBIN)/postCalc.o \
-lincompressibleRASModels \ -lincompressibleRASModels \
-lincompressibleTransportModels \ -lincompressibleTransportModels \
-lfiniteVolume \ -lfiniteVolume \
......
...@@ -2,7 +2,7 @@ ...@@ -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-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -29,22 +29,17 @@ Description ...@@ -29,22 +29,17 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "calc.H"
#include "fvCFD.H" #include "fvCFD.H"
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
#include "RASModel.H" #include "RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[]) void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{ {
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H" #include "createFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nCalculating the Reynolds Stress R\n" << endl; Info<< "\nCalculating the Reynolds Stress R\n" << endl;
volSymmTensorField R volSymmTensorField R
...@@ -63,8 +58,6 @@ int main(int argc, char *argv[]) ...@@ -63,8 +58,6 @@ int main(int argc, char *argv[])
R.write(); R.write();
Info<< "End" << endl; Info<< "End" << endl;
return 0;
} }
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 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 "turbulentIntensityKineticEnergyInletFvPatchSymmTensorField.H"
#include "addToRunTimeSelectionTable.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::turbulentIntensityKineticEnergyInletFvPatchSymmTensorField::
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
const fvPatch& p,
const DimensionedField<symmTensor, volMesh>& iF
)
:
fixedValueFvPatchSymmTensorField(p, iF)
{}
Foam::turbulentIntensityKineticEnergyInletFvPatchSymmTensorField::
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
const turbulentIntensityKineticEnergyInletFvPatchSymmTensorField& ptf,
const fvPatch& p,
const DimensionedField<symmTensor, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
fixedValueFvPatchSymmTensorField(ptf, p, iF, mapper)
{}
Foam::turbulentIntensityKineticEnergyInletFvPatchSymmTensorField::
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
const fvPatch& p,
const DimensionedField<symmTensor, volMesh>& iF,
const dictionary& dict
)
:
fixedValueFvPatchSymmTensorField(p, iF)
{
fvPatchSymmTensorField::operator=(symmTensorField("value", dict, p.size()));
}
Foam::turbulentIntensityKineticEnergyInletFvPatchSymmTensorField::
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
const turbulentIntensityKineticEnergyInletFvPatchSymmTensorField& ptf
)
:
fixedValueFvPatchSymmTensorField(ptf)
{}
Foam::turbulentIntensityKineticEnergyInletFvPatchSymmTensorField::
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
const turbulentIntensityKineticEnergyInletFvPatchSymmTensorField& ptf,
const DimensionedField<symmTensor, volMesh>& iF
)
:
fixedValueFvPatchSymmTensorField(ptf, iF)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::turbulentIntensityKineticEnergyInletFvPatchSymmTensorField::write
(
Ostream& os
) const
{
fvPatchSymmTensorField::write(os);
writeEntry("value", os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
makePatchTypeField
(
fvPatchSymmTensorField,
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
);
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 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/>.
Class
Foam::turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
Description
Dummy version of turbulentIntensityKineticEnergyInlet patch type for
symmetric tensors provided for compatibility with R utility.
Value is given by a fixed-value condition.
SourceFiles
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField.C
\*---------------------------------------------------------------------------*/
#ifndef turbulentIntensityKineticEnergyInletFvPatchSymmTensorField_H
#define turbulentIntensityKineticEnergyInletFvPatchSymmTensorField_H
#include "fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class turbulentIntensityKineticEnergyInletFvPatchSymmTensorField Declaration
\*---------------------------------------------------------------------------*/
class turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
:
public fixedValueFvPatchSymmTensorField
{
public:
//- Runtime type information
TypeName("turbulentIntensityKineticEnergyInlet");
// Constructors
//- Construct from patch and internal field
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
const fvPatch&,
const DimensionedField<symmTensor, volMesh>&
);
//- Construct from patch, internal field and dictionary
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
const fvPatch&,
const DimensionedField<symmTensor, volMesh>&,
const dictionary&
);
//- Construct by mapping given
// turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
// onto a new patch
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
const turbulentIntensityKineticEnergyInletFvPatchSymmTensorField&,
const fvPatch&,
const DimensionedField<symmTensor, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
const turbulentIntensityKineticEnergyInletFvPatchSymmTensorField&
);
//- Construct and return a clone
virtual tmp<fvPatchSymmTensorField> clone() const
{
return tmp<fvPatchSymmTensorField>
(
new turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
*this
)
);
}
//- Construct as copy setting internal field reference
turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
const turbulentIntensityKineticEnergyInletFvPatchSymmTensorField&,
const DimensionedField<symmTensor, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchSymmTensorField> clone
(
const DimensionedField<symmTensor, volMesh>& iF
) const
{
return tmp<fvPatchSymmTensorField>
(
new turbulentIntensityKineticEnergyInletFvPatchSymmTensorField
(
*this,
iF
)
);
}
// Member functions
//- Write
virtual void write(Ostream&) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
mesh mesh
); );
# include "createPhi.H" #include "createPhi.H"
singlePhaseTransportModel laminarTransport(U, phi); singlePhaseTransportModel laminarTransport(U, phi);
......
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