thermophysicalModels: Removed pressure field from solid thermos
Solid thermo no longer requires a pressure field, so solid regions of chtMultiRegionFoam cases no longer need a 0/<solidRegionName>/p file. In order for solidThermo to continue to use heThermo and the low level thermo classes, it now constructs a uniformGeometricScalarField for the pressure with the value NaN. This is passed into the low-level thermo models by heThermo. The enforces the requirement that low-level thermo models used by solidThermo should have no pressure dependence. If an instantiation is made with pressure dependence, the code will fail with a floating point error.
This commit is contained in:
@ -1,34 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Version: dev
|
|
||||||
\\/ M anipulation |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
object p;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions"
|
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform $pInitial;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
".*"
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value uniform $pInitial;
|
|
||||||
}
|
|
||||||
|
|
||||||
#includeEtc "caseDicts/setConstraintTypes"
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -616,6 +616,9 @@ meshTools = meshes/meshTools
|
|||||||
$(meshTools)/matchPoints.C
|
$(meshTools)/matchPoints.C
|
||||||
|
|
||||||
fields/UniformDimensionedFields/uniformDimensionedFields.C
|
fields/UniformDimensionedFields/uniformDimensionedFields.C
|
||||||
|
|
||||||
|
fields/UniformGeometricFields/uniformGeometricFields.C
|
||||||
|
|
||||||
fields/cloud/cloud.C
|
fields/cloud/cloud.C
|
||||||
|
|
||||||
Fields = fields/Fields
|
Fields = fields/Fields
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,20 +22,21 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::solidPressureThermo
|
Foam::UniformFieldField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Fundamental solid thermodynamic properties including pressure.
|
A class representing the concept of a field of uniform fields which stores
|
||||||
|
only the single value and providing the operator[] to return it.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
solidPressureThermo.C
|
UniformFieldFieldI.H
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef solidPressureThermo_H
|
#ifndef UniformFieldField_H
|
||||||
#define solidPressureThermo_H
|
#define UniformFieldField_H
|
||||||
|
|
||||||
#include "solidThermo.H"
|
#include "UniformField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -43,59 +44,34 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class solidPressureThermo Declaration
|
Class UniformFieldField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class solidPressureThermo
|
template<class Type>
|
||||||
:
|
class UniformFieldField
|
||||||
public solidThermo
|
|
||||||
{
|
{
|
||||||
|
// Private Data
|
||||||
|
|
||||||
protected:
|
Type value_;
|
||||||
|
|
||||||
// Fields
|
|
||||||
|
|
||||||
//- Pressure [Pa]
|
|
||||||
volScalarField& p_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
// Public typedefs
|
||||||
TypeName("solidPressureThermo");
|
|
||||||
|
//- Component type
|
||||||
|
typedef typename pTraits<Type>::cmptType cmptType;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh and phase name
|
//- Construct given value
|
||||||
solidPressureThermo
|
UniformFieldField(const Type& value);
|
||||||
(
|
|
||||||
const fvMesh&,
|
|
||||||
const word& phaseName
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from mesh, dictionary and phase name
|
|
||||||
solidPressureThermo
|
|
||||||
(
|
|
||||||
const fvMesh&,
|
|
||||||
const dictionary& dict,
|
|
||||||
const word& phaseName
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
// Member Operators
|
||||||
virtual ~solidPressureThermo();
|
|
||||||
|
|
||||||
|
inline UniformField<Type> operator[](const label) const;
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
// Access to thermodynamic state variables
|
|
||||||
|
|
||||||
//- Pressure [Pa]
|
|
||||||
// Non-const access allowed for transport equations
|
|
||||||
virtual volScalarField& p();
|
|
||||||
|
|
||||||
//- Pressure [Pa]
|
|
||||||
virtual const volScalarField& p() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -105,6 +81,10 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "UniformFieldFieldI.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2020 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 "UniformFieldField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline Foam::UniformFieldField<Type>::UniformFieldField(const Type& value)
|
||||||
|
:
|
||||||
|
value_(value)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline Foam::UniformField<Type> Foam::UniformFieldField<Type>::operator[]
|
||||||
|
(
|
||||||
|
const label
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return UniformField<Type>(value_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,8 +51,15 @@ class UniformField
|
|||||||
|
|
||||||
Type value_;
|
Type value_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// Public typedefs
|
||||||
|
|
||||||
|
//- Component type
|
||||||
|
typedef typename pTraits<Type>::cmptType cmptType;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct given value
|
//- Construct given value
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -39,6 +39,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "regIOobject.H"
|
#include "regIOobject.H"
|
||||||
#include "dimensionedType.H"
|
#include "dimensionedType.H"
|
||||||
|
#include "UniformField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -58,6 +59,15 @@ class UniformDimensionedField
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// Public Typedefs
|
||||||
|
|
||||||
|
//- Type of the non-dimensioned field
|
||||||
|
typedef UniformField<Type> FieldType;
|
||||||
|
|
||||||
|
//- Component type of the elements of the field
|
||||||
|
typedef typename UniformField<Type>::cmptType cmptType;
|
||||||
|
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("UniformDimensionedField");
|
TypeName("UniformDimensionedField");
|
||||||
|
|
||||||
@ -87,8 +97,6 @@ public:
|
|||||||
return dimensioned<Type>::name();
|
return dimensioned<Type>::name();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool writeData(Ostream&) const;
|
|
||||||
|
|
||||||
//- Is object global
|
//- Is object global
|
||||||
virtual bool global() const
|
virtual bool global() const
|
||||||
{
|
{
|
||||||
@ -102,6 +110,15 @@ public:
|
|||||||
return globalFilePath(type());
|
return globalFilePath(type());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Return the non-dimensioned field
|
||||||
|
FieldType field() const
|
||||||
|
{
|
||||||
|
return FieldType(this->value());
|
||||||
|
}
|
||||||
|
|
||||||
|
//- WriteData function required for regIOobject write operation
|
||||||
|
bool writeData(Ostream&) const;
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,60 +23,46 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "solidPressureThermo.H"
|
#include "UniformGeometricField.H"
|
||||||
#include "fvMesh.H"
|
|
||||||
|
|
||||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(solidPressureThermo, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::solidPressureThermo::solidPressureThermo
|
template<class Type>
|
||||||
|
Foam::UniformGeometricField<Type>::UniformGeometricField
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const IOobject& io,
|
||||||
const word& phaseName
|
const dimensioned<Type>& dt
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
solidThermo(mesh, phaseName),
|
UniformDimensionedField<Type>(io, dt)
|
||||||
p_(lookupOrConstruct(mesh, "p"))
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::solidPressureThermo::solidPressureThermo
|
template<class Type>
|
||||||
|
Foam::UniformGeometricField<Type>::UniformGeometricField
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const UniformGeometricField<Type>& rdt
|
||||||
const dictionary& dict,
|
|
||||||
const word& phaseName
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
solidThermo(mesh, dict, phaseName),
|
UniformDimensionedField<Type>(rdt)
|
||||||
p_(lookupOrConstruct(mesh, "p"))
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::UniformGeometricField<Type>::UniformGeometricField
|
||||||
|
(
|
||||||
|
const IOobject& io
|
||||||
|
)
|
||||||
|
:
|
||||||
|
UniformDimensionedField<Type>(io)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::solidPressureThermo::~solidPressureThermo()
|
template<class Type>
|
||||||
|
Foam::UniformGeometricField<Type>::~UniformGeometricField()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
const Foam::volScalarField& Foam::solidPressureThermo::p() const
|
|
||||||
{
|
|
||||||
return p_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::volScalarField& Foam::solidPressureThermo::p()
|
|
||||||
{
|
|
||||||
return p_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,116 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2020 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::UniformGeometricField
|
||||||
|
|
||||||
|
Description
|
||||||
|
Dimensioned<Type> registered with the database as a registered IOobject
|
||||||
|
which has the functionality of a uniform field and allows values from the
|
||||||
|
top-level code to be passed to boundary conditions etc.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
UniformGeometricField.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef UniformGeometricField_H
|
||||||
|
#define UniformGeometricField_H
|
||||||
|
|
||||||
|
#include "UniformDimensionedField.H"
|
||||||
|
#include "UniformFieldField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class UniformGeometricField Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class UniformGeometricField
|
||||||
|
:
|
||||||
|
public UniformDimensionedField<Type>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Public Typedefs
|
||||||
|
|
||||||
|
typedef UniformDimensionedField<Type> Internal;
|
||||||
|
typedef UniformField<Type> Patch;
|
||||||
|
typedef UniformFieldField<Type> Boundary;
|
||||||
|
typedef Type cmptType;
|
||||||
|
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("UniformGeometricField");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components. Either reads or uses supplied value.
|
||||||
|
UniformGeometricField(const IOobject&, const dimensioned<Type>&);
|
||||||
|
|
||||||
|
//- Copy constructor
|
||||||
|
UniformGeometricField(const UniformGeometricField<Type>&);
|
||||||
|
|
||||||
|
//- Construct from Istream
|
||||||
|
UniformGeometricField(const IOobject&);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~UniformGeometricField();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Operators
|
||||||
|
|
||||||
|
inline const UniformGeometricField<Type>& oldTime() const;
|
||||||
|
|
||||||
|
inline const Internal& operator()() const;
|
||||||
|
|
||||||
|
inline const Internal& v() const;
|
||||||
|
|
||||||
|
inline typename Internal::FieldType primitiveField() const;
|
||||||
|
|
||||||
|
inline Boundary boundaryField() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
#include "UniformGeometricField.C"
|
||||||
|
#include "UniformGeometricFieldI.H"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2020 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 "UniformGeometricField.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline const Foam::UniformGeometricField<Type>&
|
||||||
|
Foam::UniformGeometricField<Type>::oldTime() const
|
||||||
|
{
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline const typename Foam::UniformGeometricField<Type>::Internal&
|
||||||
|
Foam::UniformGeometricField<Type>::operator()() const
|
||||||
|
{
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline const typename Foam::UniformGeometricField<Type>::Internal&
|
||||||
|
Foam::UniformGeometricField<Type>::v() const
|
||||||
|
{
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline typename Foam::UniformGeometricField<Type>::Internal::FieldType
|
||||||
|
Foam::UniformGeometricField<Type>::primitiveField() const
|
||||||
|
{
|
||||||
|
return typename Internal::FieldType(this->value());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline typename Foam::UniformGeometricField<Type>::Boundary
|
||||||
|
Foam::UniformGeometricField<Type>::boundaryField() const
|
||||||
|
{
|
||||||
|
return Boundary(this->value());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2020 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 "uniformGeometricFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTemplateTypeNameAndDebug(uniformGeometricScalarField, 0);
|
||||||
|
defineTemplateTypeNameAndDebug(uniformGeometricVectorField, 0);
|
||||||
|
defineTemplateTypeNameAndDebug(uniformGeometricSphericalTensorField, 0);
|
||||||
|
defineTemplateTypeNameAndDebug(uniformGeometricSymmTensorField, 0);
|
||||||
|
defineTemplateTypeNameAndDebug(uniformGeometricTensorField, 0);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2020 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/>.
|
||||||
|
|
||||||
|
InClass
|
||||||
|
Foam::UniformGeometricField
|
||||||
|
|
||||||
|
Description
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
uniformGeometricFields.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef uniformGeometricFields_H
|
||||||
|
#define uniformGeometricFields_H
|
||||||
|
|
||||||
|
#include "UniformGeometricField.H"
|
||||||
|
#include "fieldTypes.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
typedef UniformGeometricField<scalar> uniformGeometricScalarField;
|
||||||
|
typedef UniformGeometricField<vector> uniformGeometricVectorField;
|
||||||
|
typedef UniformGeometricField<sphericalTensor>
|
||||||
|
uniformGeometricSphericalTensorField;
|
||||||
|
typedef UniformGeometricField<symmTensor> uniformGeometricSymmTensorField;
|
||||||
|
typedef UniformGeometricField<tensor> uniformGeometricTensorField;
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -24,7 +24,6 @@ absorptionEmissionModels/constantAbsorptionEmission/constantAbsorptionEmission.C
|
|||||||
absorptionEmissionModels/binary/binary.C
|
absorptionEmissionModels/binary/binary.C
|
||||||
absorptionEmissionModels/greyMean/greyMean.C
|
absorptionEmissionModels/greyMean/greyMean.C
|
||||||
absorptionEmissionModels/wideBand/wideBand.C
|
absorptionEmissionModels/wideBand/wideBand.C
|
||||||
absorptionEmissionModels/greyMeanSolid/greyMeanSolid.C
|
|
||||||
|
|
||||||
/* Soot model */
|
/* Soot model */
|
||||||
sootModels/sootModel/sootModel.C
|
sootModels/sootModel/sootModel.C
|
||||||
|
|||||||
@ -1,205 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Copyright (C) 2011-2019 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 "greyMeanSolid.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
#include "unitConversion.H"
|
|
||||||
#include "extrapolatedCalculatedFvPatchFields.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace radiationModels
|
|
||||||
{
|
|
||||||
namespace absorptionEmissionModels
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(greyMeanSolid, 0);
|
|
||||||
|
|
||||||
addToRunTimeSelectionTable
|
|
||||||
(
|
|
||||||
absorptionEmissionModel,
|
|
||||||
greyMeanSolid,
|
|
||||||
dictionary
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField>
|
|
||||||
Foam::radiationModels::absorptionEmissionModels::greyMeanSolid::X
|
|
||||||
(
|
|
||||||
const word specie
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
const volScalarField& T = thermo_.T();
|
|
||||||
const volScalarField& p = thermo_.p();
|
|
||||||
|
|
||||||
tmp<scalarField> tXj(new scalarField(T.primitiveField().size(), 0.0));
|
|
||||||
scalarField& Xj = tXj.ref();
|
|
||||||
|
|
||||||
tmp<scalarField> tRhoInv(new scalarField(T.primitiveField().size(), 0.0));
|
|
||||||
scalarField& rhoInv = tRhoInv.ref();
|
|
||||||
|
|
||||||
forAll(mixture_.Y(), specieI)
|
|
||||||
{
|
|
||||||
const scalarField& Yi = mixture_.Y()[specieI];
|
|
||||||
|
|
||||||
forAll(rhoInv, iCell)
|
|
||||||
{
|
|
||||||
rhoInv[iCell] +=
|
|
||||||
Yi[iCell]/mixture_.rho(specieI, p[iCell], T[iCell]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const scalarField& Yj = mixture_.Y(specie);
|
|
||||||
const label mySpecieI = mixture_.species()[specie];
|
|
||||||
forAll(Xj, iCell)
|
|
||||||
{
|
|
||||||
Xj[iCell] = Yj[iCell]/mixture_.rho(mySpecieI, p[iCell], T[iCell]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (Xj/rhoInv);
|
|
||||||
}
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::radiationModels::absorptionEmissionModels::greyMeanSolid::greyMeanSolid
|
|
||||||
(
|
|
||||||
const dictionary& dict,
|
|
||||||
const fvMesh& mesh
|
|
||||||
)
|
|
||||||
:
|
|
||||||
absorptionEmissionModel(dict, mesh),
|
|
||||||
coeffsDict_((dict.optionalSubDict(typeName + "Coeffs"))),
|
|
||||||
thermo_(mesh.lookupObject<solidPressureThermo>(basicThermo::dictName)),
|
|
||||||
speciesNames_(0),
|
|
||||||
mixture_(dynamic_cast<const basicSpecieMixture&>(thermo_)),
|
|
||||||
solidData_(mixture_.Y().size())
|
|
||||||
{
|
|
||||||
if (!isA<basicSpecieMixture>(thermo_))
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< "Model requires a multi-component thermo package"
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
label nFunc = 0;
|
|
||||||
const dictionary& functionDicts = dict.optionalSubDict(typeName + "Coeffs");
|
|
||||||
|
|
||||||
forAllConstIter(dictionary, functionDicts, iter)
|
|
||||||
{
|
|
||||||
// safety:
|
|
||||||
if (!iter().isDict())
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const word& key = iter().keyword();
|
|
||||||
if (!mixture_.contains(key))
|
|
||||||
{
|
|
||||||
WarningInFunction
|
|
||||||
<< " specie: " << key << " is not found in the solid mixture"
|
|
||||||
<< nl
|
|
||||||
<< " specie is the mixture are:" << mixture_.species() << nl
|
|
||||||
<< nl << endl;
|
|
||||||
}
|
|
||||||
speciesNames_.insert(key, nFunc);
|
|
||||||
const dictionary& dict = iter().dict();
|
|
||||||
dict.lookup("absorptivity") >> solidData_[nFunc][absorptivity];
|
|
||||||
dict.lookup("emissivity") >> solidData_[nFunc][emissivity];
|
|
||||||
|
|
||||||
nFunc++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::radiationModels::absorptionEmissionModels::greyMeanSolid::~greyMeanSolid()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField>
|
|
||||||
Foam::radiationModels::absorptionEmissionModels::greyMeanSolid::calc
|
|
||||||
(
|
|
||||||
const label propertyId
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
tmp<volScalarField> ta
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"a",
|
|
||||||
mesh().time().timeName(),
|
|
||||||
mesh(),
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh(),
|
|
||||||
dimensionedScalar(dimless/dimLength, 0),
|
|
||||||
extrapolatedCalculatedFvPatchVectorField::typeName
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
scalarField& a = ta.ref().primitiveFieldRef();
|
|
||||||
|
|
||||||
forAllConstIter(HashTable<label>, speciesNames_, iter)
|
|
||||||
{
|
|
||||||
if (mixture_.contains(iter.key()))
|
|
||||||
{
|
|
||||||
a += solidData_[iter()][propertyId]*X(iter.key());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ta.ref().correctBoundaryConditions();
|
|
||||||
return ta;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField>
|
|
||||||
Foam::radiationModels::absorptionEmissionModels::greyMeanSolid::eCont
|
|
||||||
(
|
|
||||||
const label bandI
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
return calc(emissivity);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField>
|
|
||||||
Foam::radiationModels::absorptionEmissionModels::greyMeanSolid::aCont
|
|
||||||
(
|
|
||||||
const label bandI
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
return calc(absorptivity);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,164 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Copyright (C) 2011-2019 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::radiationModels::absorptionEmissionModels::greyMeanSolid
|
|
||||||
|
|
||||||
Description
|
|
||||||
greyMeanSolid radiation absorption and emission coefficients for solid phase
|
|
||||||
|
|
||||||
The coefficients for the species in the Look up table have to be specified
|
|
||||||
for use in moles x P [atm], i.e. (k[i] = species[i]*p*9.869231e-6).
|
|
||||||
|
|
||||||
The coefficients for CO and soot or any other added are multiplied by the
|
|
||||||
respective mass fraction being solved
|
|
||||||
|
|
||||||
All the species in the dictionary need either to be in the look-up table or
|
|
||||||
being solved. Conversely, all the species solved do not need to be included
|
|
||||||
in the calculation of the absorption coefficient
|
|
||||||
|
|
||||||
The names of the species in the absorption dictionary must match exactly the
|
|
||||||
name in the look-up table or the name of the field being solved
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
greyMeanSolid.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef greyMeanSolid_H
|
|
||||||
#define greyMeanSolid_H
|
|
||||||
|
|
||||||
#include "absorptionEmissionModel.H"
|
|
||||||
#include "solidPressureThermo.H"
|
|
||||||
#include "basicSpecieMixture.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
namespace radiationModels
|
|
||||||
{
|
|
||||||
namespace absorptionEmissionModels
|
|
||||||
{
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class greyMeanSolid Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class greyMeanSolid
|
|
||||||
:
|
|
||||||
public absorptionEmissionModel
|
|
||||||
{
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// Private Data
|
|
||||||
|
|
||||||
//- Enumering of radiative properties
|
|
||||||
enum radiativeProperties
|
|
||||||
{
|
|
||||||
absorptivity,
|
|
||||||
emissivity
|
|
||||||
};
|
|
||||||
|
|
||||||
//- Absorption model dictionary
|
|
||||||
dictionary coeffsDict_;
|
|
||||||
|
|
||||||
//- SLG thermo package
|
|
||||||
const solidPressureThermo& thermo_;
|
|
||||||
|
|
||||||
//- Hash table of species names
|
|
||||||
HashTable<label> speciesNames_;
|
|
||||||
|
|
||||||
//- Basic multicomponent mixture
|
|
||||||
const basicSpecieMixture& mixture_;
|
|
||||||
|
|
||||||
//- List of solid species data
|
|
||||||
List<FixedList<scalar, 2>> solidData_;
|
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Calculate the volumetric fraction of Yj
|
|
||||||
tmp<scalarField> X(const word specie) const;
|
|
||||||
|
|
||||||
//- Calculate the property mixing
|
|
||||||
tmp<volScalarField> calc(const label) const;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("greyMeanSolid");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
greyMeanSolid
|
|
||||||
(
|
|
||||||
const dictionary& dict,
|
|
||||||
const fvMesh& mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~greyMeanSolid();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
// Access
|
|
||||||
|
|
||||||
// Absorption coefficient
|
|
||||||
|
|
||||||
//- Absorption coefficient for continuous phase
|
|
||||||
tmp<volScalarField> aCont(const label bandI = 0) const;
|
|
||||||
|
|
||||||
|
|
||||||
// Emission coefficient
|
|
||||||
|
|
||||||
//- Emission coefficient for continuous phase
|
|
||||||
tmp<volScalarField> eCont(const label bandI = 0) const;
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
inline bool isGrey() const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace absorptionEmissionModels
|
|
||||||
} // End namespace radiationModels
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -142,6 +142,30 @@ Foam::heThermo<BasicThermo, MixtureType>::patchFieldProperty
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicThermo, class MixtureType>
|
||||||
|
Foam::UIndirectList<Foam::scalar>
|
||||||
|
Foam::heThermo<BasicThermo, MixtureType>::cellSetScalarList
|
||||||
|
(
|
||||||
|
const volScalarField& psi,
|
||||||
|
const labelList& cells
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return UIndirectList<scalar>(psi, cells);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicThermo, class MixtureType>
|
||||||
|
Foam::UniformField<Foam::scalar>
|
||||||
|
Foam::heThermo<BasicThermo, MixtureType>::cellSetScalarList
|
||||||
|
(
|
||||||
|
const uniformGeometricScalarField& psi,
|
||||||
|
const labelList&
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return psi.primitiveField();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicThermo, class MixtureType>
|
template<class BasicThermo, class MixtureType>
|
||||||
void Foam::heThermo<BasicThermo, MixtureType>::
|
void Foam::heThermo<BasicThermo, MixtureType>::
|
||||||
heBoundaryCorrection(volScalarField& h)
|
heBoundaryCorrection(volScalarField& h)
|
||||||
@ -189,7 +213,16 @@ Foam::heThermo<BasicThermo, MixtureType>::heThermo
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
he(this->p(), this->T_),
|
volScalarFieldProperty
|
||||||
|
(
|
||||||
|
"he",
|
||||||
|
dimEnergy/dimMass,
|
||||||
|
&MixtureType::cellMixture,
|
||||||
|
&MixtureType::patchFaceMixture,
|
||||||
|
&MixtureType::thermoType::HE,
|
||||||
|
this->p_,
|
||||||
|
this->T_
|
||||||
|
),
|
||||||
this->heBoundaryTypes(),
|
this->heBoundaryTypes(),
|
||||||
this->heBoundaryBaseTypes()
|
this->heBoundaryBaseTypes()
|
||||||
)
|
)
|
||||||
@ -222,7 +255,16 @@ Foam::heThermo<BasicThermo, MixtureType>::heThermo
|
|||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
he(this->p(), this->T_),
|
volScalarFieldProperty
|
||||||
|
(
|
||||||
|
"he",
|
||||||
|
dimEnergy/dimMass,
|
||||||
|
&MixtureType::cellMixture,
|
||||||
|
&MixtureType::patchFaceMixture,
|
||||||
|
&MixtureType::thermoType::HE,
|
||||||
|
this->p_,
|
||||||
|
this->T_
|
||||||
|
),
|
||||||
this->heBoundaryTypes(),
|
this->heBoundaryTypes(),
|
||||||
this->heBoundaryBaseTypes()
|
this->heBoundaryBaseTypes()
|
||||||
)
|
)
|
||||||
@ -272,7 +314,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he
|
|||||||
&MixtureType::cellMixture,
|
&MixtureType::cellMixture,
|
||||||
&MixtureType::thermoType::HE,
|
&MixtureType::thermoType::HE,
|
||||||
cells,
|
cells,
|
||||||
UIndirectList<scalar>(this->p(), cells),
|
cellSetScalarList(this->p_, cells),
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -290,7 +332,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he
|
|||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::HE,
|
&MixtureType::thermoType::HE,
|
||||||
patchi,
|
patchi,
|
||||||
this->p().boundaryField()[patchi],
|
this->p_.boundaryField()[patchi],
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -307,7 +349,7 @@ Foam::heThermo<BasicThermo, MixtureType>::hs() const
|
|||||||
&MixtureType::cellMixture,
|
&MixtureType::cellMixture,
|
||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::Hs,
|
&MixtureType::thermoType::Hs,
|
||||||
this->p(),
|
this->p_,
|
||||||
this->T_
|
this->T_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -345,7 +387,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::hs
|
|||||||
&MixtureType::cellMixture,
|
&MixtureType::cellMixture,
|
||||||
&MixtureType::thermoType::Hs,
|
&MixtureType::thermoType::Hs,
|
||||||
cells,
|
cells,
|
||||||
UIndirectList<scalar>(this->p(), cells),
|
cellSetScalarList(this->p_, cells),
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -363,7 +405,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::hs
|
|||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::Hs,
|
&MixtureType::thermoType::Hs,
|
||||||
patchi,
|
patchi,
|
||||||
this->p().boundaryField()[patchi],
|
this->p_.boundaryField()[patchi],
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -380,7 +422,7 @@ Foam::heThermo<BasicThermo, MixtureType>::ha() const
|
|||||||
&MixtureType::cellMixture,
|
&MixtureType::cellMixture,
|
||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::Ha,
|
&MixtureType::thermoType::Ha,
|
||||||
this->p(),
|
this->p_,
|
||||||
this->T_
|
this->T_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -418,7 +460,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::ha
|
|||||||
&MixtureType::cellMixture,
|
&MixtureType::cellMixture,
|
||||||
&MixtureType::thermoType::Ha,
|
&MixtureType::thermoType::Ha,
|
||||||
cells,
|
cells,
|
||||||
UIndirectList<scalar>(this->p(), cells),
|
cellSetScalarList(this->p_, cells),
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -436,7 +478,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::ha
|
|||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::Ha,
|
&MixtureType::thermoType::Ha,
|
||||||
patchi,
|
patchi,
|
||||||
this->p().boundaryField()[patchi],
|
this->p_.boundaryField()[patchi],
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -469,7 +511,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cp
|
|||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::Cp,
|
&MixtureType::thermoType::Cp,
|
||||||
patchi,
|
patchi,
|
||||||
this->p().boundaryField()[patchi],
|
this->p_.boundaryField()[patchi],
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -486,7 +528,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cp() const
|
|||||||
&MixtureType::cellMixture,
|
&MixtureType::cellMixture,
|
||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::Cp,
|
&MixtureType::thermoType::Cp,
|
||||||
this->p(),
|
this->p_,
|
||||||
this->T_
|
this->T_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -505,7 +547,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv
|
|||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::Cv,
|
&MixtureType::thermoType::Cv,
|
||||||
patchi,
|
patchi,
|
||||||
this->p().boundaryField()[patchi],
|
this->p_.boundaryField()[patchi],
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -522,7 +564,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv() const
|
|||||||
&MixtureType::cellMixture,
|
&MixtureType::cellMixture,
|
||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::Cv,
|
&MixtureType::thermoType::Cv,
|
||||||
this->p(),
|
this->p_,
|
||||||
this->T_
|
this->T_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -540,7 +582,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::gamma
|
|||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::gamma,
|
&MixtureType::thermoType::gamma,
|
||||||
patchi,
|
patchi,
|
||||||
this->p().boundaryField()[patchi],
|
this->p_.boundaryField()[patchi],
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -557,7 +599,7 @@ Foam::heThermo<BasicThermo, MixtureType>::gamma() const
|
|||||||
&MixtureType::cellMixture,
|
&MixtureType::cellMixture,
|
||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::gamma,
|
&MixtureType::thermoType::gamma,
|
||||||
this->p(),
|
this->p_,
|
||||||
this->T_
|
this->T_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -575,7 +617,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cpv
|
|||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::Cpv,
|
&MixtureType::thermoType::Cpv,
|
||||||
patchi,
|
patchi,
|
||||||
this->p().boundaryField()[patchi],
|
this->p_.boundaryField()[patchi],
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -592,7 +634,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cpv() const
|
|||||||
&MixtureType::cellMixture,
|
&MixtureType::cellMixture,
|
||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::Cpv,
|
&MixtureType::thermoType::Cpv,
|
||||||
this->p(),
|
this->p_,
|
||||||
this->T_
|
this->T_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -610,7 +652,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::CpByCpv
|
|||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::CpByCpv,
|
&MixtureType::thermoType::CpByCpv,
|
||||||
patchi,
|
patchi,
|
||||||
this->p().boundaryField()[patchi],
|
this->p_.boundaryField()[patchi],
|
||||||
T
|
T
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -627,7 +669,7 @@ Foam::heThermo<BasicThermo, MixtureType>::CpByCpv() const
|
|||||||
&MixtureType::cellMixture,
|
&MixtureType::cellMixture,
|
||||||
&MixtureType::patchFaceMixture,
|
&MixtureType::patchFaceMixture,
|
||||||
&MixtureType::thermoType::CpByCpv,
|
&MixtureType::thermoType::CpByCpv,
|
||||||
this->p(),
|
this->p_,
|
||||||
this->T_
|
this->T_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -647,7 +689,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE
|
|||||||
&MixtureType::thermoType::THE,
|
&MixtureType::thermoType::THE,
|
||||||
cells,
|
cells,
|
||||||
h,
|
h,
|
||||||
UIndirectList<scalar>(this->p(), cells),
|
cellSetScalarList(this->p_, cells),
|
||||||
T0
|
T0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -667,7 +709,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE
|
|||||||
&MixtureType::thermoType::THE,
|
&MixtureType::thermoType::THE,
|
||||||
patchi,
|
patchi,
|
||||||
h,
|
h,
|
||||||
this->p().boundaryField()[patchi],
|
this->p_.boundaryField()[patchi],
|
||||||
T0
|
T0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,6 +36,8 @@ SourceFiles
|
|||||||
#define heThermo_H
|
#define heThermo_H
|
||||||
|
|
||||||
#include "basicMixture.H"
|
#include "basicMixture.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "uniformGeometricFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -100,6 +102,20 @@ protected:
|
|||||||
const Args& ... args
|
const Args& ... args
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Return an indirect list of a field for the given set of cells
|
||||||
|
static UIndirectList<scalar> cellSetScalarList
|
||||||
|
(
|
||||||
|
const volScalarField& psi,
|
||||||
|
const labelList& cells
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Return an indirect list of a field for the given set of cells
|
||||||
|
static UniformField<scalar> cellSetScalarList
|
||||||
|
(
|
||||||
|
const uniformGeometricScalarField& psi,
|
||||||
|
const labelList&
|
||||||
|
);
|
||||||
|
|
||||||
//- Correct the enthalpy/internal energy field boundaries
|
//- Correct the enthalpy/internal energy field boundaries
|
||||||
void heBoundaryCorrection(volScalarField& he);
|
void heBoundaryCorrection(volScalarField& he);
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
solidThermo/solidThermo.C
|
solidThermo/solidThermo.C
|
||||||
solidPressureThermo/solidPressureThermo.C
|
solidThermo/solidThermos.C
|
||||||
heSolidThermo/heSolidThermos.C
|
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libsolidThermo
|
LIB = $(FOAM_LIBBIN)/libsolidThermo
|
||||||
|
|||||||
@ -29,8 +29,8 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef makeHeSolidThermo_H
|
#ifndef makeSolidThermo_H
|
||||||
#define makeHeSolidThermo_H
|
#define makeSolidThermo_H
|
||||||
|
|
||||||
#include "basicThermo.H"
|
#include "basicThermo.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,10 +31,10 @@ License
|
|||||||
template<class BasicSolidThermo, class MixtureType>
|
template<class BasicSolidThermo, class MixtureType>
|
||||||
void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::calculate()
|
void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::calculate()
|
||||||
{
|
{
|
||||||
scalarField& TCells = this->T_.primitiveFieldRef();
|
|
||||||
|
|
||||||
const scalarField& hCells = this->he_;
|
const scalarField& hCells = this->he_;
|
||||||
const scalarField& pCells = this->p_;
|
const auto& pCells = this->p_;
|
||||||
|
|
||||||
|
scalarField& TCells = this->T_.primitiveFieldRef();
|
||||||
scalarField& rhoCells = this->rho_.primitiveFieldRef();
|
scalarField& rhoCells = this->rho_.primitiveFieldRef();
|
||||||
scalarField& alphaCells = this->alpha_.primitiveFieldRef();
|
scalarField& alphaCells = this->alpha_.primitiveFieldRef();
|
||||||
|
|
||||||
@ -60,8 +60,7 @@ void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::calculate()
|
|||||||
/mixture_.Cpv(pCells[celli], TCells[celli]);
|
/mixture_.Cpv(pCells[celli], TCells[celli]);
|
||||||
}
|
}
|
||||||
|
|
||||||
volScalarField::Boundary& pBf =
|
const auto& pBf = this->p_.boundaryField();
|
||||||
this->p_.boundaryFieldRef();
|
|
||||||
|
|
||||||
volScalarField::Boundary& TBf =
|
volScalarField::Boundary& TBf =
|
||||||
this->T_.boundaryFieldRef();
|
this->T_.boundaryFieldRef();
|
||||||
@ -77,7 +76,7 @@ void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::calculate()
|
|||||||
|
|
||||||
forAll(this->T_.boundaryField(), patchi)
|
forAll(this->T_.boundaryField(), patchi)
|
||||||
{
|
{
|
||||||
fvPatchScalarField& pp = pBf[patchi];
|
const auto& pp = pBf[patchi];
|
||||||
fvPatchScalarField& pT = TBf[patchi];
|
fvPatchScalarField& pT = TBf[patchi];
|
||||||
fvPatchScalarField& prho = rhoBf[patchi];
|
fvPatchScalarField& prho = rhoBf[patchi];
|
||||||
fvPatchScalarField& phe = heBf[patchi];
|
fvPatchScalarField& phe = heBf[patchi];
|
||||||
@ -211,10 +210,11 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa() const
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const auto& pCells = this->p_;
|
||||||
|
const scalarField& TCells = this->T_;
|
||||||
|
|
||||||
volVectorField& Kappa = tKappa.ref();
|
volVectorField& Kappa = tKappa.ref();
|
||||||
vectorField& KappaCells = Kappa.primitiveFieldRef();
|
vectorField& KappaCells = Kappa.primitiveFieldRef();
|
||||||
const scalarField& TCells = this->T_;
|
|
||||||
const scalarField& pCells = this->p_;
|
|
||||||
|
|
||||||
forAll(KappaCells, celli)
|
forAll(KappaCells, celli)
|
||||||
{
|
{
|
||||||
@ -231,9 +231,10 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa() const
|
|||||||
|
|
||||||
forAll(KappaBf, patchi)
|
forAll(KappaBf, patchi)
|
||||||
{
|
{
|
||||||
vectorField& Kappap = KappaBf[patchi];
|
const auto& pp = this->p_.boundaryField()[patchi];
|
||||||
const scalarField& pT = this->T_.boundaryField()[patchi];
|
const scalarField& pT = this->T_.boundaryField()[patchi];
|
||||||
const scalarField& pp = this->p_.boundaryField()[patchi];
|
|
||||||
|
vectorField& Kappap = KappaBf[patchi];
|
||||||
|
|
||||||
forAll(Kappap, facei)
|
forAll(Kappap, facei)
|
||||||
{
|
{
|
||||||
@ -259,10 +260,10 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa
|
|||||||
const label patchi
|
const label patchi
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const scalarField& pp = this->p_.boundaryField()[patchi];
|
const auto& pp = this->p_.boundaryField()[patchi];
|
||||||
const scalarField& Tp = this->T_.boundaryField()[patchi];
|
const scalarField& Tp = this->T_.boundaryField()[patchi];
|
||||||
tmp<vectorField> tKappa(new vectorField(pp.size()));
|
|
||||||
|
|
||||||
|
tmp<vectorField> tKappa(new vectorField(Tp.size()));
|
||||||
vectorField& Kappap = tKappa.ref();
|
vectorField& Kappap = tKappa.ref();
|
||||||
|
|
||||||
forAll(Tp, facei)
|
forAll(Tp, facei)
|
||||||
@ -270,11 +271,11 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa
|
|||||||
Kappap[facei] =
|
Kappap[facei] =
|
||||||
this->patchFaceVolMixture
|
this->patchFaceVolMixture
|
||||||
(
|
(
|
||||||
pp[facei],
|
pp[patchi],
|
||||||
Tp[facei],
|
Tp[facei],
|
||||||
patchi,
|
patchi,
|
||||||
facei
|
facei
|
||||||
).Kappa(pp[facei], Tp[facei]);
|
).Kappa(pp[patchi], Tp[facei]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tKappa;
|
return tKappa;
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,7 +26,6 @@ License
|
|||||||
#include "solidThermo.H"
|
#include "solidThermo.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
|
|
||||||
|
|
||||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -46,6 +45,18 @@ Foam::solidThermo::solidThermo
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
basicThermo(mesh, phaseName),
|
basicThermo(mesh, phaseName),
|
||||||
|
p_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
phasePropertyName("p"),
|
||||||
|
mesh.time().timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
dimensionedScalar(phasePropertyName("p"), dimPressure, NaN)
|
||||||
|
),
|
||||||
rho_
|
rho_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -70,6 +81,18 @@ Foam::solidThermo::solidThermo
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
basicThermo(mesh, dict, phaseName),
|
basicThermo(mesh, dict, phaseName),
|
||||||
|
p_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
phasePropertyName("p"),
|
||||||
|
mesh.time().timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
dimensionedScalar(phasePropertyName("p"), dimPressure, NaN)
|
||||||
|
),
|
||||||
rho_
|
rho_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -36,6 +36,7 @@ SourceFiles
|
|||||||
#define solidThermo_H
|
#define solidThermo_H
|
||||||
|
|
||||||
#include "basicThermo.H"
|
#include "basicThermo.H"
|
||||||
|
#include "uniformGeometricFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -55,6 +56,13 @@ protected:
|
|||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
|
//- Pressure [Pa]
|
||||||
|
// Note: This value should never be used. Solid thermo should only be
|
||||||
|
// instantiated with thermo models that do not depend on pressure.
|
||||||
|
// This uniform field takes a value of NaN, so that if any thermo
|
||||||
|
// models that do depend on pressure are used then the code will exit.
|
||||||
|
uniformGeometricScalarField p_;
|
||||||
|
|
||||||
//- Density field [kg/m^3]
|
//- Density field [kg/m^3]
|
||||||
volScalarField rho_;
|
volScalarField rho_;
|
||||||
|
|
||||||
|
|||||||
@ -23,24 +23,18 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "solidPressureThermo.H"
|
#include "solidThermo.H"
|
||||||
#include "heSolidThermo.H"
|
#include "heSolidThermo.H"
|
||||||
#include "pureMixture.H"
|
#include "pureMixture.H"
|
||||||
|
|
||||||
#include "forSolids.H"
|
#include "forSolids.H"
|
||||||
#include "makeHeSolidThermo.H"
|
#include "makeSolidThermo.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
forSolids(makeSolidThermos, solidThermo, heSolidThermo, pureMixture);
|
||||||
/* * * * * * * * * * * * * * * * * Enthalpy-based * * * * * * * * * * * * * */
|
}
|
||||||
|
|
||||||
forSolids(makeSolidThermos, solidPressureThermo, heSolidThermo, pureMixture);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
@ -1,31 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Version: dev
|
|
||||||
\\/ M anipulation |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
location "0";
|
|
||||||
object p;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 1e6;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
".*"
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Version: dev
|
|
||||||
\\/ M anipulation |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
object p;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions"
|
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform $pInitial;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
".*"
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value uniform $pInitial;
|
|
||||||
}
|
|
||||||
|
|
||||||
#includeEtc "caseDicts/setConstraintTypes"
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Version: dev
|
|
||||||
\\/ M anipulation |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
location "0/heater";
|
|
||||||
object p;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
#includeEtc "caseDicts/setConstraintTypes"
|
|
||||||
|
|
||||||
".*"
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value $internalField;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Version: dev
|
|
||||||
\\/ M anipulation |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
location "0/metal";
|
|
||||||
object p;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
#includeEtc "caseDicts/setConstraintTypes"
|
|
||||||
|
|
||||||
".*"
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value $internalField;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Version: dev
|
|
||||||
\\/ M anipulation |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
location "0/solid";
|
|
||||||
object p;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [ 1 -1 -2 0 0 0 0 ];
|
|
||||||
|
|
||||||
internalField uniform 1e6;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
#includeEtc "caseDicts/setConstraintTypes"
|
|
||||||
|
|
||||||
".*"
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value $internalField;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Version: dev
|
|
||||||
\\/ M anipulation |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
location "0/solid";
|
|
||||||
object p;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
#includeEtc "caseDicts/setConstraintTypes"
|
|
||||||
|
|
||||||
".*"
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value $internalField;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Version: dev
|
|
||||||
\\/ M anipulation |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
object p;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
topSurface
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bottomSurface
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
fixedEnd
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
tractionEnd
|
|
||||||
{
|
|
||||||
type calculated;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultFaces
|
|
||||||
{
|
|
||||||
type empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
Reference in New Issue
Block a user