本文整理汇总了C++中volVectorField::db方法的典型用法代码示例。如果您正苦于以下问题:C++ volVectorField::db方法的具体用法?C++ volVectorField::db怎么用?C++ volVectorField::db使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类volVectorField
的用法示例。
在下文中一共展示了volVectorField::db方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
Foam::turbulenceModel::turbulenceModel
(
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const word& propertiesName
)
:
IOdictionary
(
IOobject
(
IOobject::groupName(propertiesName, U.group()),
U.time().constant(),
U.db(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
),
runTime_(U.time()),
mesh_(U.mesh()),
U_(U),
alphaRhoPhi_(alphaRhoPhi),
phi_(phi),
y_(mesh_)
{}
示例2:
turbulenceModel::turbulenceModel
(
const volVectorField& U,
const surfaceScalarField& phi,
transportModel& transport,
const word& turbulenceModelName
)
:
regIOobject
(
IOobject
(
turbulenceModelName,
U.time().constant(),
U.db(),
IOobject::NO_READ,
IOobject::NO_WRITE
)
),
runTime_(U.time()),
mesh_(U.mesh()),
U_(U),
phi_(phi),
transportModel_(transport),
y_(mesh_)
{}
示例3: exit
Foam::autoPtr
<
Foam::TurbulenceModel<Alpha, Rho, BasicTurbulenceModel, TransportModel>
>
Foam::TurbulenceModel<Alpha, Rho, BasicTurbulenceModel, TransportModel>::New
(
const alphaField& alpha,
const rhoField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const transportModel& transport,
const word& propertiesName
)
{
// get model name, but do not register the dictionary
// otherwise it is registered in the database twice
const word modelType
(
IOdictionary
(
IOobject
(
IOobject::groupName(propertiesName, U.group()),
U.time().constant(),
U.db(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).lookup("simulationType")
);
Info<< "Selecting turbulence model type " << modelType << endl;
typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"TurbulenceModel::New"
"(const alphaField&, const rhoField&, "
"const volVectorField&, const surfaceScalarField&, "
"transportModel&, const word&)"
) << "Unknown TurbulenceModel type "
<< modelType << nl << nl
<< "Valid TurbulenceModel types:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<TurbulenceModel>
(
cstrIter()(alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName)
);
}
示例4: exit
autoPtr<LESModel> LESModel::New
(
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel,
const word& turbulenceModelName
)
{
// get model name, but do not register the dictionary
// otherwise it is registered in the database twice
const word modelType
(
IOdictionary
(
IOobject
(
"LESProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).lookup("LESModel")
);
Info<< "Selecting LES turbulence model " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"LESModel::New"
"("
"const volScalarField&, "
"const volVectorField&, "
"const surfaceScalarField&, "
"const basicThermo&, "
"const word&"
")"
) << "Unknown LESModel type "
<< modelType << nl << nl
<< "Valid LESModel types:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<LESModel>
(
cstrIter()(rho, U, phi, thermoPhysicalModel, turbulenceModelName)
);
}
示例5: injection
// Construct from components
IncompressibleCloud::IncompressibleCloud(
const volPointInterpolation& vpi,
const volVectorField& U
)
:
Cloud<HardBallParticle>(U.mesh()),
runTime_(U.time()),
time0_(runTime_.value()),
mesh_(U.mesh()),
volPointInterpolation_(vpi),
U_(U),
smoment_(mesh_.nCells(), vector::zero),
random(666),
cloudProperties_
(
IOobject
(
"cloudProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE
)
),
interpolationSchemes_(cloudProperties_.subDict("interpolationSchemes"))
{
g_=cloudProperties_.lookup("g");
HardBallParticle::density=readScalar(cloudProperties_.lookup("density"));
dragCoefficient_=readScalar(cloudProperties_.lookup("drag"));
subCycles_=readScalar(cloudProperties_.lookup("subCycles"));
useSourceMoment=readBool(cloudProperties_.lookup("useMomentumSource"));
dictionary injection(cloudProperties_.subDict("injection"));
thres=readScalar(injection.lookup("thres"));
center=injection.lookup("center");
r0=readScalar(injection.lookup("r0"));
vel0=readScalar(injection.lookup("vel0"));
vel1=injection.lookup("vel1");
d0=readScalar(injection.lookup("d0"));
d1=readScalar(injection.lookup("d1"));
tStart=readScalar(injection.lookup("tStart"));
tEnd=readScalar(injection.lookup("tEnd"));
dictionary wall(cloudProperties_.subDict("wall"));
wallReflect_=readBool(wall.lookup("reflect"));
if(wallReflect_) {
wallElasticity_=readScalar(wall.lookup("elasticity"));
}
}
示例6: exit
autoPtr<turbulenceModel> turbulenceModel::New
(
const volVectorField& U,
const surfaceScalarField& phi,
transportModel& transport,
const word& turbulenceModelName
)
{
// get model name, but do not register the dictionary
// otherwise it is registered in the database twice
const word modelType
(
IOdictionary
(
IOobject
(
"turbulenceProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).lookup("simulationType")
);
Info<< "Selecting turbulence model type " << modelType << endl;
turbulenceModelConstructorTable::iterator cstrIter =
turbulenceModelConstructorTablePtr_->find(modelType);
if (cstrIter == turbulenceModelConstructorTablePtr_->end())
{
FatalErrorIn
(
"turbulenceModel::New(const volVectorField&, "
"const surfaceScalarField&, transportModel&, const word&)"
) << "Unknown turbulenceModel type "
<< modelType << nl << nl
<< "Valid turbulenceModel types:" << endl
<< turbulenceModelConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<turbulenceModel>
(
cstrIter()(U, phi, transport, turbulenceModelName)
);
}
示例7: exit
Foam::autoPtr<Foam::phaseChangeTwoPhaseMixture>
Foam::phaseChangeTwoPhaseMixture::New
(
const volVectorField& U,
const surfaceScalarField& phi,
const word& alpha1Name
)
{
IOdictionary transportPropertiesDict
(
IOobject
(
"transportProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
);
word phaseChangeTwoPhaseMixtureTypeName
(
transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture")
);
Info<< "Selecting phaseChange model "
<< phaseChangeTwoPhaseMixtureTypeName << endl;
componentsConstructorTable::iterator cstrIter =
componentsConstructorTablePtr_
->find(phaseChangeTwoPhaseMixtureTypeName);
if (cstrIter == componentsConstructorTablePtr_->end())
{
FatalErrorIn
(
"phaseChangeTwoPhaseMixture::New"
) << "Unknown phaseChangeTwoPhaseMixture type "
<< phaseChangeTwoPhaseMixtureTypeName << endl << endl
<< "Valid phaseChangeTwoPhaseMixtures are : " << endl
<< componentsConstructorTablePtr_->toc()
<< exit(FatalError);
}
return autoPtr<phaseChangeTwoPhaseMixture>(cstrIter()(U, phi, alpha1Name));
}
开发者ID:GoldenMan123,项目名称:openfoam-extend-foam-extend-3.1,代码行数:47,代码来源:newPhaseChangeTwoPhaseMixture.C
示例8: exit
Foam::autoPtr<Foam::SRF::SRFModel> Foam::SRF::SRFModel::New
(
const volVectorField& Urel
)
{
// get model name, but do not register the dictionary
// otherwise it is registered in the database twice
const word modelType
(
IOdictionary
(
IOobject
(
"SRFProperties",
Urel.time().constant(),
Urel.db(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).lookup("SRFModel")
);
Info<< "Selecting SRFModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"SRFModel::New(const fvMesh&)"
) << "Unknown SRFModel type "
<< modelType << nl << nl
<< "Valid SRFModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<SRFModel>(cstrIter()(Urel));
}
示例9: subDict
viscoelasticModel::viscoelasticModel
(
const volScalarField& alpha,
const volVectorField& U,
const surfaceScalarField& phi
)
:
IOdictionary
(
IOobject
(
"viscoelasticProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE
)
),
lawPtr_(viscoelasticLaw::New(word::null, alpha, U, phi, subDict("rheology")))
{}
示例10: exit
Foam::autoPtr<Foam::laminarModel<BasicTurbulenceModel>>
Foam::laminarModel<BasicTurbulenceModel>::New
(
const alphaField& alpha,
const rhoField& rho,
const volVectorField& U,
const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi,
const transportModel& transport,
const word& propertiesName
)
{
IOdictionary modelDict
(
IOobject
(
IOobject::groupName(propertiesName, U.group()),
U.time().constant(),
U.db(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
);
if (modelDict.found("laminar"))
{
// get model name, but do not register the dictionary
// otherwise it is registered in the database twice
const word modelType
(
modelDict.subDict("laminar").lookup("laminarModel")
);
Info<< "Selecting laminar stress model " << modelType << endl;
typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorInFunction
<< "Unknown laminarModel type "
<< modelType << nl << nl
<< "Valid laminarModel types:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<laminarModel>
(
cstrIter()
(
alpha,
rho,
U,
alphaRhoPhi,
phi,
transport, propertiesName)
);
}
else
{
Info<< "Selecting laminar stress model "
<< laminarModels::Stokes<BasicTurbulenceModel>::typeName << endl;
return autoPtr<laminarModel>
(
new laminarModels::Stokes<BasicTurbulenceModel>
(
alpha,
rho,
U,
alphaRhoPhi,
phi,
transport,
propertiesName
)
);
}
}
示例11: readScalar
// Construct from components
Foam::spray::spray
(
const volVectorField& U,
const volScalarField& rho,
const volScalarField& p,
const volScalarField& T,
const basicMultiComponentMixture& composition,
const PtrList<gasThermoPhysics>& gasProperties,
const dictionary&,
const dimensionedVector& g,
bool readFields
)
:
Cloud<parcel>(U.mesh(), false), // suppress className checking on positions
runTime_(U.time()),
time0_(runTime_.value()),
mesh_(U.mesh()),
rndGen_(label(0)),
g_(g.value()),
U_(U),
rho_(rho),
p_(p),
T_(T),
sprayProperties_
(
IOobject
(
"sprayProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE
)
),
ambientPressure_(p_.average().value()),
ambientTemperature_(T_.average().value()),
injectors_
(
IOobject
(
"injectorProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ,
IOobject::NO_WRITE
),
injector::iNew(U.time())
),
atomization_
(
atomizationModel::New
(
sprayProperties_,
*this
)
),
drag_
(
dragModel::New
(
sprayProperties_
)
),
evaporation_
(
evaporationModel::New
(
sprayProperties_
)
),
heatTransfer_
(
heatTransferModel::New
(
sprayProperties_
)
),
wall_
(
wallModel::New
(
sprayProperties_,
U,
*this
)
),
breakupModel_
(
breakupModel::New
(
sprayProperties_,
*this
)
),
collisionModel_
//.........这里部分代码省略.........