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


C++ dimensionSet函数代码示例

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


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


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