ENH: Re-worked energy jump boundary conditions

This commit is contained in:
andy
2012-10-25 12:24:36 +01:00
parent ee31016890
commit bb6eac67ff
12 changed files with 1036 additions and 10 deletions

View File

@ -10,8 +10,12 @@ rhoThermo/rhoThermos.C
derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C
derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C
derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C
derivedFvPatchFields/energyJump/energyJumpFvPatchScalarField.C
derivedFvPatchFields/temperatureJump/temperatureJumpFvPatchScalarField.C
derivedFvPatchFields/energyJump/energyJump/energyJumpFvPatchScalarField.C
derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C
derivedFvPatchFields/temperatureJump/uniformTemperatureJump/uniformTemperatureJumpFvPatchScalarField.C
derivedFvPatchFields/temperatureJump/uniformTemperatureJumpAMI/uniformTemperatureJumpAMIFvPatchScalarField.C
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C

View File

@ -1,8 +1,8 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lfiniteVolume \
-L$(FOAM_USER_LIBBIN)/FvPatchScalarFieldEnthalpyJump
-lfiniteVolume

View File

@ -25,7 +25,7 @@ License
#include "addToRunTimeSelectionTable.H"
#include "energyJumpFvPatchScalarField.H"
#include "temperatureJumpFvPatchScalarField.H"
#include "temperatureJumpBase.H"
#include "basicThermo.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -108,8 +108,8 @@ void Foam::energyJumpFvPatchScalarField::updateCoeffs()
label patchID = patch().index();
const scalarField& pp = thermo.p().boundaryField()[patchID];
const temperatureJumpFvPatchScalarField& TbPatch =
refCast<const temperatureJumpFvPatchScalarField>
const temperatureJumpBase& TbPatch =
refCast<const temperatureJumpBase>
(
thermo.T().boundaryField()[patchID]
);

View File

@ -0,0 +1,143 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 "energyJumpAMIFvPatchScalarField.H"
#include "temperatureJumpBase.H"
#include "basicThermo.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
fixedJumpAMIFvPatchField<scalar>(p, iF)
{}
Foam::energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField
(
const energyJumpAMIFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
fixedJumpAMIFvPatchField<scalar>(ptf, p, iF, mapper)
{}
Foam::energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
fixedJumpAMIFvPatchField<scalar>(p, iF)
{
if (dict.found("value"))
{
fvPatchScalarField::operator=
(
scalarField("value", dict, p.size())
);
}
}
Foam::energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField
(
const energyJumpAMIFvPatchScalarField& ptf
)
:
fixedJumpAMIFvPatchField<scalar>(ptf)
{}
Foam::energyJumpAMIFvPatchScalarField::energyJumpAMIFvPatchScalarField
(
const energyJumpAMIFvPatchScalarField& ptf,
const DimensionedField<scalar, volMesh>& iF
)
:
fixedJumpAMIFvPatchField<scalar>(ptf, iF)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::energyJumpAMIFvPatchScalarField::updateCoeffs()
{
if (this->updated())
{
return;
}
if (this->cyclicAMIPatch().owner())
{
const basicThermo& thermo =
db().lookupObject<basicThermo>("thermophysicalProperties");
label patchID = patch().index();
const scalarField& pp = thermo.p().boundaryField()[patchID];
const temperatureJumpBase& TbPatch =
refCast<const temperatureJumpBase>
(
thermo.T().boundaryField()[patchID]
);
const labelUList& faceCells = this->patch().faceCells();
jump_ = thermo.he(pp, TbPatch.jump(), faceCells);
}
fixedJumpAMIFvPatchField<scalar>::updateCoeffs();
}
void Foam::energyJumpAMIFvPatchScalarField::write(Ostream& os) const
{
fixedJumpAMIFvPatchField<scalar>::write(os);
this->writeEntry("value", os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
makePatchTypeField
(
fvPatchScalarField,
energyJumpAMIFvPatchScalarField
);
}
// ************************************************************************* //

View File

@ -0,0 +1,164 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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::energyJumpAMIFvPatchScalarField
Group
grpThermoBoundaryConditions grpCoupledBoundaryConditions
Description
This boundary condition provides an energy jump condition across a pair
of coupled patches.
\heading Patch usage
\table
Property | Description | Required | Default value
jump | energy jump values | yes |
\endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type energyJumpAMI;
jump uniform 100;
}
\endverbatim
SeeAlso
Foam::fixedJumpFvPatchField
SourceFiles
energyJumpAMIFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef energyJumpAMIFvPatchScalarField_H
#define energyJumpAMIFvPatchScalarField_H
#include "fixedJumpAMIFvPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class energyJumpAMIFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class energyJumpAMIFvPatchScalarField
:
public fixedJumpAMIFvPatchField<scalar>
{
public:
//- Runtime type information
TypeName("energyJumpAMI");
// Constructors
//- Construct from patch and internal field
energyJumpAMIFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
energyJumpAMIFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const dictionary&
);
//- Construct by mapping given energyJumpAMIFvPatchScalarField onto a
// new patch
energyJumpAMIFvPatchScalarField
(
const energyJumpAMIFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
energyJumpAMIFvPatchScalarField
(
const energyJumpAMIFvPatchScalarField&
);
//- Construct and return a clone
virtual tmp<fvPatchField<scalar> > clone() const
{
return tmp<fvPatchField<scalar> >
(
new energyJumpAMIFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
energyJumpAMIFvPatchScalarField
(
const energyJumpAMIFvPatchScalarField&,
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 energyJumpAMIFvPatchScalarField(*this, iF)
);
}
// Member functions
// Evaluation functions
//- Update the coefficients
virtual void updateCoeffs();
//- Write
virtual void write(Ostream&) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,78 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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:
//- 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
// ************************************************************************* //

View File

@ -0,0 +1,81 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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
// ************************************************************************* //

View File

@ -0,0 +1,100 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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
);
}
// ************************************************************************* //

View File

@ -0,0 +1,175 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 |
jump | current jump value | 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.
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
// ************************************************************************* //

View File

@ -0,0 +1,100 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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
);
}
// ************************************************************************* //

View File

@ -0,0 +1,175 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 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 |
jump | current jump value | 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.
Note
The underlying \c patchType should be set to \c cyclic
SeeAlso
Foam::uniformJumpFvPatchField
Foam::energyJumpFvPatchScalarField
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
// ************************************************************************* //

View File

@ -28,8 +28,10 @@ License
#include "fixedEnergyFvPatchScalarField.H"
#include "gradientEnergyFvPatchScalarField.H"
#include "mixedEnergyFvPatchScalarField.H"
#include "temperatureJumpFvPatchScalarField.H"
#include "temperatureJumpBase.H"
#include "temperatureJumpAMIBase.H"
#include "energyJumpFvPatchScalarField.H"
#include "energyJumpAMIFvPatchScalarField.H"
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
@ -59,10 +61,14 @@ Foam::wordList Foam::heThermo<BasicThermo, MixtureType>::heBoundaryTypes()
{
hbt[patchi] = mixedEnergyFvPatchScalarField::typeName;
}
else if (isA<temperatureJumpFvPatchScalarField>(tbf[patchi]))
else if (isA<temperatureJumpBase>(tbf[patchi]))
{
hbt[patchi] = energyJumpFvPatchScalarField::typeName;
}
else if (isA<temperatureJumpAMIBase>(tbf[patchi]))
{
hbt[patchi] = energyJumpAMIFvPatchScalarField::typeName;
}
}
return hbt;