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

[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 21, 2012, 08:31
Default
  #281
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 17
linch is on a distinguished road
Quote:
Originally Posted by gschaider View Post
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
I use a moving reference frame. It is sufficient to describe the reference frame velocity with a single vector, this velocity is needed for BCs. That's it, actually.

Best regards,
Illya
linch is offline   Reply With Quote

Old   August 21, 2012, 08:58
Default
  #282
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Done

Quote:
Originally Posted by gschaider View Post
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
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   August 23, 2012, 14:48
Default
  #283
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by linch View Post
I use a moving reference frame. It is sufficient to describe the reference frame velocity with a single vector, this velocity is needed for BCs. That's it, actually.
It was discussed elsewhere: it is not possible to access a variable in the solver code if it is not registered with the mesh.

The possibilities with swak are (I assume that the reference frame velocity is specified in a file):
- use a global variable that is used in all boundary conditions. That wy you have to specify the velocity twice (and consistent): once in the original file, the other time in the controlDict with a global-variable functionObject
- with the pythonIntegration (or the swakCoded if you prefer C++) functionObject: the FO reads the value from the file and injects it into the global namespace

Note: with option 1 you have a possibility to keep it consistent: add a dictionary file with an entry

referenceVelocity (1 1 42);

include that using the include directive into both files where the vel is used and write $referenceVelocity instead of the velocity.
gschaider is offline   Reply With Quote

Old   April 8, 2013, 08:52
Default Download of Groovy Bc
  #284
New Member
 
Mohammad Ghandali
Join Date: Jan 2013
Posts: 8
Rep Power: 13
Mohamad(AUT) is on a distinguished road
Hi bernhard
thank you for your works i appreciate you for these
if you notice that the sourcefourge svn for downloading groovy bc lib is down can you mail it for me?
thank you for your help...

Best Regards Mohamad
Mohamad(AUT) is offline   Reply With Quote

Old   April 8, 2013, 10:19
Default
  #285
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Mohamad,

The SVN is still down and has been for a while. Temporary download instructions can be found here:

http://openfoamwiki.net/index.php/Co...am#Downloading

Note that swak4Foam combines groovyBC and funkySetField functionalities, and I believe that the individual devlopment of these two tools have come to a stop along with the introduction of swak4Foam.

Kind regards

Niels
Mohamad(AUT) likes this.
ngj is offline   Reply With Quote

Old   July 2, 2013, 03:52
Default temperature dependent velocity BC using groovyBC?
  #286
Senior Member
 
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13
Sherlock_1812 is on a distinguished road
Hi all,

I would like to have a gradient BC for velocity at the boundary that is calculated from updated values of the temperature field. Is this possible using groovyBC?

Thanks in advance,
__________________
Regards,

Srivaths
Sherlock_1812 is offline   Reply With Quote

Old   July 2, 2013, 11:33
Default
  #287
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Sherlock_1812 View Post
Hi all,

I would like to have a gradient BC for velocity at the boundary that is calculated from updated values of the temperature field. Is this possible using groovyBC?

Thanks in advance,
Yes, it is. Use gradientExpression and set fractionExpression to "0"
__________________
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   July 3, 2013, 01:49
Default
  #288
Senior Member
 
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13
Sherlock_1812 is on a distinguished road
Hi Bernhard,

Thank you for the reply.

So if I have to write gradient(U) = (1/mu)*(dSigma/dT)*gradient(T) where T is the temperature on the particular patch, it has to be like

surface
{
type groovyBC;
variables "mu= ... ;dSigma/dT= ...;";
fractionExpression "0";
gradientExpression "(1/mu)*(dSigma/dT)*T"; ---> how to make sure T is temperature of the patch 'surface' here?
}
__________________
Regards,

Srivaths

Last edited by Sherlock_1812; July 3, 2013 at 08:17.
Sherlock_1812 is offline   Reply With Quote

Old   July 3, 2013, 13:03
Default
  #289
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Sherlock_1812 View Post
Hi Bernhard,

Thank you for the reply.

So if I have to write gradient(U) = (1/mu)*(dSigma/dT)*gradient(T) where T is the temperature on the particular patch, it has to be like

surface
{
type groovyBC;
variables "mu= ... ;dSigma/dT= ...;";
fractionExpression "0";
gradientExpression "(1/mu)*(dSigma/dT)*T"; ---> how to make sure T is temperature of the patch 'surface' here?
}
T IS the current temperature on the patch. Everything else would be a bit complicated (and make groovyBC unusable). If you want things to be more complicated internalField(T) gives you the values on the cells next to the patch (sometimes, especially when dealing with gradients this value can help)

Some remarks:
- use the list-syntax for the variables. It makes things more readable
- if your U is a vector then the gradientExpression must be a vector too (it is the gradient of the field in the direction of the face normal).
__________________
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   July 4, 2013, 01:02
Default
  #290
Senior Member
 
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 13
Sherlock_1812 is on a distinguished road
Quote:
Originally Posted by gschaider View Post
T IS the current temperature on the patch. Everything else would be a bit complicated (and make groovyBC unusable). If you want things to be more complicated internalField(T) gives you the values on the cells next to the patch (sometimes, especially when dealing with gradients this value can help)

Some remarks:
- use the list-syntax for the variables. It makes things more readable
- if your U is a vector then the gradientExpression must be a vector too (it is the gradient of the field in the direction of the face normal).
Thank you for the reply and your remarks Bernhard. This will be of help.
__________________
Regards,

Srivaths
Sherlock_1812 is offline   Reply With Quote

Old   July 12, 2013, 04:39
Default
  #291
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
Hi, I am not sure why groovyBC does not work with my 1.6ext installation but works with 2.1.1. I am currently using the multiple installation iso from here. http://www.tfd.chalmers.se/~hani/kur...fromUSBiso.htm

Works fine for 2.1.1 but in 1.6ext

Code:
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 86
    could not load libgroovyBC.so: cannot open shared object file: No such file or directory
Create mesh for time = 0


Reading gravitationalProperties
Reading field h

Reading field h0 if present

Reading field U

Creating field hU



--> FOAM FATAL ERROR: 
Not Implemented
    Trying to construct an genericFvPatchField on patch inlet of field hU

    From function genericFvPatchField<Type>::genericFvPatchField(const fvPatch& p, const DimensionedField<Type, volMesh>& iF)
    in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 45.

FOAM aborting
haze_1986 is offline   Reply With Quote

Old   July 12, 2013, 05:45
Default
  #292
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by haze_1986 View Post
Hi, I am not sure why groovyBC does not work with my 1.6ext installation but works with 2.1.1. I am currently using the multiple installation iso from here. http://www.tfd.chalmers.se/~hani/kur...fromUSBiso.htm

Works fine for 2.1.1 but in 1.6ext

Code:
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 86
    could not load libgroovyBC.so: cannot open shared object file: No such file or directory
Create mesh for time = 0


Reading gravitationalProperties
Reading field h

Reading field h0 if present

Reading field U

Creating field hU



--> FOAM FATAL ERROR: 
Not Implemented
    Trying to construct an genericFvPatchField on patch inlet of field hU

    From function genericFvPatchField<Type>::genericFvPatchField(const fvPatch& p, const DimensionedField<Type, volMesh>& iF)
    in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 45.

FOAM aborting
For technical reasons every OF-installation has to have its own installation of swak/groovyBC. Seems that this 1.6-ext has none. From what I see in the link the ISO is from last years workshop. I was not involved in the creation of that ISO so I can't vouch that there was a swak for 1.6-ext on it.

I guess you'll have to get the sources from the latest release and compile them
__________________
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   July 12, 2013, 06:15
Default
  #293
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
Quote:
Originally Posted by gschaider View Post
For technical reasons every OF-installation has to have its own installation of swak/groovyBC. Seems that this 1.6-ext has none. From what I see in the link the ISO is from last years workshop. I was not involved in the creation of that ISO so I can't vouch that there was a swak for 1.6-ext on it.

I guess you'll have to get the sources from the latest release and compile them
I intend to get the tarball from
http://openfoamwiki.net/images/e/e6/...e_0.2.3.tar.gz

and wmake all from the OF1.6ext terminal.

Would that be a sensible procedure?
haze_1986 is offline   Reply With Quote

Old   July 12, 2013, 06:30
Default
  #294
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by haze_1986 View Post
I intend to get the tarball from
http://openfoamwiki.net/images/e/e6/...e_0.2.3.tar.gz

and wmake all from the OF1.6ext terminal.

Would that be a sensible procedure?
Yep. 0.2.3 is not the latest version but more up-to-date than what is on the stick anyway.

There is a problem with 1.6-dev that there are two slightly different version around. If you experience problems during compilation (something about symmTensors in the Parsers) go to Libraries/swak4FoamParsers/include/swak.H and comment (or uncomment) the line with #define FOAM_SYMMTENSOR_WORKAROUND
__________________
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   July 12, 2013, 06:39
Default
  #295
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Yep. 0.2.3 is not the latest version but more up-to-date than what is on the stick anyway.

There is a problem with 1.6-dev that there are two slightly different version around. If you experience problems during compilation (something about symmTensors in the Parsers) go to Libraries/swak4FoamParsers/include/swak.H and comment (or uncomment) the line with #define FOAM_SYMMTENSOR_WORKAROUND
Works very well, thank you very much.
haze_1986 is offline   Reply With Quote

Old   August 12, 2014, 05:30
Post inlet boundary for tensor using groovy?
  #296
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 18
Tushar@cfd is on a distinguished road
Dear Bernhard,

I wish to apply inlet boundary for the tensor using groovy BC. Suppose, the boundary is "mu*(du/dy)" along xx-direction (i.e., Txx). How would I progress?

Thanks in Advance
Tushar@cfd is offline   Reply With Quote

Old   August 12, 2014, 07:40
Default
  #297
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Tushar@cfd View Post
Dear Bernhard,

I wish to apply inlet boundary for the tensor using groovy BC. Suppose, the boundary is "mu*(du/dy)" along xx-direction (i.e., Txx). How would I progress?

Thanks in Advance
One way is to build the tensor from components with a function "tensor(Txx,...)" (there are of course 9 components.
Also all the operators (inner/outer product etc) described in table 1.2 of the OF Programmers Guide are supported

For details see:
http://sourceforge.net/p/openfoam-ex...amReference.md
Tushar@cfd likes this.
__________________
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   August 12, 2014, 07:51
Default
  #298
Senior Member
 
T. Chourushi
Join Date: Jul 2009
Posts: 321
Blog Entries: 1
Rep Power: 18
Tushar@cfd is on a distinguished road
Thank you for the info.

I will try to figure out..
Tushar@cfd is offline   Reply With Quote

Old   October 29, 2014, 18:10
Default
  #299
Senior Member
 
zandi's Avatar
 
Fatema Zandi Goharrizi
Join Date: Mar 2009
Posts: 158
Rep Power: 17
zandi is on a distinguished road
Quote:
Originally Posted by RitaFC View Post
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.
Hi RitaFC,
would you please tell me how do you fix it?
I need it really!
Thank you
zandi is offline   Reply With Quote

Old   October 29, 2014, 18:13
Default
  #300
Senior Member
 
zandi's Avatar
 
Fatema Zandi Goharrizi
Join Date: Mar 2009
Posts: 158
Rep Power: 17
zandi is on a distinguished road
Quote:
Originally Posted by RitaFC View Post
Hi

No 'swakConfiguration'. Python etc won't work
Checking swak4Foam-version and generating file
./Allwmake: line 32: wmake: command not found
I meant this error
I have the same problem
zandi is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ship resistance shows wiggles when using Overset mesh and dynamic mesh in Fluent Qingsong FLUENT 2 March 21, 2022 16:08
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
[ICEM] Dynamic mesh setup with ICEM David121284 ANSYS Meshing & Geometry 0 April 11, 2014 05:19
Dynamic Mesh "Shadow Wall" thezack FLUENT 0 June 4, 2013 23:09
dynamic mesh for drop interface IndrajitW FLUENT 0 March 30, 2013 09:03


All times are GMT -4. The time now is 17:03.