|
[Sponsors] |
Baldwin Lomax - Zero Equation Turbulence Model |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 6, 2016, 21:20 |
Baldwin Lomax - Zero Equation Turbulence Model
|
#1 |
Senior Member
|
Hello experts in OpenFoam.
I need some assistance in coding a zero equation turbulence model i.e. Baldwin Lomax. http://www.cfd-online.com/Wiki/Baldwin-Lomax_model I have tried to modify the two equation turbulence models and one equation models to remove the PDEs and convert this into a fully algebraic zero equation model without much success. Another Idea I have is to start from Laminar so that I don't have to remove the PDE's. What is the best way to go about it? Also if any one else has done some work or know more information please help me out. With kind regards Shereez |
|
June 7, 2016, 21:54 |
|
#2 |
Senior Member
|
Hello;
I have made some progress in removing 2 PDE's from a 2-equation model. But Baldwin Lomax uses y+ (yPlus) for it's execution. Wall distance y_ is easily incorporated in to the code but does any one know how I can incorporate yplus in to my source code without having to redefine the whole calculation of yplus again... Thanks |
|
June 9, 2016, 12:58 |
|
#3 |
Senior Member
|
Going forward;
now I am stuck here: I have a function F= a * b * y_ * C I would like to return the Ymax which is the corresponding y_ while F = Fmax (i,e, maximum of function F) I tried while ( F == Fmax) { return y_(Fmax); } But it doesnt work. Can somebody please help me Thanks |
|
June 10, 2016, 01:31 |
|
#4 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26 |
Hey shereez,
Your code looks horrible I can probably help you, but I need more information. What are a, b, C and y_ ? Functions or constants? Philipp.
__________________
The skeleton ran out of shampoo in the shower. |
|
June 10, 2016, 14:13 |
|
#5 | |
Senior Member
|
Quote:
Code:
tmp<volScalarField> Baldwin_Fake::L() const { return f_ * y_ *(1 - exp(yPlus/Aplus_)); } tmp<volScalarField> Baldwin_Fake:: Fnum(const volScalarField& G1) const { return (y_ * G1 * (1 - exp(yPlus/Aplus_))); } tmp<volScalarField> Baldwin_Fake::Fmax(const volScalarField &Fnum) const { tmp<volScalarField> Y1 = max (Fnum, 1e-40); return Y1; } tmp<volScalarField> Baldwin_Fake::Ymax(const volScalarField& Fmax, const volScalarField& G1) const { return (Fmax / (G1 *(1 - exp(yPlus/Aplus_)) )); } // tmp<volScalarField> Baldwin_Fake::Fkleb(const volScalarField& Ymax) const { tmp<volScalarField> H; (1 +5.5 * pow(((y_ * Ckleb_)/Ymax),(6))); return pow(H,-1); } tmp<volScalarField> Baldwin_Fake::YmaxFmax ( const volScalarField& Ymax, const volScalarField& Fmax ) const { return (Ymax * Fmax); } // // tmp<volScalarField> Baldwin_Fake::Fwake(const volScalarField& YmaxFmax, const volScalarField& Fmax, const volScalarField& Udiff, const volScalarField& Ymax) const { // ((YmaxFmax, Cwk_ * Ymax * ((Udiff * Udiff))/Fmax)),1e-40); return max ((((sqr(Udiff))/Fmax) * Cwk_ * Ymax), YmaxFmax ); } tmp<volScalarField> Baldwin_Fake::nut_Inner(const volScalarField& L, const volScalarField& G1) const { return ((sqr(L)) * G1 * scalar(1.2)); } tmp<volScalarField> Baldwin_Fake::nut_Outer(const volScalarField& Fkleb, const volScalarField& Fwake) const { return (Fwake* Fkleb * Ccp_ * K_ * scalar(1.2)); } tmp<volScalarField> Baldwin_Fake::yCrossOver(const volScalarField& nut_Inner, const volScalarField& nut_Outer) const { if (nut_Inner = nut_Outer) { return 0.0; } } Thanks for the help I am not an expert in C++ coding |
||
June 14, 2016, 18:40 |
|
#6 |
Senior Member
|
Code:
tmp<volScalarField> Baldwin_Edit2::Ymax(const volScalarField& Fmax) const { return y_(Fmax); } Is there any one who can help me? |
|
June 21, 2016, 02:13 |
|
#7 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26 |
Hi again,
Sorry I forgot about this thread... Well, I don't understand your code or I don't understand the model! Can you post the whole code? It looks like you use y+ as a constant...
__________________
The skeleton ran out of shampoo in the shower. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implement an les turbulence model | pante | OpenFOAM Programming & Development | 19 | December 5, 2014 16:16 |
Zero equation turbulence model gives better result?? | Sanyo | CFX | 10 | June 26, 2011 10:58 |
Baldwin Lomax Turbulence Model | kharati | Main CFD Forum | 0 | February 7, 2009 11:30 |
Baldwin lomax turbulence model | masoud | Main CFD Forum | 1 | February 7, 2009 11:29 |
Reynolds transport, turbulence model, etc | Beginner | Main CFD Forum | 1 | January 7, 2009 05:36 |