tmp<fvVectorMatrix> GenEddyVisc::divDevBeff(volVectorField& U) const { return ( - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); }
tmp<fvVectorMatrix> GenSGSStress::divDevBeff ( volVectorField& U ) const { if (couplingFactor_.value() > 0.0) { return ( fvc::div(B_ + couplingFactor_*nuSgs_*fvc::grad(U)) + fvc::laplacian ( (1.0 - couplingFactor_)*nuSgs_, U, "laplacian(nuEff,U)" ) - fvm::laplacian(nuEff(), U) ); } else { return ( fvc::div(B_) + fvc::laplacian(nuSgs_, U, "laplacian(nuEff,U)") - fvm::laplacian(nuEff(), U) ); } }
tmp<fvVectorMatrix> kEpsilon::divDevReff(volVectorField& U) const { return ( - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(fvc::grad(U)().T())) ); }
tmp<fvVectorMatrix> realizableKE_Veh::divDevReff(volVectorField& U) const { return ( - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); }
tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const { return ( - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); }
tmp<fvVectorMatrix> LienCubicKE::divDevReff(volVectorField& U) const { return ( fvc::div(nonlinearStress_) - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(T(fvc::grad(U)))) ); }
bool Foam::functionObjects::PecletNo::calc() { if (foundObject<surfaceScalarField>(fieldName_)) { tmp<volScalarField> nuEff ( mesh_.lookupObject<turbulenceModel> ( turbulenceModel::propertiesName ).nuEff() ); const surfaceScalarField& phi = mesh_.lookupObject<surfaceScalarField>(fieldName_); return store ( resultName_, mag(phi) /( mesh_.magSf() *mesh_.surfaceInterpolation::deltaCoeffs() *fvc::interpolate(nuEff) ) ); } else { return false; } }
void Foam::fixedShearStressFvPatchVectorField::updateCoeffs() { if (updated()) { return; } const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> ( IOobject::groupName ( turbulenceModel::propertiesName, dimensionedInternalField().group() ) ); scalarField nuEff(turbModel.nuEff()()[patch().index()]); const vectorField Uc(patchInternalField()); vector tauHat = tau0_/(mag(tau0_) + ROOTVSMALL); const scalarField& ry = patch().deltaCoeffs(); operator==(tauHat*(tauHat & (tau0_*(1.0/(ry*nuEff)) + Uc))); fixedValueFvPatchVectorField::updateCoeffs(); }
tmp<fvVectorMatrix> Smagorinsky2::divDevBeff ( volVectorField& U ) const { volTensorField gradU = fvc::grad(U); volSymmTensorField aniNuEff ( "aniNuEff", I*nuEff() + cD2_*delta()*symm(gradU) ); return ( - fvm::laplacian(aniNuEff, U) - fvc::div(nuEff()*dev(fvc::grad(U)().T())) ); }
tmp<volScalarField> spectEddyVisc::k() const { volScalarField eps = 2*nuEff()*magSqr(symm(fvc::grad(U()))); return cK1_*pow(delta()*eps, 2.0/3.0) *exp(-cK2_*pow(delta(), -4.0/3.0)*nu()/pow(eps, 1.0/3.0)) - cK3_*sqrt(eps*nu()) *erfc(cK4_*pow(delta(), -2.0/3.0)*sqrt(nu())*pow(eps, -1.0/6.0)); }
tmp<volSymmTensorField> NonLinEddyViscABL::devBeff() const { return -nuEff()*dev(twoSymm(fvc::grad(U()))); tmp<volSymmTensorField> tdevBeff ( GenEddyViscModel::devBeff() ); tdevBeff() += nonlinearStress_; return tdevBeff; }
tmp<volScalarField> spectEddyVisc::k() const { const volScalarField eps(2*nuEff()*magSqr(symm(fvc::grad(U())))); //TODO move this into a single kernel invocation return cK1_*pow(delta()*eps, 2.0/3.0) *exp(-cK2_*pow(delta(), -4.0/3.0)*nu()/pow(eps, 1.0/3.0)) - cK3_*sqrt(eps*nu()) *erfc(cK4_*pow(delta(), -2.0/3.0)*sqrt(nu())*pow(eps, -1.0/6.0)); }
volScalarField locDynOneEqEddy::ce ( const volSymmTensorField& D, const volScalarField& KK ) const { volScalarField ce = simpleFilter_(nuEff()*(filter_(magSqr(D)) - magSqr(filter_(D)))) /simpleFilter_(pow(KK, 1.5)/(2.0*delta())); return 0.5*(mag(ce) + ce); }
tmp<fvVectorMatrix> kEpsilon::divDevRhoReff ( const volScalarField& rho, volVectorField& U ) const { volScalarField muEff("muEff", rho*nuEff()); return ( - fvm::laplacian(muEff, U) - fvc::div(muEff*dev(T(fvc::grad(U)))) ); }
volScalarField dynOneEqEddy::ce ( const volSymmTensorField& D, const volScalarField& KK ) const { const volScalarField ce ( simpleFilter_(nuEff()*(filter_(magSqr(D)) - magSqr(filter_(D)))) /simpleFilter_(pow(KK, 1.5)/(2.0*delta())) ); tmp<volScalarField> tfld = 0.5*(mag(ce) + ce); return tfld(); }
tmp<volSymmTensorField> LienCubicKE::devReff() const { return tmp<volSymmTensorField> ( new volSymmTensorField ( IOobject ( "devRhoReff", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), -nuEff()*dev(twoSymm(fvc::grad(U_))) + nonlinearStress_ ) ); }
tmp<volSymmTensorField> kEpsilon::devReff() const { return tmp<volSymmTensorField> ( new volSymmTensorField ( IOobject ( "devRhoReff", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), -nuEff()*dev(twoSymm(fvc::grad(U_))) ) ); }
tmp<volScalarField> SpalartAllmarasIDDES::fd(const volScalarField& S) const { return 1 - tanh(pow3(8*rd(nuEff(), S))); }
void Foam::yPlusLES::calcIncompressibleYPlus ( const fvMesh& mesh, const volVectorField& U, volScalarField& yPlus ) { const incompressible::LESModel& model = mesh.lookupObject<incompressible::LESModel>("LESProperties"); volScalarField::GeometricBoundaryField d = nearWallDist(mesh).y(); volScalarField nuEff(model.nuEff()); const fvPatchList& patches = mesh.boundary(); const volScalarField nuLam(model.nu()); bool foundPatch = false; forAll(patches, patchI) { const fvPatch& currPatch = patches[patchI]; if (isA<wallFvPatch>(currPatch)) { foundPatch = true; yPlus.boundaryField()[patchI] = d[patchI] *sqrt ( nuEff.boundaryField()[patchI] *mag(U.boundaryField()[patchI].snGrad()) ) /nuLam.boundaryField()[patchI]; const scalarField& Yp = yPlus.boundaryField()[patchI]; scalar minYp = gMin(Yp); scalar maxYp = gMax(Yp); scalar avgYp = gAverage(Yp); if (log_) { Info<< " patch " << currPatch.name() << " y+ : min = " << minYp << ", max = " << maxYp << ", average = " << avgYp << nl; } if (Pstream::master()) { file() << obr_.time().value() << token::TAB << currPatch.name() << token::TAB << minYp << token::TAB << maxYp << token::TAB << avgYp << endl; } } } if (log_ && !foundPatch) { Info<< " no " << wallFvPatch::typeName << " patches" << endl; } }
tmp<volSymmTensorField> SpalartAllmaras::devReff() const { return -nuEff()*dev(twoSymm(fvc::grad(U()))); }
tmp<volSymmTensorField> GenEddyVisc::devBeff() const { return -nuEff()*dev(twoSymm(fvc::grad(U()))); }
Foam::tmp<Foam::scalarField> Foam::incompressibleTurbulenceModel::muEff(const label patchi) const { return nuEff(patchi); }
Foam::tmp<Foam::volScalarField> Foam::incompressibleTurbulenceModel::muEff() const { return nuEff(); }
tmp<volScalarField> SpalartAllmaras::epsilon() const { return 2*nuEff()*magSqr(symm(fvc::grad(U()))); }