mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -13,6 +13,14 @@ PtrList<volScalarField>& Y = composition.Y();
|
|||||||
|
|
||||||
word inertSpecie(thermo.lookup("inertSpecie"));
|
word inertSpecie(thermo.lookup("inertSpecie"));
|
||||||
|
|
||||||
|
if (!composition.contains(inertSpecie))
|
||||||
|
{
|
||||||
|
FatalErrorIn(args.executable())
|
||||||
|
<< "Specified inert specie '" << inertSpecie << "' not found in "
|
||||||
|
<< "species list. Available species:" << composition.species()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
@ -14,7 +14,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||||||
label inertIndex = -1;
|
label inertIndex = -1;
|
||||||
volScalarField Yt = 0.0*Y[0];
|
volScalarField Yt = 0.0*Y[0];
|
||||||
|
|
||||||
for (label i=0; i<Y.size(); i++)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
if (Y[i].name() != inertSpecie)
|
if (Y[i].name() != inertSpecie)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,6 +13,14 @@
|
|||||||
|
|
||||||
word inertSpecie(thermo.lookup("inertSpecie"));
|
word inertSpecie(thermo.lookup("inertSpecie"));
|
||||||
|
|
||||||
|
if (!composition.contains(inertSpecie))
|
||||||
|
{
|
||||||
|
FatalErrorIn(args.executable())
|
||||||
|
<< "Specified inert specie '" << inertSpecie << "' not found in "
|
||||||
|
<< "species list. Available species:" << composition.species()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
|
|||||||
@ -15,7 +15,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||||||
label inertIndex = -1;
|
label inertIndex = -1;
|
||||||
volScalarField Yt = 0.0*Y[0];
|
volScalarField Yt = 0.0*Y[0];
|
||||||
|
|
||||||
for (label i=0; i<Y.size(); i++)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
if (Y[i].name() != inertSpecie)
|
if (Y[i].name() != inertSpecie)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,6 +13,14 @@
|
|||||||
|
|
||||||
word inertSpecie(thermo.lookup("inertSpecie"));
|
word inertSpecie(thermo.lookup("inertSpecie"));
|
||||||
|
|
||||||
|
if (!composition.contains(inertSpecie))
|
||||||
|
{
|
||||||
|
FatalErrorIn(args.executable())
|
||||||
|
<< "Specified inert specie '" << inertSpecie << "' not found in "
|
||||||
|
<< "species list. Available species:" << composition.species()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
|
|||||||
@ -14,7 +14,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||||||
label inertIndex = -1;
|
label inertIndex = -1;
|
||||||
volScalarField Yt = 0.0*Y[0];
|
volScalarField Yt = 0.0*Y[0];
|
||||||
|
|
||||||
for (label i=0; i<Y.size(); i++)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
if (Y[i].name() != inertSpecie)
|
if (Y[i].name() != inertSpecie)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,6 +13,14 @@
|
|||||||
|
|
||||||
word inertSpecie(thermo.lookup("inertSpecie"));
|
word inertSpecie(thermo.lookup("inertSpecie"));
|
||||||
|
|
||||||
|
if (!composition.contains(inertSpecie))
|
||||||
|
{
|
||||||
|
FatalErrorIn(args.executable())
|
||||||
|
<< "Specified inert specie '" << inertSpecie << "' not found in "
|
||||||
|
<< "species list. Available species:" << composition.species()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& h = thermo.h();
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
|
|||||||
@ -121,7 +121,7 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Far field gas molar fractions
|
// Far field carrier molar fractions
|
||||||
scalarField Xinf(Y_.size());
|
scalarField Xinf(Y_.size());
|
||||||
|
|
||||||
forAll(Xinf, i)
|
forAll(Xinf, i)
|
||||||
@ -135,7 +135,7 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
|||||||
// Molar fraction of far field species at particle surface
|
// Molar fraction of far field species at particle surface
|
||||||
const scalar Xsff = 1.0 - min(sum(Cs)*specie::RR*this->T_/pc_, 1.0);
|
const scalar Xsff = 1.0 - min(sum(Cs)*specie::RR*this->T_/pc_, 1.0);
|
||||||
|
|
||||||
// Surface gas total molar concentration
|
// Surface carrier total molar concentration
|
||||||
const scalar CsTot = pc_/(specie::RR*this->T_);
|
const scalar CsTot = pc_/(specie::RR*this->T_);
|
||||||
|
|
||||||
// Surface carrier composition (molar fraction)
|
// Surface carrier composition (molar fraction)
|
||||||
@ -171,10 +171,10 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
|
|||||||
cbrt(td.cloud().mcCarrierThermo().speciesData()[i].W());
|
cbrt(td.cloud().mcCarrierThermo().speciesData()[i].W());
|
||||||
|
|
||||||
rhos += Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].W();
|
rhos += Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].W();
|
||||||
cps += Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].Cp(T);
|
|
||||||
mus += Ys[i]*sqrtW*td.cloud().mcCarrierThermo().speciesData()[i].mu(T);
|
mus += Ys[i]*sqrtW*td.cloud().mcCarrierThermo().speciesData()[i].mu(T);
|
||||||
kappa +=
|
kappa +=
|
||||||
Ys[i]*cbrtW*td.cloud().mcCarrierThermo().speciesData()[i].kappa(T);
|
Ys[i]*cbrtW*td.cloud().mcCarrierThermo().speciesData()[i].kappa(T);
|
||||||
|
cps += Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].Cp(T);
|
||||||
|
|
||||||
sumYiSqrtW += Ys[i]*sqrtW;
|
sumYiSqrtW += Ys[i]*sqrtW;
|
||||||
sumYiCbrtW += Ys[i]*cbrtW;
|
sumYiCbrtW += Ys[i]*cbrtW;
|
||||||
@ -417,7 +417,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
|
|||||||
const scalarField& YComponents,
|
const scalarField& YComponents,
|
||||||
scalarField& dMassPC,
|
scalarField& dMassPC,
|
||||||
scalar& Sh,
|
scalar& Sh,
|
||||||
scalar& dhsTrans,
|
scalar& dhsTrans, // TODO: not used
|
||||||
scalar& N,
|
scalar& N,
|
||||||
scalar& NCpW,
|
scalar& NCpW,
|
||||||
scalarField& Cs
|
scalarField& Cs
|
||||||
|
|||||||
@ -233,7 +233,7 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
|||||||
|
|
||||||
if (mag(htc) < ROOTVSMALL && !td.cloud().radiation())
|
if (mag(htc) < ROOTVSMALL && !td.cloud().radiation())
|
||||||
{
|
{
|
||||||
return T + dt*Sh/(this->volume(d)*rho*cp);
|
return max(T + dt*Sh/(this->volume(d)*rho*cp), td.constProps().TMin());
|
||||||
}
|
}
|
||||||
|
|
||||||
const scalar As = this->areaS(d);
|
const scalar As = this->areaS(d);
|
||||||
@ -256,9 +256,11 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
|||||||
IntegrationScheme<scalar>::integrationResult Tres =
|
IntegrationScheme<scalar>::integrationResult Tres =
|
||||||
td.cloud().TIntegrator().integrate(T, dt, ap, bp);
|
td.cloud().TIntegrator().integrate(T, dt, ap, bp);
|
||||||
|
|
||||||
dhsTrans += dt*htc*As*(Tres.average() - Tc_);
|
scalar Tnew = max(Tres.value(), td.constProps().TMin());
|
||||||
|
|
||||||
return Tres.value();
|
dhsTrans += dt*htc*As*(0.5*(T + Tnew) - Tc_);
|
||||||
|
|
||||||
|
return Tnew;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -71,15 +71,12 @@ bool Foam::Rebound<CloudType>::correct
|
|||||||
nw /= mag(nw);
|
nw /= mag(nw);
|
||||||
|
|
||||||
scalar Un = U & nw;
|
scalar Un = U & nw;
|
||||||
vector Ut = U - Un*nw;
|
|
||||||
|
|
||||||
if (Un > 0.0)
|
if (Un > 0.0)
|
||||||
{
|
{
|
||||||
U -= UFactor_*2.0*Un*nw;
|
U -= UFactor_*2.0*Un*nw;
|
||||||
}
|
}
|
||||||
|
|
||||||
U -= Ut;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,10 +7,10 @@ fieldMinMax/fieldMinMax.C
|
|||||||
fieldMinMax/fieldMinMaxFunctionObject.C
|
fieldMinMax/fieldMinMaxFunctionObject.C
|
||||||
|
|
||||||
fieldValues/fieldValue/fieldValue.C
|
fieldValues/fieldValue/fieldValue.C
|
||||||
fieldValues/face/faceSource.C
|
fieldValues/faceSource/faceSource.C
|
||||||
fieldValues/face/faceSourceFunctionObject.C
|
fieldValues/faceSource/faceSourceFunctionObject.C
|
||||||
fieldValues/cell/cellSource.C
|
fieldValues/cellSource/cellSource.C
|
||||||
fieldValues/cell/cellSourceFunctionObject.C
|
fieldValues/cellSource/cellSourceFunctionObject.C
|
||||||
|
|
||||||
streamLine/streamLine.C
|
streamLine/streamLine.C
|
||||||
streamLine/streamLineParticle.C
|
streamLine/streamLineParticle.C
|
||||||
|
|||||||
@ -50,10 +50,13 @@ namespace Foam
|
|||||||
fieldValues::faceSource::sourceTypeNames_;
|
fieldValues::faceSource::sourceTypeNames_;
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
const char* NamedEnum<fieldValues::faceSource::operationType, 4>::
|
const char* NamedEnum<fieldValues::faceSource::operationType, 5>::
|
||||||
names[] = {"none", "sum", "areaAverage", "areaIntegrate"};
|
names[] =
|
||||||
|
{
|
||||||
|
"none", "sum", "areaAverage", "areaIntegrate", "weightedAverage"
|
||||||
|
};
|
||||||
|
|
||||||
const NamedEnum<fieldValues::faceSource::operationType, 4>
|
const NamedEnum<fieldValues::faceSource::operationType, 5>
|
||||||
fieldValues::faceSource::operationTypeNames_;
|
fieldValues::faceSource::operationTypeNames_;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -68,7 +71,9 @@ void Foam::fieldValues::faceSource::setFaceZoneFaces()
|
|||||||
if (zoneId < 0)
|
if (zoneId < 0)
|
||||||
{
|
{
|
||||||
FatalErrorIn("faceSource::faceSource::setFaceZoneFaces()")
|
FatalErrorIn("faceSource::faceSource::setFaceZoneFaces()")
|
||||||
<< "Unknown face zone name: " << sourceName_
|
<< type() << " " << name_ << ": "
|
||||||
|
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl
|
||||||
|
<< " Unknown face zone name: " << sourceName_
|
||||||
<< ". Valid face zones are: " << mesh().faceZones().names()
|
<< ". Valid face zones are: " << mesh().faceZones().names()
|
||||||
<< nl << exit(FatalError);
|
<< nl << exit(FatalError);
|
||||||
}
|
}
|
||||||
@ -164,7 +169,9 @@ void Foam::fieldValues::faceSource::setPatchFaces()
|
|||||||
if (patchId < 0)
|
if (patchId < 0)
|
||||||
{
|
{
|
||||||
FatalErrorIn("faceSource::constructFaceAddressing()")
|
FatalErrorIn("faceSource::constructFaceAddressing()")
|
||||||
<< "Unknown patch name: " << sourceName_
|
<< type() << " " << name_ << ": "
|
||||||
|
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl
|
||||||
|
<< " Unknown patch name: " << sourceName_
|
||||||
<< ". Valid patch names are: "
|
<< ". Valid patch names are: "
|
||||||
<< mesh().boundaryMesh().names() << nl
|
<< mesh().boundaryMesh().names() << nl
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
@ -197,7 +204,7 @@ void Foam::fieldValues::faceSource::setPatchFaces()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::fieldValues::faceSource::initialise()
|
void Foam::fieldValues::faceSource::initialise(const dictionary& dict)
|
||||||
{
|
{
|
||||||
switch (source_)
|
switch (source_)
|
||||||
{
|
{
|
||||||
@ -214,15 +221,40 @@ void Foam::fieldValues::faceSource::initialise()
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
FatalErrorIn("faceSource::constructFaceAddressing()")
|
FatalErrorIn("faceSource::constructFaceAddressing()")
|
||||||
<< "Unknown source type. Valid source types are:"
|
<< type() << " " << name_ << ": "
|
||||||
|
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):"
|
||||||
|
<< nl << " Unknown source type. Valid source types are:"
|
||||||
<< sourceTypeNames_ << nl << exit(FatalError);
|
<< sourceTypeNames_ << nl << exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< type() << " " << name_ << ":" << nl
|
Info<< type() << " " << name_ << ":" << nl
|
||||||
<< " total faces = " << faceId_.size() << nl
|
<< " total faces = " << faceId_.size() << nl
|
||||||
<< " total area = " << sum(filterField(mesh().magSf()))
|
<< " total area = " << sum(filterField(mesh().magSf())) << nl;
|
||||||
<< nl << endl;
|
|
||||||
|
if (operation_ == opWeightedAverage)
|
||||||
|
{
|
||||||
|
dict.lookup("weightField") >> weightFieldName_;
|
||||||
|
if
|
||||||
|
(
|
||||||
|
obr().foundObject<volScalarField>(weightFieldName_)
|
||||||
|
|| obr().foundObject<surfaceScalarField>(weightFieldName_)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Info<< " weight field = " << weightFieldName_;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorIn("faceSource::constructFaceAddressing()")
|
||||||
|
<< type() << " " << name_ << ": "
|
||||||
|
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):"
|
||||||
|
<< nl << " Weight field " << weightFieldName_
|
||||||
|
<< " must be either a " << volScalarField::typeName << " or "
|
||||||
|
<< surfaceScalarField::typeName << nl << exit(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -302,12 +334,13 @@ Foam::fieldValues::faceSource::faceSource
|
|||||||
faceId_(),
|
faceId_(),
|
||||||
facePatchId_(),
|
facePatchId_(),
|
||||||
flipMap_(),
|
flipMap_(),
|
||||||
outputFilePtr_(NULL)
|
outputFilePtr_(NULL),
|
||||||
|
weightFieldName_("undefinedWeightedFieldName")
|
||||||
{
|
{
|
||||||
initialise();
|
|
||||||
|
|
||||||
if (active_)
|
if (active_)
|
||||||
{
|
{
|
||||||
|
initialise(dict);
|
||||||
|
|
||||||
// Create the output file if not already created
|
// Create the output file if not already created
|
||||||
makeFile();
|
makeFile();
|
||||||
}
|
}
|
||||||
@ -327,7 +360,7 @@ void Foam::fieldValues::faceSource::read(const dictionary& dict)
|
|||||||
if (active_)
|
if (active_)
|
||||||
{
|
{
|
||||||
fieldValue::read(dict);
|
fieldValue::read(dict);
|
||||||
initialise();
|
initialise(dict);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ Description
|
|||||||
valueOutput true; // Write values at run-time output times?
|
valueOutput true; // Write values at run-time output times?
|
||||||
source faceZone; // Type of face source: faceZone, patch
|
source faceZone; // Type of face source: faceZone, patch
|
||||||
sourceName f0;
|
sourceName f0;
|
||||||
operation sum; // none, sum, areaAverage, areaIntegrate
|
operation sum;
|
||||||
fields
|
fields
|
||||||
(
|
(
|
||||||
p
|
p
|
||||||
@ -48,6 +48,13 @@ Description
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
where operation is one of:
|
||||||
|
- none
|
||||||
|
- sum
|
||||||
|
- areaAverage
|
||||||
|
- areaIntegrate
|
||||||
|
- weightedAverage
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
faceSource.C
|
faceSource.C
|
||||||
|
|
||||||
@ -100,11 +107,12 @@ public:
|
|||||||
opNone,
|
opNone,
|
||||||
opSum,
|
opSum,
|
||||||
opAreaAverage,
|
opAreaAverage,
|
||||||
opAreaIntegrate
|
opAreaIntegrate,
|
||||||
|
opWeightedAverage
|
||||||
};
|
};
|
||||||
|
|
||||||
//- Operation type names
|
//- Operation type names
|
||||||
static const NamedEnum<operationType, 4> operationTypeNames_;
|
static const NamedEnum<operationType, 5> operationTypeNames_;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -143,11 +151,14 @@ protected:
|
|||||||
//- Output file pointer
|
//- Output file pointer
|
||||||
autoPtr<OFstream> outputFilePtr_;
|
autoPtr<OFstream> outputFilePtr_;
|
||||||
|
|
||||||
|
//- Weight field name - only used for opWeightedAverage mode
|
||||||
|
word weightFieldName_;
|
||||||
|
|
||||||
|
|
||||||
// Protected member functions
|
// Protected member functions
|
||||||
|
|
||||||
//- Initialise, e.g. face addressing
|
//- Initialise, e.g. face addressing
|
||||||
void initialise();
|
void initialise(const dictionary& dict);
|
||||||
|
|
||||||
//- Insert field values into values list
|
//- Insert field values into values list
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -129,6 +129,47 @@ Type Foam::fieldValues::faceSource::processValues
|
|||||||
result = sum(values*filterField(mesh().magSf()));
|
result = sum(values*filterField(mesh().magSf()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case opWeightedAverage:
|
||||||
|
{
|
||||||
|
if (mesh().foundObject<volScalarField>(weightFieldName_))
|
||||||
|
{
|
||||||
|
tmp<scalarField> wField =
|
||||||
|
filterField
|
||||||
|
(
|
||||||
|
mesh().lookupObject<volScalarField>(weightFieldName_)
|
||||||
|
);
|
||||||
|
result = sum(values*wField())/sum(wField());
|
||||||
|
}
|
||||||
|
else if (mesh().foundObject<surfaceScalarField>(weightFieldName_))
|
||||||
|
{
|
||||||
|
tmp<scalarField> wField =
|
||||||
|
filterField
|
||||||
|
(
|
||||||
|
mesh().lookupObject<surfaceScalarField>
|
||||||
|
(
|
||||||
|
weightFieldName_
|
||||||
|
)
|
||||||
|
);
|
||||||
|
result = sum(values*wField())/sum(wField());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"fieldValues::faceSource::processValues"
|
||||||
|
"("
|
||||||
|
"List<Type>&"
|
||||||
|
") const"
|
||||||
|
) << type() << " " << name_ << ": "
|
||||||
|
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):"
|
||||||
|
<< nl
|
||||||
|
<< " Weight field " << weightFieldName_
|
||||||
|
<< " must be either a " << volScalarField::typeName
|
||||||
|
<< " or " << surfaceScalarField::typeName << nl
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
// Do nothing
|
// Do nothing
|
||||||
@ -137,7 +137,7 @@ public:
|
|||||||
//- Return the output field values flag
|
//- Return the output field values flag
|
||||||
const Switch& valueOutput() const;
|
const Switch& valueOutput() const;
|
||||||
|
|
||||||
//- Helper funvction to return the reference to the mesh
|
//- Helper function to return the reference to the mesh
|
||||||
const fvMesh& mesh() const;
|
const fvMesh& mesh() const;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -63,10 +63,7 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
|||||||
cpPolynomial_(pt.cpPolynomial_),
|
cpPolynomial_(pt.cpPolynomial_),
|
||||||
dhPolynomial_(pt.dhPolynomial_),
|
dhPolynomial_(pt.dhPolynomial_),
|
||||||
dsPolynomial_(pt.dsPolynomial_)
|
dsPolynomial_(pt.dsPolynomial_)
|
||||||
{
|
{}
|
||||||
// Offset dh poly so that it is relative to the enthalpy at Tstd
|
|
||||||
dhPolynomial_[0] -= dhPolynomial_.evaluate(specie::Tstd);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -56,7 +56,7 @@ inline Foam::janafThermo<equationOfState>::janafThermo
|
|||||||
template<class equationOfState>
|
template<class equationOfState>
|
||||||
inline void Foam::janafThermo<equationOfState>::checkT(const scalar T) const
|
inline void Foam::janafThermo<equationOfState>::checkT(const scalar T) const
|
||||||
{
|
{
|
||||||
if (T < Tlow_ || T > Thigh_)
|
if (T < Tlow_ || T > Thigh_)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
|||||||
42
tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/U
Normal file
42
tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/U
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format binary;
|
||||||
|
class volVectorField;
|
||||||
|
location "0";
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform (0 0 0);
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
stationaryWalls
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
atmosphere
|
||||||
|
{
|
||||||
|
type pressureInletOutletVelocity;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
floatingObject
|
||||||
|
{
|
||||||
|
type movingWallVelocity;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object alpha1;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
stationaryWalls
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
atmosphere
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform 0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
floatingObject
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object epsilon;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -3 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0.1;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
stationaryWalls
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
Cmu 0.09;
|
||||||
|
kappa 0.41;
|
||||||
|
E 9.8;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
atmosphere
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform 0.1;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
floatingObject
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
Cmu 0.09;
|
||||||
|
kappa 0.41;
|
||||||
|
E 9.8;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
43
tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/k
Normal file
43
tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/k
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object k;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0.1;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
stationaryWalls
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
atmosphere
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform 0.1;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
floatingObject
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object nut;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
stationaryWalls
|
||||||
|
{
|
||||||
|
type nutkWallFunction;
|
||||||
|
Cmu 0.09;
|
||||||
|
kappa 0.41;
|
||||||
|
E 9.8;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
atmosphere
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
floatingObject
|
||||||
|
{
|
||||||
|
type nutkWallFunction;
|
||||||
|
Cmu 0.09;
|
||||||
|
kappa 0.41;
|
||||||
|
E 9.8;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
46
tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/p
Normal file
46
tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/p
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
object pd;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
stationaryWalls
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
atmosphere
|
||||||
|
{
|
||||||
|
type totalPressure;
|
||||||
|
p0 uniform 0;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho rho;
|
||||||
|
psi none;
|
||||||
|
gamma 1;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
floatingObject
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: 1.6 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class pointVectorField;
|
||||||
|
location "0.01";
|
||||||
|
object pointDisplacement;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 0 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform (0 0 0);
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
stationaryWalls
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
atmosphere
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
floatingObject
|
||||||
|
{
|
||||||
|
type sixDoFRigidBodyDisplacement;
|
||||||
|
centreOfMass (0.5 0.5 0.5);
|
||||||
|
momentOfInertia (0.08622222 0.8622222 0.144);
|
||||||
|
mass 9.6;
|
||||||
|
rhoInf 1;
|
||||||
|
Q (1 0 0 0 1 0 0 0 1);
|
||||||
|
v (0 0 0);
|
||||||
|
a (0 0 0);
|
||||||
|
pi (0 0 0);
|
||||||
|
tau (0 0 0);
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -20,7 +20,7 @@ makeMeshByCellSet()
|
|||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
makeMeshByCellSet 1 2
|
makeMeshByCellSet 1 2
|
||||||
runApplication subsetMesh -overwrite c0 -patch floatingObject
|
runApplication subsetMesh -overwrite c0 -patch floatingObject
|
||||||
cp -r 0.orig 0 > /dev/null 2>&1
|
cp -r 0.org 0 > /dev/null 2>&1
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user