|
[Sponsors] |
August 2, 2006, 11:16 |
Using the snGrad operation
|
#1 |
New Member
Ruediger Bahrmann
Join Date: Mar 2009
Posts: 4
Rep Power: 17 |
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-((C2-1.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, 11:29 |
Yes. The first parameter of f
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
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 face-normal gradient of k^0.5 (why not sqrt k?).
A face-normal 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, 10:13 |
Hrvoje,
Thank you for answe
|
#3 |
New Member
Ruediger Bahrmann
Join Date: Mar 2009
Posts: 4
Rep Power: 17 |
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: 17 |
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: Germany
Posts: 1,377
Rep Power: 30 |
phi is a surfaceScalarField. It's components are the vector U scalar multiplied with the vector Sf on a face.
|
|
October 1, 2015, 05:30 |
|
#6 | |
New Member
David Casasnovas
Join Date: May 2013
Posts: 1
Rep Power: 0 |
Quote:
Code:
phi*(fvc::snGrad(rho)) |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Operation conditions | Paweł | FLUENT | 2 | October 27, 2006 02:35 |
File operation in UDF | Ajay | FLUENT | 0 | April 10, 2004 17:33 |
Boolean operation | Lam | FLUENT | 1 | July 22, 2003 18:18 |
About the technology of operation | Masaru | Phoenics | 0 | June 14, 2003 00:58 |
Matrix operation : | Jay | FLUENT | 0 | November 11, 2002 10:20 |