|
[Sponsors] |
May 17, 2011, 18:48 |
epsilon groovyBC problem
|
#1 |
New Member
Thomas Smyth
Join Date: Apr 2010
Posts: 14
Rep Power: 16 |
Hi everyone,
I am trying to create an epsilon inlet using groovyBC but am having a couple of problems. It is probably something very simple but I am hoping you can point me in the right direction! here's my epsilon inlet condition: Code:
inlet { type groovyBC; variables "uStar=0.005;z0=0.05;K=0.41;epsilon=pow(uStar,3)/K(pos().z+z0)"; valueExpression "epsilon"; value uniform 0; } Thanks for your help and time Thomas |
|
May 18, 2011, 04:23 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Is your problem a syntax error? Because you're using K like a function. Apart from that: Having a variable with the same name as the field might lead to weird behaviour (the variable should shadow the field value and your case should be alright anyway) And one last thing: Never ever (not even for fun and not even in the "value"-field that is probably never going to be used) set epsilon to zero |
||
May 18, 2011, 06:15 |
|
#3 | |
New Member
Thomas Smyth
Join Date: Apr 2010
Posts: 14
Rep Power: 16 |
Quote:
Hi Bernhard, It was a floating point exception which led me to believe I was doing something mathematically incorrect. Thanks for pointing me in the right direction as the K was providing the problem. I appreciate your advice on the other issues too especially the epsilon value. I just realised how novice an error that was. Thanks again for all your help,it seems to be working correctly now (hopefully!) Thomas |
||
May 18, 2011, 12:29 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
October 25, 2012, 23:53 |
|
#5 |
Member
|
Hi did you solve your problem?
I am using this equation too as : inlet { type groovyBC variables "u_f=0.521;z0=0.001;z_f=pos().y;K=0.4;epsi = pow(u_f,3)/(K(z_f+z0))"; valueExpression "epsi"; } i also got the following error : From function groovyBCFvPatchField<Type>::groovyBCFvPatchField(c onst fvPatch& p,const DimensionedField<Type, volMesh>& iF,const dictionary& dict) in file groovyBCFvPatchField.C at line 119 No value defined for epsilon on inlet therefore using 100{0} I try many solution and none is working ... is there something i had miss? because i do it for my wind condition and it work well ... i guess because it's not a vector but i don't know how to solve this problem |
|
October 26, 2012, 06:16 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
So declare an approximate 'value' for epsilon. It will only be used until all other fields are loaded. After that your valueExpression will be used
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
Tags |
epsilon, groovybc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
simpleFoam error - "Floating point exception" | mbcx4jc2 | OpenFOAM Running, Solving & CFD | 12 | August 4, 2015 03:20 |
[swak4Foam] Problem with fully developed velocity profile groovyBC in 2D axi-sym mesh | harshad88 | OpenFOAM Community Contributions | 7 | July 24, 2014 15:28 |
[swak4Foam] a problem in groovyBC: "syntax error, unexpected '('" | immortality | OpenFOAM Community Contributions | 14 | December 5, 2012 05:22 |
___Minus epsilon problem___ | maysmech | OpenFOAM | 0 | January 3, 2011 04:10 |
Problem with epsilon | joshK | OpenFOAM | 1 | October 8, 2010 02:55 |