|
[Sponsors] |
October 28, 2011, 07:30 |
Understanding Code behind BCs
|
#1 |
Senior Member
|
What do the Code parts of the BCs actually do?
While there already are several implemented boundary conditions and while groovyBC helps with even extending the range of BCs, sometimes it is necessary to do own BCs. By now this is the case for me as well. I will have to implement some boundary conditions even groovyBC is not capable of. Therefore I really need to understand how the BCs work, how/where from they get their values, how/where to they write the values to the fields after they maybe have changed them, how the changes of the values take place inside the BC... I hope somebody can tell me a good starting point for understanding how the BCs work in the code-way. Maybe even the place of a very basic (and extensively commented?) BC would be enough... To all: Feel free to add further questions on the code of the BCs and particularly the answers will be welcome! Nevertheless, please avoid questions on the physics side of the BCs, as there are other threads for these! |
|
October 29, 2011, 03:20 |
|
#2 |
Senior Member
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18 |
Hi
See /opt/openfoam201/src/finiteVolume/fields/fvPatchFields/basic/fixedValue Good luck Ata |
|
November 29, 2011, 04:33 |
|
#4 |
New Member
Ola Widlund
Join Date: Jun 2011
Location: Sweden
Posts: 13
Rep Power: 15 |
Hi,
I guess you're an expert on BC:s by now, but anyway.... What I did the first time was to copy a bc class that inherits from either fixedValue or mixed (depending on what is closest to your needs), then do search-replace on the calss name to make it your own. There are plenty of bc:s in the library that inherit and build on the basic classes. From there it's easy to see where in the code things are done. Other complex bc:s also contain a lot of useful code snippets you could reuse. For example how to look up values of other fields, read variable settings from the dictionary of the bc, etc. /Ola |
|
November 30, 2011, 09:17 |
|
#5 |
Senior Member
|
Hi Ola,
actually, I am not yet much more advanced concerning BCs. I have the luxury of having several open problems to solve, so I first decided to work on two other major points while waiting for additional answers in this thread. ;-) Thank you (and all who will follow with giving further enlightening answers!) for your answers and assistance! |
|
November 30, 2011, 10:13 |
Hi Linse
|
#6 |
Member
kshitij neroorkar
Join Date: Mar 2009
Location: Michigan, USA
Posts: 32
Rep Power: 17 |
I have a pdf document that I had made some time back for explaining how boundary conditions are implemented in OpenFOAM. I can send it to you if you give me your email address
|
|
December 13, 2011, 10:40 |
|
#7 | |
New Member
jack zhou
Join Date: Dec 2011
Posts: 1
Rep Power: 0 |
Quote:
Thanks, jack Zhou |
||
January 8, 2012, 05:48 |
|
#8 |
Member
Andreas Ruopp
Join Date: Aug 2009
Location: Stuttgart / Germany
Posts: 31
Rep Power: 17 |
Hellokshitij ,
could you send me your bc-pdf too? I'm currently working on a internalfixedvalue-problem... Thanks in advance Andy |
|
January 9, 2012, 09:58 |
|
#9 |
Member
kshitij neroorkar
Join Date: Mar 2009
Location: Michigan, USA
Posts: 32
Rep Power: 17 |
Hi Andy
can you please send me your email address, mine is kdneroorkar(at)gmail.com Thanks Kshitij |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The FOAM Documentation Project - SHUT-DOWN | holger_marschall | OpenFOAM | 242 | March 7, 2013 13:30 |
Debugging Unsteady 2-D Panel Method Code: Wake Modeling | RajeshAero | Main CFD Forum | 5 | November 10, 2011 06:48 |
Understanding k-omega SST model source code | tmhonka | OpenFOAM Programming & Development | 1 | September 8, 2009 08:33 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 16:56 |
What is the Better Way to Do CFD? | John C. Chien | Main CFD Forum | 54 | April 23, 2001 09:10 |