|
[Sponsors] |
June 21, 2013, 03:24 |
OF/groovyBC: 2nd derivative or power BC
|
#1 |
Member
Join Date: Nov 2012
Posts: 58
Rep Power: 13 |
It recently occurred to me that I have no idea how to impose a BC of the following two sorts:
i) d^2 (X) / dn^2 = 0 ii) d(X) / dn = X^2 Even though they appear rarely, they are used in the literature. Is there a way to impose them natively in OF or in groovyBC? |
|
June 23, 2013, 05:25 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Power: that is easy: the "pow(X,2)". Although that is "only" explicit as it uses the current value of X to set a gradient for the "next" X
__________________
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 |
||
June 23, 2013, 06:21 |
|
#3 |
Member
Join Date: Nov 2012
Posts: 58
Rep Power: 13 |
Thanks! I should have imagined the second one, seems obvious now.
|
|
October 3, 2013, 06:55 |
|
#4 | |
Member
Join Date: Jun 2011
Posts: 80
Rep Power: 14 |
Quote:
I was wondering if implementing a convective bc like this: dU/dt + Un*dU/dn = 0, is possible by using groovy bc. Could you help me?? Thanks in advance!! Best, |
||
October 3, 2013, 08:44 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Also does the behaviour of oldTime depend on the solver storing the last time-step value. You'll have to experiment
__________________
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 |
||
September 18, 2014, 18:44 |
|
#6 | |
Member
Join Date: Jun 2011
Posts: 80
Rep Power: 14 |
Quote:
This is what I have tried but my code blows up at the 3rd time step: type groovyBC; refValue uniform (1 0 0); refGradient uniform (1 0 0); valueFraction uniform 0; value uniform (1 0 0); gradientExpression "-(U-oldTime(U))/deltaT()"; fractionExpression "0"; Would you know what is wrong?? It is supposed that gradientExpression calculates the field derivative normal to the domain... Thank you! Best! |
||
September 23, 2014, 13:45 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
The problem is not groovyBC per se (it gets to the 3rd timestep) but the physics or the implementation of it. My time is limited and I limit myself to problems with swak itself. Just some hints: check the sign, try under-relaxation, but first write out all timesteps (its only three after all) and try to figure out what goes wrong (my guess is: the BC leads to oszillations because of overcorrection)
__________________
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 |
||
February 24, 2015, 12:26 |
|
#8 |
New Member
Bruno
Join Date: Oct 2014
Posts: 2
Rep Power: 0 |
Hello maalan! Have you managed to make the BC work? I've tryied the one that you wrote and my code also blows up on the third time step!
I'm new to OF so I have no ideia how to fix it Thank you |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2nd derivative in UDS | Andrew Garrard | FLUENT | 9 | September 21, 2015 09:15 |
Boundary condition involving 2nd derivative of U | maka | OpenFOAM Pre-Processing | 1 | November 8, 2007 15:04 |
2nd order derivative calculation at the boundaries | Vishal | FLUENT | 0 | May 25, 2006 06:54 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 05:12 |
2nd derivative on nonorthogonal FV-mesh | Thomas Wolfanger | Main CFD Forum | 1 | June 29, 1999 11:00 |