
[Sponsors] 
November 10, 2010, 02:48 
Turbulence model implementation errors

#1  
New Member

Dear Foamers,
I have implemented a nonlinear eddy viscosity model, by modifying the kOmegaSST and including additional nonlinear terms (code attached). I get a number of errors as: no matching function to call to 'Foam:: .....' final error as: Quote:
Thanks, Elbert 

November 10, 2010, 07:26 

#2 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20 
Is IV_ a scalar or tensor?
IV_( (S_&&W_)&&W_), If it is a scalar there should be a normal matrix multiplication somewhere either IV_( (S_&W_)&&W_) or IV_( S_&& (W_ & W_) ) 

November 10, 2010, 08:28 

#3 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20 
some other issues...
C1prime_ is defined as a volScalarField, but its just a constant, so I would change it to dimensionedScalar, otherwise you need to supply size information et.c.... Beta2_ is a volScalarField, but you cant just initialize it with a value it needs more information than that. (same error as C1prime_) To get it to compile i just set it to Beta2_( 0.*N_), // why use a volScalarField for a zero? but Im guessing that it really should be something else, otherwise why have it aij_ is a symmetric tensor W_ is a tensor and W_ & W_ is just a tensor multiplication, this does not imply that the result is a symmetric tensor. sure in this example it will be, but the code sees this as any other tensor multiplication so you need to explicitly extract the symmetric part. aij_ ( Beta1_ *S_ + Beta2_ * ( (S_ & S_)(1./3.)*(IIs_ * I )) + Beta3_ * (symm(W_ & W_)(1./3.)*( IIo_*I)) // why should a tensor multiplication yield a symm tensor? + Beta4_*symm((S_ & W_)(W_ & S_)) + Beta6_*(symm(((S_ & W_) & W_) + ((W_ & W_) & S_))  (2./3.)*IV_*I  IIo_*S_) + Beta9_*(symm(((W_ & S_) & (W_ & W_))  ((W_ & W_) & (S_ & W_)) + 0.5*IIo_*((S_ & W_)  (W_ & S_)))) ), 

November 11, 2010, 17:03 

#4  
New Member

Hi Niklas,
Thanks, after making changes you suggested, it is working! I did this for aij_ , Quote:
A_=symm(W_&W_) ? In the constructor portion of my BSLEARSM.C (attached) , can you please tell me how I can include this code: Quote:


November 12, 2010, 03:02 

#5  
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20 
Quote:
in the tensor class the multiplication operation between two tensors returns another tensor, not a symmetric tensor. Quote:
This is a good start if the dimensions of IIs_ and N_ are the same otherwise use another field which has the same dimensions as N_ or a constructor like the one for nut_. For that kind of complicated expressions you have to place it in here. Code:
{ bound(omega_, omega0_); nut_ = a1_*k_/max(a1_*omega_, F2()*mag(symm(fvc::grad(U_)))); // nut_ = k_/(omega_+smallOmega_); nut_.correctBoundaryConditions(); // calculation of N_ goes here .... printCoeffs(); } 

December 21, 2010, 05:51 

#6  
New Member
Maolong LIU
Join Date: Apr 2010
Location: Japan
Posts: 28
Rep Power: 7 
Hi, I am also using this model.
Which reference did you use to write this model. Because your correlations are a little different with mine. Quote:


December 21, 2010, 09:25 

#7 
New Member

I used the formulation described here:
"Explicit Algebraic Reynolds Stress Models for Anisotropic WallBounded Flows", F.R. Menter, A.V. Garbaruk, and Y. Egorov. EUCASS – 3rd European Conference for AeroSpace Sciences, July 69th 2009 Versailles 

December 22, 2010, 04:34 

#8 
New Member
Maolong LIU
Join Date: Apr 2010
Location: Japan
Posts: 28
Rep Power: 7 
Does this model work well?
I use the formula of " Wallin, S. and A. Johansson (2000). "An explicit algebraic Reynolds stress model for incompressible and compressible turbulent flows." Journal of Fluid Mechanics 403: 89132 ", it does not work quite well. I want to try this one you use. Would you mind to send me the reference you use because I cannot find the file. my mail: maolongliu@gmail.com Thank you. 

December 26, 2010, 14:47 

#9 
Member
Markus Weinmann
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 77
Rep Power: 8 
Hi Elbert,
I am also using the WJ model. The reference you are using seem much newer. Would it be possible for you to send me copy as well please: mw405@soton.ac.uk Thanks, Markus. 

June 17, 2011, 11:07 

#10  
Senior Member
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 8 
Quote:
I recently had a similar issue when implementing Wilcox 1998 komega model (http://turbmodels.larc.nasa.gov/wilcox.html), which is different than the komega model implemented in OF (Wilcox 1988 komega model). I have the following expression Code:
forAll(fBetaStar_, cellI) { if(xiK_[cellI] <= scalar(0)) fBetaStar_[cellI] = scalar(1); else fBetaStar_[cellI] = (scalar(1)+680*sqr(xiK_[cellI]))/(scalar(1)+400*sqr(xiK_[cellI])); } Why should it be placed there and how is that related to the complexity of the expression? Thanks and best regards, Florian 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Modified ke turbulence model UDF  Travis  Fluent UDF and Scheme Programming  6  October 7, 2015 13:54 
Centrifugal Pump and Turbulence Model  Michiel  CFX  12  January 25, 2010 04:20 
turbulence model equation  Andy Chen  FLOW3D  4  January 1, 2010 22:45 
kw Turbulence model implementation  suneesh  Main CFD Forum  4  November 23, 2005 18:35 
turbulence model question  Jason Wei  Main CFD Forum  1  May 6, 2003 00:45 