mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -44,7 +44,7 @@ runApplication()
|
||||
echo "$APP_NAME already run on $PWD: remove log file to re-run"
|
||||
else
|
||||
echo "Running $APP_RUN on $PWD"
|
||||
$APP_RUN $* > log.$APP_NAME 2>&1
|
||||
$APP_RUN "$@" > log.$APP_NAME 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
@ -65,9 +65,9 @@ runParallel()
|
||||
#if [ "$WM_SCHEDULER" ]
|
||||
#then
|
||||
# echo "$PWD: $WM_SCHEDULER -np $nProcs" 1>&2
|
||||
# $WM_SCHEDULER -np $nProcs "( mpirun -np $nProcs $APP_RUN -parallel $* < /dev/null > log.$APP_NAME 2>&1 )"
|
||||
# $WM_SCHEDULER -np $nProcs "( mpirun -np $nProcs $APP_RUN -parallel "$@" < /dev/null > log.$APP_NAME 2>&1 )"
|
||||
#else
|
||||
( mpirun -np $nProcs $APP_RUN -parallel $* < /dev/null > log.$APP_NAME 2>&1 )
|
||||
( mpirun -np $nProcs $APP_RUN -parallel "$@" < /dev/null > log.$APP_NAME 2>&1 )
|
||||
#fi
|
||||
fi
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ basicSource/basicSourceIO.C
|
||||
basicSource/basicSourceList.C
|
||||
basicSource/IObasicSourceList.C
|
||||
|
||||
general/explicitSource/explicitSource.C
|
||||
general/semiImplicitSource/semiImplicitSource.C
|
||||
general/explicitSetValue/explicitSetValue.C
|
||||
general/codedSource/codedSource.C
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,15 +23,16 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "ExplicitSource.H"
|
||||
#include "SemiImplicitSource.H"
|
||||
#include "fvMesh.H"
|
||||
#include "fvMatrices.H"
|
||||
#include "DimensionedField.H"
|
||||
#include "fvmSup.H"
|
||||
|
||||
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
const Foam::wordList Foam::ExplicitSource<Type>::
|
||||
const Foam::wordList Foam::SemiImplicitSource<Type>::
|
||||
volumeModeTypeNames_
|
||||
(
|
||||
IStringStream("(absolute specific)")()
|
||||
@ -41,8 +42,8 @@ volumeModeTypeNames_
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
typename Foam::ExplicitSource<Type>::volumeModeType
|
||||
Foam::ExplicitSource<Type>::wordToVolumeModeType
|
||||
typename Foam::SemiImplicitSource<Type>::volumeModeType
|
||||
Foam::SemiImplicitSource<Type>::wordToVolumeModeType
|
||||
(
|
||||
const word& vmtName
|
||||
) const
|
||||
@ -57,8 +58,8 @@ Foam::ExplicitSource<Type>::wordToVolumeModeType
|
||||
|
||||
FatalErrorIn
|
||||
(
|
||||
"ExplicitSource<Type>::volumeModeType"
|
||||
"ExplicitSource<Type>::wordToVolumeModeType(const word&)"
|
||||
"SemiImplicitSource<Type>::volumeModeType"
|
||||
"SemiImplicitSource<Type>::wordToVolumeModeType(const word&)"
|
||||
) << "Unknown volumeMode type " << vmtName
|
||||
<< ". Valid volumeMode types are:" << nl << volumeModeTypeNames_
|
||||
<< exit(FatalError);
|
||||
@ -68,7 +69,7 @@ Foam::ExplicitSource<Type>::wordToVolumeModeType
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::word Foam::ExplicitSource<Type>::volumeModeTypeToWord
|
||||
Foam::word Foam::SemiImplicitSource<Type>::volumeModeTypeToWord
|
||||
(
|
||||
const volumeModeType& vmtType
|
||||
) const
|
||||
@ -85,7 +86,7 @@ Foam::word Foam::ExplicitSource<Type>::volumeModeTypeToWord
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::ExplicitSource<Type>::setFieldData(const dictionary& dict)
|
||||
void Foam::SemiImplicitSource<Type>::setFieldData(const dictionary& dict)
|
||||
{
|
||||
fieldNames_.setSize(dict.toc().size());
|
||||
injectionRate_.setSize(fieldNames_.size());
|
||||
@ -111,7 +112,7 @@ void Foam::ExplicitSource<Type>::setFieldData(const dictionary& dict)
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::ExplicitSource<Type>::ExplicitSource
|
||||
Foam::SemiImplicitSource<Type>::SemiImplicitSource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -131,7 +132,7 @@ Foam::ExplicitSource<Type>::ExplicitSource
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::ExplicitSource<Type>::addSup
|
||||
void Foam::SemiImplicitSource<Type>::addSup
|
||||
(
|
||||
fvMatrix<Type>& eqn,
|
||||
const label fieldI
|
||||
@ -139,15 +140,17 @@ void Foam::ExplicitSource<Type>::addSup
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< "ExplicitSource<"<< pTraits<Type>::typeName
|
||||
Info<< "SemiImplicitSource<" << pTraits<Type>::typeName
|
||||
<< ">::addSup for source " << name_ << endl;
|
||||
}
|
||||
|
||||
const GeometricField<Type, fvPatchField, volMesh>& psi = eqn.psi();
|
||||
|
||||
DimensionedField<Type, volMesh> Su
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name_ + fieldNames_[fieldI] + "Sup",
|
||||
name_ + fieldNames_[fieldI] + "Su",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
@ -163,9 +166,31 @@ void Foam::ExplicitSource<Type>::addSup
|
||||
false
|
||||
);
|
||||
|
||||
UIndirectList<Type>(Su, cells_) = injectionRate_[fieldI]/VDash_;
|
||||
UIndirectList<Type>(Su, cells_) = injectionRate_[fieldI].first()/VDash_;
|
||||
|
||||
eqn += Su;
|
||||
DimensionedField<scalar, volMesh> Sp
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name_ + fieldNames_[fieldI] + "Sp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh_,
|
||||
dimensioned<scalar>
|
||||
(
|
||||
"zero",
|
||||
Su.dimensions()/psi.dimensions(),
|
||||
0.0
|
||||
),
|
||||
false
|
||||
);
|
||||
|
||||
UIndirectList<scalar>(Sp, cells_) = injectionRate_[fieldI].second()/VDash_;
|
||||
|
||||
eqn += Su + fvm::Sp(Sp, psi);
|
||||
}
|
||||
|
||||
|
||||
@ -22,21 +22,33 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::ExplicitSource
|
||||
Foam::SemiImplicitSource
|
||||
|
||||
Description
|
||||
Explicit source
|
||||
Semi-implicit source, described using an input dictionary. The injection
|
||||
rate coefficients are specified as pairs of Su-Sp coefficients, i.e.
|
||||
|
||||
Sources described by:
|
||||
\f[
|
||||
S(x) = S_u + S_p x
|
||||
\f]
|
||||
|
||||
where
|
||||
\vartable
|
||||
S(x) | net source for field 'x'
|
||||
S_u | explicit source contribution
|
||||
S_p | linearised implicit contribution
|
||||
\endvartable
|
||||
|
||||
Example of the source specification:
|
||||
|
||||
\verbatim
|
||||
<Type>ExplicitSourceCoeffs
|
||||
<Type>SemiImplicitSourceCoeffs
|
||||
{
|
||||
volumeMode absolute; // specific
|
||||
injectionRate
|
||||
injectionRateSuSp
|
||||
{
|
||||
k 30.7;
|
||||
epsilon 1.5;
|
||||
k (30.7 0);
|
||||
epsilon (1.5 0);
|
||||
}
|
||||
}
|
||||
\verbatim
|
||||
@ -49,12 +61,12 @@ SeeAlso
|
||||
Foam::basicSource
|
||||
|
||||
SourceFiles
|
||||
ExplicitSource.C
|
||||
SemiImplicitSource.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef ExplicitSource_H
|
||||
#define ExplicitSource_H
|
||||
#ifndef SemiImplicitSource_H
|
||||
#define SemiImplicitSource_H
|
||||
|
||||
#include "Tuple2.H"
|
||||
#include "basicSource.H"
|
||||
@ -69,7 +81,7 @@ namespace Foam
|
||||
class fvMesh;
|
||||
|
||||
template<class Type>
|
||||
class ExplicitSource;
|
||||
class SemiImplicitSource;
|
||||
|
||||
// Forward declaration of friend functions
|
||||
|
||||
@ -77,15 +89,15 @@ template<class Type>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const ExplicitSource<Type>&
|
||||
const SemiImplicitSource<Type>&
|
||||
);
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class ExplicitSource Declaration
|
||||
Class SemiImplicitSource Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class ExplicitSource
|
||||
class SemiImplicitSource
|
||||
:
|
||||
public basicSource
|
||||
{
|
||||
@ -115,7 +127,7 @@ protected:
|
||||
scalar VDash_;
|
||||
|
||||
//- Source field values
|
||||
List<Type> injectionRate_;
|
||||
List<Tuple2<Type, scalar> > injectionRate_;
|
||||
|
||||
|
||||
// Protected functions
|
||||
@ -133,13 +145,13 @@ protected:
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("ExplicitSource");
|
||||
TypeName("SemiImplicitSource");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
ExplicitSource
|
||||
SemiImplicitSource
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
@ -156,7 +168,7 @@ public:
|
||||
inline const volumeModeType& volumeMode() const;
|
||||
|
||||
//- Return const access to the source field values
|
||||
inline const List<Type>& injectionRate() const;
|
||||
inline const List<Tuple2<Type, scalar> >& injectionRate() const;
|
||||
|
||||
|
||||
// Edit
|
||||
@ -165,7 +177,7 @@ public:
|
||||
inline volumeModeType& volumeMode();
|
||||
|
||||
//- Return access to the source field values
|
||||
inline List<Type>& injectionRate();
|
||||
inline List<Tuple2<Type, scalar> >& injectionRate();
|
||||
|
||||
|
||||
// Evaluation
|
||||
@ -191,13 +203,13 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "ExplicitSource.C"
|
||||
# include "ExplicitSourceIO.C"
|
||||
# include "SemiImplicitSource.C"
|
||||
# include "SemiImplicitSourceIO.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "ExplicitSourceI.H"
|
||||
#include "SemiImplicitSourceI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,35 +23,37 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "ExplicitSource.H"
|
||||
#include "SemiImplicitSource.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
inline const typename Foam::ExplicitSource<Type>::volumeModeType&
|
||||
Foam::ExplicitSource<Type>::volumeMode() const
|
||||
inline const typename Foam::SemiImplicitSource<Type>::volumeModeType&
|
||||
Foam::SemiImplicitSource<Type>::volumeMode() const
|
||||
{
|
||||
return volumeMode_;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline const Foam::List<Type>& Foam::ExplicitSource<Type>::injectionRate() const
|
||||
inline const Foam::List<Foam::Tuple2<Type, Foam::scalar> >&
|
||||
Foam::SemiImplicitSource<Type>::injectionRate() const
|
||||
{
|
||||
return injectionRate_;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline typename Foam::ExplicitSource<Type>::volumeModeType&
|
||||
Foam::ExplicitSource<Type>::volumeMode()
|
||||
inline typename Foam::SemiImplicitSource<Type>::volumeModeType&
|
||||
Foam::SemiImplicitSource<Type>::volumeMode()
|
||||
{
|
||||
return volumeMode_;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Foam::List<Type>& Foam::ExplicitSource<Type>::injectionRate()
|
||||
inline Foam::List<Foam::Tuple2<Type,
|
||||
Foam::scalar> >& Foam::SemiImplicitSource<Type>::injectionRate()
|
||||
{
|
||||
return injectionRate_;
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,12 +23,12 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "ExplicitSource.H"
|
||||
#include "SemiImplicitSource.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::ExplicitSource<Type>::writeData(Ostream& os) const
|
||||
void Foam::SemiImplicitSource<Type>::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
@ -36,12 +36,12 @@ void Foam::ExplicitSource<Type>::writeData(Ostream& os) const
|
||||
|
||||
|
||||
template<class Type>
|
||||
bool Foam::ExplicitSource<Type>::read(const dictionary& dict)
|
||||
bool Foam::SemiImplicitSource<Type>::read(const dictionary& dict)
|
||||
{
|
||||
if (basicSource::read(dict))
|
||||
{
|
||||
volumeMode_ = wordToVolumeModeType(coeffs_.lookup("volumeMode"));
|
||||
setFieldData(coeffs_.subDict("injectionRate"));
|
||||
setFieldData(coeffs_.subDict("injectionRateSuSp"));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,17 +24,17 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "makeBasicSource.H"
|
||||
#include "ExplicitSource.H"
|
||||
#include "SemiImplicitSource.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeBasicSource(ExplicitSource, scalar);
|
||||
makeBasicSource(ExplicitSource, vector);
|
||||
makeBasicSource(ExplicitSource, sphericalTensor);
|
||||
makeBasicSource(ExplicitSource, symmTensor);
|
||||
makeBasicSource(ExplicitSource, tensor);
|
||||
makeBasicSource(SemiImplicitSource, scalar);
|
||||
makeBasicSource(SemiImplicitSource, vector);
|
||||
makeBasicSource(SemiImplicitSource, sphericalTensor);
|
||||
makeBasicSource(SemiImplicitSource, symmTensor);
|
||||
makeBasicSource(SemiImplicitSource, tensor);
|
||||
}
|
||||
|
||||
|
||||
@ -14,11 +14,6 @@ derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C
|
||||
derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C
|
||||
derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C
|
||||
|
||||
derivedFvPatchFields/temperatureJump/temperatureJumpBase/temperatureJumpBase.C
|
||||
derivedFvPatchFields/temperatureJump/temperatureJumpBase/temperatureJumpAMIBase.C
|
||||
derivedFvPatchFields/temperatureJump/uniformTemperatureJump/uniformTemperatureJumpFvPatchScalarField.C
|
||||
derivedFvPatchFields/temperatureJump/uniformTemperatureJumpAMI/uniformTemperatureJumpAMIFvPatchScalarField.C
|
||||
|
||||
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libfluidThermophysicalModels
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "energyJumpFvPatchScalarField.H"
|
||||
#include "temperatureJumpBase.H"
|
||||
#include "fixedJumpFvPatchFields.H"
|
||||
#include "basicThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
@ -107,8 +107,8 @@ void Foam::energyJumpFvPatchScalarField::updateCoeffs()
|
||||
label patchID = patch().index();
|
||||
|
||||
const scalarField& pp = thermo.p().boundaryField()[patchID];
|
||||
const temperatureJumpBase& TbPatch =
|
||||
refCast<const temperatureJumpBase>
|
||||
const fixedJumpFvPatchScalarField& TbPatch =
|
||||
refCast<const fixedJumpFvPatchScalarField>
|
||||
(
|
||||
thermo.T().boundaryField()[patchID]
|
||||
);
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "energyJumpAMIFvPatchScalarField.H"
|
||||
#include "temperatureJumpBase.H"
|
||||
#include "fixedJumpAMIFvPatchFields.H"
|
||||
#include "basicThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
@ -107,8 +107,8 @@ void Foam::energyJumpAMIFvPatchScalarField::updateCoeffs()
|
||||
label patchID = patch().index();
|
||||
|
||||
const scalarField& pp = thermo.p().boundaryField()[patchID];
|
||||
const temperatureJumpBase& TbPatch =
|
||||
refCast<const temperatureJumpBase>
|
||||
const fixedJumpAMIFvPatchScalarField& TbPatch =
|
||||
refCast<const fixedJumpAMIFvPatchScalarField>
|
||||
(
|
||||
thermo.T().boundaryField()[patchID]
|
||||
);
|
||||
|
||||
@ -1,49 +0,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 "temperatureJumpAMIBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(temperatureJumpAMIBase, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::temperatureJumpAMIBase::temperatureJumpAMIBase()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::temperatureJumpAMIBase::~temperatureJumpAMIBase()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,79 +0,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/>.
|
||||
|
||||
Description
|
||||
Base class for temperature jump boundary conditions that provides access
|
||||
to the jump field
|
||||
|
||||
SourceFiles
|
||||
temperatureJumpBase.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef temperatureJumpAMIBase_H
|
||||
#define temperatureJumpAMIBase_H
|
||||
|
||||
#include "typeInfo.H"
|
||||
#include "scalarField.H"
|
||||
#include "tmp.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class temperatureJumpAMIBase Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class temperatureJumpAMIBase
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("temperatureJumpAMIBase");
|
||||
|
||||
//- Construct null
|
||||
temperatureJumpAMIBase();
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~temperatureJumpAMIBase();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return a field of the temperature jump
|
||||
virtual tmp<scalarField> jump() const = 0;
|
||||
};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,49 +0,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 "temperatureJumpBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(temperatureJumpBase, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::temperatureJumpBase::temperatureJumpBase()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::temperatureJumpBase::~temperatureJumpBase()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,79 +0,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/>.
|
||||
|
||||
Description
|
||||
Base class for temperature jump boundary conditions that provides access
|
||||
to the jump field
|
||||
|
||||
SourceFiles
|
||||
temperatureJumpBase.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef temperatureJumpBase_H
|
||||
#define temperatureJumpBase_H
|
||||
|
||||
#include "typeInfo.H"
|
||||
#include "scalarField.H"
|
||||
#include "tmp.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class temperatureJumpBase Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class temperatureJumpBase
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("temperatureJumpBase");
|
||||
|
||||
//- Construct null
|
||||
temperatureJumpBase();
|
||||
|
||||
|
||||
//-Destructor
|
||||
virtual ~temperatureJumpBase();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return a field of the temperature jump
|
||||
virtual tmp<scalarField> jump() const = 0;
|
||||
};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,100 +0,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 "addToRunTimeSelectionTable.H"
|
||||
#include "uniformTemperatureJumpFvPatchScalarField.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::uniformTemperatureJumpFvPatchScalarField::
|
||||
uniformTemperatureJumpFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
uniformJumpFvPatchField<scalar>(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
Foam::uniformTemperatureJumpFvPatchScalarField::
|
||||
uniformTemperatureJumpFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
uniformJumpFvPatchField<scalar>(ptf, p, iF, mapper)
|
||||
{}
|
||||
|
||||
|
||||
Foam::uniformTemperatureJumpFvPatchScalarField::
|
||||
uniformTemperatureJumpFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
uniformJumpFvPatchField<scalar>(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
Foam::uniformTemperatureJumpFvPatchScalarField::
|
||||
uniformTemperatureJumpFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpFvPatchScalarField& ptf
|
||||
)
|
||||
:
|
||||
uniformJumpFvPatchField<scalar>(ptf)
|
||||
{}
|
||||
|
||||
|
||||
Foam::uniformTemperatureJumpFvPatchScalarField::
|
||||
uniformTemperatureJumpFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpFvPatchScalarField& ptf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
uniformJumpFvPatchField<scalar>(ptf, iF)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
uniformTemperatureJumpFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,174 +0,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/>.
|
||||
|
||||
Class
|
||||
Foam::uniformTemperatureJumpFvPatchScalarField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
This boundary condition provides a temperature jump condition across a
|
||||
coupled pair of cyclic patches, when solving for energy.
|
||||
|
||||
The jump is specified as a \c DataEntry type, to enable the use of, e.g.
|
||||
contant, polynomial, table values.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
patchType | underlying patch type should be \c cyclic| yes |
|
||||
jumpTable | jump data, e.g. \c csvFile | yes |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type uniformTemperatureJump;
|
||||
patchType cyclic;
|
||||
jumpTable constant 100;
|
||||
value uniform 300;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
The above example shows the use of a constant jump condition of 300 K.
|
||||
|
||||
Note
|
||||
The underlying \c patchType should be set to \c cyclic
|
||||
|
||||
SeeAlso
|
||||
Foam::uniformJumpFvPatchField
|
||||
Foam::energyJumpFvPatchScalarField
|
||||
|
||||
SourceFiles
|
||||
uniformTemperatureJumpFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef uniformTemperatureJumpFvPatchScalarField_H
|
||||
#define uniformTemperatureJumpFvPatchScalarField_H
|
||||
|
||||
#include "temperatureJumpBase.H"
|
||||
#include "uniformJumpFvPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class uniformTemperatureJumpFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class uniformTemperatureJumpFvPatchScalarField
|
||||
:
|
||||
public temperatureJumpBase,
|
||||
public uniformJumpFvPatchField<scalar>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("uniformTemperatureJump");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
uniformTemperatureJumpFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
uniformTemperatureJumpFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// uniformTemperatureJumpFvPatchScalarField onto a new patch
|
||||
uniformTemperatureJumpFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
uniformTemperatureJumpFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchField<scalar> > clone() const
|
||||
{
|
||||
return tmp<fvPatchField<scalar> >
|
||||
(
|
||||
new uniformTemperatureJumpFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
uniformTemperatureJumpFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchField<scalar> > clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchField<scalar> >
|
||||
(
|
||||
new uniformTemperatureJumpFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
virtual tmp<Field<scalar> > jump() const
|
||||
{
|
||||
return uniformJumpFvPatchField::jump();
|
||||
}
|
||||
};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,100 +0,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 "addToRunTimeSelectionTable.H"
|
||||
#include "uniformTemperatureJumpAMIFvPatchScalarField.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::uniformTemperatureJumpAMIFvPatchScalarField::
|
||||
uniformTemperatureJumpAMIFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
uniformJumpAMIFvPatchField<scalar>(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
Foam::uniformTemperatureJumpAMIFvPatchScalarField::
|
||||
uniformTemperatureJumpAMIFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpAMIFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
uniformJumpAMIFvPatchField<scalar>(ptf, p, iF, mapper)
|
||||
{}
|
||||
|
||||
|
||||
Foam::uniformTemperatureJumpAMIFvPatchScalarField::
|
||||
uniformTemperatureJumpAMIFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
uniformJumpAMIFvPatchField<scalar>(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
Foam::uniformTemperatureJumpAMIFvPatchScalarField::
|
||||
uniformTemperatureJumpAMIFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpAMIFvPatchScalarField& ptf
|
||||
)
|
||||
:
|
||||
uniformJumpAMIFvPatchField<scalar>(ptf)
|
||||
{}
|
||||
|
||||
|
||||
Foam::uniformTemperatureJumpAMIFvPatchScalarField::
|
||||
uniformTemperatureJumpAMIFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpAMIFvPatchScalarField& ptf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
uniformJumpAMIFvPatchField<scalar>(ptf, iF)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
uniformTemperatureJumpAMIFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,175 +0,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/>.
|
||||
|
||||
Class
|
||||
Foam::uniformTemperatureJumpAMIFvPatchScalarField
|
||||
|
||||
Group
|
||||
grpCoupledBoundaryConditions
|
||||
|
||||
Description
|
||||
This boundary condition provides a temperature jump condition across a
|
||||
coupled pair of non-conformal cyclic patches using an arbitrary mesh
|
||||
interface (AMI), when solving for energy.
|
||||
|
||||
The jump is specified as a \c DataEntry type, to enable the use of, e.g.
|
||||
contant, polynomial, table values.
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
patchType | underlying patch type should be \c cyclicAMI| yes |
|
||||
jumpTable | jump data, e.g. \c csvFile | yes |
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type uniformTemperatureJumpAMI;
|
||||
patchType cyclic;
|
||||
jumpTable constant 100;
|
||||
value uniform 300;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
The above example shows the use of a constant jump condition of 300 K.
|
||||
|
||||
Note
|
||||
The underlying \c patchType should be set to \c cyclicAMI
|
||||
|
||||
SeeAlso
|
||||
Foam::uniformJumpAMIFvPatchField
|
||||
Foam::energyJumpAMIFvPatchScalarField
|
||||
|
||||
SourceFiles
|
||||
uniformTemperatureJumpAMIFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef uniformTemperatureJumpAMIFvPatchScalarField_H
|
||||
#define uniformTemperatureJumpAMIFvPatchScalarField_H
|
||||
|
||||
#include "temperatureJumpAMIBase.H"
|
||||
#include "uniformJumpAMIFvPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class uniformTemperatureJumpAMIFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class uniformTemperatureJumpAMIFvPatchScalarField
|
||||
:
|
||||
public temperatureJumpAMIBase,
|
||||
public uniformJumpAMIFvPatchField<scalar>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("uniformTemperatureJumpAMI");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
uniformTemperatureJumpAMIFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
uniformTemperatureJumpAMIFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// uniformTemperatureJumpAMIFvPatchScalarField onto a new patch
|
||||
uniformTemperatureJumpAMIFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpAMIFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
uniformTemperatureJumpAMIFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpAMIFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchField<scalar> > clone() const
|
||||
{
|
||||
return tmp<fvPatchField<scalar> >
|
||||
(
|
||||
new uniformTemperatureJumpAMIFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
uniformTemperatureJumpAMIFvPatchScalarField
|
||||
(
|
||||
const uniformTemperatureJumpAMIFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchField<scalar> > clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchField<scalar> >
|
||||
(
|
||||
new uniformTemperatureJumpAMIFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
virtual tmp<Field<scalar> > jump() const
|
||||
{
|
||||
return uniformJumpAMIFvPatchField::jump();
|
||||
}
|
||||
};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -28,8 +28,8 @@ License
|
||||
#include "fixedEnergyFvPatchScalarField.H"
|
||||
#include "gradientEnergyFvPatchScalarField.H"
|
||||
#include "mixedEnergyFvPatchScalarField.H"
|
||||
#include "temperatureJumpBase.H"
|
||||
#include "temperatureJumpAMIBase.H"
|
||||
#include "fixedJumpFvPatchFields.H"
|
||||
#include "fixedJumpAMIFvPatchFields.H"
|
||||
#include "energyJumpFvPatchScalarField.H"
|
||||
#include "energyJumpAMIFvPatchScalarField.H"
|
||||
|
||||
@ -61,11 +61,11 @@ Foam::wordList Foam::heThermo<BasicThermo, MixtureType>::heBoundaryTypes()
|
||||
{
|
||||
hbt[patchi] = mixedEnergyFvPatchScalarField::typeName;
|
||||
}
|
||||
else if (isA<temperatureJumpBase>(tbf[patchi]))
|
||||
else if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
hbt[patchi] = energyJumpFvPatchScalarField::typeName;
|
||||
}
|
||||
else if (isA<temperatureJumpAMIBase>(tbf[patchi]))
|
||||
else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
|
||||
{
|
||||
hbt[patchi] = energyJumpAMIFvPatchScalarField::typeName;
|
||||
}
|
||||
|
||||
@ -7,36 +7,14 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runKivaToFoam()
|
||||
{
|
||||
if [ -f log.kivaToFoam ]
|
||||
then
|
||||
echo "kivaToFoam already run: remove log file to re-run"
|
||||
else
|
||||
echo "kivaToFoam: converting kiva file"
|
||||
kivaToFoam -file $1 > log.kivaToFoam 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
restartApplication()
|
||||
{
|
||||
if [ -f log-2.$1 ]
|
||||
then
|
||||
echo "$1 already run: remove log file to re-run"
|
||||
else
|
||||
echo "Running $1"
|
||||
$1 > log-2.$1 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
runKivaToFoam otape17
|
||||
runApplication kivaToFoam -file otape17
|
||||
|
||||
cp system/controlDict.1st system/controlDict
|
||||
runApplication $application
|
||||
mv log.$application log.$application.1
|
||||
|
||||
cp system/controlDict.2nd system/controlDict
|
||||
restartApplication $application
|
||||
runApplication $application
|
||||
mv log.$application log.$application.2
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
|
||||
blockMesh > log.blockMesh 2>&1
|
||||
runApplication blockMesh
|
||||
|
||||
@ -7,24 +7,13 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runStarToFoam()
|
||||
{
|
||||
if [ -f log.star3ToFoam -o -f log.starToFoam ]
|
||||
then
|
||||
echo "star3ToFoam already run on $PWD: remove log file to re-run"
|
||||
else
|
||||
echo "star3ToFoam: converting mesh $1"
|
||||
star3ToFoam $1 > log.star3ToFoam 2>&1
|
||||
fi
|
||||
}
|
||||
runApplication star3ToFoam prostar/nacaAirfoil
|
||||
|
||||
runStarToFoam prostar/nacaAirfoil
|
||||
mv constant/polyMesh/boundary temp
|
||||
sed -e s/"\([\t ]*type[\t ]*\)symmetryPlane"/"\1empty"/g \
|
||||
temp > constant/polyMesh/boundary
|
||||
rm temp
|
||||
|
||||
runApplication $application
|
||||
|
||||
# end-of-file
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -83,8 +83,16 @@ type -P gnuplot &>/dev/null || {
|
||||
exit 1
|
||||
}
|
||||
|
||||
SETSDIR="../sets"
|
||||
|
||||
if [ ! -d $SETSDIR ]
|
||||
then
|
||||
echo "createGraphs: results sets not available in folder $SETSDIR"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# paths to data
|
||||
LATESTTIME=`ls ../sets`
|
||||
LATESTTIME=`ls $SETSDIR`
|
||||
OFDATAROOT=../sets/$LATESTTIME
|
||||
|
||||
EXPTDATAROOT=./exptData
|
||||
|
||||
@ -13,7 +13,7 @@ unset FOAM_SETNAN
|
||||
unset FOAM_SIGFPE
|
||||
|
||||
# Create first baffle
|
||||
createBaffles baffleFaces '(baffle1Wall_0 baffle1Wall_1)' -overwrite > log.createBaffles 2>&1
|
||||
runApplication createBaffles baffleFaces '(baffle1Wall_0 baffle1Wall_1)' -overwrite
|
||||
|
||||
# Create region
|
||||
runApplication extrudeToRegionMesh -overwrite
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
|
||||
blockMesh > log.blockMesh 2>&1
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
|
||||
@ -1,6 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
|
||||
blockMesh > log.blockMesh 2>&1
|
||||
topoSet
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication topoSet
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -16,9 +16,13 @@ unset FOAM_SETNAN
|
||||
|
||||
# Create faceZones for fan and baffles
|
||||
runApplication topoSet
|
||||
|
||||
# Create fan cyclics
|
||||
createBaffles cyclicFaces '(fan_half0 fan_half1)' -overwrite > log.createBaffles 2>&1
|
||||
runApplication createBaffles cyclicFaces '(fan_half0 fan_half1)' -overwrite
|
||||
mv log.createBaffles log.createBaffles.1
|
||||
|
||||
# Create wall baffles
|
||||
createBaffles baffleFaces '(baffles baffles)' -overwrite > log.createBaffles 2>&1
|
||||
runApplication createBaffles baffleFaces '(baffles baffles)' -overwrite
|
||||
mv log.createBaffles log.createBaffles.2
|
||||
|
||||
runApplication $application
|
||||
|
||||
@ -8,7 +8,7 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
transformPoints -scale '(1.6666 1 1)'
|
||||
runApplication transformPoints -scale '(1.6666 1 1)'
|
||||
|
||||
runApplication changeDictionary -instance system -dict system/changeDictionaryDict.X
|
||||
runApplication mirrorMesh -overwrite
|
||||
|
||||
@ -21,10 +21,12 @@ setsToZones -noFlipMap > log.setsToZones 2>&1
|
||||
# - use binary writing to avoid 'nan'
|
||||
# - use setFields to set values
|
||||
unset FOAM_SIGFPE
|
||||
createBaffles cycLeft '(cycLeft_half0 cycLeft_half1)' -overwrite > log.createBaffles1 2>&1
|
||||
runApplication createBaffles cycLeft '(cycLeft_half0 cycLeft_half1)' -overwrite
|
||||
mv log.createBaffles log.createBaffles1
|
||||
|
||||
# create the second cyclic - rhs of porous zone
|
||||
createBaffles cycRight '(cycRight_half0 cycRight_half1)' -overwrite > log.createBaffles2 2>&1
|
||||
runApplication createBaffles cycRight '(cycRight_half0 cycRight_half1)' -overwrite
|
||||
mv log.createBaffles log.createBaffles2
|
||||
|
||||
# Initialise newly created patchFields to 0
|
||||
runApplication changeDictionary
|
||||
|
||||
@ -23,11 +23,8 @@ filter1
|
||||
|
||||
DarcyForchheimerCoeffs
|
||||
{
|
||||
Darcy
|
||||
{
|
||||
d d [0 -2 0 0 0 0 0] (500000 -1000 -1000);
|
||||
f f [0 -1 0 0 0 0 0] (0 0 0);
|
||||
}
|
||||
d d [0 -2 0 0 0 0 0] (500000 -1000 -1000);
|
||||
f f [0 -1 0 0 0 0 0] (0 0 0);
|
||||
|
||||
coordinateSystem
|
||||
{
|
||||
|
||||
@ -17,7 +17,7 @@ FoamFile
|
||||
|
||||
massSource1
|
||||
{
|
||||
type scalarExplicitSource;
|
||||
type scalarSemiImplicitSource;
|
||||
active true;
|
||||
timeStart 0.2;
|
||||
duration 2.0;
|
||||
@ -27,13 +27,13 @@ massSource1
|
||||
(2.75 0.5 0)
|
||||
);
|
||||
|
||||
scalarExplicitSourceCoeffs
|
||||
scalarSemiImplicitSourceCoeffs
|
||||
{
|
||||
volumeMode absolute;
|
||||
injectionRate
|
||||
injectionRateSuSp
|
||||
{
|
||||
rho 1e-4; // kg/s
|
||||
H2O 1e-4; // kg/s
|
||||
rho (1e-4 0); // kg/s
|
||||
H2O (1e-4 0); // kg/s
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -41,7 +41,7 @@ massSource1
|
||||
|
||||
momentumSource1
|
||||
{
|
||||
type vectorExplicitSource;
|
||||
type vectorSemiImplicitSource;
|
||||
active true;
|
||||
timeStart 0.2;
|
||||
duration 2.0;
|
||||
@ -51,12 +51,12 @@ momentumSource1
|
||||
(2.75 0.5 0)
|
||||
);
|
||||
|
||||
vectorExplicitSourceCoeffs
|
||||
vectorSemiImplicitSourceCoeffs
|
||||
{
|
||||
volumeMode absolute;
|
||||
injectionRate
|
||||
injectionRateSuSp
|
||||
{
|
||||
U (0 0.005 0);
|
||||
U ((0 0.005 0) 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -64,7 +64,7 @@ momentumSource1
|
||||
|
||||
energySource1
|
||||
{
|
||||
type scalarExplicitSource;
|
||||
type scalarSemiImplicitSource;
|
||||
active true;
|
||||
timeStart 0.2;
|
||||
duration 2.0;
|
||||
@ -74,12 +74,12 @@ energySource1
|
||||
(2.75 0.5 0)
|
||||
);
|
||||
|
||||
scalarExplicitSourceCoeffs
|
||||
scalarSemiImplicitSourceCoeffs
|
||||
{
|
||||
volumeMode absolute;
|
||||
injectionRate
|
||||
injectionRateSuSp
|
||||
{
|
||||
h 10;
|
||||
h (10 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ unset FOAM_SETNAN
|
||||
# Create faceZones for porous baffles
|
||||
runApplication topoSet
|
||||
|
||||
createBaffles cyclicZoneFaces '(porous_half0 porous_half1)' -overwrite > log.createBaffles 2>&1
|
||||
runApplication createBaffles cyclicZoneFaces '(porous_half0 porous_half1)' -overwrite
|
||||
|
||||
runApplication changeDictionary
|
||||
|
||||
|
||||
Reference in New Issue
Block a user