CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Boundary Conditions with GroovyBC, Normal Gradient

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   December 14, 2012, 04:55
Default
  #21
New Member
 
Peter Benovsky
Join Date: Jun 2011
Posts: 5
Rep Power: 5
Peter Benovsky is on a distinguished road
Quote:
Originally Posted by gschaider View Post
You can only have one BC on a patch at a time. Have you made sure that groovyBC is actually evaluated on that patch (for instance by introducing a syntactic error into an expression - if it fails it's evaluated)

BTW: which version of OF?
2.1.1
What I meant is that I use groovyBC for the temperature. alphat uses standard alpatWallFunction, hence should not be groovyfied.
Peter Benovsky is offline   Reply With Quote

Old   December 14, 2012, 06:26
Default
  #22
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,803
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Peter Benovsky View Post
2.1.1
What I meant is that I use groovyBC for the temperature. alphat uses standard alpatWallFunction, hence should not be groovyfied.
OK. Please provide some context (like which fields you used which BC on). It is not as absurd as you might think: I have seen people specifying 'type' twice hoping both would work.

Anyway: if the value 0 is only there during the first timestep then it is the same bug
__________________
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

Old   December 17, 2012, 09:44
Default
  #23
New Member
 
Peter Benovsky
Join Date: Jun 2011
Posts: 5
Rep Power: 5
Peter Benovsky is on a distinguished road
Quote:
Originally Posted by gschaider View Post
OK. Please provide some context (like which fields you used which BC on). It is not as absurd as you might think: I have seen people specifying 'type' twice hoping both would work.

Anyway: if the value 0 is only there during the first timestep then it is the same bug
It took longer than I thought but here it is (the context):
Code:
location "0";
object alphat;
 
heater
{
type alphatWallFunction;
value uniform 0.01;
}
 
object T;
 
heater
{
type groovyBC;
refValue uniform 300;
valueExpression "300"; 
gradientExpression "gradT*time()";
fractionExpression "0";
variables "heatFlux=100;gradT=heatFlux/(alphaEff);";
}
Without groovybc in the next time step I get for alphat:
Code:
location "0";
object alphat;
 
heater
{
type alphatWallFunction;
Prt                             0.85;
value nonuniform List<scalar>
.
.
.
}
With groovy bc it is just fixedValue with value=0
Cheers
Peter
Peter Benovsky is offline   Reply With Quote

Old   December 17, 2012, 12:30
Default
  #24
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,803
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Peter Benovsky View Post
It took longer than I thought but here it is (the context):
Code:
location "0";
object alphat;
 
heater
{
type alphatWallFunction;
value uniform 0.01;
}
 
object T;
 
heater
{
type groovyBC;
refValue uniform 300;
valueExpression "300"; 
gradientExpression "gradT*time()";
fractionExpression "0";
variables "heatFlux=100;gradT=heatFlux/(alphaEff);";
}
Without groovybc in the next time step I get for alphat:
Code:
location "0";
object alphat;
 
heater
{
type alphatWallFunction;
Prt                             0.85;
value nonuniform List<scalar>
.
.
.
}
With groovy bc it is just fixedValue with value=0
Cheers
Peter
Hmm. That is strange. It should work. Could you try some things:

- instead of alphaEff add a constant (although I don't think that is the problem)
- set valueFraction to "uniform 0" (just to be sure)
- reset the 300 in the refValue to x. This should fail (this is just to make sure that it is really read)

Which version of swak do you use (check the start of the output of funkySetFields)
__________________
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

Old   February 21, 2014, 16:25
Default
  #25
New Member
 
Xuan Ge
Join Date: Oct 2011
Location: Ames, IA, US
Posts: 6
Rep Power: 4
xuan8908 is on a distinguished road
Hi, Bernhard,

I am trying to look at your codes of the groovyBC implementation. I am
curious where you pass those strings, like "valueExpression_" and
"gradientExpression_"? In the source code, groovyBCCommon.C, you just
look up those keywords from the dictionary file and read them. How do
those strings come into play to update the boundary condition? I guess
one of those source codes may contain the implementation of this. Could
you please tell me which source code is the right one that I can read
and learn from? Thanks a lot in advance. I will appreciate your reply.
xuan8908 is offline   Reply With Quote

Old   February 22, 2014, 11:23
Default
  #26
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,803
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by xuan8908 View Post
Hi, Bernhard,

I am trying to look at your codes of the groovyBC implementation. I am
curious where you pass those strings, like "valueExpression_" and
"gradientExpression_"? In the source code, groovyBCCommon.C, you just
look up those keywords from the dictionary file and read them. How do
those strings come into play to update the boundary condition? I guess
one of those source codes may contain the implementation of this. Could
you please tell me which source code is the right one that I can read
and learn from? Thanks a lot in advance. I will appreciate your reply.
grep is your friend if you want to find the location of variables in the source code (of course there are more sophisticated tool, but this is installed on every system)

That'd be updateCoeffs in groovyBCFvPatchField.C. But the real magic happens in Libraries/swak4FoamParsers (especially everything with PatchValue in the beginning)
__________________
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

Old   February 22, 2014, 11:54
Default
  #27
New Member
 
Xuan Ge
Join Date: Oct 2011
Location: Ames, IA, US
Posts: 6
Rep Power: 4
xuan8908 is on a distinguished road
Thank you, Bernhard. I will take a look at it.
xuan8908 is offline   Reply With Quote

Old   September 17, 2014, 04:40
Default
  #28
New Member
 
Join Date: Jul 2013
Posts: 6
Rep Power: 3
Sliwa is on a distinguished road
Hello,

I am not sure this is the right thread for my question, but I was wondering if it was possible to set a fixed gradient in the direction normal to the patch and a fixed value in the tangential direction with groovyBC?
Sliwa is offline   Reply With Quote

Old   September 17, 2014, 17:29
Default
  #29
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,803
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Sliwa View Post
Hello,

I am not sure this is the right thread for my question, but I was wondering if it was possible to set a fixed gradient in the direction normal to the patch and a fixed value in the tangential direction with groovyBC?
There is a groovyBCDirection that wraps directionMixed (DirectionMixed mixed bc) but maybe this is not exactly what you need (no Dirichlet in tangential direction)
__________________
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

Old   September 18, 2014, 10:56
Default
  #30
New Member
 
Join Date: Jul 2013
Posts: 6
Rep Power: 3
Sliwa is on a distinguished road
Yes, I needed the Dirichlet in the tangential direction. Thanks anyway.
Sliwa is offline   Reply With Quote

Reply

Tags
boundary, condition, gradient, groovybc, normal

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
Algorithm for coupled pde with all flux boundary conditions benk Main CFD Forum 3 December 28, 2010 05:09
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05
CFX doesn't continue calculation... mactech001 CFX 6 November 15, 2009 21:25


All times are GMT -4. The time now is 02:06.