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

Generating a parabolic Profile with groovyBC

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 26, 2010, 12:29
Default Generating a parabolic Profile with groovyBC
  #1
New Member
 
Andreas Rarrek
Join Date: May 2009
Posts: 12
Rep Power: 8
erklaerbaer is on a distinguished road
Hi,

How can i generate a parabolic velocity profile with groovyBC?
The entry in the openfoamwiki isnt really helpful. The example "parabolic inlet condition that pulsates " generates an error and i cant find any "real" documentation. If someone could point me to the solution i would be really grateful.
erklaerbaer is offline   Reply With Quote

Old   March 27, 2010, 06:47
Default
  #2
New Member
 
Andreas Rarrek
Join Date: May 2009
Posts: 12
Rep Power: 8
erklaerbaer is on a distinguished road
I managed to get a parabolic profile with

Code:
variables "w=0.00005;m=3;n=2;Umax=1*(m+1)*(n+1)/m/n;c=pos().y-w;d=pos().z-w;a=pow((c/w),2);b=pow((d/w),2);speed=Umax*(1-a)*(1-b);";
valueExpression    "vector (speed, 0, 0)";
in my starting file for U but i have two problems.
pow() does not accecpt non integer values for the exponent like pow(a,1.5) is this a "normal" behaviour?
and
i need some function to get the distance from a point like
distance = pos().z-w now this will result in an negative value if pos().z <w which "should" be positive, i tried abs() but it seems its not implemented and i tried something like sqr(pow(pos().z-w,2)) which doesnt work either.

has anybody an idea?
thanks
erklaerbaer is offline   Reply With Quote

Old   March 27, 2010, 09:14
Default
  #3
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Quote:
Originally Posted by erklaerbaer View Post
I managed to get a parabolic profile with

Code:
variables "w=0.00005;m=3;n=2;Umax=1*(m+1)*(n+1)/m/n;c=pos().y-w;d=pos().z-w;a=pow((c/w),2);b=pow((d/w),2);speed=Umax*(1-a)*(1-b);";
valueExpression    "vector (speed, 0, 0)";
in my starting file for U but i have two problems.
pow() does not accecpt non integer values for the exponent like pow(a,1.5) is this a "normal" behaviour?
and
i need some function to get the distance from a point like
distance = pos().z-w now this will result in an negative value if pos().z <w which "should" be positive, i tried abs() but it seems its not implemented and i tried something like sqr(pow(pos().z-w,2)) which doesnt work either.

has anybody an idea?
thanks
Strange, pow() should be able to deal with floating point exponents ...
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   March 29, 2010, 14:31
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by erklaerbaer View Post
I managed to get a parabolic profile with

Code:
variables "w=0.00005;m=3;n=2;Umax=1*(m+1)*(n+1)/m/n;c=pos().y-w;d=pos().z-w;a=pow((c/w),2);b=pow((d/w),2);speed=Umax*(1-a)*(1-b);";
valueExpression    "vector (speed, 0, 0)";
in my starting file for U but i have two problems.
pow() does not accecpt non integer values for the exponent like pow(a,1.5) is this a "normal" behaviour?
and
i need some function to get the distance from a point like
distance = pos().z-w now this will result in an negative value if pos().z <w which "should" be positive, i tried abs() but it seems its not implemented and i tried something like sqr(pow(pos().z-w,2)) which doesnt work either.

has anybody an idea?
thanks
According to the grammar file power should work with any scalar-constant as an exponent. It doesn't work with expressions. So something like pow(p,T) or even pow(p,3./2) are NOT possible. What is the expression that is not working for you and what is the error message?

Bernhard
gschaider is offline   Reply With Quote

Old   April 7, 2010, 15:42
Default
  #5
New Member
 
Andreas Rarrek
Join Date: May 2009
Posts: 12
Rep Power: 8
erklaerbaer is on a distinguished road
Sorry for answering so late; I solved the problem another way.
I think (I did and learned a lot inf and of OpenFOAM the last days) I just missused the Expression.
erklaerbaer is offline   Reply With Quote

Old   June 4, 2010, 15:18
Default groovyBC
  #6
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 129
Rep Power: 7
Chrisi1984 is on a distinguished road
Hi,

Can someone tell me how I can use groovyBC?

I read the article in OpenFoamWiki http://openfoamwiki.net/index.php/Co...rds_of_warning,

but I do not understand this part:

1.2 Pre-requisites

To compile this utility Bison has to be installed. The compilation is known to work with version 2.4.1. It may probably work with older versions. Check with
bison -V
on the command line before trying to compile it and report the version number when reporting a problem.
2 Usage

2.1 Compilation and installation

Just do
wmake libso
in the directory of the sources. The library will be compiled and installed in a place (%FOAM_USER_LIBBIN) where it is usable





I installed bison 2.4.1 like it is written in the install-file:


./configure
make

make install


where do I now have to write "wmake libso"? What means "in the directory of sources"?


Best Regards


Chrisi
Chrisi1984 is offline   Reply With Quote

Old   June 6, 2010, 03:54
Default
  #7
New Member
 
Andreas Rarrek
Join Date: May 2009
Posts: 12
Rep Power: 8
erklaerbaer is on a distinguished road
Hi Chrisi,

you have to type "wmake libso" in the directory of groovyBC. The directory "make" should be in that directory where to type "wmake libso".

--

Wenn du wmake eintippst sucht das Skript nach dem Ordner Make und dort nach den Steuerdateien, deswegen musst dein aktuelles Arbeitsverzeichnis Der Ordner sein wo der Ordner "make" drinliegt.
erklaerbaer is offline   Reply With Quote

Old   June 6, 2010, 11:59
Default
  #8
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 129
Rep Power: 7
Chrisi1984 is on a distinguished road
Thank you,

I tried to do so but, I have a problem in compiling groovyBC. I am using OF 1.6.x.

I have bison (GNU Bison) 2.4.1 and flex 2.5.35.

I copied all the files of groovyBC from here https://openfoam-extend.svn.sourcefo...ries/groovyBC/.
and put it into my run folder. When I compile it I get the following error:

root@chrisilinux:~/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/groovyBC# wmake libso
wmakeLnInclude: linking include files to ./lnInclude
make: *** Keine Regel vorhanden, um das Target »PatchValueExpressionDriver.dep«,
benötigt von »Make/linuxGccDPOpt/dependencies«, zu erstellen. Schluss.
root@chrisilinux:~/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/groovyBC#

I yet tried compiling with out coomented groovyBCPointPatchFields.C, but it did not help.

Can you help me compilling groovyBC?

Thanks in advance.

Regards
Chrisi
Chrisi1984 is offline   Reply With Quote

Old   June 6, 2010, 12:54
Default
  #9
New Member
 
Andreas Rarrek
Join Date: May 2009
Posts: 12
Rep Power: 8
erklaerbaer is on a distinguished road
okay ähm.
You ned to install "svn" if it isnt already there.
Then go to a location of your choice, eg run/user_apps or whatever and paste the following line in the console
and hit Enter, svn will then download all files you ned.

After svn did its job there should be a ne folder, go with the shell to the appropirate folder (where there is a subfolder "make") and enter
"wclean" and than "wmake libso". Should work
If there comes an error just post it here.

Currently i have no OpenFOAM installed (or any linux) but i survived installing groovyBC
erklaerbaer is offline   Reply With Quote

Old   June 6, 2010, 14:51
Default
  #10
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 129
Rep Power: 7
Chrisi1984 is on a distinguished road
Thank you erklaerbaer!!

Vielen Dank!!

Dann kann ich jetzt mal versuchen damit zu arbeiten.

Now I can use groovyBC!!

Regards
Chrisi
Chrisi1984 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
Parabolic velocity profile at vertical entrance ztp911 FLUENT 2 September 3, 2013 06:10
IdeasUnvToFoam Bug amp Fix benru OpenFOAM Bugs 42 November 13, 2009 08:59
Parabolic profile relaxation in nozzle jet dneckels Main CFD Forum 0 June 25, 2009 11:19
problem in 3d parabolic velocity profile Lokesh FLUENT 8 August 11, 2005 05:36
How to create a parabolic velocity profile Nelson FLUENT 0 July 7, 2005 02:49


All times are GMT -4. The time now is 20:08.