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


C++ volScalarField::mesh方法代码示例

本文整理汇总了C++中volScalarField::mesh方法的典型用法代码示例。如果您正苦于以下问题:C++ volScalarField::mesh方法的具体用法?C++ volScalarField::mesh怎么用?C++ volScalarField::mesh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在volScalarField的用法示例。


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

示例1: dimensionedScalar

Foam::tmp<Foam::volScalarField>
Foam::saturationModels::polynomial::Tsat
(
    const volScalarField& p
) const
{
    tmp<volScalarField> tTsat
    (
        new volScalarField
        (
            IOobject
            (
                "Tsat",
                p.mesh().time().timeName(),
                p.mesh(),
                IOobject::NO_READ,
                IOobject::NO_WRITE
            ),
            p.mesh(),
            dimensionedScalar("zero", dimTemperature, 0)
        )
    );

    volScalarField& Tsat = tTsat();

    forAll(Tsat,celli)
    {
        Tsat[celli] = C_.value(p[celli]);
    }
开发者ID:Kiiree,项目名称:OpenFOAM-dev,代码行数:29,代码来源:polynomial.C

示例2: dimensionedScalar

Foam::tmp<Foam::volScalarField> Foam::functionObjects::pressureTools::rho
(
    const volScalarField& p
) const
{
    if (p.dimensions() == dimPressure)
    {
        return p.mesh().lookupObject<volScalarField>(rhoName_);
    }
    else
    {
        return
            tmp<volScalarField>
            (
                new volScalarField
                (
                    IOobject
                    (
                        "rho",
                        p.mesh().time().timeName(),
                        p.mesh(),
                        IOobject::NO_READ,
                        IOobject::NO_WRITE
                    ),
                    p.mesh(),
                    dimensionedScalar("zero", dimDensity, rhoInf_)
                )
            );
    }
}
开发者ID:kcavatar,项目名称:OpenFOAM-dev,代码行数:30,代码来源:pressureTools.C

示例3: Sp

Foam::tmp<Foam::fvScalarMatrix>
Foam::populationBalanceSubModels::diffusionModels::noDiffusion
::momentDiff
(
    const volScalarField& moment
) const
{
    tmp<volScalarField> noDiff
    (
        new volScalarField
        (
            IOobject
            (
                "noDiff",
                moment.mesh().time().timeName(),
                moment.mesh(),
                IOobject::NO_READ,
                IOobject::NO_WRITE,
                false
            ),
            moment.mesh(),
            dimensionedScalar("zero", inv(dimTime), 0.0)
        )
    );

    return fvm::Sp(noDiff, moment);
}
开发者ID:dyj19901127,项目名称:OpenQBMM,代码行数:27,代码来源:noDiffusion.C

示例4: doCellCalculation

void lcFaceMaximumPluginFunction::doCellCalculation(volScalarField &field)
{
    const cellList &cl=field.mesh().cells();
    const surfaceScalarField &o=original_();

    forAll(field,cellI) {
        scalar maxVal=-1e30;

        const cell &c=cl[cellI];
        forAll(c,i) {
            const label faceI=c[i];
            if(faceI<field.mesh().nInternalFaces()) {
                maxVal=max(maxVal,o[faceI]);
            } else {
                label patchID=field.mesh().boundaryMesh().whichPatch(faceI);
                label startI=field.mesh().boundaryMesh()[patchID].start();
                maxVal=max(
                    maxVal,
                    o.boundaryField()[patchID][faceI-startI]
                );
            }
        }

        field[cellI]=maxVal;
    }
开发者ID:ahmmedshakil,项目名称:swak4foam,代码行数:25,代码来源:lcFaceMaximumPluginFunction.C

示例5: XiEqModel

Foam::XiEqModels::basicSubGrid::basicSubGrid
(
    const dictionary& XiEqProperties,
    const hhuCombustionThermo& thermo,
    const compressible::RASModel& turbulence,
    const volScalarField& Su
)
:
    XiEqModel(XiEqProperties, thermo, turbulence, Su),

    B_
    (
        IOobject
        (
            "B",
            Su.mesh().facesInstance(),
            Su.mesh(),
            IOobject::MUST_READ,
            IOobject::NO_WRITE
        ),
        Su.mesh()
    ),

    XiEqModel_(XiEqModel::New(XiEqModelCoeffs_, thermo, turbulence, Su))
{}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:25,代码来源:basicXiSubXiEq.C

示例6: dimensionedVector

virtualMassForce::virtualMassForce
(
    const dictionary& multiphaseSurfaceForcesDict,
    const multiphase::transport& mtm,
    const PtrList<volScalarField>& alpha,
    const volScalarField& beta
)
:
	multiphaseSurfaceForcesDict_(multiphaseSurfaceForcesDict),
    alpha_(alpha),
    beta_(beta),
    mtm_(mtm),
    virtualMassForce_
	(
		IOobject
		(
			"virtualMassForce",
			beta.time().timeName(),
			beta.mesh(),
			IOobject::NO_READ,
			IOobject::AUTO_WRITE
		),
        beta.mesh(),
        dimensionedVector("zero", dimensionSet(0, 0, 0, 0, 0), vector(0.0, 0.0, 0.0))
    )
{}
开发者ID:lrm29,项目名称:multiphaseSurfaceForces,代码行数:26,代码来源:virtualMassForce.C

示例7: dimensionedScalar

Foam::tmp<Foam::volScalarField> Foam::SrivastavaSundaresanFrictionalStress::muf
(
    const volScalarField& alpha,
    const volScalarField& Theta,
    const dimensionedScalar& alphaMinFriction,
    const dimensionedScalar& alphaMax,
    const volScalarField& pf,
    const volSymmTensorField& D,
    const dimensionedScalar& phi
) const
{
    const scalar I2Dsmall = 1.0e-35;

    //Creating muf assuming it should be 0 on the boundary which may not be
    // true
    tmp<volScalarField> tmuf
    (
       new volScalarField
       (
          IOobject
          (
             "muf",
             alpha.mesh().time().timeName(),
             alpha.mesh()
          ),
          alpha.mesh(),
          dimensionedScalar("muf", dimensionSet(1, -1, -1, 0, 0), 1e30)
       )
    );
    
    volScalarField& muff = tmuf();
   
      forAll (D, celli)
    {
        if (alpha[celli] >= alphaMinFriction.value())
        {
            muff[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
                );
        }
        if (alpha[celli] < alphaMinFriction.value())
        {
            muff[celli] = 0.0;
        }
    }

    muff.correctBoundaryConditions();

    return tmuf;
}
开发者ID:jpola,项目名称:twophaseeulersedfoam,代码行数:56,代码来源:SrivastavaSundaresanFrictionalStress.C

示例8: 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

示例9: dimensionedScalar

interfaceProperties::interfaceProperties
(
    const volScalarField& gamma,
    const volVectorField& U,
    const IOdictionary& dict
)
:
    transportPropertiesDict_(dict),
    cGamma_
    (
        readScalar
        (
            gamma.mesh().solutionDict().subDict("PISO").lookup("cGamma")
        )
    ),
    sigma_(dict.lookup("sigma")),

    deltaN_
    (
        "deltaN",
        1e-8/pow(average(gamma.mesh().V()), 1.0/3.0)
    ),

    gamma_(gamma),
    U_(U),

    nHatf_
    (
        IOobject
        (
            "nHatf",
            gamma_.time().timeName(),
            gamma_.mesh()
        ),
        gamma_.mesh(),
        dimensionedScalar("nHatf", dimArea, 0.0)
    ),

    K_
    (
        IOobject
        (
            "K",
            gamma_.time().timeName(),
            gamma_.mesh()
        ),
        gamma_.mesh(),
        dimensionedScalar("K", dimless/dimLength, 0.0)
    )
{
    calculateK();
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Core-OpenFOAM-1.5-dev,代码行数:52,代码来源:interfaceProperties.C

示例10: dimensionedScalar

Foam::tmp<Foam::volScalarField> Foam::SchaefferFrictionalStress::muf
(
    const volScalarField& alpha,
    const dimensionedScalar& alphaMax,
    const volScalarField& pf,
    const volTensorField& D,
    const dimensionedScalar& phi
) const
{
    const scalar I2Dsmall = 1.0e-15;

    // Creating muf assuming it should be 0 on the boundary which may not be
    // true
    tmp<volScalarField> tmuf
    (
        new volScalarField
        (
            IOobject
            (
                "muf",
                alpha.mesh().time().timeName(),
                alpha.mesh()
            ),
            alpha.mesh(),
            dimensionedScalar("muf", dimensionSet(1, -1, -1, 0, 0), 0.0)
        )
    );

    volScalarField& muff = tmuf();

    forAll (D, celli)
    {
        if (alpha[celli] > alphaMax.value()-5e-2)
        {
            muff[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
                );
        }
    }

    return tmuf;
}
开发者ID:frankl000,项目名称:OpenFOAM-1.7.x,代码行数:48,代码来源:SchaefferFrictionalStress.C

示例11:

Foam::tmp<Foam::volScalarField>
Foam::phaseEquationsOfState::adiabaticPerfectFluid::psi
(
    const volScalarField& p,
    const volScalarField& T
) const
{
    return tmp<Foam::volScalarField>
           (
               new volScalarField
               (
                   IOobject
                   (
                       "psi",
                       p.time().timeName(),
                       p.mesh(),
                       IOobject::NO_READ,
                       IOobject::NO_WRITE,
                       false
                   ),
                   (rho0_/(gamma_*(p0_ + B_)))
                   *pow((p + B_)/(p0_ + B_), 1.0/gamma_ - 1.0)
               )
           );
}
开发者ID:asayan17,项目名称:OpenFOAM-2.1.x,代码行数:25,代码来源:adiabaticPerfectFluid.C

示例12: dimensionSet

Foam::tmp<Foam::volScalarField> Foam::consumptionSpeed::omega0Sigma
(
    const volScalarField& sigma
)
{
    tmp<volScalarField> tomega0
    (
        new volScalarField
        (
            IOobject
            (
                "omega0",
                sigma.time().timeName(),
                sigma.db(),
                IOobject::NO_READ,
                IOobject::NO_WRITE
            ),
            sigma.mesh(),
            dimensionedScalar
            (
                "omega0",
                dimensionSet(1, -2, -1, 0, 0, 0, 0),
                0
            )
        )
    );

    volScalarField& omega0 = tomega0();

    volScalarField::InternalField& iomega0 = omega0.internalField();

    forAll(iomega0, celli)
    {
        iomega0[celli] = omega0Sigma(sigma[celli], 1.0);
    }
开发者ID:000861,项目名称:OpenFOAM-2.1.x,代码行数:35,代码来源:consumptionSpeed.C

示例13:

Foam::tmp<Foam::fvScalarMatrix>
Foam::diameterModels::IATEsources::phaseChange::R
(
    const volScalarField& alphai,
    volScalarField& kappai
) const
{
    if (!iDmdtPtr_)
    {
        iDmdtPtr_ = &alphai.mesh().lookupObject<volScalarField>
        (
            IOobject::groupName("iDmdt", pairName_)
        );
    }

    const volScalarField& iDmdt = *iDmdtPtr_;

    return -fvm::SuSp
    (
        (1.0/3.0)
       *iDmdt()
       /(alphai()*phase().rho()()),
        kappai
    );
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:25,代码来源:phaseChange.C

示例14: dimensionedScalar

Foam::tmp<Foam::volScalarField>
Foam::laminarModels::generalizedNewtonianViscosityModels::strainRateFunction::
nu
(
    const volScalarField& nu0,
    const volScalarField& strainRate
) const
{
    tmp<volScalarField> tnu
    (
        volScalarField::New
        (
            IOobject::groupName(type() + ":nu", nu0.group()),
            nu0.mesh(),
            dimensionedScalar(dimViscosity, 0)
        )
    );

    tnu.ref().primitiveFieldRef() = strainRateFunction_->value(strainRate);

    volScalarField::Boundary& nuBf = tnu.ref().boundaryFieldRef();
    const volScalarField::Boundary& sigmaBf = strainRate.boundaryField();

    forAll(nuBf, patchi)
    {
        nuBf[patchi] = strainRateFunction_->value(sigmaBf[patchi]);
    }
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:27,代码来源:strainRateFunction.C

示例15: dimensionedScalar

Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi
(
    const volScalarField& p,
    const volScalarField& Tu,
    scalar phi
) const
{
    tmp<volScalarField> tSu0
    (
        new volScalarField
        (
            IOobject
            (
                "Su0",
                p.time().timeName(),
                p.db(),
                IOobject::NO_READ,
                IOobject::NO_WRITE
            ),
            p.mesh(),
            dimensionedScalar("Su0", dimVelocity, 0.0)
        )
    );

    volScalarField& Su0 = tSu0();

    forAll(Su0, celli)
    {
        Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi, 0.0);
    }
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Core-OpenFOAM-1.5-dev,代码行数:30,代码来源:Gulders.C


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