Hi,
I want to modify the epsi
Hi,
I want to modify the epsilon equation of the LaunderGibsonRSTM in the way, which is discribed below. The Problem lies in the snGrad() operation. With snGrad(...) in the equation, compiling the code is not possible. By changing the gradient with a constant, compiling the code is possible. Could anybody say, what mistake I'm doing? =================ORIGINAL=EQUATION================ =========== tmp<fvscalarmatrix> epsEqn ( fvm::ddt(epsilon_) + fvm::div(phi_, epsilon_) // fvm::laplacian(Ceps*(k_/epsilon_)*R_, epsilon_)  fvm::laplacian(DepsilonEff(), epsilon_) == C1*G*epsilon_/k_ + boundarySource  fvm::Sp(C2*epsilon_/k_ + boundaryCentral, epsilon_) ); ================MODIFIED=EQUATION================= =========== tmp<fvscalarmatrix> epsEqn ( fvm::ddt(epsilon_) + fvm::div(phi_, epsilon_) // fvm::laplacian(Ceps*(k_/epsilon_)*R_, epsilon_)  fvm::laplacian(DepsilonEff(), epsilon_) == C1*G*epsilon_/k_ + boundarySource  fvm::Sp(C2*(1.0((C21.4)/C2)*exp(sqr(sqr(k_)/(6.0*epsilon_*nu()))))*(epsilon_ 2.0*nu()*sqr(fvc::snGrad(pow(k_,0.5))))/k_ + boundaryCentral, epsilon_) ); Thanks, Rüdiger 
Yes. The first parameter of f
Yes. The first parameter of fvm::Sp should be a volume scalar field. In your operations you use fvc::snGrad(pow(k_,0.5) which is a facenormal gradient of k^0.5 (why not sqrt k?).
A facenormal gradient is defined on the faces, and you cannot sum up a cell centred and a face centred field. My guess is that you assume snGrad is doing something different from what it actually does. Hrv 
Hrvoje,
Thank you for answe
Hrvoje,
Thank you for answering so quickly. The answer was very plausible. I think you could help me. Rüdiger 
what about
Code:
phi&(fvc::snGrad(rho)) I get an error Quote:

phi is a surfaceScalarField. It's components are the vector U scalar multiplied with the vector Sf on a face.

All times are GMT 4. The time now is 23:18. 