当前位置: 首页>>代码示例>>C++>>正文


C++ dimensionedScalar函数代码示例

本文整理汇总了C++中dimensionedScalar函数的典型用法代码示例。如果您正苦于以下问题:C++ dimensionedScalar函数的具体用法?C++ dimensionedScalar怎么用?C++ dimensionedScalar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dimensionedScalar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: dimensionedScalar

Foam::tmp<Foam::volScalarField>
Foam::diameterModels::IATEsources::dummy::R() const
{
    return volScalarField::New
    (
        "R",
        iate_.phase().U().mesh(),
        dimensionedScalar(dimless/dimTime, 0)
    );
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:10,代码来源:dummy.C

示例2: ThermoType

void Foam::inhomogeneousMixture<ThermoType>::read(const dictionary& thermoDict)
{
    stoicRatio_ = dimensionedScalar
    (
        thermoDict.lookup("stoichiometricAirFuelMassRatio")
    );

    fuel_ = ThermoType(thermoDict.lookup("fuel"));
    oxidant_ = ThermoType(thermoDict.lookup("oxidant"));
    products_ = ThermoType(thermoDict.lookup("burntProducts"));
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:foam-extend-foam-extend-3.2,代码行数:11,代码来源:inhomogeneousMixture.C

示例3: name_

Foam::processorField::processorField
(
    const word& name,
    const objectRegistry& obr,
    const dictionary& dict,
    const bool loadFromFiles
)
:
    name_(name),
    obr_(obr),
    active_(true)
{
    // Check if the available mesh is an fvMesh otherise deactivate
    if (isA<fvMesh>(obr_))
    {
        read(dict);

        const fvMesh& mesh = refCast<const fvMesh>(obr_);

        volScalarField* procFieldPtr
        (
            new volScalarField
            (
                IOobject
                (
                    "processorID",
                    mesh.time().timeName(),
                    mesh,
                    IOobject::NO_READ,
                    IOobject::NO_WRITE
                ),
                mesh,
                dimensionedScalar("0", dimless, 0.0)
            )
        );

        mesh.objectRegistry::store(procFieldPtr);
    }
    else
    {
        active_ = false;
        WarningIn
        (
            "processorField::processorField"
            "("
                "const word&, "
                "const objectRegistry&, "
                "const dictionary&, "
                "const bool"
            ")"
        )   << "No fvMesh available, deactivating " << name_
            << endl;
    }
}
开发者ID:BijanZarif,项目名称:OpenFOAM-2.4.0-MNF,代码行数:54,代码来源:processorField.C

示例4: dimensionedScalar

Foam::tmp<Foam::volScalarField> Foam::JohnsonJacksonFrictionalStress::muf
(
    const volScalarField& alpha,
    const dimensionedScalar& alphaMax,
    const volScalarField& pf,
    const volSymmTensorField& D,
    const dimensionedScalar& phi
) const
{
    return dimensionedScalar("0.5", dimTime, 0.5)*pf*sin(phi);
}
开发者ID:themiwi,项目名称:freefoam-debian,代码行数:11,代码来源:JohnsonJacksonFrictionalStress.C

示例5: dimensionedVector

void Foam::CellAverageParticleVelocity<CloudType>::preEvolve()
{
    if (UpPtr_.valid())
    {
        UpPtr_->internalField() = vector::zero;
    }
    else
    {
        const fvMesh& mesh = this->owner().mesh();

        UpPtr_.reset
        (
            new volVectorField
            (
                IOobject
                (
                    this->owner().name() + "Up",
                    mesh.time().timeName(),
                    mesh,
                    IOobject::MUST_READ,
                    IOobject::AUTO_WRITE
                ),
                mesh,
                dimensionedVector("zeroVector", dimVelocity, vector::zero)
            )
        );
    }

    if (pVolPtr_.valid())
    {
        pVolPtr_->internalField() = scalar(0);
    }
    else
    {
        const fvMesh& mesh = this->owner().mesh();

        pVolPtr_.reset
        (
            new volScalarField
            (
                IOobject
                (
                    this->owner().name() + "pVol",
                    mesh.time().timeName(),
                    mesh,
                    IOobject::NO_READ,
                    IOobject::NO_WRITE
                ),
                mesh,
                dimensionedScalar("zeroVolume", dimVolume, scalar(0))
            )
        );
    }
}
开发者ID:Washino,项目名称:OpenFOAM-User-Dir,代码行数:54,代码来源:CellAverageParticleVelocity.C

示例6: dimensionedScalar

Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu
(
    const volScalarField& alpha1,
    const dimensionedScalar& alphaMax,
    const volScalarField& pf,
    const volSymmTensorField& D
) const
{
    const scalar I2Dsmall = 1.0e-15;

    // Creating nu assuming it should be 0 on the boundary which may not be
    // true
    tmp<volScalarField> tnu
    (
        new volScalarField
        (
            IOobject
            (
                "Schaeffer:nu",
                alpha1.mesh().time().timeName(),
                alpha1.mesh(),
                IOobject::NO_READ,
                IOobject::NO_WRITE,
                false
            ),
            alpha1.mesh(),
            dimensionedScalar("nu", dimensionSet(0, 2, -1, 0, 0), 0.0)
        )
    );

    volScalarField& nuf = tnu();

    forAll (D, celli)
    {
        if (alpha1[celli] > alphaMax.value() - 5e-2)
        {
            nuf[celli] =
                0.5*pf[celli]*sin(phi_.value())
               /(
                    sqrt(1.0/6.0*(sqr(D[celli].xx() - D[celli].yy())
                  + sqr(D[celli].yy() - D[celli].zz())
                  + sqr(D[celli].zz() - D[celli].xx()))
                  + sqr(D[celli].xy()) + sqr(D[celli].xz())
                  + sqr(D[celli].yz())) + I2Dsmall
                );
        }
    }

    // Correct coupled BCs
    nuf.correctBoundaryConditions();

    return tnu;
}
开发者ID:alexQch,项目名称:OpenFOAM-2.3.x,代码行数:54,代码来源:SchaefferFrictionalStress.C

示例7: dimensionedScalar

void Foam::processorField::execute()
{
    if (active_)
    {
        const volScalarField& procField =
            obr_.lookupObject<volScalarField>("processorID");

        const_cast<volScalarField&>(procField) ==
            dimensionedScalar("procI", dimless, Pstream::myProcNo());
    }
}
开发者ID:BijanZarif,项目名称:OpenFOAM-2.4.0-MNF,代码行数:11,代码来源:processorField.C

示例8: constant

//- Construct from objectRegistry arguments
Foam::engineTime::engineTime
(
    const word& name,
    const fileName& rootPath,
    const fileName& caseName,
    const fileName& systemName,
    const fileName& constantName,
    const fileName& dictName
)
:
    Time
    (
        name,
        rootPath,
        caseName,
        systemName,
        constantName
    ),
    dict_
    (
        IOobject
        (
            dictName,
            constant(),
            *this,
            IOobject::MUST_READ,
            IOobject::NO_WRITE,
            false
        )
    ),
    rpm_(dict_.lookup("rpm")),
    conRodLength_(dimensionedScalar("conRodLength", dimLength, 0)),
    bore_(dimensionedScalar("bore", dimLength, 0)),
    stroke_(dimensionedScalar("stroke", dimLength, 0)),
    clearance_(dimensionedScalar("clearance", dimLength, 0))
{
    // the geometric parameters are not strictly required for Time
    if (dict_.found("conRodLength"))
    {
        dict_.lookup("conRodLength") >> conRodLength_;
    }
开发者ID:Haider-BA,项目名称:foam-extend-3.0,代码行数:42,代码来源:engineTime.C

示例9: D

volScalarField dynamicKEqn<BasicTurbulenceModel>::Ce() const
{
    const volSymmTensorField D(dev(symm(fvc::grad(this->U_))));

    volScalarField KK
    (
        0.5*(filter_(magSqr(this->U_)) - magSqr(filter_(this->U_)))
    );
    KK.max(dimensionedScalar("small", KK.dimensions(), SMALL));

    return Ce(D, KK);
}
开发者ID:BarisCumhur,项目名称:OpenFOAM-dev,代码行数:12,代码来源:dynamicKEqn.C

示例10: dimensionedScalar

Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::nu
(
    const phaseModel& phase,
    const dimensionedScalar& alphaMinFriction,
    const dimensionedScalar& alphaMax,
    const volScalarField& pf,
    const volSymmTensorField& D
) const
{
    return dimensionedScalar("0.5", dimTime, 0.5)*pf*sin(phi_);
}
开发者ID:petebachant,项目名称:OpenFOAM-dev,代码行数:12,代码来源:JohnsonJacksonFrictionalStress.C

示例11: primaryMesh

tmp<volScalarField::Internal> kinematicSingleLayer::Srho
(
    const label i
) const
{
    return volScalarField::Internal::New
    (
        typeName + ":Srho(" + Foam::name(i) + ")",
        primaryMesh(),
        dimensionedScalar(dimMass/dimVolume/dimTime, 0)
    );
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:12,代码来源:kinematicSingleLayer.C

示例12: transferPrimaryRegionThermoFields

void kinematicSingleLayer::preEvolveRegion()
{
    if (debug)
    {
        InfoInFunction << endl;
    }

    surfaceFilmRegionModel::preEvolveRegion();

    transferPrimaryRegionThermoFields();

    correctThermoFields();

    transferPrimaryRegionSourceFields();

    // Reset transfer fields
    availableMass_ = mass();
    cloudMassTrans_ == dimensionedScalar(dimMass, 0);
    cloudDiameterTrans_ == dimensionedScalar(dimLength, 0);
    primaryMassTrans_ == dimensionedScalar(dimMass, 0);
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:21,代码来源:kinematicSingleLayer.C

示例13: filmRadiationModel

standardRadiation::standardRadiation
(
    const surfaceFilmModel& owner,
    const dictionary& dict
)
    :
    filmRadiationModel(typeName, owner, dict),
    QrPrimary_
    (
       IOobject
       (
           "Qr", // same name as Qr on primary region to enable mapping
           owner.time().timeName(),
           owner.regionMesh(),
           IOobject::NO_READ,
           IOobject::NO_WRITE
       ),
       owner.regionMesh(),
       dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
       owner.mappedPushedFieldPatchTypes<scalar>()
    ),
    QrNet_
    (
       IOobject
       (
           "QrNet",
           owner.time().timeName(),
           owner.regionMesh(),
           IOobject::NO_READ,
           IOobject::NO_WRITE
       ),
       owner.regionMesh(),
       dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0),
       zeroGradientFvPatchScalarField::typeName
    ),
    delta_(owner.delta()),
    deltaMin_(readScalar(coeffs_.lookup("deltaMin"))),
    beta_(readScalar(coeffs_.lookup("beta"))),
    kappaBar_(readScalar(coeffs_.lookup("kappaBar")))
{}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:40,代码来源:standardRadiation.C

示例14: dimensionedScalar

void Foam::LESModels::IDDESDelta::calcDelta()
{
    const volScalarField& hmax = hmax_;
    const fvMesh& mesh = turbulenceModel_.mesh();

    // Wall-normal vectors
    const volVectorField& n = wallDist::New(mesh).n();

    tmp<volScalarField> tfaceToFacenMax
    (
        new volScalarField
        (
            IOobject
            (
                "faceToFaceMax",
                mesh.time().timeName(),
                mesh,
                IOobject::NO_READ,
                IOobject::NO_WRITE
            ),
            mesh,
            dimensionedScalar("zero", dimLength, 0.0)
        )
    );

    scalarField& faceToFacenMax = tfaceToFacenMax.ref().primitiveFieldRef();

    const cellList& cells = mesh.cells();
    const vectorField& faceCentres = mesh.faceCentres();

    forAll(cells, celli)
    {
        scalar maxDelta = 0.0;
        const labelList& cFaces = cells[celli];
        const vector nci = n[celli];

        forAll(cFaces, cFacei)
        {
            label facei = cFaces[cFacei];
            const point& fci = faceCentres[facei];

            forAll(cFaces, cFacej)
            {
                label facej = cFaces[cFacej];
                const point& fcj = faceCentres[facej];
                scalar ndfc = nci & (fcj - fci);

                if (ndfc > maxDelta)
                {
                    maxDelta = ndfc;
                }
            }
开发者ID:petebachant,项目名称:OpenFOAM-dev,代码行数:52,代码来源:IDDESDelta.C

示例15:

Foam::tmp<Foam::volScalarField> Foam::radiationModels::noRadiation::Rp() const
{
    return volScalarField::New
    (
        "Rp",
        mesh_,
        dimensionedScalar
        (
            constant::physicoChemical::sigma.dimensions()/dimLength,
            0
        )
    );
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:13,代码来源:noRadiation.C


注:本文中的dimensionedScalar函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。