|
[Sponsors] |
[swak4Foam] groovyBC results diferent from funkySetBoundaryField?! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 22, 2012, 10:52 |
groovyBC results diferent from funkySetBoundaryField?!
|
#1 |
Member
|
Hello,
I'm trying to run a case with groovyBC because my boudary condition will need to change with time and I notice that time() is available there. However when I'm running the case (without using time, check bottom expression) the correct values are putted on the boundary but the internal field it's not changing. Code:
Inlet { type groovyBC; value uniform (0 0 0); variables "bx=2.669/sqrt(pos().x*pos().x+pos().y*pos().y)*sin(atan(pos().y/pos().x));by=-2.669/sqrt(pos().x*pos().x+pos().y*pos().y)*cos(atan(pos().y/pos().x));"; valueExpression "vector(bx,by,0)"; } Perhaps I'm doing something wrong with groovy?! |
|
October 22, 2012, 16:28 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
BTW: which version of swak are you using? Check if there is an output "swakVersion: x.y.z" just below the regular OF-Header when you run funkySetBoundaryField. Not that I think that this is your problem because I'm not aware of a bug like this in the past
__________________
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 |
||
October 22, 2012, 17:05 |
|
#3 |
Member
|
The value and refValue are the same and both of them are the same as funkySetBoudary.
valueFraction should be "1" Drichilet BC The version is 0.2.0. But, one strange thing happen, when I'm use a similar expression for a scalar its works. Maybe its somehow related to my code (or not). At least I have find a way of get around this. Thanks for your help Bernhard, Carlos |
|
October 22, 2012, 17:57 |
|
#4 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
What you could do is: set the type of the BC to mixed. Set the refValue with funkySetBoundaryField to the value you want and try this. If the problem persists then it is a problem with mixed
__________________
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 |
|||
October 22, 2012, 18:50 |
|
#5 |
Member
|
Yes it is "1".
I'm sure now that the problem is with my code. I'm working on a solution now.. Thanks, Carlos |
|
October 23, 2012, 07:59 |
|
#6 |
Member
|
Another question..
Imagine that in my BC I need to know the field value in the cell next to the wall and I need to know the distance from the BC to that cell. Something like this Code:
B[wall]=B[wall+1]/deltaY; One feature that was suggested by a user for old-school groovyBC was to access the values on other boundaries • This is done via external variables • For technical reasons only a single value (min, max, average) is stored • This has been extended for other entities (fields, sets, . . . ) Thanks, Carlos |
|
October 23, 2012, 09:23 |
|
#7 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
__________________
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 |
|||
October 23, 2012, 10:37 |
|
#8 |
Member
|
Great!!
Your utilities are the best... Thanks, Carlos |
|
October 23, 2012, 11:15 |
|
#9 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Well. They're standing on the shoulders of giants: the functionality is all OpenFOAM. They just put a wrapper around it
__________________
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC for oscillatory flow | liybzd | OpenFOAM Community Contributions | 5 | November 12, 2018 08:53 |
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam | dani2702 | OpenFOAM Community Contributions | 0 | November 17, 2016 04:30 |
[swak4Foam] groovyBC issue - k and epsilon | sagnikmazumdar | OpenFOAM Community Contributions | 24 | March 1, 2015 08:16 |
Creating a tool to interpolate results | Luis Batista | OpenFOAM Running, Solving & CFD | 2 | April 11, 2013 09:15 |
[swak4Foam] groovyBC and Eqn.setReference() | benk | OpenFOAM Community Contributions | 3 | June 2, 2011 09:49 |