Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2009-09-03 12:29:52 +01:00
7 changed files with 20 additions and 74 deletions

View File

@ -276,9 +276,9 @@ void Foam::ReactingParcel<ParcelType>::calc
td, td,
dt, dt,
cellI, cellI,
Re,
Ts, Ts,
mus/rhos, mus/rhos,
Re,
d0, d0,
T0, T0,
mass0, mass0,

View File

@ -145,7 +145,7 @@ LaunderSharmaKE::LaunderSharmaKE
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
autoCreateK("k", mesh_) mesh_
), ),
epsilon_ epsilon_
@ -158,21 +158,10 @@ LaunderSharmaKE::LaunderSharmaKE
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
autoCreateEpsilon("epsilon", mesh_) mesh_
), ),
mut_ mut_(rho_*Cmu_*fMu()*sqr(k_)/(epsilon_ + epsilonSmall_)),
(
IOobject
(
"mut",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
autoCreateMut("mut", mesh_)
),
alphat_ alphat_
( (
@ -187,9 +176,6 @@ LaunderSharmaKE::LaunderSharmaKE
autoCreateAlphat("alphat", mesh_) autoCreateAlphat("alphat", mesh_)
) )
{ {
mut_ = rho_*Cmu_*fMu()*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_.correctBoundaryConditions();
alphat_ = mut_/Prt_; alphat_ = mut_/Prt_;
alphat_.correctBoundaryConditions(); alphat_.correctBoundaryConditions();
@ -275,8 +261,7 @@ void LaunderSharmaKE::correct()
if (!turbulence_) if (!turbulence_)
{ {
// Re-calculate viscosity // Re-calculate viscosity
mut_ = rho_*Cmu_*fMu()*sqr(k_)/(epsilon_ + epsilonSmall_); mut_ == rho_*Cmu_*fMu()*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity // Re-calculate thermal diffusivity
alphat_ = mut_/Prt_; alphat_ = mut_/Prt_;
@ -304,8 +289,6 @@ void LaunderSharmaKE::correct()
volScalarField G("RASModel::G", mut_*(tgradU() && dev(twoSymm(tgradU())))); volScalarField G("RASModel::G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear(); tgradU.clear();
// Update espsilon and G at the wall
epsilon_.boundaryField().updateCoeffs();
// Dissipation equation // Dissipation equation
@ -322,9 +305,6 @@ void LaunderSharmaKE::correct()
); );
epsEqn().relax(); epsEqn().relax();
epsEqn().boundaryManipulate(epsilon_.boundaryField());
solve(epsEqn); solve(epsEqn);
bound(epsilon_, epsilon0_); bound(epsilon_, epsilon0_);
@ -348,8 +328,8 @@ void LaunderSharmaKE::correct()
// Re-calculate viscosity // Re-calculate viscosity
mut_ = Cmu_*fMu()*rho_*sqr(k_)/(epsilon_ + epsilonSmall_); mut_ == Cmu_*fMu()*rho_*sqr(k_)/(epsilon_ + epsilonSmall_);
mut_.correctBoundaryConditions();
// Re-calculate thermal diffusivity // Re-calculate thermal diffusivity
alphat_ = mut_/Prt_; alphat_ = mut_/Prt_;

View File

@ -114,7 +114,7 @@ LamBremhorstKE::LamBremhorstKE
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
autoCreateEpsilon("epsilon", mesh_) mesh_
), ),
y_(mesh_), y_(mesh_),
@ -127,22 +127,8 @@ LamBremhorstKE::LamBremhorstKE
*(scalar(1) + 20.5/(Rt_ + SMALL)) *(scalar(1) + 20.5/(Rt_ + SMALL))
), ),
nut_ nut_(Cmu_*fMu_*sqr(k_)/(epsilon_ + epsilonSmall_))
(
IOobject
(
"nut",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
autoCreateNut("nut", mesh_)
)
{ {
nut_ = Cmu_*fMu_*sqr(k_)/(epsilon_ + epsilonSmall_);
nut_.correctBoundaryConditions();
printCoeffs(); printCoeffs();
} }
@ -234,6 +220,7 @@ void LamBremhorstKE::correct()
volScalarField G("RASModel::G", nut_*2*magSqr(symm(fvc::grad(U_)))); volScalarField G("RASModel::G", nut_*2*magSqr(symm(fvc::grad(U_))));
// Calculate parameters and coefficients for low-Reynolds number model // Calculate parameters and coefficients for low-Reynolds number model
Rt_ = sqr(k_)/(nu()*epsilon_); Rt_ = sqr(k_)/(nu()*epsilon_);
@ -244,8 +231,6 @@ void LamBremhorstKE::correct()
volScalarField f1 = scalar(1) + pow(0.05/(fMu_ + SMALL), 3); volScalarField f1 = scalar(1) + pow(0.05/(fMu_ + SMALL), 3);
volScalarField f2 = scalar(1) - exp(-sqr(Rt_)); volScalarField f2 = scalar(1) - exp(-sqr(Rt_));
// Update espsilon and G at the wall
epsilon_.boundaryField().updateCoeffs();
// Dissipation equation // Dissipation equation
@ -260,9 +245,6 @@ void LamBremhorstKE::correct()
); );
epsEqn().relax(); epsEqn().relax();
epsEqn().boundaryManipulate(epsilon_.boundaryField());
solve(epsEqn); solve(epsEqn);
bound(epsilon_, epsilon0_); bound(epsilon_, epsilon0_);
@ -284,8 +266,7 @@ void LamBremhorstKE::correct()
// Re-calculate viscosity // Re-calculate viscosity
nut_ = Cmu_*fMu_*sqr(k_)/epsilon_; nut_ == Cmu_*fMu_*sqr(k_)/epsilon_;
nut_.correctBoundaryConditions();
} }

View File

@ -50,7 +50,7 @@ namespace RASModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class LamBremhorstKE Declaration Class LamBremhorstKE Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class LamBremhorstKE class LamBremhorstKE

View File

@ -133,22 +133,8 @@ LaunderSharmaKE::LaunderSharmaKE
mesh_ mesh_
), ),
nut_ nut_(Cmu_*fMu()*sqr(k_)/(epsilonTilda_ + epsilonSmall_))
(
IOobject
(
"nut",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
autoCreateNut("nut", mesh_)
)
{ {
nut_ = Cmu_*fMu()*sqr(k_)/(epsilonTilda_ + epsilonSmall_);
nut_.correctBoundaryConditions();
printCoeffs(); printCoeffs();
} }
@ -235,7 +221,7 @@ void LaunderSharmaKE::correct()
volScalarField S2 = 2*magSqr(symm(fvc::grad(U_))); volScalarField S2 = 2*magSqr(symm(fvc::grad(U_)));
volScalarField G = nut_*S2; volScalarField G("RASModel::G", nut_*S2);
volScalarField E = 2.0*nu()*nut_*fvc::magSqrGradGrad(U_); volScalarField E = 2.0*nu()*nut_*fvc::magSqrGradGrad(U_);
volScalarField D = 2.0*nu()*magSqr(fvc::grad(sqrt(k_))); volScalarField D = 2.0*nu()*magSqr(fvc::grad(sqrt(k_)));
@ -276,8 +262,7 @@ void LaunderSharmaKE::correct()
// Re-calculate viscosity // Re-calculate viscosity
nut_ = Cmu_*fMu()*sqr(k_)/epsilonTilda_; nut_ == Cmu_*fMu()*sqr(k_)/epsilonTilda_;
nut_.correctBoundaryConditions();
} }

View File

@ -61,7 +61,7 @@ namespace RASModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class LaunderSharmaKE Declaration Class LaunderSharmaKE Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class LaunderSharmaKE class LaunderSharmaKE

View File

@ -285,7 +285,7 @@ void LienLeschzinerLowRe::correct()
volScalarField f2 = scalar(1) - 0.3*exp(-sqr(Rt)); volScalarField f2 = scalar(1) - 0.3*exp(-sqr(Rt));
volScalarField G = Cmu_*fMu*sqr(k_)/epsilon_*S2; volScalarField G("RASModel::G", Cmu_*fMu*sqr(k_)/epsilon_*S2);
// Dissipation equation // Dissipation equation
@ -297,7 +297,7 @@ void LienLeschzinerLowRe::correct()
== ==
C1_*G*epsilon_/k_ C1_*G*epsilon_/k_
// E-term // E-term
+ C2_*f2*Cmu75*pow(k_, scalar(0.5)) + C2_*f2*Cmu75*sqrt(k_)
/(kappa_*y_*(scalar(1) - exp(-Aepsilon_*yStar_))) /(kappa_*y_*(scalar(1) - exp(-Aepsilon_*yStar_)))
*exp(-Amu_*sqr(yStar_))*epsilon_ *exp(-Amu_*sqr(yStar_))*epsilon_
- fvm::Sp(C2_*f2*epsilon_/k_, epsilon_) - fvm::Sp(C2_*f2*epsilon_/k_, epsilon_)
@ -305,8 +305,8 @@ void LienLeschzinerLowRe::correct()
epsEqn().relax(); epsEqn().relax();
# include "LienLeschzinerLowReSetWallDissipation.H" #include "LienLeschzinerLowReSetWallDissipation.H"
# include "wallDissipationI.H" #include "wallDissipationI.H"
solve(epsEqn); solve(epsEqn);
bound(epsilon_, epsilon0_); bound(epsilon_, epsilon0_);