本文整理汇总了C++中volVectorField::time方法的典型用法代码示例。如果您正苦于以下问题:C++ volVectorField::time方法的具体用法?C++ volVectorField::time怎么用?C++ volVectorField::time使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类volVectorField
的用法示例。
在下文中一共展示了volVectorField::time方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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"));
}
}
示例4: viscoelasticLaw
Foam::WhiteMetznerCross::WhiteMetznerCross
(
const word& name,
const volVectorField& U,
const surfaceScalarField& phi,
const dictionary& dict
)
:
viscoelasticLaw(name, U, phi),
tau_
(
IOobject
(
"tau" + name,
U.time().timeName(),
U.mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
U.mesh()
),
rho_(dict.lookup("rho")),
etaS_(dict.lookup("etaS")),
etaP_(dict.lookup("etaP")),
lambda_(dict.lookup("lambda")),
K_(dict.lookup("K")),
L_(dict.lookup("L")),
m_(dict.lookup("m")),
n_(dict.lookup("n"))
{}
示例5: viscoelasticLaw
// from components
FENE_P::FENE_P
(
const word& name,
const volScalarField& alpha,
const volVectorField& U,
const surfaceScalarField& phi,
const dictionary& dict
)
:
viscoelasticLaw(name, alpha, U, phi),
tau_
(
IOobject
(
"tau" + name,
U.time().timeName(),
U.mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
U.mesh()
),
etaS1_(dict.subDict("phase1").lookup("etaS")),
etaS2_(dict.subDict("phase2").lookup("etaS")),
etaP1_(dict.subDict("phase1").lookup("etaP")),
etaP2_(dict.subDict("phase2").lookup("etaP")),
lambda1_(dict.subDict("phase1").lookup("lambda")),
lambda2_(dict.subDict("phase2").lookup("lambda")),
Lquad1_(dict.subDict("phase1").lookup("Lquad")),
Lquad2_(dict.subDict("phase2").lookup("Lquad"))
{}
示例6: twoPhaseMixture
// from components
Giesekus_Cross::Giesekus_Cross
(
const word& name,
const volScalarField& alpha,
const volVectorField& U,
const surfaceScalarField& phi,
const dictionary& dict
)
:
twoPhaseMixture(U, phi, "alpha"),
viscoelasticLaw(name, alpha, U, phi),
tau_
(
IOobject
(
"tau" + name,
U.time().timeName(),
U.mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
U.mesh()
),
etaS1_(dict.subDict("phase1").lookup("etaS")),
etaS2_(dict.subDict("phase2").lookup("etaS")),
etaP1_(dict.subDict("phase1").lookup("etaP")),
etaP2_(dict.subDict("phase2").lookup("etaP")),
lambda1_(dict.subDict("phase1").lookup("lambda")),
lambda2_(dict.subDict("phase2").lookup("lambda")),
alpha1_(dict.subDict("phase1").lookup("alpha")),
alpha2_(dict.subDict("phase2").lookup("alpha"))
{}
示例7: viscoelasticLaw
Foam::FENE_P::FENE_P
(
const word& name,
const volVectorField& U,
const surfaceScalarField& phi,
const dictionary& dict
)
:
viscoelasticLaw(name, U, phi),
tau_
(
IOobject
(
"tau" + name,
U.time().timeName(),
U.mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
U.mesh()
),
rho_(dict.lookup("rho")),
etaS_(dict.lookup("etaS")),
etaP_(dict.lookup("etaP")),
L2_(dict.lookup("L2")),
lambda_(dict.lookup("lambda"))
{}
示例8: viscoelasticLaw
Foam::EPTT::EPTT
(
const word& name,
const volScalarField& alpha,
const volScalarField& rho,
const volVectorField& U,
const surfaceScalarField& phi,
const dictionary& dict
)
:
viscoelasticLaw(name, alpha, rho, U, phi),
tau_
(
IOobject
(
"tau" + name,
U.time().timeName(),
U.mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
U.mesh()
),
etaS1_(dict.subDict("phase1").lookup("etaS")),
etaS2_(dict.subDict("phase2").lookup("etaS")),
etaP1_(dict.subDict("phase1").lookup("etaP")),
etaP2_(dict.subDict("phase2").lookup("etaP")),
lambda1_(dict.subDict("phase1").lookup("lambda")),
lambda2_(dict.subDict("phase2").lookup("lambda")),
epsilon1_(dict.subDict("phase1").lookup("epsilon")),
epsilon2_(dict.subDict("phase2").lookup("epsilon")),
zeta1_(dict.subDict("phase1").lookup("zeta")),
zeta2_(dict.subDict("phase2").lookup("zeta"))
{}
示例9: 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)
);
}
示例10: viscoelasticLaw
XPP_SE::XPP_SE
(
const word& name,
const volScalarField& alpha,
const volVectorField& U,
const surfaceScalarField& phi,
const dictionary& dict
)
:
viscoelasticLaw(name, alpha, U, phi),
tau_
(
IOobject
(
"tau" + name,
U.time().timeName(),
U.mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
U.mesh()
),
I_
(
dimensionedSymmTensor
(
"I",
dimensionSet(0, 0, 0, 0, 0, 0, 0),
symmTensor
(
1, 0, 0,
1, 0,
1
)
)
),
etaS1_(dict.subDict("phase1").lookup("etaS")),
etaS2_(dict.subDict("phase2").lookup("etaS")),
etaP1_(dict.subDict("phase1").lookup("etaP")),
etaP2_(dict.subDict("phase2").lookup("etaP")),
alpha1_(dict.subDict("phase1").lookup("alpha")),
alpha2_(dict.subDict("phase2").lookup("alpha")),
lambdaOb1_(dict.subDict("phase1").lookup("lambdaOb")),
lambdaOb2_(dict.subDict("phase2").lookup("lambdaOb")),
lambdaOs1_(dict.subDict("phase1").lookup("lambdaOs")),
lambdaOs2_(dict.subDict("phase2").lookup("lambdaOs")),
q1_(dict.subDict("phase1").lookup("q")),
q2_(dict.subDict("phase2").lookup("q")),
pt_
(
dimensionedScalar
(
"zero",
lambdaOb1_.dimensions(),
scalar( SMALL )
)
)
{}
示例11: 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)
);
}
示例12: 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)
);
}
示例13: 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
示例14: viscoelasticLaw
Foam::S_MDCPP::S_MDCPP
(
const word& name,
const volVectorField& U,
const surfaceScalarField& phi,
const dictionary& dict
)
:
viscoelasticLaw(name, U, phi),
tau_
(
IOobject
(
"tau" + name,
U.time().timeName(),
U.mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
U.mesh()
),
I_
(
dimensionedSymmTensor
(
"I",
dimensionSet(0, 0, 0, 0, 0, 0, 0),
symmTensor
(
1, 0, 0,
1, 0,
1
)
)
),
rho_(dict.lookup("rho")),
etaS_(dict.lookup("etaS")),
etaP_(dict.lookup("etaP")),
zeta_(dict.lookup("zeta")),
lambdaOb_(dict.lookup("lambdaOb")),
lambdaOs_(dict.lookup("lambdaOs")),
q_(dict.lookup("q"))
{}
示例15: 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));
}