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

This commit is contained in:
mattijs
2009-07-07 17:41:08 +01:00
157 changed files with 8848 additions and 3974 deletions

View File

@ -63,17 +63,28 @@ class OutputFilterFunctionObject
{
// Private data
//- Output filter name
word name_;
//- Reference to the time database
const Time& time_;
//- Input dictionary
dictionary dict_;
//- Name of region
word regionName_;
//- Optional dictionary name to supply required inputs
word dictName_;
//- Switch for the execution of the functionObject
bool enabled_;
//- Output controls
outputFilterOutputControl outputControl_;
//- Pointer to the output filter
autoPtr<OutputFilter> ptr_;
@ -108,31 +119,78 @@ public:
// Member Functions
//- Return name
virtual const word& name() const
{
return name_;
}
// Access
//- Switch the function object on
virtual void on();
//- Return name
virtual const word& name() const
{
return name_;
}
//- Switch the function object off
virtual void off();
//- Return time database
virtual const Time& time() const
{
return time_;
}
//- Return the input dictionary
virtual const dictionary& dict() const
{
return dict_;
}
//- Return the region name
virtual const word& regionName() const
{
return regionName_;
}
//- Return the optional dictionary name
virtual const word& dictName() const
{
return dictName_;
}
//- Return the enabled flag
virtual bool enabled() const
{
return enabled_;
}
//- Return the output control object
virtual const outputFilterOutputControl& outputControl() const
{
return outputControl_;
}
//- Return the output filter
virtual const OutputFilter& outputFilter() const
{
return ptr_();
}
//- Called at the start of the time-loop
virtual bool start();
// Function object control
//- Called at each ++ or += of the time-loop
virtual bool execute();
//- Switch the function object on
virtual void on();
//- Called when Time::run() determines that the time-loop exits
virtual bool end();
//- Switch the function object off
virtual void off();
//- Read and set the function object if its data have changed
virtual bool read(const dictionary&);
//- Called at the start of the time-loop
virtual bool start();
//- Called at each ++ or += of the time-loop
virtual bool execute();
//- Called when Time::run() determines that the time-loop exits
virtual bool end();
//- Read and set the function object if its data have changed
virtual bool read(const dictionary&);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2007 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -299,7 +299,7 @@ void Foam::DsmcCloud<ParcelType>::collisions()
// Temporary storage for subCells
List<DynamicList<label> > subCells(8);
scalar deltaT = mesh_.time().deltaT().value();
scalar deltaT = cachedDeltaT();
label collisionCandidates = 0;
@ -778,6 +778,9 @@ Foam::DsmcCloud<ParcelType>::~DsmcCloud()
template<class ParcelType>
void Foam::DsmcCloud<ParcelType>::evolve()
{
// cache the value of deltaT for this timestep
storeDeltaT();
typename ParcelType::trackData td(*this);
// Reset the surface data collection fields

View File

@ -116,6 +116,10 @@ class DsmcCloud
//- Random number generator
Random rndGen_;
//- In-cloud cache of deltaT, lookup in submodels and parcel is
// expensive
scalar cachedDeltaT_;
// References to the macroscopic fields
@ -243,6 +247,12 @@ public:
//- Return refernce to the random object
inline Random& rndGen();
//- Store (cache) the current value of deltaT
inline void storeDeltaT();
//- Return the cached value of deltaT
inline scalar cachedDeltaT() const;
// References to the surface data collection fields

View File

@ -120,6 +120,20 @@ inline Foam::Random& Foam::DsmcCloud<ParcelType>::rndGen()
}
template<class ParcelType>
inline void Foam::DsmcCloud<ParcelType>::storeDeltaT()
{
cachedDeltaT_ = mesh().time().deltaT().value();
}
template<class ParcelType>
inline Foam::scalar Foam::DsmcCloud<ParcelType>::cachedDeltaT() const
{
return cachedDeltaT_;
}
template<class ParcelType>
inline const Foam::volScalarField& Foam::DsmcCloud<ParcelType>::q() const
{

View File

@ -44,7 +44,7 @@ bool Foam::DsmcParcel<ParcelType>::move
const polyMesh& mesh = td.cloud().pMesh();
const polyBoundaryMesh& pbMesh = mesh.boundaryMesh();
const scalar deltaT = mesh.time().deltaT().value();
const scalar deltaT = td.cloud().cachedDeltaT();
scalar tEnd = (1.0 - p.stepFraction())*deltaT;
const scalar dtMax = tEnd;
@ -145,7 +145,7 @@ void Foam::DsmcParcel<ParcelType>::hitWallPatch
const scalar fA = mag(wpp.faceAreas()[wppLocalFace]);
const scalar deltaT = td.cloud().mesh().time().deltaT().value();
const scalar deltaT = td.cloud().cachedDeltaT();
scalar deltaQ = td.cloud().nParticle()*(preIE - postIE)/(deltaT*fA);

View File

@ -126,7 +126,7 @@ void Foam::FreeStream<CloudType>::inflow()
const polyMesh& mesh(cloud.mesh());
const scalar deltaT = mesh.time().deltaT().value();
const scalar deltaT = cloud.cachedDeltaT();
Random& rndGen(cloud.rndGen());

View File

@ -177,6 +177,7 @@ template<class ParcelType>
void Foam::KinematicCloud<ParcelType>::preEvolve()
{
this->dispersion().cacheFields(true);
forces_.cacheFields(true);
}
@ -189,6 +190,7 @@ void Foam::KinematicCloud<ParcelType>::postEvolve()
}
this->dispersion().cacheFields(false);
forces_.cacheFields(false);
this->postProcessing().post();
}

View File

@ -274,18 +274,6 @@ public:
inline const dictionary& interpolationSchemes() const;
// Forces to include in particle motion evaluation
//- Return reference to the gravity force flag
inline Switch forceGravity() const;
//- Return reference to the virtual mass force flag
inline Switch forceVirtualMass() const;
//- Return reference to the pressure gradient force flag
inline Switch forcePressureGradient() const;
// Sub-models
//- Return const-access to the dispersion model

View File

@ -27,6 +27,7 @@ License
#include "particleForces.H"
#include "fvMesh.H"
#include "volFields.H"
#include "fvcGrad.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -40,21 +41,17 @@ Foam::particleForces::particleForces
mesh_(mesh),
dict_(dict.subDict("particleForces")),
g_(g),
gradUPtr_(NULL),
gravity_(dict_.lookup("gravity")),
virtualMass_(dict_.lookup("virtualMass")),
Cvm_(0.0),
pressureGradient_(dict_.lookup("pressureGradient")),
gradUName_("unknown_gradUName")
UName_(dict_.lookupOrDefault<word>("U", "U"))
{
if (gravity_)
if (virtualMass_)
{
dict_.lookup("Cvm") >> Cvm_;
}
if (pressureGradient_)
{
dict_.lookup("gradU") >> gradUName_;
}
}
@ -63,18 +60,21 @@ Foam::particleForces::particleForces(const particleForces& f)
mesh_(f.mesh_),
dict_(f.dict_),
g_(f.g_),
gradUPtr_(f.gradUPtr_),
gravity_(f.gravity_),
virtualMass_(f.virtualMass_),
Cvm_(f.Cvm_),
pressureGradient_(f.pressureGradient_),
gradUName_(f.gradUName_)
UName_(f.UName_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::particleForces::~particleForces()
{}
{
cacheFields(false);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -109,9 +109,26 @@ Foam::Switch Foam::particleForces::pressureGradient() const
}
const Foam::word& Foam::particleForces::gradUName() const
const Foam::word& Foam::particleForces::UName() const
{
return gradUName_;
return UName_;
}
void Foam::particleForces::cacheFields(const bool store)
{
if (store && pressureGradient_)
{
const volVectorField U = mesh_.lookupObject<volVectorField>(UName_);
gradUPtr_ = fvc::grad(U).ptr();
}
else
{
if (gradUPtr_)
{
delete gradUPtr_;
}
}
}
@ -130,15 +147,17 @@ Foam::vector Foam::particleForces::calcCoupled
// Virtual mass force
if (virtualMass_)
{
notImplemented("Foam::particleForces::calc(...) - virtualMass force");
notImplemented
(
"Foam::particleForces::calcCoupled(...) - virtual mass force"
);
// Ftot += Cvm_*rhoc/rho*d(Uc - U)/dt;
}
// Pressure gradient force
if (pressureGradient_)
{
const volSymmTensorField& gradU =
mesh_.lookupObject<volSymmTensorField>(gradUName_);
const volTensorField& gradU = *gradUPtr_;
Ftot += rhoc/rho*(U & gradU[cellI]);
}

View File

@ -39,6 +39,7 @@ SourceFiles
#include "dictionary.H"
#include "Switch.H"
#include "vector.H"
#include "volFieldsFwd.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -65,6 +66,9 @@ class particleForces
//- Gravity
const vector g_;
//- Velocity gradient field
const volTensorField* gradUPtr_;
// Forces to include in particle motion evaluation
@ -80,8 +84,11 @@ class particleForces
//- Pressure gradient
Switch pressureGradient_;
//- Name of velocity gradient field for pressure gradient force
word gradUName_;
// Additional info
//- Name of velucity field - default = "U"
const word UName_;
public:
@ -126,12 +133,15 @@ public:
//- Return pressure gradient force activate switch
Switch pressureGradient() const;
//- Return the name of the velocity gradient field
const word& gradUName() const;
//- Return name of velocity field
const word& UName() const;
// Evaluation
//- Cache carrier fields
void cacheFields(const bool store);
//- Calculate action/reaction forces between carrier and particles
vector calcCoupled
(

View File

@ -507,7 +507,7 @@ void Foam::moleculeCloud::initialiseMolecules
else
{
const dictionary& zoneDict =
mdInitialiseDict.subDict(zone.name());
mdInitialiseDict.subDict(zone.name());
const scalar temperature
(
@ -530,7 +530,7 @@ void Foam::moleculeCloud::initialiseMolecules
{
FatalErrorIn("Foam::moleculeCloud::initialiseMolecules")
<< "latticeIds and latticePositions must be the same "
<< " size." << nl
<< " size." << nl
<< abort(FatalError);
}
@ -548,6 +548,15 @@ void Foam::moleculeCloud::initialiseMolecules
zoneDict.lookup("numberDensity")
);
if (numberDensity < VSMALL)
{
WarningIn("moleculeCloud::initialiseMolecules")
<< "numberDensity too small, not filling zone "
<< zone.name() << endl;
continue;
}
latticeCellScale = pow
(
latticeIds.size()/(det(latticeCellShape)*numberDensity),
@ -572,9 +581,19 @@ void Foam::moleculeCloud::initialiseMolecules
zoneDict.lookup("massDensity")
);
if (massDensity < VSMALL)
{
WarningIn("moleculeCloud::initialiseMolecules")
<< "massDensity too small, not filling zone "
<< zone.name() << endl;
continue;
}
latticeCellScale = pow
(
unitCellMass /(det(latticeCellShape)*massDensity),
unitCellMass/(det(latticeCellShape)*massDensity),
(1.0/3.0)
);
}
@ -906,7 +925,7 @@ void Foam::moleculeCloud::initialiseMolecules
)
{
WarningIn("Foam::moleculeCloud::initialiseMolecules()")
<< "A whole layer of unit cells was placed "
<< "A whole layer of unit cells was placed "
<< "outside the bounds of the mesh, but no "
<< "molecules have been placed in zone '"
<< zone.name()

View File

@ -127,11 +127,11 @@ void Foam::staticPressure::write()
{
const volScalarField& p = obr_.lookupObject<volScalarField>(pName_);
volScalarField pDyn
volScalarField pStatic
(
IOobject
(
"pDyn",
"pStatic",
obr_.time().timeName(),
obr_,
IOobject::NO_READ
@ -139,7 +139,7 @@ void Foam::staticPressure::write()
dimensionedScalar("rho", dimDensity, rho_)*p
);
pDyn.write();
pStatic.write();
}
}

View File

@ -0,0 +1,4 @@
faceZoneIntegration/faceZonesIntegration.C
faceZoneIntegration/faceZonesIntegrationFunctionObject.C
LIB = $(FOAM_LIBBIN)/libzoneFunctionObjects

View File

@ -0,0 +1,9 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
LIB_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lsampling

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Typedef
Foam::IOfaceZonesIntegration
Description
Instance of the generic IOOutputFilter for faceZonesIntegration.
\*---------------------------------------------------------------------------*/
#ifndef IOfaceZonesIntegration_H
#define IOfaceZonesIntegration_H
#include "faceZonesIntegration.H"
#include "IOOutputFilter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOOutputFilter<faceZonesIntegration> IOfaceZonesIntegration;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,322 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "faceZonesIntegration.H"
#include "volFields.H"
#include "dictionary.H"
#include "Time.H"
#include "IOmanip.H"
#include "ListListOps.H"
#include "processorPolyPatch.H"
#include "cyclicPolyPatch.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(faceZonesIntegration, 0);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::faceZonesIntegration::faceZonesIntegration
(
const word& name,
const objectRegistry& obr,
const dictionary& dict,
const bool loadFromFiles
)
:
name_(name),
obr_(obr),
active_(true),
log_(false),
faceZonesSet_(),
fItems_(),
faceZonesIntegrationFilePtr_(NULL)
{
// Check if the available mesh is an fvMesh otherise deactivate
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"Foam::faceZonesIntegration::faceZonesIntegration"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating."
<< endl;
}
read(dict);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::faceZonesIntegration::~faceZonesIntegration()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::faceZonesIntegration::read(const dictionary& dict)
{
if (active_)
{
log_ = dict.lookupOrDefault<Switch>("log", false);
dict.lookup("fields") >> fItems_;
dict.lookup("faceZones") >> faceZonesSet_;
}
}
void Foam::faceZonesIntegration::makeFile()
{
// Create the face Zone file if not already created
if (faceZonesIntegrationFilePtr_.empty())
{
if (debug)
{
Info<< "Creating faceZonesIntegration file." << endl;
}
// File update
if (Pstream::master())
{
fileName faceZonesIntegrationDir;
if (Pstream::parRun())
{
// Put in undecomposed case (Note: gives problems for
// distributed data running)
faceZonesIntegrationDir =
obr_.time().path()/".."/name_/obr_.time().timeName();
}
else
{
faceZonesIntegrationDir =
obr_.time().path()/name_/obr_.time().timeName();
}
// Create directory if does not exist.
mkDir(faceZonesIntegrationDir);
// Open new file at start up
faceZonesIntegrationFilePtr_.resize(fItems_.size());
forAll(fItems_, Ifields)
{
const word& fieldName = fItems_[Ifields];
OFstream* sPtr = new OFstream
(
faceZonesIntegrationDir/fieldName
);
faceZonesIntegrationFilePtr_.insert(fieldName, sPtr);
}
// Add headers to output data
writeFileHeader();
}
}
}
void Foam::faceZonesIntegration::writeFileHeader()
{
forAllIter(HashPtrTable<OFstream>, faceZonesIntegrationFilePtr_, iter)
{
unsigned int w = IOstream::defaultPrecision() + 7;
OFstream& os = *faceZonesIntegrationFilePtr_[iter.key()];
os << "#Time " << setw(w);
forAll (faceZonesSet_, zoneI)
{
const word name = faceZonesSet_[zoneI];
os << name << setw(w);
}
os << nl << endl;
}
}
void Foam::faceZonesIntegration::execute()
{
// Do nothing - only valid on write
}
void Foam::faceZonesIntegration::end()
{
// Do nothing - only valid on write
}
void Foam::faceZonesIntegration::write()
{
if (active_)
{
makeFile();
scalar dm = 0.0;
forAll(fItems_, fieldI)
{
const word& fieldName = fItems_[fieldI];
const surfaceScalarField& fD =
obr_.lookupObject<surfaceScalarField>(fieldName);
const fvMesh& mesh = fD.mesh();
unsigned int w = IOstream::defaultPrecision() + 7;
if
(
Pstream::master()
&& faceZonesIntegrationFilePtr_.found(fieldName)
)
{
OFstream& os = *faceZonesIntegrationFilePtr_(fieldName);
os << obr_.time().value();
const faceZoneMesh& faceZoneList = mesh.faceZones();
forAll(faceZonesSet_, zoneI)
{
const word name = faceZonesSet_[zoneI];
label zoneID = faceZoneList.findZoneID(name);
const faceZone& fz = mesh.faceZones()[zoneID];
dm = calcFaceZonesIntegral(fD, fz);
reduce(dm, sumOp<scalar>());
os << ' ' << setw(w) << dm;
if (log_)
{
Info<< "faceZonesIntegration output:" << nl
<< " Integration" << dm << endl;
}
}
os << endl;
}
}
}
}
Foam::scalar Foam::faceZonesIntegration::calcFaceZonesIntegral
(
const surfaceScalarField& fD,
const faceZone& fz
) const
{
scalar dm = 0.0;
const fvMesh& mesh = fD.mesh();
forAll (fz, i)
{
label faceI = fz[i];
if (mesh.isInternalFace(faceI))
{
if (fz.flipMap()[faceI])
{
dm -= fD[faceI];
}
else
{
dm += fD[faceI];
}
}
else
{
label patchI = mesh.boundaryMesh().whichPatch(faceI);
const polyPatch& pp = mesh.boundaryMesh()[patchI];
if (isA<processorPolyPatch>(pp))
{
if (refCast<const processorPolyPatch>(pp).owner())
{
if (fz.flipMap()[faceI])
{
dm -= fD.boundaryField()[patchI][pp.whichFace(faceI)];
}
else
{
dm += fD.boundaryField()[patchI][pp.whichFace(faceI)];
}
}
}
else if (isA<cyclicPolyPatch>(pp))
{
label patchFaceI = faceI - pp.start();
if (patchFaceI < pp.size()/2)
{
if (fz.flipMap()[patchFaceI])
{
dm -= fD.boundaryField()[patchI][patchFaceI];
}
else
{
dm += fD.boundaryField()[patchI][patchFaceI];
}
}
}
else if (!isA<emptyPolyPatch>(pp))
{
label patchFaceI = faceI - pp.start();
if (fz.flipMap()[patchFaceI])
{
dm -= fD.boundaryField()[patchI][patchFaceI];
}
else
{
dm += fD.boundaryField()[patchI][patchFaceI];
}
}
}
}
return dm;
}
// ************************************************************************* //

View File

@ -0,0 +1,178 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::faceZonesIntegration
Description
Integrates surfaceScalarFields on faceZones
SourceFiles
faceZonesIntegration.C
IOfaceZonesIntegration.H
\*---------------------------------------------------------------------------*/
#ifndef faceZonesIntegration_H
#define faceZonesIntegration_H
#include "fvCFD.H"
#include "primitiveFieldsFwd.H"
#include "volFieldsFwd.H"
#include "HashPtrTable.H"
#include "OFstream.H"
#include "Switch.H"
#include "pointFieldFwd.H"
#include "polyMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward declaration of classes
class objectRegistry;
class dictionary;
class mapPolyMesh;
/*---------------------------------------------------------------------------*\
Class faceZonesIntegration Declaration
\*---------------------------------------------------------------------------*/
class faceZonesIntegration
{
protected:
// Private data
//- Name of this set of face zone integration,
// Also used as the name of the probes directory.
word name_;
const objectRegistry& obr_;
//- on/off switch
bool active_;
//- Switch to send output to Info as well as to file
Switch log_;
//- Current open files
HashPtrTable<OFstream> faceZonesIntegrationFilePtr_;
// Read from dictionary
//- faceZones to integrate over
wordList faceZonesSet_;
//- Names of the surface fields
wordList fItems_;
// Private Member Functions
//- If the integration file has not been created create it
void makeFile();
scalar calcFaceZonesIntegral
(
const surfaceScalarField& fD,
const faceZone& fz
) const;
//- Disallow default bitwise copy construct
faceZonesIntegration(const faceZonesIntegration&);
//- Disallow default bitwise assignment
void operator=(const faceZonesIntegration&);
//- Output file header information
virtual void writeFileHeader();
public:
//- Runtime type information
TypeName("faceZonesIntegration");
// Constructors
//- Construct for given objectRegistry and dictionary.
// Allow the possibility to load fields from files
faceZonesIntegration
(
const word& name,
const objectRegistry&,
const dictionary&,
const bool loadFromFiles = false
);
// Destructor
virtual ~faceZonesIntegration();
// Member Functions
//- Return name of the set of zones
virtual const word& name() const
{
return name_;
};
//- Read the zone integration data
virtual void read(const dictionary&);
//- Execute, currently does nothing
virtual void execute();
//- Execute at the final time-loop, currently does nothing
virtual void end();
//- Write the integration
virtual void write();
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh&)
{}
//- Update for changes of mesh
virtual void movePoints(const pointField&)
{}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "faceZonesIntegrationFunctionObject.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineNamedTemplateTypeNameAndDebug(faceZonesIntegrationFunctionObject, 0);
addToRunTimeSelectionTable
(
functionObject,
faceZonesIntegrationFunctionObject,
dictionary
);
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Typedef
Foam::faceZonesIntegrationFunctionObject
Description
FunctionObject wrapper around faceZonesIntegration to allow them to be
created via the functions list within controlDict.
SourceFiles
faceZonesIntegrationFunctionObject.C
\*---------------------------------------------------------------------------*/
#ifndef faceZonesIntegrationFunctionObject_H
#define faceZonesIntegrationFunctionObject_H
#include "faceZonesIntegration.H"
#include "OutputFilterFunctionObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef OutputFilterFunctionObject<faceZonesIntegration>
faceZonesIntegrationFunctionObject;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -175,9 +175,8 @@ public:
);
// Destructor
virtual ~probes();
//- Destructor
virtual ~probes();
// Member Functions
@ -188,6 +187,18 @@ public:
return name_;
}
//- Return names of fields to probe
virtual const wordList& fieldNames() const
{
return fieldNames_;
}
//- Return locations to probe
virtual const vectorField& probeLocations() const
{
return probeLocations_;
}
//- Cells to be probed (obtained from the locations)
const labelList& cells() const
{

View File

@ -34,7 +34,6 @@ const Foam::scalar Foam::liquidMixture::TrMax = 0.999;
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
Foam::liquidMixture::liquidMixture
(
const dictionary& thermophysicalProperties
@ -72,6 +71,7 @@ Foam::liquidMixture::liquidMixture
}
}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::liquidMixture> Foam::liquidMixture::New
@ -85,7 +85,6 @@ Foam::autoPtr<Foam::liquidMixture> Foam::liquidMixture::New
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Critical Temperature
Foam::scalar Foam::liquidMixture::Tc
(
const scalarField& x
@ -104,9 +103,8 @@ Foam::scalar Foam::liquidMixture::Tc
return vTc/vc;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Pseudocritical temperature
Foam::scalar Foam::liquidMixture::Tpc
(
const scalarField& x
@ -121,9 +119,7 @@ Foam::scalar Foam::liquidMixture::Tpc
return Tpc;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Pseudocritical pressure
Foam::scalar Foam::liquidMixture::Ppc
(
const scalarField& x
@ -140,7 +136,6 @@ Foam::scalar Foam::liquidMixture::Ppc
return specie::RR*Zc*Tpc(x)/Vc;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::scalar Foam::liquidMixture::omega
(
@ -156,7 +151,6 @@ Foam::scalar Foam::liquidMixture::omega
return omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::scalarField Foam::liquidMixture::Xs
(
@ -178,9 +172,6 @@ Foam::scalarField Foam::liquidMixture::Xs
return xs;
}
//-----------------------------------------------------------------------------
// Physical properties
//-----------------------------------------------------------------------------
Foam::scalar Foam::liquidMixture::W
(
@ -196,6 +187,7 @@ Foam::scalar Foam::liquidMixture::W
return W;
}
Foam::scalarField Foam::liquidMixture::Y
(
const scalarField& X
@ -211,6 +203,7 @@ Foam::scalarField Foam::liquidMixture::Y
return Y;
}
Foam::scalarField Foam::liquidMixture::X
(
const scalarField& Y
@ -250,6 +243,7 @@ Foam::scalar Foam::liquidMixture::rho
return W(x)/v;
}
Foam::scalar Foam::liquidMixture::pv
(
const scalar p,
@ -271,6 +265,7 @@ Foam::scalar Foam::liquidMixture::pv
return pv/W(x);
}
Foam::scalar Foam::liquidMixture::hl
(
const scalar p,
@ -292,6 +287,7 @@ Foam::scalar Foam::liquidMixture::hl
return hl/W(x);
}
Foam::scalar Foam::liquidMixture::cp
(
const scalar p,
@ -313,6 +309,7 @@ Foam::scalar Foam::liquidMixture::cp
return cp/W(x);
}
Foam::scalar Foam::liquidMixture::sigma
(
const scalar p,
@ -346,6 +343,7 @@ Foam::scalar Foam::liquidMixture::sigma
return sigma;
}
Foam::scalar Foam::liquidMixture::mu
(
const scalar p,
@ -367,6 +365,7 @@ Foam::scalar Foam::liquidMixture::mu
return exp(mu);
}
Foam::scalar Foam::liquidMixture::K
(
const scalar p,
@ -402,7 +401,12 @@ Foam::scalar Foam::liquidMixture::K
{
scalar Tj = min(TrMax*properties_[j].Tc(), T);
scalar Kij = 2.0/(1.0/properties_[i].K(p, Ti) + 1.0/properties_[j].K(p, Tj));
scalar Kij =
2.0
/(
1.0/properties_[i].K(p, Ti)
+ 1.0/properties_[j].K(p, Tj)
);
K += phii[i]*phii[j]*Kij;
}
}
@ -410,6 +414,7 @@ Foam::scalar Foam::liquidMixture::K
return K;
}
Foam::scalar Foam::liquidMixture::D
(
const scalar p,
@ -432,4 +437,5 @@ Foam::scalar Foam::liquidMixture::D
return 1.0/Dinv;
}
// ************************************************************************* //

View File

@ -27,19 +27,117 @@ License
#include "Ar.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(Ar, 0);
addToRunTimeSelectionTable(liquid, Ar,);
addToRunTimeSelectionTable(liquid, Ar, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(Ar, 0);
addToRunTimeSelectionTable(liquid, Ar,);
addToRunTimeSelectionTable(liquid, Ar, Istream);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::Ar::Ar()
:
liquid
(
39.948,
150.86,
4.8981e+6,
0.07459,
0.291,
83.78,
6.88e+4,
87.28,
0.0,
0.0,
1.4138e+4
),
rho_(151.922244, 0.286, 150.86, 0.2984),
pv_(39.233, -1051.7, -3.5895, 5.0444e-05, 2),
hl_(150.86, 218509.061780314, 0.352, 0.0, 0.0, 0.0),
cp_(4562.43116050866, -70.7770101131471, 0.367477721037349, 0.0, 0.0, 0.0),
h_
(
-1460974.49982473,
4562.43116050866,
-35.3885050565735,
0.122492573679116,
0.0,
0.0
),
cpg_(520.326424351657, 0.0, 0.0, 0.0, 0.0, 0.0),
B_
(
0.000952488234705117,
-0.379993992189847,
-2022.62941824372,
4633523580654.85,
-302893761890458.0
),
mu_(-8.868, 204.3, -0.3831, -1.3e-22, 10.0),
mug_(8.386e-07, 0.6175, 75.377, -432.5),
K_(0.1819, -0.0003176, -4.11e-06, 0.0, 0.0, 0.0),
Kg_(0.0001236, 0.8262, -132.8, 16000),
sigma_(150.86, 0.03823, 1.2927, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 39.948, 28) // note: Same as nHeptane
{}
Foam::Ar::Ar
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc0& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::Ar::Ar(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
} // End namespace Foam
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
Ar()
:
liquid(39.948, 150.86, 4.8981e+6, 0.07459, 0.291, 83.78, 6.88e+4, 87.28, 0.0, 0.0, 1.4138e+4),
rho_(151.922244, 0.286, 150.86, 0.2984),
pv_(39.233, -1051.7, -3.5895, 5.0444e-05, 2),
hl_(150.86, 218509.061780314, 0.352, 0, 0, 0),
cp_(4562.43116050866, -70.7770101131471, 0.367477721037349, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-1460974.49982473, 4562.43116050866, -35.3885050565735, 0.122492573679116, 0, 0),
cpg_(520.326424351657, 0, 0, 0, 0, 0),
B_(0.000952488234705117, -0.379993992189847, -2022.62941824372, 4633523580654.85, -302893761890458.0),
mu_(-8.868, 204.3, -0.3831, -1.3e-22, 10),
mug_(8.386e-07, 0.6175, 75.377, -432.5),
K_(0.1819, -0.0003176, -4.11e-06, 0, 0, 0),
Kg_(0.0001236, 0.8262, -132.8, 16000),
sigma_(150.86, 0.03823, 1.2927, 0, 0, 0),
D_(147.18, 20.1, 39.948, 28) // NN: Same as nHeptane
{}
Ar();
//- Construct from components
Ar
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
Ar(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
Ar(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const Ar& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "ArI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::Ar::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::Ar::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::Ar::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::Ar::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::Ar::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::Ar::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::Ar::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::Ar::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::Ar::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::Ar::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::Ar::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::Ar::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::Ar::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C10H22.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C10H22, 0);
addToRunTimeSelectionTable(liquid, C10H22,);
addToRunTimeSelectionTable(liquid, C10H22, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C10H22, 0);
addToRunTimeSelectionTable(liquid, C10H22,);
addToRunTimeSelectionTable(liquid, C10H22, Istream);
Foam::C10H22::C10H22()
:
liquid
(
142.285,
617.70,
2.11e+6,
0.6,
0.247,
243.51,
1.393,
447.30,
0.0,
0.4923,
1.57e+4
),
rho_(60.94208835, 0.25745, 617.7, 0.28912),
pv_(112.73, -9749.6, -13.245, 7.1266e-06, 2.0),
hl_(617.70, 464743.296904101, 0.39797, 0.0, 0.0, 0.0),
cp_
(
1958.18252099659,
-1.39094071757388,
0.00754612221948905,
0.0,
0.0,
0.0
),
h_
(
-2699436.15229142,
1958.18252099659,
-0.695470358786942,
0.00251537407316302,
0.0,
0.0
),
cpg_(1175.10630073444, 3762.16748076045, 1614.1, 2658.04547211582, 742),
B_
(
0.00337351091119935,
-4.13606494008504,
-534560.916470464,
-1.13364022911762e+19,
2.80704220402713e+21
),
mu_(-16.468, 1533.5, 0.7511, 0.0, 0.0),
mug_(2.64e-08, 0.9487, 71.0, 0.0),
K_(0.2063, -0.000254, 0.0, 0.0, 0.0, 0.0),
Kg_(-668.4, 0.9323, -4071000000.0, 0.0),
sigma_(617.70, 0.055435, 1.3095, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 142.285, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C10H22::C10H22
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C10H22::C10H22(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C10H22()
:
liquid(142.285, 617.70, 2.11e+6, 0.6, 0.247, 243.51, 1.393, 447.30, 0.0, 0.4923, 1.57e+4),
rho_(60.94208835, 0.25745, 617.7, 0.28912),
pv_(112.73, -9749.6, -13.245, 7.1266e-06, 2),
hl_(617.70, 464743.296904101, 0.39797, 0, 0, 0),
cp_(1958.18252099659, -1.39094071757388, 0.00754612221948905, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-2699436.15229142, 1958.18252099659, -0.695470358786942, 0.00251537407316302, 0, 0),
cpg_(1175.10630073444, 3762.16748076045, 1614.1, 2658.04547211582, 742),
B_(0.00337351091119935, -4.13606494008504, -534560.916470464, -1.13364022911762e+19, 2.80704220402713e+21),
mu_(-16.468, 1533.5, 0.7511, 0, 0),
mug_(2.64e-08, 0.9487, 71, 0),
K_(0.2063, -0.000254, 0, 0, 0, 0),
Kg_(-668.4, 0.9323, -4071000000.0, 0),
sigma_(617.70, 0.055435, 1.3095, 0, 0, 0),
D_(147.18, 20.1, 142.285, 28) // NN: Same as nHeptane
{}
C10H22();
//- Construct from components
C10H22
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C10H22(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C10H22(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -261,8 +175,7 @@ public:
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C10H22& l)
{
l.writeData(os);
@ -277,6 +190,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C10H22I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C10H22::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C10H22::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C10H22::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C10H22::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C10H22::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C10H22::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C10H22::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C10H22::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C10H22::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C10H22::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C10H22::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C10H22::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C10H22::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,116 @@ License
#include "C12H26.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C12H26, 0);
addToRunTimeSelectionTable(liquid, C12H26,);
addToRunTimeSelectionTable(liquid, C12H26, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C12H26, 0);
addToRunTimeSelectionTable(liquid, C12H26,);
addToRunTimeSelectionTable(liquid, C12H26, Istream);
Foam::C12H26::C12H26()
:
liquid
(
170.338,
658.0,
1.82e+6,
0.716,
0.238,
263.57,
6.152e-1,
489.47,
0.0,
0.5764,
1.59e+4
),
rho_(60.53982858, 0.25511, 658.0, 0.29368),
pv_(137.47, -11976.0, -16.698, 8.0906e-06, 2.0),
hl_(658.0, 454020.829174935, 0.40681, 0.0, 0.0, 0.0),
cp_(2983.53861146661, -8.0352006011577, 0.018207916025784, 0.0, 0.0, 0.0),
h_
(
-2755166.83820769,
2983.53861146661,
-4.01760030057885,
0.00606930534192801,
0.0,
0.0
),
cpg_(1250.16144371778, 3894.02247296552, 1715.5, 2650.67101879792, 777.5),
B_
(
0.00516619896910848,
-6.40491258556517,
-295295.236529723,
-3.22147729807794e+19,
8.78195117941974e+21
),
mu_(-20.607, 1943, 1.3205, 0.0, 0.0),
mug_(6.344e-08, 0.8287, 219.5, 0.0),
K_(0.2047, -0.0002326, 0.0, 0.0, 0.0, 0.0),
Kg_(5.719e-06, 1.4699, 579.4, 0.0),
sigma_(658.0, 0.055493, 1.3262, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 170.338, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C12H26::C12H26
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C12H26::C12H26(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C12H26()
:
liquid(170.338, 658.0, 1.82e+6, 0.716, 0.238, 263.57, 6.152e-1, 489.47, 0, 0.5764, 1.59e+4),
rho_(60.53982858, 0.25511, 658, 0.29368),
pv_(137.47, -11976, -16.698, 8.0906e-06, 2),
hl_(658.0, 454020.829174935, 0.40681, 0, 0, 0),
cp_(2983.53861146661, -8.0352006011577, 0.018207916025784, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-2755166.83820769, 2983.53861146661, -4.01760030057885, 0.00606930534192801, 0, 0),
cpg_(1250.16144371778, 3894.02247296552, 1715.5, 2650.67101879792, 777.5),
B_(0.00516619896910848, -6.40491258556517, -295295.236529723, -3.22147729807794e+19, 8.78195117941974e+21),
mu_(-20.607, 1943, 1.3205, 0, 0),
mug_(6.344e-08, 0.8287, 219.5, 0),
K_(0.2047, -0.0002326, 0, 0, 0, 0),
Kg_(5.719e-06, 1.4699, 579.4, 0),
sigma_(658.0, 0.055493, 1.3262, 0, 0, 0),
D_(147.18, 20.1, 170.338, 28) // NN: Same as nHeptane
{}
C12H26();
//- Construct from conponents
C12H26
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C12H26(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C12H26(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C12H26& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C12H26I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C12H26::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C12H26::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C12H26::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C12H26::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C12H26::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C12H26::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C12H26::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C12H26::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C12H26::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C12H26::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C12H26::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C12H26::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C12H26::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C13H28.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C13H28, 0);
addToRunTimeSelectionTable(liquid, C13H28,);
addToRunTimeSelectionTable(liquid, C13H28, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C13H28, 0);
addToRunTimeSelectionTable(liquid, C13H28,);
addToRunTimeSelectionTable(liquid, C13H28, Istream);
Foam::C13H28::C13H28()
:
liquid
(
184.365,
675.80,
1.7225e+6,
0.77,
0.236,
267.76,
3.801e-1,
508.62,
0.0,
0.6186,
1.5901e+4
),
rho_(59.513022, 0.2504, 675.8, 0.312),
pv_(118.27, -11432, -13.769, 5.9641e-06, 2.0),
hl_(675.80, 444227.48352453, 0.4162, 0.0, 0.0, 0.0),
cp_
(
4275.05220622135,
-16.6539202126217,
0.0325755973205326,
0.0,
0.0,
0.0
),
h_
(
-2860442.0545124,
4275.05220622135,
-8.32696010631085,
0.0108585324401775,
0.0,
0.0
),
cpg_(1136.87522035093, 3641.14663846175, -1443, 2277.00485450058, -683.0),
B_
(
0.00246321156401703,
-2.66601578390692,
-1249532.17801643,
-1.0460770753668e+19,
1.90117430097904e+21
),
mu_(-23.341, 2121.9, 1.7208, 0.0, 0.0),
mug_(3.5585e-08, 0.8987, 165.3, 0.0),
K_(0.1981, -0.0002046, 0.0, 0.0, 0.0, 0.0),
Kg_(5.3701e-06, 1.4751, 599.09, 0.0),
sigma_(675.80, 0.05561, 1.3361, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 184.365, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C13H28::C13H28
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C13H28::C13H28(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C13H28()
:
liquid(184.365, 675.80, 1.7225e+6, 0.77, 0.236, 267.76, 3.801e-1, 508.62, 0.0, 0.6186, 1.5901e+4),
rho_(59.513022, 0.2504, 675.8, 0.312),
pv_(118.27, -11432, -13.769, 5.9641e-06, 2),
hl_(675.80, 444227.48352453, 0.4162, 0, 0, 0),
cp_(4275.05220622135, -16.6539202126217, 0.0325755973205326, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-2860442.0545124, 4275.05220622135, -8.32696010631085, 0.0108585324401775, 0, 0),
cpg_(1136.87522035093, 3641.14663846175, -1443, 2277.00485450058, -683),
B_(0.00246321156401703, -2.66601578390692, -1249532.17801643, -1.0460770753668e+19, 1.90117430097904e+21),
mu_(-23.341, 2121.9, 1.7208, 0, 0),
mug_(3.5585e-08, 0.8987, 165.3, 0),
K_(0.1981, -0.0002046, 0, 0, 0, 0),
Kg_(5.3701e-06, 1.4751, 599.09, 0),
sigma_(675.80, 0.05561, 1.3361, 0, 0, 0),
D_(147.18, 20.1, 184.365, 28) // NN: Same as nHeptane
{}
C13H28();
//- Construct from components
C13H28
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C13H28(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C13H28(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C13H28& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C13H28I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C13H28::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C13H28::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C13H28::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C13H28::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C13H28::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C13H28::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C13H28::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C13H28::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C13H28::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C13H28::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C13H28::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C13H28::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C13H28::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C14H30.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C14H30, 0);
addToRunTimeSelectionTable(liquid, C14H30,);
addToRunTimeSelectionTable(liquid, C14H30, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C14H30, 0);
addToRunTimeSelectionTable(liquid, C14H30,);
addToRunTimeSelectionTable(liquid, C14H30, Istream);
Foam::C14H30::C14H30()
:
liquid
(
198.392,
692.40,
1.6212e+6,
0.8428,
0.237,
279.01,
1.8849e-1,
526.73,
0.0,
0.6617,
1.6173e+4
),
rho_(60.92023144, 0.2582, 692.4, 0.26628),
pv_(249.21, -16915, -35.195, 0.028451, 1.0),
hl_(692.40, 455764.345336506, 0.428, 0.0, 0.0, 0.0),
cp_
(
2565.72845679261,
-4.78114036856325,
0.0120362716238558,
0.0,
0.0,
0.0
),
h_
(
-2690601.01887934,
2565.72845679261,
-2.39057018428162,
0.00401209054128527,
0.0,
0.0
),
cpg_(1134.11831122223, 3629.17859591113, -1440.3, 2275.29335860317, -682),
B_
(
0.00247837614419936,
-2.62692044034034,
-1427174.48284205,
-1.68288035807895e+19,
3.48854792531957e+21
),
mu_(-18.964, 2010.9, 1.0648, 0.0, 0.0),
mug_(4.4565e-08, 0.8684, 228.16, -4347.2),
K_(0.1957, -0.0001993, 0.0, 0.0, 0.0, 0.0),
Kg_(-0.000628, 0.944, -5490, 0.0),
sigma_(692.40, 0.056436, 1.3658, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 198.392, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C14H30::C14H30
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C14H30::C14H30(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C14H30()
:
liquid(198.392, 692.40, 1.6212e+6, 0.8428, 0.237, 279.01, 1.8849e-1, 526.73, 0.0, 0.6617, 1.6173e+4),
rho_(60.92023144, 0.2582, 692.4, 0.26628),
pv_(249.21, -16915, -35.195, 0.028451, 1),
hl_(692.40, 455764.345336506, 0.428, 0, 0, 0),
cp_(2565.72845679261, -4.78114036856325, 0.0120362716238558, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-2690601.01887934, 2565.72845679261, -2.39057018428162, 0.00401209054128527, 0, 0),
cpg_(1134.11831122223, 3629.17859591113, -1440.3, 2275.29335860317, -682),
B_(0.00247837614419936, -2.62692044034034, -1427174.48284205, -1.68288035807895e+19, 3.48854792531957e+21),
mu_(-18.964, 2010.9, 1.0648, 0, 0),
mug_(4.4565e-08, 0.8684, 228.16, -4347.2),
K_(0.1957, -0.0001993, 0, 0, 0, 0),
Kg_(-0.000628, 0.944, -5490, 0),
sigma_(692.40, 0.056436, 1.3658, 0, 0, 0),
D_(147.18, 20.1, 198.392, 28) // NN: Same as nHeptane
{}
C14H30();
//- Construct from components
C14H30
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C14H30(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C14H30(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
//- Liquid thermal conductivity [W/(m K)]
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
//- Vapour thermal conductivity [W/(m K)]
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C14H30& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C14H30I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C14H30::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C14H30::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C14H30::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C14H30::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C14H30::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C14H30::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C14H30::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C14H30::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C14H30::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C14H30::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C14H30::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C14H30::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C14H30::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C16H34.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C16H34, 0);
addToRunTimeSelectionTable(liquid, C16H34,);
addToRunTimeSelectionTable(liquid, C16H34, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C16H34, 0);
addToRunTimeSelectionTable(liquid, C16H34,);
addToRunTimeSelectionTable(liquid, C16H34, Istream);
Foam::C16H34::C16H34()
:
liquid
(
226.446,
720.60,
1.4186e+6,
0.93,
0.22,
291.32,
8.7467e-2,
560.01,
0.0,
0.7471,
1.6052e+4
),
rho_(61.94656776, 0.25442, 720.6, 0.3238),
pv_(233.1, -17346, -32.251, 0.02407, 1.0),
hl_(720.60, 430654.548987397, 0.4122, 0.0, 0.0, 0.0),
cp_
(
3769.90540791182,
-12.5871068599136,
0.0247211255663602,
0.0,
0.0,
0.0
),
h_
(
-2777201.30410301,
3769.90540791182,
-6.29355342995681,
0.00824037518878673,
0.0,
0.0
),
cpg_(1128.74592618108, 3600.8584828171, -1429.7, 2259.69988429913, 679.0),
B_
(
0.0025091191718997,
-2.46668079807106,
-1704070.72767901,
-3.00623548219001e+19,
7.07320950690231e+21
),
mu_(-18.388, 2056.8, 0.98681, 0.0, 0.0),
mug_(1.2463e-07, 0.7322, 395.0, 6000.0),
K_(0.1963, -0.00019, 0.0, 0.0, 0.0, 0.0),
Kg_(3.075e-06, 1.552, 678.0, 0.0),
sigma_(720.60, 0.05699, 1.3929, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 226.446, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C16H34::C16H34
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C16H34::C16H34(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C16H34()
:
liquid(226.446, 720.60, 1.4186e+6, 0.93, 0.22, 291.32, 8.7467e-2, 560.01, 0, 0.7471, 1.6052e+4),
rho_(61.94656776, 0.25442, 720.6, 0.3238),
pv_(233.1, -17346, -32.251, 0.02407, 1),
hl_(720.60, 430654.548987397, 0.4122, 0, 0, 0),
cp_(3769.90540791182, -12.5871068599136, 0.0247211255663602, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-2777201.30410301, 3769.90540791182, -6.29355342995681, 0.00824037518878673, 0, 0),
cpg_(1128.74592618108, 3600.8584828171, -1429.7, 2259.69988429913, 679),
B_(0.0025091191718997, -2.46668079807106, -1704070.72767901, -3.00623548219001e+19, 7.07320950690231e+21),
mu_(-18.388, 2056.8, 0.98681, 0, 0),
mug_(1.2463e-07, 0.7322, 395, 6000),
K_(0.1963, -0.00019, 0, 0, 0, 0),
Kg_(3.075e-06, 1.552, 678, 0),
sigma_(720.60, 0.05699, 1.3929, 0, 0, 0),
D_(147.18, 20.1, 226.446, 28) // NN: Same as nHeptane
{}
C16H34();
//- Construct from components
C16H34
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C16H34(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C16H34(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C16H34& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C16H34I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C16H34::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C16H34::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C16H34::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C16H34::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C16H34::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C16H34::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C16H34::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C16H34::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C16H34::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C16H34::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C16H34::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C16H34::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C16H34::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C2H5OH.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C2H5OH, 0);
addToRunTimeSelectionTable(liquid, C2H5OH,);
addToRunTimeSelectionTable(liquid, C2H5OH, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C2H5OH, 0);
addToRunTimeSelectionTable(liquid, C2H5OH,);
addToRunTimeSelectionTable(liquid, C2H5OH, Istream);
Foam::C2H5OH::C2H5OH()
:
liquid
(
46.069,
516.25,
6.3835e+6,
0.16692,
0.248,
159.05,
7.1775e-5,
351.44,
5.6372e-30,
0.6371,
2.6421e+4
),
rho_(70.1308387, 0.26395, 516.25, 0.2367),
pv_(59.796, -6595, -5.0474, 6.3e-07, 2),
hl_(516.25, 958345.091059064, -0.4134, 0.75362, 0.0, 0.0),
cp_
(
2052.57331394213,
-1.21990926653498,
0.00714146172046278,
5.20523562482363e-05,
0.0,
0.0
),
h_
(
-6752827.25039109,
2052.57331394213,
-0.60995463326749,
0.00238048724015426,
1.30130890620591e-05,
0.0
),
cpg_(909.505307256507, 3358.00646855803, 1530, 2029.56434912848, 640),
B_
(
-0.00358158414552085,
3.90718270420456,
-1180837.43949293,
9.81136990166923e+18,
-3.58592545963663e+21
),
mu_(8.049, 776, -3.068, 0.0, 0.0),
mug_(1.0613e-07, 0.8066, 52.7, 0.0),
K_(0.253, -0.000281, 0.0, 0.0, 0.0, 0.0),
Kg_(-3.12, 0.7152, -3550000.0, 0.0),
sigma_(516.25, 0.04064, -4.34e-05, -6.42e-08, 0.0, 0.0),
D_(147.18, 20.1, 46.069, 28) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C2H5OH::C2H5OH
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C2H5OH::C2H5OH(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C2H5OH()
:
liquid(46.069, 516.25, 6.3835e+6, 0.16692, 0.248, 159.05, 7.1775e-5, 351.44, 5.6372e-30, 0.6371, 2.6421e+4),
rho_(70.1308387, 0.26395, 516.25, 0.2367),
pv_(59.796, -6595, -5.0474, 6.3e-07, 2),
hl_(516.25, 958345.091059064, -0.4134, 0.75362, 0, 0),
cp_(2052.57331394213, -1.21990926653498, 0.00714146172046278, 5.20523562482363e-05, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-6752827.25039109, 2052.57331394213, -0.60995463326749, 0.00238048724015426, 1.30130890620591e-05, 0),
cpg_(909.505307256507, 3358.00646855803, 1530, 2029.56434912848, 640),
B_(-0.00358158414552085, 3.90718270420456, -1180837.43949293, 9.81136990166923e+18, -3.58592545963663e+21),
mu_(8.049, 776, -3.068, 0, 0),
mug_(1.0613e-07, 0.8066, 52.7, 0),
K_(0.253, -0.000281, 0, 0, 0, 0),
Kg_(-3.12, 0.7152, -3550000.0, 0),
sigma_(516.25, 0.04064, -4.34e-05, -6.42e-08, 0, 0),
D_(147.18, 20.1, 46.069, 28) // NN: Same as nHeptane
{}
C2H5OH();
//- Construct from components
C2H5OH
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C2H5OH(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C2H5OH(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C2H5OH& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C2H5OHI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C2H5OH::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C2H5OH::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,115 @@ License
#include "C2H6.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C2H6, 0);
addToRunTimeSelectionTable(liquid, C2H6,);
addToRunTimeSelectionTable(liquid, C2H6, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C2H6, 0);
addToRunTimeSelectionTable(liquid, C2H6,);
addToRunTimeSelectionTable(liquid, C2H6, Istream);
Foam::C2H6::C2H6()
:
liquid
(
30.070,
305.32,
4.872e+6,
0.14550,
0.279,
90.35,
1.13,
184.55,
0.0,
0.0995,
1.24e+4
),
rho_(57.499854, 0.27937, 305.32, 0.29187),
pv_(51.857, -2598.7, -5.1283, 1.4913e-05, 2.0),
hl_(305.32, 701396.740937812, 0.60646, -0.55492, 0.32799, 0.0),
cp_
(
305.32,
8.02554965861611,
2983.63817758563,
167.548325566287,
-343.93389207094
),
h_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
cpg_(1341.07083471899, 4463.58496840705, 1655.5, 2435.08480212837, 752.87),
B_
(
0.00269205187894912,
-2.05221150648487,
-47721.9820419022,
2.24808779514466e+15,
-3.23910874625873e+17
),
mu_(-3.4134, 197.05, -1.2193, -9.2023e-26, 10.0),
mug_(2.5906e-07, 0.67988, 98.902, 0.0),
K_(0.35758, -0.0011458, 6.1866e-07, 0.0, 0.0, 0.0),
Kg_(7.3869e-05, 1.1689, 500.73, 0.0),
sigma_(305.32, 0.048643, 1.1981, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 30.070, 28) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C2H6::C2H6
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc14& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C2H6::C2H6(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C2H6()
:
liquid(30.070, 305.32, 4.872e+6, 0.14550, 0.279, 90.35, 1.13, 184.55, 0.0, 0.0995, 1.24e+4),
rho_(57.499854, 0.27937, 305.32, 0.29187),
pv_(51.857, -2598.7, -5.1283, 1.4913e-05, 2),
hl_(305.32, 701396.740937812, 0.60646, -0.55492, 0.32799, 0),
cp_(305.32, 8.02554965861611, 2983.63817758563, 167.548325566287, -343.93389207094),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(0, 0, 0, 0, 0, 0),
cpg_(1341.07083471899, 4463.58496840705, 1655.5, 2435.08480212837, 752.87),
B_(0.00269205187894912, -2.05221150648487, -47721.9820419022, 2.24808779514466e+15, -3.23910874625873e+17),
mu_(-3.4134, 197.05, -1.2193, -9.2023e-26, 10),
mug_(2.5906e-07, 0.67988, 98.902, 0),
K_(0.35758, -0.0011458, 6.1866e-07, 0, 0, 0),
Kg_(7.3869e-05, 1.1689, 500.73, 0),
sigma_(305.32, 0.048643, 1.1981, 0, 0, 0),
D_(147.18, 20.1, 30.070, 28) // NN: Same as nHeptane
{}
C2H6();
//- Construct from components
C2H6
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C2H6(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C2H6(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C2H6& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C2H6I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C2H6::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C2H6::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C2H6::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C2H6::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C2H6::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C2H6::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C2H6::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C2H6::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C2H6::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C2H6::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C2H6::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C2H6::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C2H6::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C2H6O.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C2H6O, 0);
addToRunTimeSelectionTable(liquid, C2H6O,);
addToRunTimeSelectionTable(liquid, C2H6O, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C2H6O, 0);
addToRunTimeSelectionTable(liquid, C2H6O,);
addToRunTimeSelectionTable(liquid, C2H6O, Istream);
Foam::C2H6O::C2H6O()
:
liquid
(
46.069,
400.10,
5.3702e+6,
0.17,
0.274,
131.65,
3.0849,
248.31,
4.3363e-30,
0.2036,
1.7572e+4
),
rho_(69.472052, 0.26325, 400.1, 0.2806),
pv_(51.566, -3664.4, -4.653, 5.9e-06, 2),
hl_(400.10, 608435.173326966, 0.2477, -0.089, 0.203, 0),
cp_
(
1491.24139877141,
11.3099915344375,
-0.067273003538171,
0.000136556035511949,
0.0,
0.0
),
h_
(
-5024829.22619402,
1491.24139877141,
5.65499576721874,
-0.0224243345127237,
3.41390088779874e-05,
0.0
),
cpg_(950.747791356443, 3160.47667628991, 1284, 1291.5409494454, 520),
B_
(
0.00235082159369641,
-2.26616596843865,
-123293.320888233,
-8.87364605266014e+16,
1.46389111984198e+19
),
mu_(-10.62, 448.99, 8.3967e-05, 0.0, 0.0),
mug_(7.27, 0.1091, 440600000, 0.0),
K_(0.31276, -0.0005677, 0.0, 0.0, 0.0, 0.0),
Kg_(0.2247, 0.1026, 997.06, 1762900),
sigma_(400.10, 0.06096, 1.2286, 0, 0, 0),
D_(147.18, 20.1, 46.069, 28) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C2H6O::C2H6O
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C2H6O::C2H6O(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C2H6O()
:
liquid(46.069, 400.10, 5.3702e+6, 0.17, 0.274, 131.65, 3.0849, 248.31, 4.3363e-30, 0.2036, 1.7572e+4),
rho_(69.472052, 0.26325, 400.1, 0.2806),
pv_(51.566, -3664.4, -4.653, 5.9e-06, 2),
hl_(400.10, 608435.173326966, 0.2477, -0.089, 0.203, 0),
cp_(1491.24139877141, 11.3099915344375, -0.067273003538171, 0.000136556035511949, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-5024829.22619402, 1491.24139877141, 5.65499576721874, -0.0224243345127237, 3.41390088779874e-05, 0),
cpg_(950.747791356443, 3160.47667628991, 1284, 1291.5409494454, 520),
B_(0.00235082159369641, -2.26616596843865, -123293.320888233, -8.87364605266014e+16, 1.46389111984198e+19),
mu_(-10.62, 448.99, 8.3967e-05, 0, 0),
mug_(7.27, 0.1091, 440600000, 0),
K_(0.31276, -0.0005677, 0, 0, 0, 0),
Kg_(0.2247, 0.1026, 997.06, 1762900),
sigma_(400.10, 0.06096, 1.2286, 0, 0, 0),
D_(147.18, 20.1, 46.069, 28) // NN: Same as nHeptane
{}
C2H6O();
//- Construct from components
C2H6O
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C2H6O(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C2H6O(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C2H6O& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C2H6OI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C2H6O::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C2H6O::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C3H6O.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C3H6O, 0);
addToRunTimeSelectionTable(liquid, C3H6O,);
addToRunTimeSelectionTable(liquid, C3H6O, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C3H6O, 0);
addToRunTimeSelectionTable(liquid, C3H6O,);
addToRunTimeSelectionTable(liquid, C3H6O, Istream);
Foam::C3H6O::C3H6O()
:
liquid
(
58.08,
508.20,
4.7015e+6,
0.209,
0.233,
178.45,
2.5938,
329.44,
9.6066e-30,
0.3064,
1.9774e+4
),
rho_(71.426784, 0.2576, 508.2, 0.29903),
pv_(70.72, -5.685, -7.351, 6.3e-06, 2.0),
hl_(508.20, 846590.909090909, 1.036, -1.294, 0.672, 0.0),
cp_
(
2334.71074380165,
-3.04752066115702,
0.00488464187327824,
1.18629476584022e-05,
0.0,
0.0
),
h_
(
2571201.780143,
2334.71074380165,
-1.52376033057851,
0.00162821395775941,
2.96573691460055e-06,
0.0
),
cpg_(828.512396694215, 2830.57851239669, 1250.0, 1234.50413223141, -524.4),
B_
(
0.00190599173553719,
-1.70798898071625,
-525826.446280992,
1.70282369146006e+17,
-2.83298898071625e+20
),
mu_(-14.918, 1023.4, 0.5961, 0.0, 0.0),
mug_(3.1005e-08, 0.9762, 23.139, 0.0),
K_(0.2502, -0.000298, 0.0, 0.0, 0.0, 0.0),
Kg_(-26.8, 0.9098, -126500000, 0.0),
sigma_(508.20, 0.0622, 1.124, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 58.08, 28) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C3H6O::C3H6O
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C3H6O::C3H6O(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C3H6O()
:
liquid(58.08, 508.20, 4.7015e+6, 0.209, 0.233, 178.45, 2.5938, 329.44, 9.6066e-30, 0.3064, 1.9774e+4),
rho_(71.426784, 0.2576, 508.2, 0.29903),
pv_(70.72, -5.685, -7.351, 6.3e-06, 2),
hl_(508.20, 846590.909090909, 1.036, -1.294, 0.672, 0),
cp_(2334.71074380165, -3.04752066115702, 0.00488464187327824, 1.18629476584022e-05, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(2571201.780143, 2334.71074380165, -1.52376033057851, 0.00162821395775941, 2.96573691460055e-06, 0),
cpg_(828.512396694215, 2830.57851239669, 1250, 1234.50413223141, -524.4),
B_(0.00190599173553719, -1.70798898071625, -525826.446280992, 1.70282369146006e+17, -2.83298898071625e+20),
mu_(-14.918, 1023.4, 0.5961, 0, 0),
mug_(3.1005e-08, 0.9762, 23.139, 0),
K_(0.2502, -0.000298, 0, 0, 0, 0),
Kg_(-26.8, 0.9098, -126500000, 0),
sigma_(508.20, 0.0622, 1.124, 0, 0, 0),
D_(147.18, 20.1, 58.08, 28) // NN: Same as nHeptane
{}
C3H6O();
//- Construct from compoents
C3H6O
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C3H6O(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C3H6O(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,8 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C3H6O& l)
{
@ -277,6 +190,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C3H6OI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,104 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C3H6O::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C3H6O::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,113 @@ License
#include "C3H8.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C3H8, 0);
addToRunTimeSelectionTable(liquid, C3H8,);
addToRunTimeSelectionTable(liquid, C3H8, Istream);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
Foam::C3H8::C3H8()
:
liquid
(
44.096,
369.83,
4.248e+6,
0.2, 0.276,
85.47,
1.685e-4,
231.11,
0.0,
0.1523,
1.31e+4
),
rho_(60.6628672, 0.27453, 369.83, 0.29359),
pv_(59.078, -3492.6, -6.0669, 1.0919e-05, 2.0),
hl_(369.83, 662395.682148041, 0.78237, -0.77319, 0.39246, 0.0),
cp_
(
369.83,
9.48470319647089,
2576.87772133527,
95.3560311677331,
-131.535634282099
),
h_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
cpg_(1177.43105950653, 4364.34143686502, 1626.5, 2648.76632801161, 723.6),
B_
(
0.00255578737300435,
-2.24963715529753,
-102276.850507983,
7.00743831640058e+15,
-1.59878447024673e+18
),
mu_(-6.9281, 420.76, -0.63276, -1.713e-26, 10.0),
mug_(2.4993e-07, 0.68612, 179.34, -8254.6),
K_(0.26755, -0.00066457, 2.774e-07, 0.0, 0.0, 0.0),
Kg_(-1.12, 0.10972, -9834.6, -7535800),
sigma_(369.83, 0.05092, 1.2197, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 44.096, 28) // note: Same as nHeptane
{}
defineTypeNameAndDebug(C3H8, 0);
addToRunTimeSelectionTable(liquid, C3H8,);
addToRunTimeSelectionTable(liquid, C3H8, Istream);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::C3H8::C3H8
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc14& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C3H8::C3H8(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
} // End namespace Foam
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C3H8()
:
liquid(44.096, 369.83, 4.248e+6, 0.2, 0.276, 85.47, 1.685e-4, 231.11, 0.0, 0.1523, 1.31e+4),
rho_(60.6628672, 0.27453, 369.83, 0.29359),
pv_(59.078, -3492.6, -6.0669, 1.0919e-05, 2),
hl_(369.83, 662395.682148041, 0.78237, -0.77319, 0.39246, 0),
cp_(369.83, 9.48470319647089, 2576.87772133527, 95.3560311677331, -131.535634282099),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(0, 0, 0, 0, 0, 0),
cpg_(1177.43105950653, 4364.34143686502, 1626.5, 2648.76632801161, 723.6),
B_(0.00255578737300435, -2.24963715529753, -102276.850507983, 7.00743831640058e+15, -1.59878447024673e+18),
mu_(-6.9281, 420.76, -0.63276, -1.713e-26, 10),
mug_(2.4993e-07, 0.68612, 179.34, -8254.6),
K_(0.26755, -0.00066457, 2.774e-07, 0, 0, 0),
Kg_(-1.12, 0.10972, -9834.6, -7535800),
sigma_(369.83, 0.05092, 1.2197, 0, 0, 0),
D_(147.18, 20.1, 44.096, 28) // NN: Same as nHeptane
{}
C3H8();
//- Construct from components
C3H8
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C3H8(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C3H8(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C3H8& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C3H8I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C3H8::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C3H8::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C3H8::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C3H8::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C3H8::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C3H8::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C3H8::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C3H8::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C3H8::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C3H8::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C3H8::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C3H8::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C3H8::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C4H10O.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C4H10O, 0);
addToRunTimeSelectionTable(liquid, C4H10O,);
addToRunTimeSelectionTable(liquid, C4H10O, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C4H10O, 0);
addToRunTimeSelectionTable(liquid, C4H10O,);
addToRunTimeSelectionTable(liquid, C4H10O, Istream);
Foam::C4H10O::C4H10O()
:
liquid
(
74.123,
466.70,
3.6376e+6,
0.28,
0.262,
156.85,
4.0709e-1,
307.58,
3.836e-30,
0.2846,
1.5532e+4
),
rho_(75.2793188, 0.27608, 466.7, 0.29358),
pv_(101.03, -6311.5, -12.27, 1.377e-05, 2),
hl_(466.70, 566355.921913576, 0.40717, 0, 0, 0),
cp_
(
599.004357621791,
17.5519069654493,
-0.0742009902459426,
0.00011822241409549,
0.0,
0.0
),
h_
(
-4312350.92187216,
599.004357621791,
8.77595348272466,
-0.0247336634153142,
2.95556035238725e-05,
0.0
),
cpg_(1163.06679438231, 3441.57683849817, 1541.3, 1938.66950878944, -688.9),
B_
(
0.00215992337061371,
-1.810504162001,
-276972.0599544,
-2.12349742994752e+17,
3.1016013922804e+19
),
mu_(10.197, -63.8, -3.226, 0.0, 0.0),
mug_(1.948e-06, 0.41, 495.8, 0.0),
K_(0.249, -0.0004005, 0.0, 0.0, 0.0, 0.0),
Kg_(-0.0044894, 0.6155, -3266.3, 0.0),
sigma_(466.70, 0.057356, 1.288, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 74.123, 28) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C4H10O::C4H10O
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C4H10O::C4H10O(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C4H10O()
:
liquid(74.123, 466.70, 3.6376e+6, 0.28, 0.262, 156.85, 4.0709e-1, 307.58, 3.836e-30, 0.2846, 1.5532e+4),
rho_(75.2793188, 0.27608, 466.7, 0.29358),
pv_(101.03, -6311.5, -12.27, 1.377e-05, 2),
hl_(466.70, 566355.921913576, 0.40717, 0, 0, 0),
cp_(599.004357621791, 17.5519069654493, -0.0742009902459426, 0.00011822241409549, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-4312350.92187216, 599.004357621791, 8.77595348272466, -0.0247336634153142, 2.95556035238725e-05, 0),
cpg_(1163.06679438231, 3441.57683849817, 1541.3, 1938.66950878944, -688.9),
B_(0.00215992337061371, -1.810504162001, -276972.0599544, -2.12349742994752e+17, 3.1016013922804e+19),
mu_(10.197, -63.8, -3.226, 0, 0),
mug_(1.948e-06, 0.41, 495.8, 0),
K_(0.249, -0.0004005, 0, 0, 0, 0),
Kg_(-0.0044894, 0.6155, -3266.3, 0),
sigma_(466.70, 0.057356, 1.288, 0, 0, 0),
D_(147.18, 20.1, 74.123, 28) // NN: Same as nHeptane
{}
C4H10O();
//- Construct from components
C4H10O
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C4H10O(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C4H10O(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C4H10O& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C4H10OI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C4H10O::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C4H10O::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C6H14.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C6H14, 0);
addToRunTimeSelectionTable(liquid, C6H14,);
addToRunTimeSelectionTable(liquid, C6H14, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C6H14, 0);
addToRunTimeSelectionTable(liquid, C6H14,);
addToRunTimeSelectionTable(liquid, C6H14, Istream);
Foam::C6H14::C6H14()
:
liquid
(
86.177,
507.60,
3.025e+6,
0.371,
0.266,
177.83,
9.017e-1,
341.88,
0.0,
0.3013,
1.49e+4
),
rho_(61.03399848, 0.26411, 507.6, 0.27537),
pv_(104.65, -6995.5, -12.702, 1.2381e-05, 2.0),
hl_(507.60, 527286.863084118, 0.39002, 0.0, 0.0, 0.0),
cp_
(
1997.28465831951,
-2.13258758137322,
0.0102964828202421,
0.0,
0.0,
0.0
),
h_
(
-2902186.5403246,
1997.28465831951,
-1.06629379068661,
0.00343216094008069,
0.0,
0.0
),
cpg_(1211.4601343746, 4088.0977523005, 1694.6, 2748.99335089409, 761.6),
B_
(
0.0022859927822969,
-2.32080485512376,
-430509.300625457,
1.93787205402834e+17,
-7.17128700233241e+19
),
mu_(-20.715, 1207.5, 1.4993, 0.0, 0.0),
mug_(1.7514e-07, 0.70737, 157.14, 0.0),
K_(0.22492, -0.0003533, 0.0, 0.0, 0.0, 0.0),
Kg_(-650.5, 0.8053, -1412100000, 0.0),
sigma_(507.60, 0.055003, 1.2674, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 86.177, 28) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C6H14::C6H14
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C6H14::C6H14(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C6H14()
:
liquid(86.177, 507.60, 3.025e+6, 0.371, 0.266, 177.83, 9.017e-1, 341.88, 0.0, 0.3013, 1.49e+4),
rho_(61.03399848, 0.26411, 507.6, 0.27537),
pv_(104.65, -6995.5, -12.702, 1.2381e-05, 2),
hl_(507.60, 527286.863084118, 0.39002, 0, 0, 0),
cp_(1997.28465831951, -2.13258758137322, 0.0102964828202421, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-2902186.5403246, 1997.28465831951, -1.06629379068661, 0.00343216094008069, 0, 0),
cpg_(1211.4601343746, 4088.0977523005, 1694.6, 2748.99335089409, 761.6),
B_(0.0022859927822969, -2.32080485512376, -430509.300625457, 1.93787205402834e+17, -7.17128700233241e+19),
mu_(-20.715, 1207.5, 1.4993, 0, 0),
mug_(1.7514e-07, 0.70737, 157.14, 0),
K_(0.22492, -0.0003533, 0, 0, 0, 0),
Kg_(-650.5, 0.8053, -1412100000, 0),
sigma_(507.60, 0.055003, 1.2674, 0, 0, 0),
D_(147.18, 20.1, 86.177, 28) // NN: Same as nHeptane
{}
C6H14();
//- Construct from components
C6H14
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C6H14(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C6H14(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C6H14& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C6H14I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C6H14::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C6H14::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C6H14::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C6H14::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C6H14::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C6H14::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C6H14::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C6H14::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C6H14::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C6H14::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C6H14::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C6H14::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C6H14::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C6H6.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C6H6, 0);
addToRunTimeSelectionTable(liquid, C6H6,);
addToRunTimeSelectionTable(liquid, C6H6, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C6H6, 0);
addToRunTimeSelectionTable(liquid, C6H6,);
addToRunTimeSelectionTable(liquid, C6H6, Istream);
Foam::C6H6::C6H6()
:
liquid
(
78.114,
562.16,
4.898e+6,
0.25894,
0.271,
278.68,
4.7961e+3,
353.24,
0.0,
0.2108,
1.8706e+4
),
rho_(80.5511568, 0.2667, 562.16, 0.2818),
pv_(78.05, -6275.5, -8.4443, 6.26e-06, 2),
hl_(562.16, 649435.440510024, 0.7616, -0.5052, 0.1564, 0),
cp_
(
1386.69124612745,
-0.416058581048212,
0.00542796425736744,
0.0,
0.0,
0.0
),
h_
(
186141.395065592,
1386.69124612745,
-0.208029290524106,
0.00180932141912248,
0.0,
0.0
),
cpg_(568.656066774202, 2970.65826868423, 1494.6, 2203.57426325627, -678.15),
B_
(
0.00184089919860716,
-2.30176408838364,
-309176.332027549,
-5.12072099751645e+15,
-2.90216862534245e+19
),
mu_(6.764, 336.4, -2.687, 0.0, 0.0),
mug_(3.134e-08, 0.9676, 7.9, 0.0),
K_(0.2407, -0.0003202, 0.0, 0.0, 0.0, 0.0),
Kg_(1.652e-05, 1.3117, 491, 0.0),
sigma_(562.16, 0.07195, 1.2389, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 78.114, 28) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C6H6::C6H6
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C6H6::C6H6(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C6H6()
:
liquid(78.114, 562.16, 4.898e+6, 0.25894, 0.271, 278.68, 4.7961e+3, 353.24, 0.0, 0.2108, 1.8706e+4),
rho_(80.5511568, 0.2667, 562.16, 0.2818),
pv_(78.05, -6275.5, -8.4443, 6.26e-06, 2),
hl_(562.16, 649435.440510024, 0.7616, -0.5052, 0.1564, 0),
cp_(1386.69124612745, -0.416058581048212, 0.00542796425736744, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(186141.395065592, 1386.69124612745, -0.208029290524106, 0.00180932141912248, 0, 0),
cpg_(568.656066774202, 2970.65826868423, 1494.6, 2203.57426325627, -678.15),
B_(0.00184089919860716, -2.30176408838364, -309176.332027549, -5.12072099751645e+15, -2.90216862534245e+19),
mu_(6.764, 336.4, -2.687, 0, 0),
mug_(3.134e-08, 0.9676, 7.9, 0),
K_(0.2407, -0.0003202, 0, 0, 0, 0),
Kg_(1.652e-05, 1.3117, 491, 0),
sigma_(562.16, 0.07195, 1.2389, 0, 0, 0),
D_(147.18, 20.1, 78.114, 28) // NN: Same as nHeptane
{}
C6H6();
//- Comstruct from components
C6H6
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C6H6(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C6H6(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
//- Liquid thermal conductivity [W/(m K)]
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
//- Vapour thermal conductivity [W/(m K)]
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C6H6& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C6H6I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C6H6::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C6H6::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C6H6::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C6H6::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C6H6::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C6H6::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C6H6::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C6H6::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C6H6::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C6H6::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C6H6::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C6H6::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C6H6::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,115 @@ License
#include "C7H16.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C7H16, 0);
addToRunTimeSelectionTable(liquid, C7H16,);
addToRunTimeSelectionTable(liquid, C7H16, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C7H16, 0);
addToRunTimeSelectionTable(liquid, C7H16,);
addToRunTimeSelectionTable(liquid, C7H16, Istream);
Foam::C7H16::C7H16()
:
liquid
(
100.204,
540.20,
2.74e+6,
0.428,
0.261,
182.57,
1.8269e-1,
371.58,
0.0,
0.3495,
1.52e+4
),
rho_(61.38396836, 0.26211, 540.2, 0.28141),
pv_(87.829, -6996.4, -9.8802, 7.2099e-06, 2.0),
hl_(540.20, 499121.791545248, 0.38795, 0.0, 0.0, 0.0),
cp_
(
540.20,
6.11976102401216,
3137.69909384855,
182.274175063868,
-254.530511150515
),
h_(-3.1469964e+6,7.3072e+3,-3.52884e+1,1.10637e-1,-1.634831e-4,9.64941e-8),
cpg_(1199.05392998284, 3992.85457666361, 1676.6, 2734.42177956968, 756.4),
B_
(
0.00274040956448844,
-2.90407568560137,
-440900.562851782,
-8.78208454752305e+17,
1.28238393676899e+20
),
mu_(-24.451, 1533.1, 2.0087, 0.0, 0.0),
mug_(6.672e-08, 0.82837, 85.752, 0.0),
K_(0.215, -0.000303, 0.0, 0.0, 0.0, 0.0),
Kg_(-0.070028, 0.38068, -7049.9, -2400500.0),
sigma_(540.20, 0.054143, 1.2512, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 100.204, 28.0) // note: Same as C7H16
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C7H16::C7H16
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc14& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C7H16::C7H16(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C7H16()
:
liquid(100.204, 540.20, 2.74e+6, 0.428, 0.261, 182.57, 1.8269e-1, 371.58, 0, 0.3495, 1.52e+4),
rho_(61.38396836, 0.26211, 540.2, 0.28141),
pv_(87.829, -6996.4, -9.8802, 7.2099e-06, 2),
hl_(540.20, 499121.791545248, 0.38795, 0, 0, 0),
cp_(540.20, 6.11976102401216, 3137.69909384855, 182.274175063868, -254.530511150515),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-3.1469964e+6,7.3072e+3,-3.52884e+1,1.10637e-1,-1.634831e-4,9.64941e-8),
cpg_(1199.05392998284, 3992.85457666361, 1676.6, 2734.42177956968, 756.4),
B_(0.00274040956448844, -2.90407568560137, -440900.562851782, -8.78208454752305e+17, 1.28238393676899e+20),
mu_(-24.451, 1533.1, 2.0087, 0, 0),
mug_(6.672e-08, 0.82837, 85.752, 0),
K_(0.215, -0.000303, 0, 0, 0, 0),
Kg_(-0.070028, 0.38068, -7049.9, -2400500),
sigma_(540.20, 0.054143, 1.2512, 0, 0, 0),
D_(147.18, 20.1, 100.204, 28) // NN: Same as C7H16
{}
C7H16();
//- Construct from components
C7H16
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C7H16(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C7H16(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C7H16& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C7H16I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C7H16::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C7H16::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C7H16::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C7H16::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C7H16::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C7H16::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C7H16::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C7H16::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C7H16::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C7H16::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C7H16::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C7H16::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C7H16::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C7H8.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C7H8, 0);
addToRunTimeSelectionTable(liquid, C7H8,);
addToRunTimeSelectionTable(liquid, C7H8, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C7H8, 0);
addToRunTimeSelectionTable(liquid, C7H8,);
addToRunTimeSelectionTable(liquid, C7H8, Istream);
Foam::C7H8::C7H8()
:
liquid
(
92.141,
591.79,
4.1086e+6,
0.31579,
0.264,
178.18,
4.1009e-2,
383.78,
1.2008e-30,
0.2641,
1.8346e+4
),
rho_(81.32088237, 0.27108, 591.79, 0.29889),
pv_(83.359, -6995, -9.1635, 6.225e-06, 2.0),
hl_(591.79, 544383.065085033, 0.3834, 0.0, 0.0, 0.0),
cp_
(
2066.83235476064,
-8.14664481609707,
0.0322581695445024,
-3.01223125427334e-05,
0.0,
0.0
),
h_
(
-353094.830249075,
2066.83235476064,
-4.07332240804853,
0.0107527231815008,
-7.53057813568336e-06,
0.0
),
cpg_(630.989461803106, 3107.19440856947, 1440.6, 2059.88647833212, -650.43),
B_
(
0.00191120131103418,
-2.24970425760519,
-482293.441573241,
-7.62309938029759e+17,
1.00986531511488e+20
),
mu_(-13.362, 1183, 0.333, 0.0, 0.0),
mug_(2.919e-08, 0.9648, 0.0, 0.0),
K_(0.2043, -0.000239, 0.0, 0.0, 0.0, 0.0),
Kg_(2.392e-05, 1.2694, 537, 0.0),
sigma_(591.79, 0.06685, 1.2456, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 92.141, 28) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C7H8::C7H8
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C7H8::C7H8(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C7H8()
:
liquid(92.141, 591.79, 4.1086e+6, 0.31579, 0.264, 178.18, 4.1009e-2, 383.78, 1.2008e-30, 0.2641, 1.8346e+4),
rho_(81.32088237, 0.27108, 591.79, 0.29889),
pv_(83.359, -6995, -9.1635, 6.225e-06, 2),
hl_(591.79, 544383.065085033, 0.3834, 0, 0, 0),
cp_(2066.83235476064, -8.14664481609707, 0.0322581695445024, -3.01223125427334e-05, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-353094.830249075, 2066.83235476064, -4.07332240804853, 0.0107527231815008, -7.53057813568336e-06, 0),
cpg_(630.989461803106, 3107.19440856947, 1440.6, 2059.88647833212, -650.43),
B_(0.00191120131103418, -2.24970425760519, -482293.441573241, -7.62309938029759e+17, 1.00986531511488e+20),
mu_(-13.362, 1183, 0.333, 0, 0),
mug_(2.919e-08, 0.9648, 0, 0),
K_(0.2043, -0.000239, 0, 0, 0, 0),
Kg_(2.392e-05, 1.2694, 537, 0),
sigma_(591.79, 0.06685, 1.2456, 0, 0, 0),
D_(147.18, 20.1, 92.141, 28) // NN: Same as nHeptane
{}
C7H8();
//- Construct from components
C7H8
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C7H8(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C7H8(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C7H8& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C7H8I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C7H8::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C7H8::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C7H8::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C7H8::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C7H8::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C7H8::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C7H8::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C7H8::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C7H8::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C7H8::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C7H8::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C7H8::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C7H8::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C8H10.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C8H10, 0);
addToRunTimeSelectionTable(liquid, C8H10,);
addToRunTimeSelectionTable(liquid, C8H10, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C8H10, 0);
addToRunTimeSelectionTable(liquid, C8H10,);
addToRunTimeSelectionTable(liquid, C8H10, Istream);
Foam::C8H10::C8H10()
:
liquid
(
106.167,
617.17,
3.6094e+6,
0.37381,
0.263,
178.15,
4.038e-3,
409.35,
1.9680e-30,
0.3036,
1.8043e+4
),
rho_(76.3765398, 0.26438, 617.17, 0.2921),
pv_(88.246, -7691.1, -9.797, 5.931e-06, 2.0),
hl_(617.17, 516167.924119547, 0.3882, 0.0, 0.0, 0.0),
cp_
(
818.521762883005,
6.66873887366131,
-0.0248005500767658,
4.23860521631015e-05,
0.0,
0.0
),
h_
(
-524002.612929508,
818.521762883005,
3.33436943683065,
-0.00826685002558862,
1.05965130407754e-05,
0.0
),
cpg_(738.835984816374, 3201.5598067196, 1559, 2285.07916772632, -702.0),
B_
(
0.00165776559571242,
-2.77958310962917,
-388067.855359952,
-5.86905535618412e+18,
1.58052878954854e+21
),
mu_(-10.452, 1048.4, -0.0715, 0.0, 0.0),
mug_(1.2e-06, 0.4518, 439.0, 0.0),
K_(0.20149, -0.00023988, 0.0, 0.0, 0.0, 0.0),
Kg_(1.708e-05, 1.319, 565.6, 0.0),
sigma_(617.17, 0.066, 1.268, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 106.167, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C8H10::C8H10
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C8H10::C8H10(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -86,26 +86,9 @@ public:
// Constructors
//- Construct null
C8H10()
:
liquid(106.167, 617.17, 3.6094e+6, 0.37381, 0.263, 178.15, 4.038e-3, 409.35, 1.9680e-30, 0.3036, 1.8043e+4),
rho_(76.3765398, 0.26438, 617.17, 0.2921),
pv_(88.246, -7691.1, -9.797, 5.931e-06, 2),
hl_(617.17, 516167.924119547, 0.3882, 0, 0, 0),
cp_(818.521762883005, 6.66873887366131, -0.0248005500767658, 4.23860521631015e-05, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-524002.612929508, 818.521762883005, 3.33436943683065, -0.00826685002558862, 1.05965130407754e-05, 0),
cpg_(738.835984816374, 3201.5598067196, 1559, 2285.07916772632, -702),
B_(0.00165776559571242, -2.77958310962917, -388067.855359952, -5.86905535618412e+18, 1.58052878954854e+21),
mu_(-10.452, 1048.4, -0.0715, 0, 0),
mug_(1.2e-06, 0.4518, 439, 0),
K_(0.20149, -0.00023988, 0, 0, 0, 0),
Kg_(1.708e-05, 1.319, 565.6, 0),
sigma_(617.17, 0.066, 1.268, 0, 0, 0),
D_(147.18, 20.1, 106.167, 28) // NN: Same as nHeptane
{}
C8H10();
// Construct from components
C8H10
(
const liquid& l,
@ -122,125 +105,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C8H10(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C8H10(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -259,9 +173,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C8H10& l)
{
l.writeData(os);
@ -276,6 +188,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C8H10I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C8H10::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C8H10::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C8H10::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C8H10::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C8H10::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C8H10::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C8H10::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C8H10::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C8H10::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C8H10::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C8H10::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C8H10::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C8H10::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C8H18.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C8H18, 0);
addToRunTimeSelectionTable(liquid, C8H18,);
addToRunTimeSelectionTable(liquid, C8H18, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C8H18, 0);
addToRunTimeSelectionTable(liquid, C8H18,);
addToRunTimeSelectionTable(liquid, C8H18, Istream);
Foam::C8H18::C8H18()
:
liquid
(
114.231,
568.70,
2.49e+6,
0.486,
0.256,
216.38,
2.1083,
398.83,
0.0,
0.3996,
1.54e+4
),
rho_(61.37745861, 0.26115, 568.7, 0.28034),
pv_(96.084, -7900.2, -11.003, 7.1802e-06, 2.0),
hl_(568.70, 483056.263186, 0.38467, 0.0, 0.0, 0.0),
cp_
(
1968.20477803749,
-1.63379467920267,
0.00839448135795012,
0.0,
0.0,
0.0
),
h_
(
-2778787.734126,
1968.20477803749,
-0.816897339601334,
0.00279816045265004,
0.0,
0.0
),
cpg_(1186.54305748877, 3878.9820626625, 1635.6, 2673.52995246474, 746.4),
B_
(
0.00239777293379205,
-2.81394717721109,
-585042.589139551,
-1.11265768486663e+18,
1.40968738783693e+20
),
mu_(-20.463, 1497.4, 1.379, 0.0, 0.0),
mug_(3.1191e-08, 0.92925, 55.092, 0.0),
K_(0.2156, -0.00029483, 0.0, 0.0, 0.0, 0.0),
Kg_(-8758, 0.8448, -27121000000.0, 0.0),
sigma_(568.70, 0.052789, 1.2323, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 114.231, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C8H18::C8H18
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C8H18::C8H18(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C8H18()
:
liquid(114.231, 568.70, 2.49e+6, 0.486, 0.256, 216.38, 2.1083, 398.83, 0.0, 0.3996, 1.54e+4),
rho_(61.37745861, 0.26115, 568.7, 0.28034),
pv_(96.084, -7900.2, -11.003, 7.1802e-06, 2),
hl_(568.70, 483056.263186, 0.38467, 0, 0, 0),
cp_(1968.20477803749, -1.63379467920267, 0.00839448135795012, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-2778787.734126, 1968.20477803749, -0.816897339601334, 0.00279816045265004, 0, 0),
cpg_(1186.54305748877, 3878.9820626625, 1635.6, 2673.52995246474, 746.4),
B_(0.00239777293379205, -2.81394717721109, -585042.589139551, -1.11265768486663e+18, 1.40968738783693e+20),
mu_(-20.463, 1497.4, 1.379, 0, 0),
mug_(3.1191e-08, 0.92925, 55.092, 0),
K_(0.2156, -0.00029483, 0, 0, 0, 0),
Kg_(-8758, 0.8448, -27121000000.0, 0),
sigma_(568.70, 0.052789, 1.2323, 0, 0, 0),
D_(147.18, 20.1, 114.231, 28) // NN: Same as nHeptane
{}
C8H18();
//- Construct from components
C8H18
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C8H18(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C8H18(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
//- Vapour pressure [Pa];
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C8H18& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C8H18I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C8H18::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C8H18::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C8H18::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C8H18::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C8H18::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C8H18::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C8H18::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C8H18::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C8H18::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C8H18::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C8H18::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C8H18::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C8H18::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "C9H20.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(C9H20, 0);
addToRunTimeSelectionTable(liquid, C9H20,);
addToRunTimeSelectionTable(liquid, C9H20, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(C9H20, 0);
addToRunTimeSelectionTable(liquid, C9H20,);
addToRunTimeSelectionTable(liquid, C9H20, Istream);
Foam::C9H20::C9H20()
:
liquid
(
128.258,
594.60,
2.29e+6,
0.544,
0.252,
219.66,
4.3058e-1,
423.97,
0.0,
0.4435,
1.56e+4
),
rho_(62.06019846, 0.26147, 594.6, 0.28281),
pv_(109.35, -90304.0, -12.882, 7.8544e-06, 2.0),
hl_(594.60, 470691.886665939, 0.38522, 0.0, 0.0, 0.0),
cp_
(
2986.79224687739,
-8.88677509395125,
0.0211300659607978,
0.0,
0.0,
0.0
),
h_
(
-2825628.50868792,
2986.79224687739,
-4.44338754697563,
0.00704335532026592,
0.0,
0.0
),
cpg_(1183.16206396482, 3832.11963386299, 1644.8, 2705.48425829188, 749.6),
B_
(
0.00304542406711472,
-3.65357326638494,
-520825.211682702,
-6.15400208953827e+18,
1.41901479829718e+21
),
mu_(-21.149, 1658, 1.454, 0.0, 0.0),
mug_(1.0344e-07, 0.77301, 220.47, 0.0),
K_(0.209, -0.000264, 0.0, 0.0, 0.0, 0.0),
Kg_(-0.065771, 0.27198, -3482.3, -1580300.0),
sigma_(594.60, 0.054975, 1.2897, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 128.258, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::C9H20::C9H20
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::C9H20::C9H20(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
C9H20()
:
liquid(128.258, 594.60, 2.29e+6, 0.544, 0.252, 219.66, 4.3058e-1, 423.97, 0, 0.4435, 1.56e+4),
rho_(62.06019846, 0.26147, 594.6, 0.28281),
pv_(109.35, -90304, -12.882, 7.8544e-06, 2),
hl_(594.60, 470691.886665939, 0.38522, 0, 0, 0),
cp_(2986.79224687739, -8.88677509395125, 0.0211300659607978, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-2825628.50868792, 2986.79224687739, -4.44338754697563, 0.00704335532026592, 0, 0),
cpg_(1183.16206396482, 3832.11963386299, 1644.8, 2705.48425829188, 749.6),
B_(0.00304542406711472, -3.65357326638494, -520825.211682702, -6.15400208953827e+18, 1.41901479829718e+21),
mu_(-21.149, 1658, 1.454, 0, 0),
mug_(1.0344e-07, 0.77301, 220.47, 0),
K_(0.209, -0.000264, 0, 0, 0, 0),
Kg_(-0.065771, 0.27198, -3482.3, -1580300),
sigma_(594.60, 0.054975, 1.2897, 0, 0, 0),
D_(147.18, 20.1, 128.258, 28) // NN: Same as nHeptane
{}
C9H20();
//- Construct from components
C9H20
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
C9H20(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
C9H20(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const C9H20& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "C9H20I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::C9H20::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::C9H20::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::C9H20::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::C9H20::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::C9H20::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::C9H20::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::C9H20::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::C9H20::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::C9H20::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::C9H20::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::C9H20::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::C9H20::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::C9H20::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "CH3OH.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(CH3OH, 0);
addToRunTimeSelectionTable(liquid, CH3OH,);
addToRunTimeSelectionTable(liquid, CH3OH, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(CH3OH, 0);
addToRunTimeSelectionTable(liquid, CH3OH,);
addToRunTimeSelectionTable(liquid, CH3OH, Istream);
Foam::CH3OH::CH3OH()
:
liquid
(
32.042,
512.58,
8.0959e+6,
0.1178,
0.224,
175.47,
1.054e-1,
337.85,
5.6706e-30,
0.5656,
2.9523e+4
),
rho_(73.952936, 0.27192, 512.58, 0.2331),
pv_(109.93, -7471.3, -13.988, 0.015281, 1.0),
hl_(512.58, 1644716.30984333, 0.3766, 0.0, 0.0, 0.0),
cp_
(
3358.09250358904,
-11.8781599151114,
0.0305536483365583,
0.0,
0.0,
0.0
),
h_
(
-8190474.32066862,
3358.09250358904,
-5.93907995755571,
0.0101845494455194,
0.0,
0.0
),
cpg_(1226.9521253355, 2772.92303851195, 1963, 1733.66206853505, 909.6),
B_
(
-0.0199737844079645,
19.3496036452157,
-3342487.98452032,
2.40808938268523e+19,
-6.85787404032208e+21
),
mu_(-7.288, 1065.3, -0.6657, 0.0, 0.0),
mug_(3.0663e-07, 0.69655, 205.0, 0.0),
K_(0.2837, -0.000281, 0.0, 0.0, 0.0, 0.0),
Kg_(-7.763, 1.0279, -74360000.0, 6770000000.0),
sigma_(512.58, 0.056, -0.00014583, 1.08e-07, 0.0, 0.0),
D_(147.18, 20.1, 32.042, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::CH3OH::CH3OH
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::CH3OH::CH3OH(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
CH3OH()
:
liquid(32.042, 512.58, 8.0959e+6, 0.1178, 0.224, 175.47, 1.054e-1, 337.85, 5.6706e-30, 0.5656, 2.9523e+4),
rho_(73.952936, 0.27192, 512.58, 0.2331),
pv_(109.93, -7471.3, -13.988, 0.015281, 1),
hl_(512.58, 1644716.30984333, 0.3766, 0, 0, 0),
cp_(3358.09250358904, -11.8781599151114, 0.0305536483365583, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-8190474.32066862, 3358.09250358904, -5.93907995755571, 0.0101845494455194, 0, 0),
cpg_(1226.9521253355, 2772.92303851195, 1963, 1733.66206853505, 909.6),
B_(-0.0199737844079645, 19.3496036452157, -3342487.98452032, 2.40808938268523e+19, -6.85787404032208e+21),
mu_(-7.288, 1065.3, -0.6657, 0, 0),
mug_(3.0663e-07, 0.69655, 205, 0),
K_(0.2837, -0.000281, 0, 0, 0, 0),
Kg_(-7.763, 1.0279, -74360000.0, 6770000000.0),
sigma_(512.58, 0.056, -0.00014583, 1.08e-07, 0, 0),
D_(147.18, 20.1, 32.042, 28) // NN: Same as nHeptane
{}
CH3OH();
//- Construct from components
CH3OH
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
CH3OH(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
CH3OH(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const CH3OH& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "CH3OHI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::CH3OH::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::CH3OH::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -30,19 +30,108 @@ Description
#include "CH4N2O.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(CH4N2O, 0);
addToRunTimeSelectionTable(liquid, CH4N2O,);
addToRunTimeSelectionTable(liquid, CH4N2O, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(CH4N2O, 0);
addToRunTimeSelectionTable(liquid, CH4N2O,);
addToRunTimeSelectionTable(liquid, CH4N2O, Istream);
Foam::CH4N2O::CH4N2O()
:
liquid
(
60.056,
705.0,
9.050e+6,
0.218,
0.337,
405.85,
9.3131e+1,
465.0,
1.52e-29,
0.3449,
4.7813e+4
),
rho_(1230.006936, 0.0, 0.0, 0.0, 0.0, 0.0),
pv_(3015.15611544, -185497.059684, -430.223621983, 0.00017405122622, 2.0),
hl_(705.0, 2534249.0, 0.5, 0.0, 0.0, 0.0),
cp_(2006.46063673904, 0.0, 0.0, 0.0, 0.0, 0.0),
h_(-6154107.41641135, 2006.46063673904, 0.0, 0.0, 0.0, 0.0),
cpg_(811.875582789397, 2099.04089516451, 1627.3, 1603.63660583455, 724.41),
B_
(
-0.000383641934194752,
0.447249234048222,
-469062.208605302,
5.5628080458239e+18,
-2.3040162514986e+21
),
mu_(-51.964, 3670.6, 5.7331, -5.3495e-29, 10.0),
mug_(2.6986e-06, 0.498, 1257.7, -19570.0),
K_(-0.4267, 0.0056903, -8.0065e-06, 1.815e-09, 0.0, 0.0),
Kg_(6.977e-05, 1.1243, 844.9, -148850.0),
sigma_(705.0, 1.0, 0.0, 0.0, 0.0, 0.0), // note: set to constant
D_(147.18, 20.1, 60.056, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::CH4N2O::CH4N2O
(
const liquid& l,
const NSRDSfunc0& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::CH4N2O::CH4N2O(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -26,7 +26,8 @@ Class
Foam::CH4N2O
Description
urea, note that some of the properties are unavailable in the literature and have been copied from water.
urea, note that some of the properties are unavailable in the literature
and have been copied from water.
SourceFiles
CH4N2O.C
@ -86,23 +87,9 @@ public:
// Constructors
//- Construct null
CH4N2O()
:
liquid(60.056, 705.0, 9.050e+6, 0.218, 0.337, 405.85, 9.3131e+1, 465.0, 1.52e-29, 0.3449, 4.7813e+4),
rho_(1230.006936, 0, 0, 0, 0, 0),
pv_(3015.15611544, -185497.059684, -430.223621983, 0.00017405122622, 2.0),
hl_(705.0, 2534249.0, 0.5, 0.0, 0.0, 0.0),
cp_(2006.46063673904, 0, 0, 0, 0, 0),
h_(-6154107.41641135, 2006.46063673904, 0, 0, 0, 0),
cpg_(811.875582789397, 2099.04089516451, 1627.3, 1603.63660583455, 724.41),
B_(-0.000383641934194752, 0.447249234048222, -469062.208605302, 5.5628080458239e+18, -2.3040162514986e+21),
mu_(-51.964, 3670.6, 5.7331, -5.3495e-29, 10),
mug_(2.6986e-06, 0.498, 1257.7, -19570),
K_(-0.4267, 0.0056903, -8.0065e-06, 1.815e-09, 0, 0),
Kg_(6.977e-05, 1.1243, 844.9, -148850),
sigma_(705.0, 1.0, 0.0, 0.0, 0.0, 0), // set to constant
D_(147.18, 20.1, 60.056, 28) // Same as nHeptane
{}
CH4N2O();
//- Construct from components
CH4N2O
(
const liquid& l,
@ -119,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
CH4N2O(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
CH4N2O(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -256,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const CH4N2O& l)
{
l.writeData(os);
@ -273,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "CH4N2OI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,106 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::CH4N2O::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::CH4N2O::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,131 @@ License
#include "H2O.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(H2O, 0);
addToRunTimeSelectionTable(liquid, H2O,);
addToRunTimeSelectionTable(liquid, H2O, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(H2O, 0);
addToRunTimeSelectionTable(liquid, H2O,);
addToRunTimeSelectionTable(liquid, H2O, Istream);
Foam::H2O::H2O()
:
liquid
(
18.015,
647.13,
2.2055e+7,
0.05595,
0.229,
273.16,
6.113e+2,
373.15,
6.1709e-30,
0.3449,
4.7813e+4
),
rho_(98.343885, 0.30542, 647.13, 0.081),
pv_(73.649, -7258.2, -7.3037, 4.1653e-06, 2),
hl_(647.13, 2889425.47876769, 0.3199, -0.212, 0.25795, 0),
cp_
(
15341.1046350264,
-116.019983347211,
0.451013044684985,
-0.000783569247849015,
5.20127671384957e-07,
0
),
h_
(
-17957283.7993676,
15341.1046350264,
-58.0099916736053,
0.150337681561662,
-0.000195892311962254,
1.04025534276991e-07
),
cpg_
(
1851.73466555648,
1487.53816264224,
2609.3,
493.366638912018,
1167.6
),
B_
(
-0.0012789342214821,
1.4909797391063,
-1563696.91923397,
1.85445462114904e+19,
-7.68082153760755e+21
),
mu_(-51.964, 3670.6, 5.7331, -5.3495e-29, 10),
mug_(2.6986e-06, 0.498, 1257.7, -19570),
K_(-0.4267, 0.0056903, -8.0065e-06, 1.815e-09, 0, 0),
Kg_(6.977e-05, 1.1243, 844.9, -148850),
sigma_(647.13, 0.18548, 2.717, -3.554, 2.047, 0),
D_(147.18, 20.1, 18.015, 28) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::H2O::H2O
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::H2O::H2O(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -86,26 +86,9 @@ public:
// Constructors
//- Construct null
H2O()
:
liquid(18.015, 647.13, 2.2055e+7, 0.05595, 0.229, 273.16, 6.113e+2, 373.15, 6.1709e-30, 0.3449, 4.7813e+4),
rho_(98.343885, 0.30542, 647.13, 0.081),
pv_(73.649, -7258.2, -7.3037, 4.1653e-06, 2),
hl_(647.13, 2889425.47876769, 0.3199, -0.212, 0.25795, 0),
cp_(15341.1046350264, -116.019983347211, 0.451013044684985, -0.000783569247849015, 5.20127671384957e-07, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-17957283.7993676, 15341.1046350264, -58.0099916736053, 0.150337681561662, -0.000195892311962254, 1.04025534276991e-07),
cpg_(1851.73466555648, 1487.53816264224, 2609.3, 493.366638912018, 1167.6),
B_(-0.0012789342214821, 1.4909797391063, -1563696.91923397, 1.85445462114904e+19, -7.68082153760755e+21),
mu_(-51.964, 3670.6, 5.7331, -5.3495e-29, 10),
mug_(2.6986e-06, 0.498, 1257.7, -19570),
K_(-0.4267, 0.0056903, -8.0065e-06, 1.815e-09, 0, 0),
Kg_(6.977e-05, 1.1243, 844.9, -148850),
sigma_(647.13, 0.18548, 2.717, -3.554, 2.047, 0),
D_(147.18, 20.1, 18.015, 28) // NN: Same as nHeptane
{}
H2O();
//- Construct from components
H2O
(
const liquid& l,
@ -122,125 +105,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
H2O(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
H2O(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,8 +174,7 @@ public:
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const H2O& l)
{
l.writeData(os);
@ -276,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "H2OI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::H2O::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::H2O::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::H2O::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::H2O::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::H2O::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::H2O::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::H2O::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::H2O::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::H2O::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::H2O::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::H2O::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::H2O::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::H2O::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,124 @@ License
#include "IC8H18.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(IC8H18, 0);
addToRunTimeSelectionTable(liquid, IC8H18,);
addToRunTimeSelectionTable(liquid, IC8H18, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(IC8H18, 0);
addToRunTimeSelectionTable(liquid, IC8H18,);
addToRunTimeSelectionTable(liquid, IC8H18, Istream);
Foam::IC8H18::IC8H18()
:
liquid
(
114.231,
543.96,
2.5676e+6,
0.468,
0.266,
165.78,
1.4464e-2,
372.39,
0.0,
0.3031,
1.4051e+4
),
rho_(67.2363666, 0.27373, 543.96, 0.2846),
pv_(120.81, -7550, -16.111, 0.017099, 1.0),
hl_(543.96, 375379.713037617, 0.1549, 0.138, 0.0666, 0.0),
cp_
(
1219.89652546156,
1.67205049417409,
0.00414073237562483,
0.0,
0.0,
0.0
),
h_
(
-2743275.10767575,
1219.89652546156,
0.836025247087043,
0.00138024412520828,
0.0,
0.0
),
cpg_(997.10236275617, 4627.4653990598, 1594, 2933.52942721328, 677.94),
B_
(
0.00234936225718063,
-2.83381919093766,
-413154.047500241,
-3.49703670632315e+17,
3.13750207912038e+19
),
mu_(-15.811, 1282.5, 0.67791, -3.8617e-28, 10.0),
mug_(1.107e-07, 0.746, 72.4, 0.0),
K_(0.1508, -0.0001712, 0.0, 0.0, 0.0, 0.0),
Kg_(1.758e-05, 1.3114, 392.9, 0.0),
sigma_(543.96, 0.047434, 1.1975, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 114.231, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::IC8H18::IC8H18
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::IC8H18::IC8H18(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -87,26 +87,9 @@ public:
// Constructors
//- Construct null
IC8H18()
:
liquid(114.231, 543.96, 2.5676e+6, 0.468, 0.266, 165.78, 1.4464e-2, 372.39, 0.0, 0.3031, 1.4051e+4),
rho_(67.2363666, 0.27373, 543.96, 0.2846),
pv_(120.81, -7550, -16.111, 0.017099, 1),
hl_(543.96, 375379.713037617, 0.1549, 0.138, 0.0666, 0),
cp_(1219.89652546156, 1.67205049417409, 0.00414073237562483, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-2743275.10767575, 1219.89652546156, 0.836025247087043, 0.00138024412520828, 0, 0),
cpg_(997.10236275617, 4627.4653990598, 1594, 2933.52942721328, 677.94),
B_(0.00234936225718063, -2.83381919093766, -413154.047500241, -3.49703670632315e+17, 3.13750207912038e+19),
mu_(-15.811, 1282.5, 0.67791, -3.8617e-28, 10),
mug_(1.107e-07, 0.746, 72.4, 0),
K_(0.1508, -0.0001712, 0, 0, 0, 0),
Kg_(1.758e-05, 1.3114, 392.9, 0),
sigma_(543.96, 0.047434, 1.1975, 0, 0, 0),
D_(147.18, 20.1, 114.231, 28) // NN: Same as nHeptane
{}
IC8H18();
//- Construct from components
IC8H18
(
const liquid& l,
@ -123,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
IC8H18(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
IC8H18(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
//- Liquid thermal conductivity [W/(m K)]
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
//- Vapour thermal conductivity [W/(m K)]
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -260,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const IC8H18& l)
{
l.writeData(os);
@ -277,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "IC8H18I.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::IC8H18::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::IC8H18::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,144 @@ License
#include "IDEA.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(IDEA, 0);
addToRunTimeSelectionTable(liquid, IDEA,);
addToRunTimeSelectionTable(liquid, IDEA, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(IDEA, 0);
addToRunTimeSelectionTable(liquid, IDEA,);
addToRunTimeSelectionTable(liquid, IDEA, Istream);
Foam::IDEA::IDEA()
:
liquid
(
142.26,
618.074,
2.11e+6,
0.523,
0.247,
242.67,
3.4929e-2,
447.3,
1.7012e-30,
0.3478,
1.57e+4
),
rho_(152.012105, 3.87150382e-1, 618.073893, 4.00790044e-1),
pv_
(
8.4817774623e+01,
-8.6782398353e+03,
-9.1277694857,
4.6153144498e-06,
2.0
),
hl_
(
618.074,
2.1671983789e+05,
-4.2413153435e+00,
1.1656811532e+01,
-1.1656446689e+01,
4.3667661492
),
cp_(1.6604957e+3, -6.250871e-1, 6.1778552e-3, 0.0, 0.0, 0.0),
h_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
cpg_
(
1.0457515243e+03,
3.4410492875e+03,
1.5976862298e+03,
2.4697705752e+03,
7.3699710536e+02
),
B_
(
0.00337351091119935,
-4.13606494008504,
-534560.916470464,
-1.13364022911762e+19,
2.80704220402713e+21
),
mu_(-6.9645853822e+01, 4.4390635942e+03, 8.4680722718e+00, 0.0, 0.0),
mug_(4.2629382158e-08, 8.8144402122e-01, 9.6918097636e+01, 0.0),
K_(2.03684e-01, -2.3168e-04, 0.0, 0.0, 0.0, 0.0),
Kg_
(
-5.664925956707e+02,
8.896721676320e-01,
-2.849783998688e+09,
6.914935658053e+05
),
sigma_
(
618.074,
8.3846525429e-03,
-1.0044759047e+01,
2.7261918781e+01,
-2.5529134309e+01,
8.6488806234
),
D_(147.18, 20.1, 142.2, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::IDEA::IDEA
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::IDEA::IDEA(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -109,26 +109,9 @@ public:
// Constructors
//- Construct null
IDEA()
:
liquid(142.26, 618.074, 2.11e+6, 0.523, 0.247, 242.67, 3.4929e-2, 447.3, 1.7012e-30, 0.3478, 1.57e+4),
rho_(152.012105, 3.87150382e-1, 618.073893, 4.00790044e-1),
pv_(8.4817774623e+01, -8.6782398353e+03, -9.1277694857, 4.6153144498e-06, 2.0),
hl_(618.074,2.1671983789e+05, -4.2413153435e+00, 1.1656811532e+01, -1.1656446689e+01, 4.3667661492),
cp_(1.6604957e+3, -6.250871e-1, 6.1778552e-3, 0.0, 0.0, 0.0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// For this fuel I've put it to zero because I was lazy at the time...
h_(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
cpg_(1.0457515243e+03, 3.4410492875e+03, 1.5976862298e+03, 2.4697705752e+03, 7.3699710536e+02),
B_(0.00337351091119935, -4.13606494008504, -534560.916470464, -1.13364022911762e+19, 2.80704220402713e+21),
mu_(-6.9645853822e+01, 4.4390635942e+03, 8.4680722718e+00, 0.0, 0.0),
mug_(4.2629382158e-08, 8.8144402122e-01, 9.6918097636e+01, 0.0),
K_(2.03684e-01, -2.3168e-04, 0.0, 0.0, 0.0, 0.0),
Kg_(-5.664925956707e+02, 8.896721676320e-01, -2.849783998688e+09, 6.914935658053e+05),
sigma_(618.074, 8.3846525429e-03, -1.0044759047e+01, 2.7261918781e+01, -2.5529134309e+01, 8.6488806234),
D_(147.18, 20.1, 142.2, 28) // NN: Same as nHeptane
{}
IDEA();
// Construct from components
IDEA
(
const liquid& l,
@ -145,125 +128,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
IDEA(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
IDEA(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -281,9 +195,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const IDEA& l)
{
l.writeData(os);
@ -298,6 +210,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "IDEAI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
inline Foam::scalar Foam::IDEA::rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline Foam::scalar Foam::IDEA::pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline Foam::scalar Foam::IDEA::hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline Foam::scalar Foam::IDEA::cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline Foam::scalar Foam::IDEA::h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline Foam::scalar Foam::IDEA::cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline Foam::scalar Foam::IDEA::B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline Foam::scalar Foam::IDEA::mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline Foam::scalar Foam::IDEA::mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline Foam::scalar Foam::IDEA::K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline Foam::scalar Foam::IDEA::Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline Foam::scalar Foam::IDEA::sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline Foam::scalar Foam::IDEA::D(scalar p, scalar T) const
{
return D_.f(p, T);
}
// ************************************************************************* //

View File

@ -27,19 +27,108 @@ License
#include "MB.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(MB, 0);
addToRunTimeSelectionTable(liquid, MB,);
addToRunTimeSelectionTable(liquid, MB, Istream);
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
defineTypeNameAndDebug(MB, 0);
addToRunTimeSelectionTable(liquid, MB,);
addToRunTimeSelectionTable(liquid, MB, Istream);
Foam::MB::MB()
:
liquid
(
102.133,
554.5,
3.4734e+6,
0.34,
0.256,
187.35,
1.0102e-1,
375.90,
5.7373e-30,
0.3807,
1.7713e+4
),
rho_(76.6099633, 0.257, 554.5, 0.2772),
pv_(107.51, -8112.9, -12.77, 9.2919e-06, 2.0),
hl_(554.5, 508307.794738233, 0.392, 0.0, 0.0, 0.0),
cp_(1135.77394182096, 2.89818178257762, 0.0, 0.0, 0.0, 0.0),
h_(-5255966.14542938, 1135.77394182096, 1.44909089128881, 0.0, 0.0, 0.0),
cpg_(875.329227575808, 2849.22600922327, 1570.0, 2029.70636327142, 678.3),
B_
(
0.00220496803188,
-2.42184210783978,
-401045.695318849,
-2.85079259397061e+17,
-3.57377145486767e+19
),
mu_(-12.206, 1141.7, 0.15014, 0.0, 0.0),
mug_(3.733e-07, 0.6177, 256.5, 0.0),
K_(0.2298, -0.0003002, 0.0, 0.0, 0.0, 0.0),
Kg_(1333.1, 0.9962, 12317000000.0, 0.0),
sigma_(554.5, 0.064084, 1.2418, 0.0, 0.0, 0.0),
D_(147.18, 20.1, 102.133, 28.0) // note: Same as nHeptane
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
Foam::MB::MB
(
const liquid& l,
const NSRDSfunc5& density,
const NSRDSfunc1& vapourPressure,
const NSRDSfunc6& heatOfVapourisation,
const NSRDSfunc0& heatCapacity,
const NSRDSfunc0& enthalpy,
const NSRDSfunc7& idealGasHeatCapacity,
const NSRDSfunc4& secondVirialCoeff,
const NSRDSfunc1& dynamicViscosity,
const NSRDSfunc2& vapourDynamicViscosity,
const NSRDSfunc0& thermalConductivity,
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
Foam::MB::MB(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
// ************************************************************************* //

View File

@ -31,8 +31,7 @@ Description
SourceFiles
MB.C
*/
// ------------------------------------------------------------------------- //
\*---------------------------------------------------------------------------*/
#ifndef MB_H
#define MB_H
@ -88,26 +87,9 @@ public:
// Constructors
//- Construct null
MB()
:
liquid(102.133, 554.5, 3.4734e+6, 0.34, 0.256, 187.35, 1.0102e-1, 375.90, 5.7373e-30, 0.3807, 1.7713e+4),
rho_(76.6099633, 0.257, 554.5, 0.2772),
pv_(107.51, -8112.9, -12.77, 9.2919e-06, 2),
hl_(554.5, 508307.794738233, 0.392, 0, 0, 0),
cp_(1135.77394182096, 2.89818178257762, 0, 0, 0, 0),
// NN: enthalpy, h_, is not used in the sprayModel.
// For consistency, the enthalpy is derived from hlat and hl.
// It is, however, convenient to have it available.
h_(-5255966.14542938, 1135.77394182096, 1.44909089128881, 0, 0, 0),
cpg_(875.329227575808, 2849.22600922327, 1570, 2029.70636327142, 678.3),
B_(0.00220496803188, -2.42184210783978, -401045.695318849, -2.85079259397061e+17, -3.57377145486767e+19),
mu_(-12.206, 1141.7, 0.15014, 0, 0),
mug_(3.733e-07, 0.6177, 256.5, 0),
K_(0.2298, -0.0003002, 0, 0, 0, 0),
Kg_(1333.1, 0.9962, 12317000000.0, 0),
sigma_(554.5, 0.064084, 1.2418, 0, 0, 0),
D_(147.18, 20.1, 102.133, 28) // NN: Same as nHeptane
{}
MB();
//- Construct from components
MB
(
const liquid& l,
@ -124,125 +106,56 @@ public:
const NSRDSfunc2& vapourThermalConductivity,
const NSRDSfunc6& surfaceTension,
const APIdiffCoefFunc& vapourDiffussivity
)
:
liquid(l),
rho_(density),
pv_(vapourPressure),
hl_(heatOfVapourisation),
cp_(heatCapacity),
h_(enthalpy),
cpg_(idealGasHeatCapacity),
B_(secondVirialCoeff),
mu_(dynamicViscosity),
mug_(vapourDynamicViscosity),
K_(thermalConductivity),
Kg_(vapourThermalConductivity),
sigma_(surfaceTension),
D_(vapourDiffussivity)
{}
);
//- Construct from Istream
MB(Istream& is)
:
liquid(is),
rho_(is),
pv_(is),
hl_(is),
cp_(is),
h_(is),
cpg_(is),
B_(is),
mu_(is),
mug_(is),
K_(is),
Kg_(is),
sigma_(is),
D_(is)
{}
MB(Istream& is);
// Member Functions
//- Liquid density [kg/m^3]
scalar rho(scalar p, scalar T) const
{
return rho_.f(p, T);
}
inline scalar rho(scalar p, scalar T) const;
//- Vapour pressure [Pa]
scalar pv(scalar p, scalar T) const
{
return pv_.f(p, T);
}
inline scalar pv(scalar p, scalar T) const;
//- Heat of vapourisation [J/kg]
scalar hl(scalar p, scalar T) const
{
return hl_.f(p, T);
}
inline scalar hl(scalar p, scalar T) const;
//- Liquid heat capacity [J/(kg K)]
scalar cp(scalar p, scalar T) const
{
return cp_.f(p, T);
}
inline scalar cp(scalar p, scalar T) const;
//- Liquid Enthalpy [J/(kg)]
scalar h(scalar p, scalar T) const
{
return h_.f(p, T);
}
inline scalar h(scalar p, scalar T) const;
//- Ideal gas heat capacity [J/(kg K)]
scalar cpg(scalar p, scalar T) const
{
return cpg_.f(p, T);
}
inline scalar cpg(scalar p, scalar T) const;
//- Second Virial Coefficient [m^3/kg]
scalar B(scalar p, scalar T) const
{
return B_.f(p, T);
}
inline scalar B(scalar p, scalar T) const;
//- Liquid viscosity [Pa s]
scalar mu(scalar p, scalar T) const
{
return mu_.f(p, T);
}
inline scalar mu(scalar p, scalar T) const;
//- Vapour viscosity [Pa s]
scalar mug(scalar p, scalar T) const
{
return mug_.f(p, T);
}
inline scalar mug(scalar p, scalar T) const;
//- Liquid thermal conductivity [W/(m K)]
scalar K(scalar p, scalar T) const
{
return K_.f(p, T);
}
inline scalar K(scalar p, scalar T) const;
//- Vapour thermal conductivity [W/(m K)]
scalar Kg(scalar p, scalar T) const
{
return Kg_.f(p, T);
}
inline scalar Kg(scalar p, scalar T) const;
//- Surface tension [N/m]
scalar sigma(scalar p, scalar T) const
{
return sigma_.f(p, T);
}
inline scalar sigma(scalar p, scalar T) const;
//- Vapour diffussivity [m2/s]
scalar D(scalar p, scalar T) const
{
return D_.f(p, T);
}
inline scalar D(scalar p, scalar T) const;
// I-O
//- Write the function coefficients
void writeData(Ostream& os) const
{
@ -261,9 +174,7 @@ public:
D_.writeData(os); os << endl;
}
// Ostream Operator
//- Ostream Operator
friend Ostream& operator<<(Ostream& os, const MB& l)
{
l.writeData(os);
@ -278,6 +189,10 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "MBI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show More