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

GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh

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

Like Tree3Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 25, 2012, 10:42
Default
  #261
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,737
Rep Power: 36
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by RitaFC View Post
I thank you for your reply.
Perhaps Bison is not correctely installed.
1 - I download swak4Foam withot problems. In which directhory it should be placed ?
2 - Moving to the swak4Foam directory - Doing "./Allwmake" - Appears:
No 'swakConfiguration'. Python etc won't work
Checking swak4Foam- version and generating file
./Allwmake: 9: ... not found
./Allwmake: 17: ... not found
./Allwmake: 19: bison: not found
Bison is version
...
Can you give me a opinion what to do ?
Kind regards,
Rita
"Install bison and flex" is the best I can offer. Does

which bison

show an installed bison?

BTW: what do the "..." in your output mean. Or are the really there?
gschaider is offline   Reply With Quote

Old   April 26, 2012, 05:36
Default
  #262
New Member
 
Rita Carvalho
Join Date: Apr 2012
Posts: 6
Rep Power: 4
RitaFC is on a distinguished road
Quote:
Originally Posted by gschaider View Post
"Install bison and flex" is the best I can offer. Does

which bison

show an installed bison?

BTW: what do the "..." in your output mean. Or are the really there?
Hi
I'm sorry to borrow you again but in a different computer with ubuntu 10.10,
I started all the instalations again: m4,bison with libiconv, flex from the root I had no errors and after:
1. svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breeder_1.7/libraries/swak4Foam/
I had a warning=> Fetching external item into 'swak4Foam/Libraries/simpleFunctionObjects'
svn: warning: 'swak4Foam/Libraries/simpleFunctionObjects' is already a working copy for a different URL
2. ./Allwmake
root@ubuntu:~/swak4Foam# ./Allwmake
No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
./Allwmake: line 32: wmake: command not found
Requirements for Library not satisfied. I see no sense in going on
root@ubuntu:~/swak4Foam#

Would you be so kind to answer me again. Perhaps you have an idea what I am doing wrong !
Kind regards, Rita
RitaFC is offline   Reply With Quote

Old   April 26, 2012, 06:38
Default
  #263
New Member
 
Rita Carvalho
Join Date: Apr 2012
Posts: 6
Rep Power: 4
RitaFC is on a distinguished road
Quote:
Originally Posted by gschaider View Post
"Install bison and flex" is the best I can offer. Does

which bison

show an installed bison?

BTW: what do the "..." in your output mean. Or are the really there?
Just to complement : when download swak4Foam from home in ubuntu 10.10 with openFoam 1.7 or ubuntu 11.10 with openFoam 2.1:

rita@ubuntu:~/swak4Foam$ ./Allwmake
No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
./Allwmake: 9: [[: not found
./Allwmake: 17: [[: not found
Bison is version 2.4.1
./Allwmake: 33: cannot open 2.3: No such file
./Allwmake: 33: [[: not found
OpenFOAM-version: Major 2 Minor 1 Patch 0
./Allwmake: 67: [[: not found
No change to swak4FoamParsers/foamVersion4swak.H
SOURCE=FaceSetValueExpressionDriver.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -IMake/linuxGccDPOpt -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/sampling/lnInclude -I/opt/openfoam210/src/triSurface/lnInclude -I/opt/openfoam210/src/lagrangian/basic/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/FaceSetValueExpressionDriver.o
In file included from lnInclude/SubsetValueExpressionParser_location.hh:44:0,
from SubsetValueExpressionParser.tab.hh:65,
from SubsetValueExpressionDriver.H:60,
from SetSubsetValueExpressionDriver.H:48,
from FaceSetValueExpressionDriver.H:52,
from FaceSetValueExpressionDriver.C:34:
position.hh: In function ‘bool parserSubset:perator==(const parserSubset:osition&, const parserSubset:osition&)’:
position.hh:136:69: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
...

In file included from lnInclude/SubsetValueExpressionParser_location.hh:44:0,
from SubsetValueExpressionParser.tab.hh:65,
from SubsetValueExpressionDriver.H:60,
from SetSubsetValueExpressionDriver.H:48,
from CellSetValueExpressionDriver.H:52,
from CellSetValueExpressionDriver.C:34:
position.hh: In function ‘bool parserSubset:perator==(const parserSubset:osition&, const parserSubset:osition&)’:
position.hh:136:69: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
RitaFC is offline   Reply With Quote

Old   April 26, 2012, 14:18
Default
  #264
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,737
Rep Power: 36
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by RitaFC View Post
Hi
I'm sorry to borrow you again but in a different computer with ubuntu 10.10,
I started all the instalations again: m4,bison with libiconv, flex from the root I had no errors and after:
1. svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breeder_1.7/libraries/swak4Foam/
I had a warning=> Fetching external item into 'swak4Foam/Libraries/simpleFunctionObjects'
svn: warning: 'swak4Foam/Libraries/simpleFunctionObjects' is already a working copy for a different URL
2. ./Allwmake
root@ubuntu:~/swak4Foam# ./Allwmake
No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
./Allwmake: line 32: wmake: command not found
Requirements for Library not satisfied. I see no sense in going on
root@ubuntu:~/swak4Foam#

Would you be so kind to answer me again. Perhaps you have an idea what I am doing wrong !
Kind regards, Rita
In that case the wmake utility is not found. Reason is probably a problem with your OF installation on that machine. Nothing swak-specific (you probably can't compile ANY utilities on that machine)
gschaider is offline   Reply With Quote

Old   April 26, 2012, 14:24
Default
  #265
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,737
Rep Power: 36
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by RitaFC View Post
Just to complement : when download swak4Foam from home in ubuntu 10.10 with openFoam 1.7 or ubuntu 11.10 with openFoam 2.1:

rita@ubuntu:~/swak4Foam$ ./Allwmake
No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
./Allwmake: 9: [[: not found
./Allwmake: 17: [[: not found
Bison is version 2.4.1
./Allwmake: 33: cannot open 2.3: No such file
./Allwmake: 33: [[: not found
OpenFOAM-version: Major 2 Minor 1 Patch 0
./Allwmake: 67: [[: not found
No change to swak4FoamParsers/foamVersion4swak.H
SOURCE=FaceSetValueExpressionDriver.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -IMake/linuxGccDPOpt -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/sampling/lnInclude -I/opt/openfoam210/src/triSurface/lnInclude -I/opt/openfoam210/src/lagrangian/basic/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/FaceSetValueExpressionDriver.o
In file included from lnInclude/SubsetValueExpressionParser_location.hh:44:0,
from SubsetValueExpressionParser.tab.hh:65,
from SubsetValueExpressionDriver.H:60,
from SetSubsetValueExpressionDriver.H:48,
from FaceSetValueExpressionDriver.H:52,
from FaceSetValueExpressionDriver.C:34:
position.hh: In function ‘bool parserSubset:perator==(const parserSubset:osition&, const parserSubset:osition&)’:
position.hh:136:69: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
...

In file included from lnInclude/SubsetValueExpressionParser_location.hh:44:0,
from SubsetValueExpressionParser.tab.hh:65,
from SubsetValueExpressionDriver.H:60,
from SetSubsetValueExpressionDriver.H:48,
from CellSetValueExpressionDriver.H:52,
from CellSetValueExpressionDriver.C:34:
position.hh: In function ‘bool parserSubset:perator==(const parserSubset:osition&, const parserSubset:osition&)’:
position.hh:136:69: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
That is the output on the other machine (the 11.10, right?). My shell-scripting skills are not good enough to know what exactly happened here. Maybe /bin/sh is now a different shell on Ubuntu (don't have that either). Try replacing the first line of Libraries/Allwmake which reads

#! /bin/sh

with

#! /bin/bash

and see whether it happens again
gschaider is offline   Reply With Quote

Old   May 8, 2012, 06:06
Default
  #266
New Member
 
Rita Carvalho
Join Date: Apr 2012
Posts: 6
Rep Power: 4
RitaFC is on a distinguished road
Sorry because I forget to report that the problem is solved.
I thank you for the answer.
In fact the file was already with "bash". But with a lot of patience and installations and verifing the text files in "swakconfiguration" and "the Files" the problem is solved and swak4Foam is working pretty well.
Thanks for that also.

Note: However the messages 9 not found and so on still appeared.
RitaFC is offline   Reply With Quote

Old   July 5, 2012, 16:49
Default inlet wave modulation
  #267
Member
 
ak
Join Date: May 2011
Posts: 71
Rep Power: 5
newOFuser is on a distinguished road
Hello all,

I am trying to study forced response of step combustor using a compressible solver with turbulence modeling.

Instead of imposing a fluctuating velocity at the inlet, I would like to use the inlet wave modulation technique (see attached figure from a paper).

Could some one please let me know if and how this could be implemented in OpenFOAM? Can groovyBC be used for this purpose? [I am sure there must be a way! ]

Thanks so much!
amit
Attached Images
File Type: jpg IWM.JPG (69.3 KB, 26 views)
newOFuser is offline   Reply With Quote

Old   July 6, 2012, 05:14
Default
  #268
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,737
Rep Power: 36
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by newOFuser View Post
Hello all,

I am trying to study forced response of step combustor using a compressible solver with turbulence modeling.

Instead of imposing a fluctuating velocity at the inlet, I would like to use the inlet wave modulation technique (see attached figure from a paper).

Could some one please let me know if and how this could be implemented in OpenFOAM? Can groovyBC be used for this purpose? [I am sure there must be a way! ]

Thanks so much!
amit
Quick glance at the paper says: Yes. Have a look at the pulsedPitzDaily-case that does something similar (of course you'll only need the real component of the complex exponential function given in the paper, but that is "Math 101")
gschaider is offline   Reply With Quote

Old   July 13, 2012, 10:13
Default
  #269
Member
 
ak
Join Date: May 2011
Posts: 71
Rep Power: 5
newOFuser is on a distinguished road
Thanks for the reply! I am currently using the same formulations as implemented in pulsedPitzDaily to implement the IVM (velocity modulation) case. [Thanks for the groovyBC tool!]

However, I am not sure how to go about implementing IWM (wave modulation). The paper also says "To use IWM, however, codes must use boundary conditions based on characteristic methods". The determination of A's is also not very clear. Do you have any insights on this?

On another note, I also came across some work (F. Piscaglia, A. Montorfano) that mentioned that the waveTransmissive BC is not perfectly non-reflecting, and there has been some work in implementing NSCBC in openFoam, as well as acoustic sources. Is the work available in the public domain?

Thanks!
ak
newOFuser is offline   Reply With Quote

Old   July 13, 2012, 18:38
Default
  #270
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,737
Rep Power: 36
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by newOFuser View Post
Thanks for the reply! I am currently using the same formulations as implemented in pulsedPitzDaily to implement the IVM (velocity modulation) case. [Thanks for the groovyBC tool!]

However, I am not sure how to go about implementing IWM (wave modulation). The paper also says "To use IWM, however, codes must use boundary conditions based on characteristic methods". The determination of A's is also not very clear. Do you have any insights on this?

On another note, I also came across some work (F. Piscaglia, A. Montorfano) that mentioned that the waveTransmissive BC is not perfectly non-reflecting, and there has been some work in implementing NSCBC in openFoam, as well as acoustic sources. Is the work available in the public domain?
Don't know. Guess you'd best open a new thread with that thread as I don't think that the people who know will find the question in this thread
gschaider is offline   Reply With Quote

Old   July 31, 2012, 11:30
Default directionMixed BC by groovyBC
  #271
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 111
Rep Power: 7
ziemowitzima is on a distinguished road
Hi
First of all , thanks for groovyBC !

I have a question. Is it possible to simulate directionMixed like BC using groovyBC ?
I am interesting in velocity BC.
I would like to have fixedValue (some time and space function) in the normal direction and some fixedGradient (again some time and space function) in the tangential direction.

Is groovyBCDirection suitable for this ? Unfortunately I could not find any example how to use it...
Is there any example how to use them ?

I tried sth like this:

sidesleft
{
type groovyBCDirection;
variables (
"yp=pts().y;"
"ep=1/0.0447213595499958;"
"para=-(1 + ep*pos().y*(2 - ep*pos().y))*normal();"
);
valueExpression "sin(time())*para";
gradientExpresion "
cos(time())*para";
valueFraction (1 0 0 0 0 0);
value uniform (0 0 0);

}


It does not give any run time error, but I am not sure if it does what I would like ...

Many Thanks
ziemowitzima is offline   Reply With Quote

Old   August 6, 2012, 18:11
Default
  #272
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,737
Rep Power: 36
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by ziemowitzima View Post
Hi
First of all , thanks for groovyBC !

I have a question. Is it possible to simulate directionMixed like BC using groovyBC ?
I am interesting in velocity BC.
I would like to have fixedValue (some time and space function) in the normal direction and some fixedGradient (again some time and space function) in the tangential direction.

Is groovyBCDirection suitable for this ? Unfortunately I could not find any example how to use it...
Is there any example how to use them ?

I tried sth like this:

sidesleft
{
type groovyBCDirection;
variables (
"yp=pts().y;"
"ep=1/0.0447213595499958;"
"para=-(1 + ep*pos().y*(2 - ep*pos().y))*normal();"
);
valueExpression "sin(time())*para";
gradientExpresion "
cos(time())*para";
valueFraction (1 0 0 0 0 0);
value uniform (0 0 0);

}


It does not give any run time error, but I am not sure if it does what I would like ...

Many Thanks
I guess the problem is that your valueFraction gets overwritten by the fractionExpression which defaults to "symmTensor(1,0,0,1,0,1)" (the one-matrix).

Check the value of valueFraction at later timesteps
gschaider is offline   Reply With Quote

Old   August 9, 2012, 08:55
Default
  #273
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 164
Rep Power: 6
linch is on a distinguished road
Hi folks,

is it possible to use a dimensionedScalar or a vector in groovyBC, not a field?

Best regards,
Illya
linch is offline   Reply With Quote

Old   August 9, 2012, 09:04
Default
  #274
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 912
Rep Power: 16
akidess will become famous soon enough
Illya, I think you need this: http://openfoamwiki.net/index.php/Contrib_IOReferencer
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Check out the scientific computing exchange http://scicomp.stackexchange.com
akidess is offline   Reply With Quote

Old   August 9, 2012, 11:09
Default
  #275
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 111
Rep Power: 7
ziemowitzima is on a distinguished road
Hi Illay,
I am not sure if I understood your question.
But in groovyBC (and any other BC) you have to specify vector or a scalar ...
ziemowitzima is offline   Reply With Quote

Old   August 15, 2012, 13:34
Default
  #276
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 912
Rep Power: 16
akidess will become famous soon enough
Any idea why
Code:
fractionExpression "sqr(normal());";
in groovyBCDirection leads to a syntax error, unexpected ')' ?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Check out the scientific computing exchange http://scicomp.stackexchange.com
akidess is offline   Reply With Quote

Old   August 20, 2012, 17:00
Default
  #277
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,737
Rep Power: 36
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by akidess View Post
Any idea why
Code:
fractionExpression "sqr(normal());";
in groovyBCDirection leads to a syntax error, unexpected ')' ?
Well. normal() is a vector. sqr expects a scalar. The parser says "This can't be all". Something like "sqr(normal().x)" or "sqr(mag(normal()))" might work
gschaider is offline   Reply With Quote

Old   August 20, 2012, 17:03
Default
  #278
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,737
Rep Power: 36
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by linch View Post
Hi folks,

is it possible to use a dimensionedScalar or a vector in groovyBC, not a field?

Best regards,
Illya
A dimensionedScalar defined in the program? No. There are some ways around (the IOreferencer described below is one of them). But to say which is the best it would be helpful if you described the problem you want to solve
gschaider is offline   Reply With Quote

Old   August 21, 2012, 04:22
Default
  #279
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 912
Rep Power: 16
akidess will become famous soon enough
Quote:
Originally Posted by gschaider View Post
Well. normal() is a vector. sqr expects a scalar. The parser says "This can't be all". Something like "sqr(normal().x)" or "sqr(mag(normal()))" might work
Foam::sqr will return a tensor when called with a vector, which is very handy for the fractionExpression of groovyBCDirection. Ok to file a bugrep?
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Check out the scientific computing exchange http://scicomp.stackexchange.com
akidess is offline   Reply With Quote

Old   August 21, 2012, 07:27
Default
  #280
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,737
Rep Power: 36
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by akidess View Post
Foam::sqr will return a tensor when called with a vector, which is very handy for the fractionExpression of groovyBCDirection. Ok to file a bugrep?
I wasn't aware of this. That's why it was not represented in the grammar.

That would be a simple fix to the grammar.

You don't have to ask to file a bug report. If I don't like them I will turn them down Yes. Please
gschaider is offline   Reply With Quote

Reply

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
FunkySetFields for OF 141 mer OpenFOAM Pre-Processing 71 June 11, 2014 11:34
Running funkySetFields sara OpenFOAM Running, Solving & CFD 10 October 3, 2012 10:08
FunkySetFields dictionary gschaider OpenFOAM Running, Solving & CFD 14 December 3, 2008 21:13
FunkySetFields for cyclic bc zakifoam OpenFOAM Pre-Processing 1 December 18, 2007 07:24


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