From a91f1315f0d62fab49d5ffb5dae7451a7123361a Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 24 Jun 2008 13:09:57 +0100 Subject: [PATCH] reverted kappa and E back to dimensionedScalar, using new lookup functionality --- .../RAS/compressible/RASModel/RASModel.C | 22 +++++++++++---- .../RAS/compressible/RASModel/RASModel.H | 8 +++--- .../kOmegaSST/kOmegaWallFunctionsI.H | 4 +-- .../kOmegaSST/kOmegaWallViscosityI.H | 2 +- ...ndardRoughWallFunctionFvPatchScalarField.C | 16 +++++------ .../wallFunctions/wallFunctionsI.H | 4 +-- .../wallFunctions/wallViscosityI.H | 2 +- .../LienCubicKELowReSetWallDissipation.H | 2 +- .../LienLeschzinerLowReSetWallDissipation.H | 2 +- .../RAS/incompressible/RASModel/RASModel.C | 28 +++++++++++++------ .../RAS/incompressible/RASModel/RASModel.H | 8 +++--- .../kOmegaSST/kOmegaWallFunctionsI.H | 4 +-- .../kOmegaSST/kOmegaWallViscosityI.H | 2 +- .../wallFunctions/nonLinearWallFunctionsI.H | 4 +-- ...ndardRoughWallFunctionFvPatchScalarField.C | 4 +-- ...utStandardWallFunctionFvPatchScalarField.C | 6 ++-- .../nutWallFunctionFvPatchScalarField.C | 4 +-- .../wallFunctions/wallFunctionsI.H | 4 +-- .../wallFunctions/wallNonlinearViscosityI.H | 2 +- .../wallFunctions/wallViscosityI.H | 2 +- 20 files changed, 75 insertions(+), 55 deletions(-) diff --git a/src/turbulenceModels/RAS/compressible/RASModel/RASModel.C b/src/turbulenceModels/RAS/compressible/RASModel/RASModel.C index 6a4a6c055b..61dbc1fc27 100644 --- a/src/turbulenceModels/RAS/compressible/RASModel/RASModel.C +++ b/src/turbulenceModels/RAS/compressible/RASModel/RASModel.C @@ -89,14 +89,24 @@ RASModel::RASModel kappa_ ( - subDict("wallFunctionCoeffs").lookupOrAddDefault + dimensioned::lookupOrAddToDict ( "kappa", + subDict("wallFunctionCoeffs"), 0.4187 ) ), - E_(subDict("wallFunctionCoeffs").lookupOrAddDefault("E", 9.0)), - yPlusLam_(yPlusLam(kappa_, E_)), + E_ + ( + dimensioned::lookupOrAddToDict + ( + "E", + subDict("wallFunctionCoeffs"), + 9.0 + ) + ), + + yPlusLam_(yPlusLam(kappa_.value(), E_.value())), k0_("k0", dimVelocity*dimVelocity, SMALL), epsilon0_("epsilon", k0_.dimensions()/dimTime, SMALL), @@ -171,10 +181,10 @@ bool RASModel::read() lookup("turbulence") >> turbulence_; coeffDict_ = subDict(type() + "Coeffs"); - subDict("wallFunctionCoeffs").readIfPresent("kappa", kappa_); - subDict("wallFunctionCoeffs").readIfPresent("E", E_); + kappa_.readIfPresent(subDict("wallFunctionCoeffs")); + E_.readIfPresent(subDict("wallFunctionCoeffs")); - yPlusLam_ = yPlusLam(kappa_, E_); + yPlusLam_ = yPlusLam(kappa_.value(), E_.value()); readIfPresent("k0", k0_); readIfPresent("epsilon0", epsilon0_); diff --git a/src/turbulenceModels/RAS/compressible/RASModel/RASModel.H b/src/turbulenceModels/RAS/compressible/RASModel/RASModel.H index 06e3b6b8fb..39960659a4 100644 --- a/src/turbulenceModels/RAS/compressible/RASModel/RASModel.H +++ b/src/turbulenceModels/RAS/compressible/RASModel/RASModel.H @@ -91,8 +91,8 @@ protected: Switch printCoeffs_; dictionary coeffDict_; - scalar kappa_; - scalar E_; + dimensionedScalar kappa_; + dimensionedScalar E_; scalar yPlusLam(const scalar kappa, const scalar E); scalar yPlusLam_; @@ -226,13 +226,13 @@ public: //- Return kappa for use in wall-functions - scalar kappa() const + dimensionedScalar kappa() const { return kappa_; } //- Return E for use in wall-functions - scalar E() const + dimensionedScalar E() const { return E_; } diff --git a/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallFunctionsI.H b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallFunctionsI.H index 1f34c5be9f..e7b9db40cd 100644 --- a/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallFunctionsI.H +++ b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallFunctionsI.H @@ -89,7 +89,7 @@ Description omega_[faceCelli] += sqrt(k_[faceCelli]) - /(Cmu25*kappa_*y_[faceCelli]); + /(Cmu25*kappa_.value()*y_[faceCelli]); if (yPlus > yPlusLam_) { @@ -97,7 +97,7 @@ Description (mutw[facei] + muw[facei]) *magFaceGradU[facei] *Cmu25*sqrt(k_[faceCelli]) - /(kappa_*y_[faceCelli]); + /(kappa_.value()*y_[faceCelli]); } } } diff --git a/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallViscosityI.H b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallViscosityI.H index 4aae893e97..68ce16201c 100644 --- a/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallViscosityI.H +++ b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaWallViscosityI.H @@ -58,7 +58,7 @@ Description { mutw[facei] = muw[facei] - *(yPlus*kappa_/log(E_*yPlus) - 1); + *(yPlus*kappa_.value()/log(E_.value()*yPlus) - 1); } else { diff --git a/src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C index 5238bcda20..b019bfdd51 100644 --- a/src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/compressible/wallFunctions/mutWallFunctions/mutStandardRoughWallFunction/mutStandardRoughWallFunctionFvPatchScalarField.C @@ -123,14 +123,14 @@ void mutStandardRoughWallFunctionFvPatchScalarField::evaluate const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalar kappa = rasModel.kappa(); - const scalar E = rasModel.E(); + const scalar kappa = rasModel.kappa().value(); + const scalar E = rasModel.E().value(); const scalar yPlusLam = 11.225; // The reciprical of the distance to the adjacent cell centre. const scalarField& ry = patch().deltaCoeffs(); - const fvPatchVectorField& U = + const fvPatchVectorField& U = patch().lookupPatchField("U"); const fvPatchScalarField& rho = @@ -139,7 +139,7 @@ void mutStandardRoughWallFunctionFvPatchScalarField::evaluate // The flow velocity at the adjacent cell centre. scalarField magUp = mag(U.patchInternalField() - U); - const scalarField& muw = + const scalarField& muw = patch().lookupPatchField("mu"); scalarField& mutw = *this; @@ -155,7 +155,7 @@ void mutStandardRoughWallFunctionFvPatchScalarField::evaluate //if (KsPlusBasedOnYPlus_) { - // If KsPlus is based on YPlus the extra term added to the law + // If KsPlus is based on YPlus the extra term added to the law // of the wall will depend on yPlus. forAll(mutw, facei) { @@ -206,7 +206,7 @@ void mutStandardRoughWallFunctionFvPatchScalarField::evaluate const scalar sint_2 = sin(t_2); const scalar logt_1 = log(t_1); G = logt_1*sint_2; - yPlusGPrime = + yPlusGPrime = (c_1*sint_2*KsPlus/t_1) + (c_3*logt_1*cos(t_2)); } @@ -268,7 +268,7 @@ void mutStandardRoughWallFunctionFvPatchScalarField::evaluate mag(ryPlusLam*(yPlus - yPlusLast)) > 0.0001 && ++iter < 10 ); - + if (yPlus > yPlusLam) { mutw[facei] = muw[facei]*(yPlus*yPlus/Re - 1); @@ -291,7 +291,7 @@ void mutStandardRoughWallFunctionFvPatchScalarField::write(Ostream& os) const << roughnessConstant_ << token::END_STATEMENT << nl; os.writeKeyword("roughnessFudgeFactor") << roughnessFudgeFactor_ << token::END_STATEMENT << nl; -} +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/RAS/compressible/wallFunctions/wallFunctionsI.H b/src/turbulenceModels/RAS/compressible/wallFunctions/wallFunctionsI.H index 19ae89d4ca..35b1a401cf 100644 --- a/src/turbulenceModels/RAS/compressible/wallFunctions/wallFunctionsI.H +++ b/src/turbulenceModels/RAS/compressible/wallFunctions/wallFunctionsI.H @@ -90,7 +90,7 @@ Description epsilon_[faceCelli] += Cmu75*pow(k_[faceCelli], 1.5) - /(kappa_*RASModel::y_[patchi][facei]); + /(kappa_.value()*RASModel::y_[patchi][facei]); if (yPlus > yPlusLam_) { @@ -98,7 +98,7 @@ Description (mutw[facei] + muw[facei]) *magFaceGradU[facei] *Cmu25*sqrt(k_[faceCelli]) - /(kappa_*RASModel::y_[patchi][facei]); + /(kappa_.value()*RASModel::y_[patchi][facei]); } } } diff --git a/src/turbulenceModels/RAS/compressible/wallFunctions/wallViscosityI.H b/src/turbulenceModels/RAS/compressible/wallFunctions/wallViscosityI.H index 938555e860..659e3286c2 100644 --- a/src/turbulenceModels/RAS/compressible/wallFunctions/wallViscosityI.H +++ b/src/turbulenceModels/RAS/compressible/wallFunctions/wallViscosityI.H @@ -58,7 +58,7 @@ Description { mutw[facei] = muw[facei] - *(yPlus*kappa_/log(E_*yPlus) - 1); + *(yPlus*kappa_.value()/log(E_.value()*yPlus) - 1); } else { diff --git a/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H b/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H index 76d0a20211..ef216dcf68 100644 --- a/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H +++ b/src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H @@ -43,7 +43,7 @@ epsilon_[faceCelli] += Cmu75*pow(k_[faceCelli], 1.5) /( - kappa_*y_[faceCelli] + kappa_.value()*y_[faceCelli] *(1.0 - exp(-Aepsilon_.value()*yStar_[faceCelli])) ) *exp(-Amu_.value()*sqr(yStar_[faceCelli])); diff --git a/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H b/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H index cfda062b59..a998d3af8e 100644 --- a/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H +++ b/src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H @@ -43,7 +43,7 @@ epsilon_[faceCelli] += Cmu75*pow(k_[faceCelli], 1.5) /( - kappa_*y_[faceCelli] + kappa_.value()*y_[faceCelli] *(1.0 - exp(-Aepsilon*yStar_[faceCelli])) ) *exp(-Amu*sqr(yStar_[faceCelli])); diff --git a/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.C b/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.C index 36567e7b8c..34be1e6e39 100644 --- a/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.C +++ b/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.C @@ -85,14 +85,24 @@ RASModel::RASModel kappa_ ( - subDict("wallFunctionCoeffs").lookupOrAddDefault + dimensioned::lookupOrAddToDict ( "kappa", + subDict("wallFunctionCoeffs"), 0.4187 ) ), - E_(subDict("wallFunctionCoeffs").lookupOrAddDefault("E", 9.0)), - yPlusLam_(yPlusLam(kappa_, E_)), + E_ + ( + dimensioned::lookupOrAddToDict + ( + "E", + subDict("wallFunctionCoeffs"), + 9.0 + ) + ), + + yPlusLam_(yPlusLam(kappa_.value(), E_.value())), k0_("k0", dimVelocity*dimVelocity, SMALL), epsilon0_("epsilon", k0_.dimensions()/dimTime, SMALL), @@ -168,14 +178,14 @@ bool RASModel::read() lookup("turbulence") >> turbulence_; coeffDict_ = subDict(type() + "Coeffs"); - subDict("wallFunctionCoeffs").readIfPresent("kappa", kappa_); - subDict("wallFunctionCoeffs").readIfPresent("E", E_); + kappa_.readIfPresent(subDict("wallFunctionCoeffs")); + E_.readIfPresent(subDict("wallFunctionCoeffs")); - yPlusLam_ = yPlusLam(kappa_, E_); + yPlusLam_ = yPlusLam(kappa_.value(), E_.value()); - readIfPresent("k0", k0_); - readIfPresent("epsilon0", epsilon0_); - readIfPresent("epsilonSmall", epsilonSmall_); + k0_.readIfPresent(*this); + epsilon0_.readIfPresent(*this); + epsilonSmall_.readIfPresent(*this); return true; } diff --git a/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.H b/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.H index 77ed3a35a4..40e087612e 100644 --- a/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.H +++ b/src/turbulenceModels/RAS/incompressible/RASModel/RASModel.H @@ -88,8 +88,8 @@ protected: Switch printCoeffs_; dictionary coeffDict_; - scalar kappa_; - scalar E_; + dimensionedScalar kappa_; + dimensionedScalar E_; scalar yPlusLam(const scalar kappa, const scalar E); scalar yPlusLam_; @@ -213,13 +213,13 @@ public: //- Return kappa for use in wall-functions - scalar kappa() const + dimensionedScalar kappa() const { return kappa_; } //- Return E for use in wall-functions - scalar E() const + dimensionedScalar E() const { return E_; } diff --git a/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallFunctionsI.H b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallFunctionsI.H index 3b3a8a59bf..ab2bcc148e 100644 --- a/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallFunctionsI.H +++ b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallFunctionsI.H @@ -87,7 +87,7 @@ Description omega_[faceCelli] += sqrt(k_[faceCelli]) - /(Cmu25*kappa_*y_[faceCelli]); + /(Cmu25*kappa_.value()*y_[faceCelli]); if (yPlus > yPlusLam_) { @@ -95,7 +95,7 @@ Description (nutw[facei] + nuw[facei]) *magFaceGradU[facei] *Cmu25*sqrt(k_[faceCelli]) - /(kappa_*y_[faceCelli]); + /(kappa_.value()*y_[faceCelli]); } } } diff --git a/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallViscosityI.H b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallViscosityI.H index 3231565d7a..f2667bc675 100644 --- a/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallViscosityI.H +++ b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaWallViscosityI.H @@ -55,7 +55,7 @@ Description { nutw[facei] = nuw[facei] - *(yPlus*kappa_/log(E_*yPlus) - 1); + *(yPlus*kappa_.value()/log(E_.value()*yPlus) - 1); } else { diff --git a/src/turbulenceModels/RAS/incompressible/wallFunctions/nonLinearWallFunctionsI.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/nonLinearWallFunctionsI.H index 07967c87d9..f286ad0b67 100644 --- a/src/turbulenceModels/RAS/incompressible/wallFunctions/nonLinearWallFunctionsI.H +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nonLinearWallFunctionsI.H @@ -89,7 +89,7 @@ Description epsilon_[faceCelli] += Cmu75*pow(k_[faceCelli], 1.5) - /(kappa_*y_[patchi][facei]); + /(kappa_.value()*y_[patchi][facei]); if (yPlus > yPlusLam_) { @@ -97,7 +97,7 @@ Description (nutw[facei] + nuw[facei]) *magFaceGradU[facei] *Cmu25*sqrt(k_[faceCelli]) - /(kappa_*y_[patchi][facei]) + /(kappa_.value()*y_[patchi][facei]) - (nonlinearStress_[faceCelli] && gradU_[faceCelli]); } } diff --git a/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C index 2f242c1a4f..dcc849510e 100644 --- a/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardRoughWallFunction/nutStandardRoughWallFunctionFvPatchScalarField.C @@ -123,8 +123,8 @@ void nutStandardRoughWallFunctionFvPatchScalarField::evaluate const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalar kappa = rasModel.kappa(); - const scalar E = rasModel.E(); + const scalar kappa = rasModel.kappa().value(); + const scalar E = rasModel.E().value(); const scalar yPlusLam = 11.225; // The reciprical of the distance to the adjacent cell centre. diff --git a/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C index 3eee19f990..f0d6eb714b 100644 --- a/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutStandardWallFunction/nutStandardWallFunctionFvPatchScalarField.C @@ -108,9 +108,9 @@ void nutStandardWallFunctionFvPatchScalarField::evaluate const RASModel& rasModel = db().lookupObject("RASProperties"); - scalar kappa = rasModel.kappa(); - scalar E = rasModel.E(); - scalar yPlusLam = rasModel.E(); + scalar kappa = rasModel.kappa().value(); + scalar E = rasModel.E().value(); + scalar yPlusLam = rasModel.E().value(); const scalarField& ry = patch().deltaCoeffs(); diff --git a/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C index 12dc46e96d..7ec3523fd7 100644 --- a/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C @@ -100,8 +100,8 @@ void nutWallFunctionFvPatchScalarField::evaluate(const Pstream::commsTypes) const RASModel& rasModel = db().lookupObject("RASProperties"); - scalar kappa = rasModel.kappa(); - scalar E = rasModel.E(); + scalar kappa = rasModel.kappa().value(); + scalar E = rasModel.E().value(); const scalarField& ry = patch().deltaCoeffs(); diff --git a/src/turbulenceModels/RAS/incompressible/wallFunctions/wallFunctionsI.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallFunctionsI.H index 52c4b0c0e1..c5f97fc043 100644 --- a/src/turbulenceModels/RAS/incompressible/wallFunctions/wallFunctionsI.H +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallFunctionsI.H @@ -88,7 +88,7 @@ Description epsilon_[faceCelli] += Cmu75*pow(k_[faceCelli], 1.5) - /(kappa_*RASModel::y_[patchi][facei]); + /(kappa_.value()*RASModel::y_[patchi][facei]); if (yPlus > yPlusLam_) { @@ -96,7 +96,7 @@ Description (nutw[facei] + nuw[facei]) *magFaceGradU[facei] *Cmu25*sqrt(k_[faceCelli]) - /(kappa_*RASModel::y_[patchi][facei]); + /(kappa_.value()*RASModel::y_[patchi][facei]); } } } diff --git a/src/turbulenceModels/RAS/incompressible/wallFunctions/wallNonlinearViscosityI.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallNonlinearViscosityI.H index d1d3617e92..05bc8411ab 100644 --- a/src/turbulenceModels/RAS/incompressible/wallFunctions/wallNonlinearViscosityI.H +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallNonlinearViscosityI.H @@ -55,7 +55,7 @@ Description if (yPlus > yPlusLam_) { nutw[facei] = nuw[facei] - *(yPlus*kappa_/log(E_*yPlus) - 1); + *(yPlus*kappa_.value()/log(E_.value()*yPlus) - 1); } else { diff --git a/src/turbulenceModels/RAS/incompressible/wallFunctions/wallViscosityI.H b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallViscosityI.H index 82a47f39b9..9a7fe62d3e 100644 --- a/src/turbulenceModels/RAS/incompressible/wallFunctions/wallViscosityI.H +++ b/src/turbulenceModels/RAS/incompressible/wallFunctions/wallViscosityI.H @@ -55,7 +55,7 @@ Description { nutw[facei] = nuw[facei] - *(yPlus*kappa_/log(E_*yPlus) - 1); + *(yPlus*kappa_.value()/log(E_.value()*yPlus) - 1); } else {