ENH: removed thermalPorousZone - functionality included by basic source (fieldSources)
This commit is contained in:
parent
f54a12e32a
commit
c6c1fdbea0
@ -12,7 +12,6 @@ wmake $makeType reactionThermo
|
||||
wmake $makeType laminarFlameSpeed
|
||||
wmake $makeType chemistryModel
|
||||
wmake $makeType barotropicCompressibilityModel
|
||||
wmake $makeType thermalPorousZone
|
||||
wmake $makeType SLGThermo
|
||||
|
||||
wmake $makeType solidSpecie
|
||||
|
@ -1,9 +0,0 @@
|
||||
thermalPorousZone/thermalPorousZone.C
|
||||
thermalPorousZone/thermalPorousZones.C
|
||||
|
||||
thermalModel/thermalModel/thermalModel.C
|
||||
thermalModel/thermalModel/thermalModelNew.C
|
||||
thermalModel/fixedTemperature/fixedTemperature.C
|
||||
thermalModel/noThermalModel/noThermalModel.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libthermalPorousZone
|
@ -1,9 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lmeshTools \
|
||||
-lfiniteVolume
|
@ -1,91 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-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 "fixedTemperature.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "volFields.H"
|
||||
#include "fvMatrices.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace porousMedia
|
||||
{
|
||||
defineTypeNameAndDebug(fixedTemperature, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
thermalModel,
|
||||
fixedTemperature,
|
||||
pZone
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::porousMedia::fixedTemperature::fixedTemperature(const porousZone& pZone)
|
||||
:
|
||||
thermalModel(pZone),
|
||||
T_(readScalar(thermalCoeffs_.lookup("T")))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::porousMedia::fixedTemperature::~fixedTemperature()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::porousMedia::fixedTemperature::addEnergySource
|
||||
(
|
||||
const fluidThermo& thermo,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const
|
||||
{
|
||||
const labelList& zones = pZone_.zoneIds();
|
||||
if (zones.empty() || T_ < 0.0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const fvMesh& mesh = pZone_.mesh();
|
||||
const scalarField T(hEqn.diag().size(), T_);
|
||||
|
||||
forAll(zones, zoneI)
|
||||
{
|
||||
const labelList& cells = mesh.cellZones()[zones[zoneI]];
|
||||
hEqn.setValues(cells, thermo.he(thermo.p(), T, cells));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,102 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-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::porousMedia::fixedTemperature
|
||||
|
||||
Description
|
||||
Fixed temperature model for porous media
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fixedTemperature_H
|
||||
#define fixedTemperature_H
|
||||
|
||||
#include "thermalModel.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace porousMedia
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedTemperature Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class fixedTemperature
|
||||
:
|
||||
public thermalModel
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Fixed temperature
|
||||
const scalar T_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("fixedTemperature");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from porous zone
|
||||
fixedTemperature(const porousZone& pZone);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~fixedTemperature();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
virtual void addEnergySource
|
||||
(
|
||||
const fluidThermo&,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace porousMedia
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -1,77 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-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 "noThermalModel.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "volFields.H"
|
||||
#include "fvMatrices.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace porousMedia
|
||||
{
|
||||
defineTypeNameAndDebug(noThermalModel, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
thermalModel,
|
||||
noThermalModel,
|
||||
pZone
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::porousMedia::noThermalModel::noThermalModel(const porousZone& pZone)
|
||||
:
|
||||
thermalModel(pZone)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::porousMedia::noThermalModel::~noThermalModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::porousMedia::noThermalModel::addEnergySource
|
||||
(
|
||||
const fluidThermo&,
|
||||
const volScalarField&,
|
||||
fvScalarMatrix&
|
||||
) const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,94 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-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::porousMedia::noThermalModel
|
||||
|
||||
Description
|
||||
A dummy thermal model porous media, corresponding to the 'none' option
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef noThermalModel_H
|
||||
#define noThermalModel_H
|
||||
|
||||
#include "thermalModel.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace porousMedia
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class noThermalModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class noThermalModel
|
||||
:
|
||||
public thermalModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("none");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from porous zone
|
||||
noThermalModel(const porousZone&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~noThermalModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
virtual void addEnergySource
|
||||
(
|
||||
const fluidThermo&,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace porousMedia
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -1,66 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 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 "thermalModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace porousMedia
|
||||
{
|
||||
defineTypeNameAndDebug(thermalModel, 0);
|
||||
defineRunTimeSelectionTable(thermalModel, pZone);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::porousMedia::thermalModel::thermalModel(const porousZone& pZone)
|
||||
:
|
||||
pZone_(pZone),
|
||||
thermalCoeffs_(pZone.dict().subDictPtr("thermalModel"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::porousMedia::thermalModel::thermalModel
|
||||
(
|
||||
const porousZone& pZone,
|
||||
const dictionary& thermalCoeffs
|
||||
)
|
||||
:
|
||||
pZone_(pZone),
|
||||
thermalCoeffs_(thermalCoeffs)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::porousMedia::thermalModel::~thermalModel()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,129 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-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::porousMedia::thermalModel
|
||||
|
||||
Description
|
||||
Base class to select the temperature specification models for porousMedia
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef thermalModel_H
|
||||
#define thermalModel_H
|
||||
|
||||
#include "porousZone.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "fvMatricesFwd.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class fluidThermo;
|
||||
|
||||
namespace porousMedia
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thermalModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class thermalModel
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Reference to the porous zone
|
||||
const porousZone& pZone_;
|
||||
|
||||
//- Thermal model coefficients dictionary
|
||||
const dictionary thermalCoeffs_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("thermalModel");
|
||||
|
||||
//- Declare runtime constructor selection table
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
thermalModel,
|
||||
pZone,
|
||||
(
|
||||
const porousZone& pZone
|
||||
),
|
||||
(pZone)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from porous zone, coefficients from "thermalModel" entry
|
||||
thermalModel(const porousZone&);
|
||||
|
||||
//- Construct from porous zone and thermal model coefficients
|
||||
thermalModel(const porousZone&, const dictionary& thermalCoeffs);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~thermalModel();
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<thermalModel> New(const porousZone&);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
virtual void addEnergySource
|
||||
(
|
||||
const fluidThermo&,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace porousMedia
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -1,65 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 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 "thermalModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::porousMedia::thermalModel>
|
||||
Foam::porousMedia::thermalModel::New
|
||||
(
|
||||
const porousZone& pZone
|
||||
)
|
||||
{
|
||||
// a missing thermalModel is the same as type "none"
|
||||
word modelType("none");
|
||||
|
||||
if (const dictionary* dictPtr = pZone.dict().subDictPtr("thermalModel"))
|
||||
{
|
||||
dictPtr->lookup("type") >> modelType;
|
||||
}
|
||||
|
||||
Info<< "Selecting thermalModel " << modelType << endl;
|
||||
|
||||
pZoneConstructorTable::iterator cstrIter =
|
||||
pZoneConstructorTablePtr_->find(modelType);
|
||||
|
||||
if (cstrIter == pZoneConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"porousMedia::thermalModel::New(const porousZone&)"
|
||||
) << "Unknown thermalModel type "
|
||||
<< modelType << nl << nl
|
||||
<< "Valid thermalModel types are :" << endl
|
||||
<< pZoneConstructorTablePtr_->sortedToc()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<porousMedia::thermalModel>(cstrIter()(pZone));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,61 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-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 "thermalPorousZone.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "volFields.H"
|
||||
#include "fvMatrices.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::thermalPorousZone::thermalPorousZone
|
||||
(
|
||||
const keyType& key,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
porousZone(key, mesh, dict),
|
||||
model_(porousMedia::thermalModel::New(*this))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::thermalPorousZone::addEnergySource
|
||||
(
|
||||
const fluidThermo& thermo,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const
|
||||
{
|
||||
if (model_.valid())
|
||||
{
|
||||
model_->addEnergySource(thermo, rho, hEqn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,145 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-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::thermalPorousZone
|
||||
|
||||
Description
|
||||
Porous zone definition based on cell zones including terms for energy
|
||||
equations.
|
||||
|
||||
See Also
|
||||
porousZone, thermalPorousZones and coordinateSystems with run-time
|
||||
selectable thermal model
|
||||
|
||||
SourceFiles
|
||||
thermalPorousZone.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef thermalPorousZone_H
|
||||
#define thermalPorousZone_H
|
||||
|
||||
#include "porousZone.H"
|
||||
#include "thermalModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class fvMesh;
|
||||
class fluidThermo;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thermalPorousZone Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class thermalPorousZone
|
||||
:
|
||||
public porousZone
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
thermalPorousZone(const thermalPorousZone&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const thermalPorousZone&);
|
||||
|
||||
//- Thermal model
|
||||
autoPtr<porousMedia::thermalModel> model_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
thermalPorousZone
|
||||
(
|
||||
const keyType& key,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Return clone
|
||||
autoPtr<thermalPorousZone> clone() const
|
||||
{
|
||||
notImplemented("autoPtr<thermalPorousZone> clone() const");
|
||||
return autoPtr<thermalPorousZone>(NULL);
|
||||
}
|
||||
|
||||
//- Return pointer to new thermalPorousZone
|
||||
// created on freestore from Istream
|
||||
class iNew
|
||||
{
|
||||
//- Reference to the finite volume mesh this zone is part of
|
||||
const fvMesh& mesh_;
|
||||
|
||||
public:
|
||||
|
||||
iNew(const fvMesh& mesh)
|
||||
:
|
||||
mesh_(mesh)
|
||||
{}
|
||||
|
||||
autoPtr<thermalPorousZone> operator()(Istream& is) const
|
||||
{
|
||||
keyType key(is);
|
||||
dictionary dict(is);
|
||||
|
||||
return autoPtr<thermalPorousZone>
|
||||
(
|
||||
new thermalPorousZone(key, mesh_, dict)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~thermalPorousZone()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
void addEnergySource
|
||||
(
|
||||
const fluidThermo&,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -1,63 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-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 "thermalPorousZones.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTemplateTypeNameAndDebug(IOPtrList<thermalPorousZone>, 0);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::thermalPorousZones::thermalPorousZones
|
||||
(
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
PorousZones<thermalPorousZone>(mesh)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::thermalPorousZones::addEnergySource
|
||||
(
|
||||
const fluidThermo& thermo,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
operator[](i).addEnergySource(thermo, rho, hEqn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,113 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-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::thermalPorousZones
|
||||
|
||||
Description
|
||||
A centralized thermalPorousZone collection.
|
||||
|
||||
Container class for a set of thermalPorousZones with the thermalPorousZone
|
||||
member functions implemented to loop over the functions for each
|
||||
thermalPorousZone.
|
||||
|
||||
The input file \c constant/thermalPorousZone is implemented as
|
||||
IOPtrList\<thermalPorousZone\> (but written as a dictionary)
|
||||
and contains the following type of data:
|
||||
|
||||
\verbatim
|
||||
1
|
||||
(
|
||||
cat1
|
||||
{
|
||||
coordinateSystem system_10;
|
||||
porosity 0.781;
|
||||
Darcy
|
||||
{
|
||||
d d [0 -2 0 0 0] (-1000 -1000 0.50753e+08);
|
||||
f f [0 -1 0 0 0] (-1000 -1000 12.83);
|
||||
}
|
||||
thermalModel
|
||||
{
|
||||
type fixedTemperature;
|
||||
T T [0 0 1 0 0] 600;
|
||||
}
|
||||
}
|
||||
)
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
thermalPorousZones.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef thermalPorousZones_H
|
||||
#define thermalPorousZones_H
|
||||
|
||||
#include "PorousZones.H"
|
||||
#include "thermalPorousZone.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thermalPorousZones Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class thermalPorousZones
|
||||
:
|
||||
public PorousZones<thermalPorousZone>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from fvMesh
|
||||
thermalPorousZones(const fvMesh&);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
void addEnergySource
|
||||
(
|
||||
const fluidThermo&,
|
||||
const volScalarField& rho,
|
||||
fvScalarMatrix& hEqn
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
Loading…
Reference in New Issue
Block a user