28 #include "surfaceInterpolate.H"
41 Foam::twoPhaseMixture::readPhasePropertiesDict
43 const objectRegistry& obr
46 typeIOobject<IOdictionary> phasePropertiesIO
49 obr.time().constant(),
56 if (phasePropertiesIO.headerOk())
58 return phasePropertiesIO;
62 typeIOobject<IOdictionary> thermophysicalPropertiesIO
64 "thermophysicalProperties",
65 obr.time().constant(),
72 if (thermophysicalPropertiesIO.headerOk())
74 IOdictionary phasePropertiesDict(thermophysicalPropertiesIO);
75 phasePropertiesDict.rename(
"phaseProperties");
76 return phasePropertiesDict;
80 typeIOobject<IOdictionary> transportPropertiesIO
82 "transportProperties",
83 obr.time().constant(),
90 if (transportPropertiesIO.headerOk())
93 phasePropertiesDict.rename(
"phaseProperties");
95 const wordList phases(phasePropertiesDict.lookup(
"phases"));
105 physicalProperties::typeName,
108 obr.time().constant(),
116 phaseDict.merge(phasePropertiesDict.subDict(phases[i]));
118 phaseDict.changeKeyword
121 viscosityModel::typeName
124 phaseDict.writeObject
132 phasePropertiesDict.remove(phases[i]);
135 phasePropertiesDict.writeObject
144 <<
"Upgrading case by "
145 "converting transportProperties into phaseProperties, "
148 physicalProperties::typeName,
154 physicalProperties::typeName,
159 return phasePropertiesDict;
163 return phasePropertiesIO;
176 phase1Name_(
wordList(lookup(
"phases"))[0]),
177 phase2Name_(
wordList(lookup(
"phases"))[1]),
183 IOobject::groupName(
"alpha", phase1Name_),
196 IOobject::groupName(
"alpha", phase2Name_),
248 const scalar nSf(
mag(
n[own[facei]] & Sf[facei]));
249 A[own[facei]] += nSf*(ialphaf[facei] - ialpha[own[facei]]);
250 sumnSf[own[facei]] += nSf;
253 const scalar nSf(
mag(
n[nei[facei]] & Sf[facei]));
254 A[nei[facei]] += nSf*(ialphaf[facei] - ialpha[nei[facei]]);
255 sumnSf[nei[facei]] += nSf;
266 const scalar nSf(
mag(
n[own[facei]] & Sf[facei]));
267 A[own[facei]] += nSf*(palphaf[facei] - ialpha[own[facei]]);
268 sumnSf[own[facei]] += nSf;
275 if (sumnSf[i] > small)
277 a[i] = 2*
mag(a[i])/sumnSf[i];
static const Foam::dimensionedScalar A("A", Foam::dimPressure, 611.21)
#define forAll(list, i)
Loop across all elements in list.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &, const Field< Type > &)
Return a temporary field constructed from name, mesh,.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOdictionary(const IOobject &io, const word &wantedType)
Construct given an IOobject, supply wanted typeName.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
IOobject(const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true)
Construct from name, instance, registry, io options.
static word groupName(Name name, const word &group)
static const versionNumber currentVersion
Current version number.
Mesh data needed to do the Finite Volume discretisation.
const labelUList & owner() const
Internal face owner.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const surfaceVectorField & Sf() const
Return cell face area vectors.
const labelUList & neighbour() const
Internal face neighbour.
const polyMesh & mesh() const
Return reference to polyMesh.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
virtual bool read()
Read object.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Class to represent a mixture of two phases.
twoPhaseMixture(const fvMesh &mesh)
Construct from components.
virtual bool read()=0
Read base phaseProperties dictionary.
tmp< volScalarField::Internal > interfaceFraction() const
Interface fraction in a cell.
Templated form of IOobject providing type information for file reading and header type checking.
Calculate the gradient of the given field.
#define WarningInFunction
Report a warning using Foam::Warning.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
List< word > wordList
A List of words.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
const dimensionSet dimLength
dimensioned< scalar > mag(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.