Commit 114b4d94 authored by andy's avatar andy
Browse files

Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

parents 2c6f89ef 8d4a600a
......@@ -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
......@@ -165,8 +165,14 @@ Foam::Istream& Foam::UIPstream::read(token& t)
}
// String
case token::STRING :
case token::VERBATIMSTRING :
{
// Recurse to read actual string
read(t);
t.type() = token::VERBATIMSTRING;
return *this;
}
case token::STRING :
{
string* pval = new string;
if (read(*pval))
......
......@@ -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
......@@ -151,10 +151,19 @@ Foam::UOPstream::~UOPstream()
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::Ostream& Foam::UOPstream::write(const token&)
Foam::Ostream& Foam::UOPstream::write(const token& t)
{
notImplemented("Ostream& UOPstream::write(const token&)");
setBad();
// Raw token output only supported for verbatim strings for now
if (t.type() == token::VERBATIMSTRING)
{
write(char(token::VERBATIMSTRING));
write(t.stringToken());
}
else
{
notImplemented("Ostream& UOPstream::write(const token&)");
setBad();
}
return *this;
}
......
......@@ -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
......@@ -29,8 +29,16 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::Ostream& Foam::OSstream::write(const token&)
Foam::Ostream& Foam::OSstream::write(const token& t)
{
if (t.type() == token::VERBATIMSTRING)
{
write(char(token::HASH));
write(char(token::BEGIN_BLOCK));
writeQuoted(t.stringToken(), false);
write(char(token::HASH));
write(char(token::END_BLOCK));
}
return *this;
}
......
......@@ -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
......@@ -65,8 +65,16 @@ void Foam::prefixOSstream::print(Ostream& os) const
}
Foam::Ostream& Foam::prefixOSstream::write(const token&)
Foam::Ostream& Foam::prefixOSstream::write(const token& t)
{
if (t.type() == token::VERBATIMSTRING)
{
write(char(token::HASH));
write(char(token::BEGIN_BLOCK));
writeQuoted(t.stringToken(), false);
write(char(token::HASH));
write(char(token::END_BLOCK));
}
return *this;
}
......
......@@ -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
......@@ -225,9 +225,9 @@ void Foam::primitiveEntry::write(Ostream& os, const bool contentsOnly) const
const token& t = operator[](i);
if (t.type() == token::VERBATIMSTRING)
{
os << token::HASH << token::BEGIN_BLOCK;
os.writeQuoted(t.stringToken(), false);
os << token::HASH << token::END_BLOCK;
// Bypass token output operator to avoid losing verbatimness.
// Handle in Ostreams themselves
os.write(t);
}
else
{
......
......@@ -25,7 +25,6 @@ License
#include "primitiveMesh.H"
#include "pyramidPointFaceRef.H"
#include "tetrahedron.H"
#include "ListOps.H"
#include "unitConversion.H"
#include "SortableList.H"
......
createShellMesh.C
LIB = $(FOAM_LIBBIN)/libcreateShellMesh
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude -DFULLDEBUG -g -O0
LIB_LIBS = \
-lfiniteVolume \
-lmeshTools \
-ldynamicMesh
......@@ -174,6 +174,7 @@ $(derivedFvPatchFields)/waveSurfacePressure/waveSurfacePressureFvPatchScalarFiel
$(derivedFvPatchFields)/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C
$(derivedFvPatchFields)/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C
$(derivedFvPatchFields)/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C
$(derivedFvPatchFields)/temperatureJump/temperatureJumpFvPatchScalarField.C
fvsPatchFields = fields/fvsPatchFields
$(fvsPatchFields)/fvsPatchField/fvsPatchFields.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
......@@ -48,7 +48,7 @@ void wedgeFvPatchField<scalar>::evaluate(const Pstream::commsTypes)
updateCoeffs();
}
operator==(patchInternalField());
this->operator==(patchInternalField());
}
......
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 "temperatureJumpFvPatchScalarField.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::temperatureJumpFvPatchScalarField::temperatureJumpFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
fixedJumpFvPatchField<scalar>(p, iF),
jumpTable_(0)
{}
Foam::temperatureJumpFvPatchScalarField::temperatureJumpFvPatchScalarField
(
const temperatureJumpFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
fixedJumpFvPatchField<scalar>(ptf, p, iF, mapper),
jumpTable_(ptf.jumpTable_().clone().ptr())
{}
Foam::temperatureJumpFvPatchScalarField::temperatureJumpFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
fixedJumpFvPatchField<scalar>(p, iF),
jumpTable_(new DataEntry<scalar>("jumpTable"))
{
if (this->cyclicPatch().owner())
{
jumpTable_ = DataEntry<scalar>::New("jumpTable", dict);
}
if (dict.found("value"))
{
fvPatchScalarField::operator=
(
scalarField("value", dict, p.size())
);
}
}
Foam::temperatureJumpFvPatchScalarField::temperatureJumpFvPatchScalarField
(
const temperatureJumpFvPatchScalarField& ptf
)
:
cyclicLduInterfaceField(),
fixedJumpFvPatchField<scalar>(ptf),
jumpTable_(ptf.jumpTable_().clone().ptr())
{}
Foam::temperatureJumpFvPatchScalarField::temperatureJumpFvPatchScalarField
(
const temperatureJumpFvPatchScalarField& ptf,
const DimensionedField<scalar, volMesh>& iF
)
:
fixedJumpFvPatchField<scalar>(ptf, iF),
jumpTable_(ptf.jumpTable_().clone().ptr())
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::temperatureJumpFvPatchScalarField::write(Ostream& os) const
{
fixedJumpFvPatchField<scalar>::write(os);
if (this->cyclicPatch().owner())
{
jumpTable_->writeData(os);
}
this->writeEntry("value", os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
makePatchTypeField
(
fvPatchScalarField,
temperatureJumpFvPatchScalarField
);
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / 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::temperatureJumpFvPatchScalarField
Description
Introduce a jump in temperature on a cycle patch
front
{
type temperatureJump;
patchType cyclic;
jumpTable constant 100;
value uniform 300;
}
SourceFiles
temperatureJumpFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef temperatureJumpFvPatchScalarField_H
#define temperatureJumpFvPatchScalarField_H
#include "fixedJumpFvPatchField.H"
#include "DataEntry.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class temperatureJumpFvPatchScalarField Declaration
\*---------------------------------------------------------------------------*/
class temperatureJumpFvPatchScalarField
:
public fixedJumpFvPatchField<scalar>
{
// Private data
//- Interpolation table
autoPtr<DataEntry<scalar> > jumpTable_;
public:
//- Runtime type information
TypeName("temperatureJump");
// Constructors
//- Construct from patch and internal field
temperatureJumpFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
temperatureJumpFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const dictionary&
);
//- Construct by mapping given temperatureJumpFvPatchScalarField onto a
// new patch
temperatureJumpFvPatchScalarField
(
const temperatureJumpFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
temperatureJumpFvPatchScalarField
(
const temperatureJumpFvPatchScalarField&
);
//- Construct and return a clone
virtual tmp<fvPatchField<scalar> > clone() const
{
return tmp<fvPatchField<scalar> >
(
new temperatureJumpFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
temperatureJumpFvPatchScalarField
(
const temperatureJumpFvPatchScalarField&,
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 temperatureJumpFvPatchScalarField(*this, iF)
);
}
// Member functions
// Access functions
//- Return jumpTable
const DataEntry<scalar>& jumpTable() const
{
return jumpTable_();
}
//- Write
virtual void write(Ostream&) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
......@@ -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
......@@ -135,7 +135,7 @@ Foam::fileName Foam::topoSet::topoSet::localPath
const word& name
)
{
return mesh.facesInstance()/polyMesh::meshSubDir/"sets"/name;
return mesh.facesInstance()/mesh.dbDir()/polyMesh::meshSubDir/"sets"/name;
}
......
......@@ -22,6 +22,7 @@ derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C
derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.C
derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.C
derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C
derivedFvPatchFields/enthalpyJump/enthalpyJumpFvPatchScalarField.C
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
......
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I/home/tom3/sergio/development/chtMultiRegionCoupledFoam/lnInclude
LIB_LIBS = \
-lfiniteVolume
-lfiniteVolume \
-L$(FOAM_USER_LIBBIN)/FvPatchScalarFieldEnthalpyJump
......@@ -33,6 +33,8 @@ License
#include "fixedInternalEnergyFvPatchScalarField.H"
#include "gradientInternalEnergyFvPatchScalarField.H"
#include "mixedInternalEnergyFvPatchScalarField.H"
#include "temperatureJumpFvPatchScalarField.H"
#include "enthalpyJumpFvPatchScalarField.H"
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
......@@ -64,10 +66,14 @@ Foam::wordList Foam::basicThermo::hBoundaryTypes()
{
hbt[patchi] = gradientEnthalpyFvPatchScalarField::typeName;
}
else if (isA<mixedFvPatchScalarField>(tbf[patchi]))
else if(isA<mixedFvPatchScalarField>(tbf[patchi]))
{
hbt[patchi] = mixedEnthalpyFvPatchScalarField::typeName;
}
else if (isA<temperatureJumpFvPatchScalarField>(tbf[patchi]))
{
hbt[patchi] = enthalpyJumpFvPatchScalarField::typeName;
}
}
return hbt;
......@@ -85,7 +91,7 @@ void Foam::basicThermo::hBoundaryCorrection(volScalarField& h)
refCast<gradientEnthalpyFvPatchScalarField>(hbf[patchi]).gradient()
= hbf[patchi].fvPatchField::snGrad();
}
else if (isA<mixedEnthalpyFvPatchScalarField>(hbf[patchi]))
else if(isA<mixedEnthalpyFvPatchScalarField>(hbf[patchi]))
{
refCast<mixedEnthalpyFvPatchScalarField>(hbf[patchi]).refGrad()
= hbf[patchi].fvPatchField::snGrad();
......
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 "enthalpyJumpFvPatchScalarField.H"
#include "temperatureJumpFvPatchScalarField.H"
#include "basicThermo.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::enthalpyJumpFvPatchScalarField::enthalpyJumpFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
fixedJumpFvPatchField<scalar>(p, iF)
{}