CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] problem with Velocity Profile with groovyBC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2014, 10:11
Default problem with Velocity Profile with groovyBC
  #1
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13
ssss is on a distinguished road
Hi,

Iḿ trying to implement a turbulent velocity inlet profile with grooveBC, here is my code

Code:
 inlet
 {
        type            groovyBC
    variables       "delta0Star=1;uInf=4.5;";
    valueExpression "(pos().y<=(8*delta0Star))  ? vector(4.5* pow( pos().y/(8*1) , 1/7 ),0,0 ) : vector( 4.5,0,0)";
        value           uniform (4.5 0 0);
   }
So my first problem is that if I write my variables name in the valueExpression I get the following groovyError error: Parser Error for driver PatchValueExpressionDriver at "1.15-24" :"field delta0Star not existing or of wrong type".

Second error is that if I substitute the variables for their real values I get the following problem:



As you see it seems like if pos().y is inverted it should be the other way around, not starting from yMax instead starting in y=0 as pos().y<=20*delta0Star says

Anyone has a clue about the problem?

Thank you very much
ssss is offline   Reply With Quote

Old   August 7, 2014, 15:44
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by ssss View Post
Hi,

Iḿ trying to implement a turbulent velocity inlet profile with grooveBC, here is my code

Code:
 inlet
 {
        type            groovyBC
    variables       "delta0Star=1;uInf=4.5;";
    valueExpression "(pos().y<=(8*delta0Star))  ? vector(4.5* pow( pos().y/(8*1) , 1/7 ),0,0 ) : vector( 4.5,0,0)";
        value           uniform (4.5 0 0);
   }
So my first problem is that if I write my variables name in the valueExpression I get the following groovyError error: Parser Error for driver PatchValueExpressionDriver at "1.15-24" :"field delta0Star not existing or of wrong type".
Classic: you forgot the ; after groovyBC. OpenFOAM therefor thought your variables-entry is part of the type entry and didn't "see" it.

Quote:
Originally Posted by ssss View Post
Second error is that if I substitute the variables for their real values I get the following problem:



As you see it seems like if pos().y is inverted it should be the other way around, not starting from yMax instead starting in y=0 as pos().y<=20*delta0Star says

Anyone has a clue about the problem?

Thank you very much
I don't see anything from that picture. U on the boundary has a higher magnitude than on the interior. That's all.

Please:
- Use "Save Screenshot" in paraview. So we don't have to look at the Ubuntu-logo
- Add a colorbar so that we get a sense of the quantities
- Use the "insert Image" of the board. That way the posting gets properly formated. Now it is formatted to the width of your picture which makes it almost unreadable
- When talking about values use the cell values not the point-values. Because right now we're looking at interpolation artefacts (in the upper left corner)
- to discuss stuff that groovyBC did select only the boundary in question in "Mesh parts" and deselect the internal field.
__________________
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
gschaider is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Parabolic Velocity Profile Allan_Carey93 OpenFOAM Running, Solving & CFD 4 November 26, 2015 07:11
Patch fully developed velocity and turbulence profile over full domain Teumde FLUENT 2 June 29, 2015 14:47
problem with either velocity or pressure counter in a certain techplot profile. ghmahtabi Tecplot 1 February 23, 2012 10:21
[swak4Foam] Scale discrete inlet velocity profile with groovyBC cboss OpenFOAM Community Contributions 1 June 20, 2010 14:02
Logarithmic velocity profile cfdworker Fluent UDF and Scheme Programming 0 April 23, 2009 20:09


All times are GMT -4. The time now is 12:18.