|
[Sponsors] |
April 1, 2017, 14:57 |
nutkRoughWallFunction
|
#1 |
New Member
Shang-Gui Cai
Join Date: Jan 2012
Location: Marseille, France
Posts: 10
Rep Power: 14 |
Anyone has the reference paper for the following code "nutkRoughWallFunctionFvPatchScalarField.C" for the computation of turbulent viscosity at rough walls? Thanks.
Code:
scalar nutkRoughWallFunctionFvPatchScalarField::fnRough ( const scalar KsPlus, const scalar Cs ) const { // Return fn based on non-dimensional roughness height if (KsPlus < 90.0) { return pow ( (KsPlus - 2.25)/87.75 + Cs*KsPlus, sin(0.4258*(log(KsPlus) - 0.811)) ); } else { return (1.0 + Cs*KsPlus); } } tmp<scalarField> nutkRoughWallFunctionFvPatchScalarField::calcNut() const { const label patchi = patch().index(); const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> ( IOobject::groupName ( turbulenceModel::propertiesName, internalField().group() ) ); const scalarField& y = turbModel.y()[patchi]; const tmp<volScalarField> tk = turbModel.k(); const volScalarField& k = tk(); const tmp<scalarField> tnuw = turbModel.nu(patchi); const scalarField& nuw = tnuw(); const scalar Cmu25 = pow025(Cmu_); tmp<scalarField> tnutw(new scalarField(*this)); scalarField& nutw = tnutw.ref(); forAll(nutw, facei) { label faceCelli = patch().faceCells()[facei]; scalar uStar = Cmu25*sqrt(k[faceCelli]); scalar yPlus = uStar*y[facei]/nuw[facei]; scalar KsPlus = uStar*Ks_[facei]/nuw[facei]; scalar Edash = E_; if (KsPlus > 2.25) { Edash /= fnRough(KsPlus, Cs_[facei]); } scalar limitingNutw = max(nutw[facei], nuw[facei]); // To avoid oscillations limit the change in the wall viscosity // which is particularly important if it temporarily becomes zero nutw[facei] = max ( min ( nuw[facei] *(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1), 2*limitingNutw ), 0.5*limitingNutw ); if (debug) { Info<< "yPlus = " << yPlus << ", KsPlus = " << KsPlus << ", Edash = " << Edash << ", nutw = " << nutw[facei] << endl; } } return tnutw; } |
|
March 16, 2018, 11:09 |
|
#2 |
New Member
Shadow
Join Date: Jun 2014
Posts: 1
Rep Power: 0 |
Hello Cai,
Just wondering if you found the answer to your question? Did you find any reference? |
|
|
|