
[Sponsors] 
August 2, 2006, 10:16 
Using the snGrad operation

#1 
New Member
Ruediger Bahrmann
Join Date: Mar 2009
Posts: 4
Rep Power: 9 
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 

August 2, 2006, 10:29 
Yes. The first parameter of f

#2 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,781
Rep Power: 22 
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 Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

August 3, 2006, 09:13 
Hrvoje,
Thank you for answe

#3 
New Member
Ruediger Bahrmann
Join Date: Mar 2009
Posts: 4
Rep Power: 9 
Hrvoje,
Thank you for answering so quickly. The answer was very plausible. I think you could help me. Rüdiger 

January 28, 2011, 10:44 

#4  
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 8 
what about
Code:
phi&(fvc::snGrad(rho)) I get an error Quote:


January 28, 2011, 11:48 

#5 
Senior Member
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,121
Rep Power: 20 
phi is a surfaceScalarField. It's components are the vector U scalar multiplied with the vector Sf on a face.


October 1, 2015, 04:30 

#6  
New Member
David Casasnovas
Join Date: May 2013
Posts: 1
Rep Power: 0 
Quote:
Code:
phi*(fvc::snGrad(rho)) 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Operation conditions  PaweÅ‚  FLUENT  2  October 27, 2006 01:35 
File operation in UDF  Ajay  FLUENT  0  April 10, 2004 16:33 
Boolean operation  Lam  FLUENT  1  July 22, 2003 17:18 
About the technology of operation  Masaru  Phoenics  0  June 13, 2003 23:58 
Matrix operation :  Jay  FLUENT  0  November 11, 2002 10:20 