CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] groovyBC, coupling inlet with velocity at specific point location (https://www.cfd-online.com/Forums/openfoam-community-contributions/91671-groovybc-coupling-inlet-velocity-specific-point-location.html)

olivierG August 18, 2011 12:03

groovyBC, coupling inlet with velocity at specific point location
 
hello,

I need to link my velocity inlet with the velocity somewhere inside the domain. I know the location / coordinate, but i can't use the coupling betwheen patch.

Can groovyBc do this ?
ex, something like :
Code:

inlet
{
  type  groovyBC;
  variables    "V022@pos(0,2,2)=U";
  valueExpression "(V022 > 1.2) ? 2 : 0";

where v022 is the velocity at coordinate (0,2,2)

regards,
olivier

gschaider August 18, 2011 12:18

Quote:

Originally Posted by olivierG (Post 320659)
hello,

I need to link my velocity inlet with the velocity somewhere inside the domain. I know the location / coordinate, but i can't use the coupling betwheen patch.

Can groovyBc do this ?

Yes. If this is the answer you were looking for read no further ;)

Quote:

ex, something like :
Code:

inlet
{
  type  groovyBC;
  variables    "V022@pos(0,2,2)=U";
  valueExpression "(V022 > 1.2) ? 2 : 0";

where v022 is the velocity at coordinate (0,2,2)

regards,
olivier
Ah. You're here. So a mere "Yes" wasn't enough for you?

The last release of swak4Foam (I see from the syntax that you're a legacy-groovyBC-man, sorry you'll have to move to the darker side of the force) can do this via a sampled set.

Basically what you do is
1. create a sampled set via a special functionObject
2. Address this set via the more universal remote variables mechanism in swak

Have a look at the fillingTheDam-example that comes with swak or at my presentation from this years Workshop to get an idea

Bernhard

newOFuser August 18, 2011 17:44

groovyBC; multiple domains
 
Hi

I am a relatively new user of OpenFoam, working in the area of combustion dynamics, and needed some help with transient boundary conditions.

The combustion system is divided into 3 components: the inlet channel (non-reacting flow), the combustor (reacting flow computations in this region), and the exhaust (models acoustics using 1D gas dynamics); the three are to be linked by appropriate boundary conditions (ie coupled at the inlet and exit planes of the combustor).

I saw that groovyBC be used for coupling of patches. The sample case for groovyBC defines 3 regions:
Region A: inlet ; interface11
Region B: interface12 ; interface21
Region C: interface22 ; outlet

However, I am interested in performing the reacting simulations only in the combustor region. Could someone please point out how it may be used for the above case, or if there are other ways to implement it?
Any tips would be useful, as I still learning working with OF! :)

Thanks so much!
amit

gschaider August 18, 2011 19:14

Quote:

Originally Posted by newOFuser (Post 320693)
Hi

I am a relatively new user of OpenFoam, working in the area of combustion dynamics, and needed some help with transient boundary conditions.

The combustion system is divided into 3 components: the inlet channel (non-reacting flow), the combustor (reacting flow computations in this region), and the exhaust (models acoustics using 1D gas dynamics); the three are to be linked by appropriate boundary conditions (ie coupled at the inlet and exit planes of the combustor).

I saw that groovyBC be used for coupling of patches. The sample case for groovyBC defines 3 regions:
Region A: inlet ; interface11
Region B: interface12 ; interface21
Region C: interface22 ; outlet

However, I am interested in performing the reacting simulations only in the combustor region. Could someone please point out how it may be used for the above case, or if there are other ways to implement it?
Any tips would be useful, as I still learning working with OF! :)

Thanks so much!
amit

Please don't hijack threads. It makes it rather hard to keep up discussions if the title of the thread has got nothing to do with the content (except that both problems attempt to use the same tool). http://openfoamwiki.net/index.php/Ho...age_Boardpoint 5 (groovyBC in the title of the new thread will surly get my attention)

newOFuser August 18, 2011 20:28

Thanks for pointing it out. Will take care from now on!
A new thread has been started for the discussion.

Cheers,
ak

gascortado June 22, 2012 22:25

In a related to note, I just need to couple the outlet of a domain (called interface11) with the inlet of another one (called interface 12). Both patches have the same exact number of cells. I do not want/need to perform any kind of averaging or interpolation, just need the velocity and pressure from the end of one domain to be exactly the same in the inlet of the other domain. I'm trying:

interface12
{
type groovyBC;
variables "U_int11@interface11=U;";
valueExpression "U_int11";
}
interface11
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}


in the U/0 file and:

interface12
{
type groovyBC;
variables "p_int12@interface11=p;";
valueExpression "p_int12";
}
interface11
{
type zeroGradient;
}


in the p/0 file.

I am not getting the desired results. Can anyone tell me what am I doing wrong?? Thanks

gschaider June 23, 2012 08:44

Quote:

Originally Posted by gascortado (Post 367905)
In a related to note, I just need to couple the outlet of a domain (called interface11) with the inlet of another one (called interface 12). Both patches have the same exact number of cells. I do not want/need to perform any kind of averaging or interpolation, just need the velocity and pressure from the end of one domain to be exactly the same in the inlet of the other domain. I'm trying:

interface12
{
type groovyBC;
variables "U_int11@interface11=U;";
valueExpression "U_int11";
}
interface11
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}


in the U/0 file and:

interface12
{
type groovyBC;
variables "p_int12@interface11=p;";
valueExpression "p_int12";
}
interface11
{
type zeroGradient;
}


in the p/0 file.

I am not getting the desired results. Can anyone tell me what am I doing wrong?? Thanks

First: the @ tells me that you're using the "old" groovyBC. Even if that feature will be added it surly will only be for the groovyBC that comes with swak4Foam

Second: I have explained that a number of times. Even for an equal number of cells this is currently not possible. Up to know I (nor one of the people I work for) did need it and I have no intention to rush in a feature that is not THAT trivial to test (equal number does not mean equal ordering ... what if the patches are not translatory aligned ... what for parallel cases).

So: you're doing nothing wrong. It just doesn't work that way

Also: for most examples that came up (including yours) I'm not quite sure why people didn't set up the problem with cyclic boundary conditions in the first place


All times are GMT -4. The time now is 01:09.