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 + sinusoidial waves (https://www.cfd-online.com/Forums/openfoam-community-contributions/92129-groovybc-sinusoidial-waves.html)

alexm September 3, 2011 01:21

groovyBC + sinusoidial waves
 
Hello togeher ...
maybe this ist a simple question, but nevertheless I am al little confused about and hope someone could help me.

I woluld like to use the groovyBC for the creation of a sinusoidial water wave ... and later for a standing wave ... first in 2dim.
At this point it is more or less a question for me of understanding, how to deal with this kind of boundaray conditition ...

Thanks in advance ...
Axel

gschaider September 5, 2011 05:48

Quote:

Originally Posted by alexm (Post 322722)
Hello togeher ...
maybe this ist a simple question, but nevertheless I am al little confused about and hope someone could help me.

I woluld like to use the groovyBC for the creation of a sinusoidial water wave ... and later for a standing wave ... first in 2dim.
At this point it is more or less a question for me of understanding, how to deal with this kind of boundaray conditition ...

Thanks in advance ...
Axel

You've got to be a bit more specific: what kind of waves? Accoustic? Water waves? ....

Basically write the boundary conditions down on a piece of paper. That is the difficult part. Implementing them in groovyBC ist pretty straightforward.

There is an example case groovyWaveTank floating around somewhere. I understand that it doesn't work with the latest versions of OF, but it might give you an idea

alexm September 11, 2011 03:11

Thanks for your answer. I would like to use the groovyBC for the generation of water waves in a wave tank.
I've found the "groovyWaveTank case" you mentioned and got it working for OpenFOAM 2.0.x. ... but I still have problems in understanding the syntax of the "value expression" part. Normaly at this point I reduce a problem to something I am more familiar with. So my idea of generating sinusoidial water wave with the groovyBC.

there seems to be three parts in the value expression " .... ? ... : ... " ... the first one seems to describe the wave as a scalar, the second as a vector .... standing for the propagation of the wave in each direction (?). But playing with this didn't bring me very far.

Any hint for me? Thanks again and have a nice weekend!

Greetings ... Axel

gschaider September 11, 2011 05:04

Quote:

Originally Posted by alexm (Post 323679)
Thanks for your answer. I would like to use the groovyBC for the generation of water waves in a wave tank.
I've found the "groovyWaveTank case" you mentioned and got it working for OpenFOAM 2.0.x. ... but I still have problems in understanding the syntax of the "value expression" part. Normaly at this point I reduce a problem to something I am more familiar with. So my idea of generating sinusoidial water wave with the groovyBC.

there seems to be three parts in the value expression " .... ? ... : ... " ... the first one seems to describe the wave as a scalar, the second as a vector .... standing for the propagation of the wave in each direction (?). But playing with this didn't bring me very far.

Any hint for me? Thanks again and have a nice weekend!

Greetings ... Axel

This is the conditional operator described in
http://openfoamwiki.net/index.php/Co...e_implemented:

Basically "a ? b : c" means "if a is true in a face then use b else use c"

alexm September 13, 2011 10:02

thanks for your help ...
this seems to be one more thing of the "I should have known" type ... :rolleyes:

gschaider September 14, 2011 04:46

Quote:

Originally Posted by alexm (Post 323954)
thanks for your help ...
this seems to be one more thing of the "I should have known" type ... :rolleyes:

I say to you what I say to everyone: the "documentation" on the Wiki is not sacrosanct. Should you have the feeling that this information is missing or too hard to find feel free to rewrite the relevant stuff


All times are GMT -4. The time now is 12:56.