• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ dimensionSet函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: fluidThermo

Foam::psiThermo::psiThermo(const fvMesh& mesh, const word& phaseName)
:
    fluidThermo(mesh, phaseName),

    psi_
    (
        IOobject
        (
            phasePropertyName("thermo:psi"),
            mesh.time().timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        mesh,
        dimensionSet(0, -2, 2, 0, 0)
    ),

    mu_
    (
        IOobject
        (
            phasePropertyName("thermo:mu"),
            mesh.time().timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        mesh,
        dimensionSet(1, -1, -1, 0, 0)
    )
{}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:32,代码来源:psiThermo.C


示例2: acceleration

void Foam::fv::tabulatedAccelerationSource::addSup
(
    const RhoFieldType& rho,
    fvMatrix<vector>& eqn,
    const label fieldi
)
{
    Vector<vector> acceleration(motion_.acceleration());

    // If gravitational force is present combine with the linear acceleration
    if (mesh_.foundObject<uniformDimensionedVectorField>("g"))
    {
        uniformDimensionedVectorField& g =
            mesh_.lookupObjectRef<uniformDimensionedVectorField>("g");

        const uniformDimensionedScalarField& hRef =
            mesh_.lookupObject<uniformDimensionedScalarField>("hRef");

        g = g0_ - dimensionedVector("a", dimAcceleration, acceleration.x());

        dimensionedScalar ghRef
        (
            mag(g.value()) > SMALL
          ? g & (cmptMag(g.value())/mag(g.value()))*hRef
          : dimensionedScalar("ghRef", g.dimensions()*dimLength, 0)
        );

        mesh_.lookupObjectRef<volScalarField>("gh") = (g & mesh_.C()) - ghRef;

        mesh_.lookupObjectRef<surfaceScalarField>("ghf") =
            (g & mesh_.Cf()) - ghRef;
    }
    // ... otherwise include explicitly in the momentum equation
    else
    {
        eqn -= rho*dimensionedVector("a", dimAcceleration, acceleration.x());
    }

    dimensionedVector Omega
    (
        "Omega",
        dimensionSet(0, 0, -1, 0, 0),
        acceleration.y()
    );

    dimensionedVector dOmegaDT
    (
        "dOmegaDT",
        dimensionSet(0, 0, -2, 0, 0),
        acceleration.z()
    );

    eqn -=
    (
        rho*(2*Omega ^ eqn.psi())         // Coriolis force
      + rho*(Omega ^ (Omega ^ mesh_.C())) // Centrifugal force
      + rho*(dOmegaDT ^ mesh_.C())        // Angular tabulatedAcceleration force
    );
}
开发者ID:petebachant,项目名称:OpenFOAM-dev,代码行数:59,代码来源:tabulatedAccelerationSourceTemplates.C


示例3: sqrt

tmp<fvScalarMatrix> kOmegaSSTSASnew<BasicTurbulenceModel>::Qsas
(
    const volScalarField& S2
) const
{
    volScalarField L
    (
        sqrt(this->k_)/(pow025(this->betaStar_)*this->omega_)
    );

    volScalarField Lvk
    (
        max
        (
            kappa_*sqrt(S2)
           /(
                mag(fvc::laplacian(this->U_))
              + dimensionedScalar
                (
                    "ROOTVSMALL",
                    dimensionSet(0, -1, -1, 0, 0),
                    ROOTVSMALL
                )
            ),
            Cs_*delta()
        )
    );

    return fvm::Su
    (
        this->alpha_*this->rho_
       *min
        (
            max
            (
                zeta2_*kappa_*S2*sqr(L/Lvk)
              - (2*C_/sigmaPhi_)*this->k_
               *max
                (
                    magSqr(fvc::grad(this->omega_))/sqr(this->omega_),
                    magSqr(fvc::grad(this->k_))/sqr(this->k_)
                ),
                dimensionedScalar("0", dimensionSet(0, 0, -2, 0, 0), 0)
            ),
            // Limit SAS production of omega for numerical stability,
            // particularly during start-up
            this->omega_/(0.1*this->omega_.time().deltaT())
        ),
        this->omega_
    );
}
开发者ID:Kiiree,项目名称:foam-dev,代码行数:51,代码来源:kOmegaSSTSASnew.C


示例4: phasePairKey

Foam::phasePair::phasePair
(
    const phaseModel& phase1,
    const phaseModel& phase2,
    const dimensionedVector& g,
    const scalarTable& sigmaTable,
    const bool ordered
)
:
    phasePairKey(phase1.name(), phase2.name(), ordered),
    phase1_(phase1),
    phase2_(phase2),
    g_(g),
    sigma_
    (
        "sigma",
        dimensionSet(1, 0, -2, 0, 0),
        sigmaTable
        [
            phasePairKey
            (
                phase1.name(),
                phase2.name(),
                false
            )
        ]
    )
{}
开发者ID:BarisCumhur,项目名称:OpenFOAM-dev,代码行数:28,代码来源:phasePair.C


示例5: dimensionedScalar

tmp<volScalarField> SpalartAllmarasIDDES::rd
(
    const volScalarField& visc,
    const volScalarField& S
) const
{
    return min
    (
        visc
       /(
           max
           (
               S,
               dimensionedScalar("SMALL", S.dimensions(), SMALL)
           )*sqr(kappa_*y_)
         + dimensionedScalar
           (
               "ROOTVSMALL",
               dimensionSet(0, 2 , -1, 0, 0),
               ROOTVSMALL
           )
       ),
       scalar(10)
    );
}
开发者ID:TsukasaHori,项目名称:openfoam-extend-foam-extend-3.1,代码行数:25,代码来源:SpalartAllmarasIDDES.C


示例6: multiphaseSurfaceForcesDict_

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: dimensionSet

tmp<volScalarField> Foam::voidFractionModel::voidFractionInterp() const
{
    tmp<volScalarField> tsource
    (
        new volScalarField
        (
            IOobject
            (
                "alpha_voidFractionModel",
                particleCloud_.mesh().time().timeName(),
                particleCloud_.mesh(),
                IOobject::NO_READ,
                IOobject::NO_WRITE
            ),
            particleCloud_.mesh(),
            dimensionedScalar
            (
                "zero",
                dimensionSet(0, 0, 0, 0, 0),
                0
            )
        )
    );

    scalar tsf = particleCloud_.dataExchangeM().timeStepFraction();
    if(1-tsf < 1e-4 && particleCloud_.dataExchangeM().couplingStep() > 1) //tsf==1
    {
        tsource() = voidfractionPrev_;
    }
    else
    {
        tsource() = (1 - tsf) * voidfractionPrev_ + tsf * voidfractionNext_;
    }
    return tsource;
}
开发者ID:MarkoRamius,项目名称:CFDEMcoupling-PUBLIC,代码行数:35,代码来源:voidFractionModel.C


示例8: dimensionSet

tmp<volScalarField> meshMotionModel::body() const
{
    tmp<volScalarField> tmp
    (
        new volScalarField
        (
            IOobject
            (
                "xxx",
                particleCloud_.mesh().time().timeName(),
                particleCloud_.mesh(),
                IOobject::NO_READ,
                IOobject::NO_WRITE
            ),
            particleCloud_.mesh(),
            dimensionedScalar
            (
                "zero",
                dimensionSet(0, 1, -1, 0, 0),
                0.
            )
        )
    );
    return tmp;
}
开发者ID:CFDEMproject,项目名称:CFDEMcoupling-PUBLIC,代码行数:25,代码来源:meshMotionModel.C


示例9: dev

tmp<volScalarField> realizableKE::rCmu
(
    const volTensorField& gradU,
    const volScalarField& S2,
    const volScalarField& magS
)
{
    tmp<volSymmTensorField> tS = dev(symm(gradU));
    const volSymmTensorField& S = tS();

    volScalarField W =
        (2*sqrt(2.0))*((S&S)&&S)
       /(
            magS*S2
          + dimensionedScalar("small", dimensionSet(0, 0, -3, 0, 0), SMALL)
        );

    tS.clear();

    volScalarField phis =
        (1.0/3.0)*acos(min(max(sqrt(6.0)*W, -scalar(1)), scalar(1)));
    volScalarField As = sqrt(6.0)*cos(phis);
    volScalarField Us = sqrt(S2/2.0 + magSqr(skew(gradU)));

    return 1.0/(A0_ + As*Us*k_/(epsilon_ + epsilonSmall_));
}
开发者ID:degirmen,项目名称:openfoam-extend-OpenFOAM-1.6-ext,代码行数:26,代码来源:realizableKE.C


示例10: dragModel

Foam::dragModels::Syamlal::Syamlal
(
    const dictionary& dict,
    const phasePair& pair,
    const bool registerObject
)
:
    dragModel(dict, pair, registerObject),
    C1_
    (
        dimensionedScalar::lookupOrDefault
        (
            "C1",
            dict,
            dimensionSet(0, -2, 1, 0, 0, 0, 0),
            0.3
        )
    ),
    kineticTheorySystem_
    (
        pair_.phase1().mesh().lookupObject<kineticTheorySystem>
        (
            "kineticTheorySystem"
        )
    )
{}
开发者ID:jheylmun,项目名称:OpenFOAM-dev,代码行数:26,代码来源:Syamlal.C


示例11: basicThermo

Foam::hThermo<MixtureType>::hThermo(const fvMesh& mesh)
:
    basicThermo(mesh),
    MixtureType(*this, mesh),

    h_
    (
        IOobject
        (
            "h",
            mesh.time().timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        mesh,
        dimensionSet(0, 2, -2, 0, 0),
        hBoundaryTypes()
    )
{
    scalarField& hCells = h_.internalField();
    const scalarField& TCells = T_.internalField();

    forAll(hCells, celli)
    {
        hCells[celli] = this->cellMixture(celli).H(TCells[celli]);
    }
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Core-OpenFOAM-1.5-dev,代码行数:27,代码来源:hThermo.C


示例12: dimensionSet

tmp<volScalarField> noCouple::impMomSource() const
{
    tmp<volScalarField> tsource
    (
        new volScalarField
        (
            IOobject
            (
                "Ksl_implicitCouple",
                particleCloud_.mesh().time().timeName(),
                particleCloud_.mesh(),
                IOobject::NO_READ,
                IOobject::NO_WRITE
            ),
            particleCloud_.mesh(),
            dimensionedScalar
            (
                "zero",
                dimensionSet(1, -3, -1, 0, 0), // N/m3 / m/s
                0
            )
        )
    );

    return tsource;
}
开发者ID:CFDEMproject,项目名称:CFDEMcoupling-PUBLIC,代码行数:26,代码来源:noCouple.C


示例13: hCombustionThermo

hhuCombustionThermo::hhuCombustionThermo(const fvMesh& mesh)
:
    hCombustionThermo(mesh),

    Tu_
    (
        IOobject
        (
            "Tu",
            mesh.time().timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    ),

    hu_
    (
        IOobject
        (
            "hu",
            mesh.time().timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        mesh,
        dimensionSet(0, 2, -2, 0, 0),
        huBoundaryTypes()
    )
{}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:32,代码来源:hhuCombustionThermo.C


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


示例15: dimensionSet

Foam::flameletModel::flameletModel
(
	volScalarField& rho
)
:
	ProdRateForSigma_
    (
        IOobject
        (
            "ProdRateForSigma",
            rho.mesh().time().timeName(),
            rho.mesh(),
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        rho.mesh(),
        dimensionSet(1, -3, -1, 0, 0)
    ),

    DestrRateForSigma_
    (
        IOobject
        (
            "DestrRateForSigma",
            rho.mesh().time().timeName(),
            rho.mesh(),
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        rho.mesh(),
        dimensionSet(1, -3, -1, 0, 0)
    ),

    I0_
    (
        IOobject
        (
            "I0",
            rho.mesh().time().timeName(),
            rho.mesh(),
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        rho.mesh(),
        dimensionSet(0, 0, 0, 0, 0)
    )
{}
开发者ID:aguerrehoracio,项目名称:CCIMEC,代码行数:47,代码来源:flameletModel.C


示例16: returnIntegralSourceField

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dimensionedVector momCoupleModel::returnIntegralSourceField() const
{
    FatalError<<"the solver calls for returnIntegralSourceField()\n"
              <<", please set 'momCoupleModel' to type 'explicitCouple' to access this data.\n"
              << abort(FatalError);

    return dimensionedVector("0", dimensionSet(1, 1, -2, 0, 0), vector::zero); // Newton
}
开发者ID:CFDEMproject,项目名称:CFDEMcoupling-PUBLIC,代码行数:9,代码来源:momCoupleModel.C


示例17: 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 )
        )
    )
{}
开发者ID:chnrdu,项目名称:idurun,代码行数:58,代码来源:XPP_SE.C


示例18: geometricOneField

void Foam::porosityZone::addResistance
(
    const fvVectorMatrix& UEqn,
    volTensorField& AU,
    bool correctAUprocBC
) const
{
    if (cellZoneID_ == -1)
    {
        return;
    }

    bool compressible = false;
    if (UEqn.dimensions() == dimensionSet(1, 1, -2, 0, 0))
    {
        compressible = true;
    }

    const labelList& cells = mesh_.cellZones()[cellZoneID_];
    const vectorField& U = UEqn.psi();

    const tensor& D = D_.value();
    const tensor& F = F_.value();

    if (magSqr(D) > VSMALL || magSqr(F) > VSMALL)
    {
        if (compressible)
        {
            addViscousInertialResistance
            (
                AU,
                cells,
                mesh_.lookupObject<volScalarField>("rho"),
                mesh_.lookupObject<volScalarField>("mu"),
                U
            );
        }
        else
        {
            addViscousInertialResistance
            (
                AU,
                cells,
                geometricOneField(),
                mesh_.lookupObject<volScalarField>("nu"),
                U
            );
        }
    }

    if (correctAUprocBC)
    {
        // Correct the boundary conditions of the tensorial diagonal to ensure
        // processor boundaries are correctly handled when AU^-1 is interpolated
        // for the pressure equation.
        AU.correctBoundaryConditions();
    }
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Breeder1.6-other-waves2Foam,代码行数:58,代码来源:porosityZone.C


示例19: oldPhi

void recalcPhiFunctionObject::recalc()
{
    Info << "Calculating flux field " << phiName_
        << " for velocity " << UName_ << endl;

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

    const volVectorField &U=mesh.lookupObject<volVectorField>(UName_);
    volScalarField &p=const_cast<volScalarField&>(
        mesh.lookupObject<volScalarField>(pName_)
    );
    surfaceScalarField &phi=const_cast<surfaceScalarField&>(
        mesh.lookupObject<surfaceScalarField>(phiName_)
    );

    if(writeOldFields_) {
        Info << "Writing copy of old " << phiName_ << endl;
        surfaceScalarField oldPhi(phiName_+".old",phi);
        oldPhi.write();
    }

    if(phi.dimensions()==dimensionSet(0,3,-1,0,0,0,0)) {
        phi = fvc::interpolate(U) & mesh.Sf();
    } else if(phi.dimensions()==dimensionSet(1,0,-1,0,0,0,0)) {
        if(rhoName_=="none") {
            // force read
            rhoName_=word(dict_.lookup("rhoName"));
        }
        const volScalarField &rho=mesh.lookupObject<volScalarField>(rhoName_);
        phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
     } else {
        FatalErrorIn("recalcPhiFunctionObject::calcPhi()")
            << "Can't deal with a flux field " << phiName_
                << " with dimensions " << phi.dimensions()
                << endl
                << exit(FatalError);

    }
    adjustPhi(phi, U, p);

    if(writeFields_) {
        Info << "Writing new value of " << phiName_ << endl;
        phi.write();
    }
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-swak4Foam-dev,代码行数:45,代码来源:recalcPhiFunctionObject.C


示例20: conductivityModel

Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair
(
    const dictionary& dict
)
:
    conductivityModel(dict),
    coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
    L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
{}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:9,代码来源:HrenyaSinclairConductivity.C



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ dimensionedScalar函数代码示例发布时间:2022-05-30
下一篇:
C++ dim3函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap