|
[Sponsors] |
Boundary Condition: "mixed" calculated and gradient |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 12, 2012, 10:05 |
Boundary Condition: "mixed" calculated and gradient
|
#1 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Hi Foamers!
Is it possible to have a boundary condition that combines both, a "calculated" and a gradient (e.g. zero- or fixedGradient) BC? What I would like to have is, that it "acts" like a calculated BC until a certain value (of a variable within the solver) is reached, and then switch to a gradient BC. And it should also be possible to switch back. I had a look at the mixed BC as it looked as if it is quite close to what I want, but I do not understand how the "fraction" can be adjusted within the solver. I did not find any helpful explanations. Thanks in advance for any advices! Lindstroem |
|
November 12, 2012, 10:25 |
|
#2 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Have a look at inletOutlet derived boundary condition. Changing the value fraction from 0 to 1 will do what you would like. And for reference...I would look at
http://www.cfd-online.com/Forums/ope...tml#post185688 good luck. |
|
November 12, 2012, 11:46 |
|
#3 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Hi chegdan,
thanks for your help! I think I could work directly with the mixed-BC. But I don't get the functions of the BC in my solver. First I include the Header, then loop through my boundaries until I find my desired patch. Now how can i actually call for example the valueFraction() from the mixedBC? Do I need the "refCast" first? thanks again in advance Lindstroem |
|
November 12, 2012, 12:09 |
|
#4 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Just as a little tip, I would create a derived class from mixedBC the way inletOutlet is constructed. This way you don't need to mess with the templating and bang your head on the table. I did this about a month ago and it ended up to be really simple if I just made a derived class and derived BC.
|
|
November 12, 2012, 12:11 |
|
#5 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Allright I misunderstood your previous post..
Thanks for sharing your experience! Greetings! |
|
November 12, 2012, 12:56 |
|
#6 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
No problem, glad I could help.
|
|
November 20, 2012, 11:57 |
|
#7 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Hi again,
It's progressing But one further question: If I want to use the refGradient for a mixedFvPatchScalarField, I need to prescribe a scalar. But how do I interpret this scalar because I would intuitively prescribe a vector.. Thanks! |
|
November 20, 2012, 12:08 |
|
#8 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
The gradient in this BC is in the direction normal to the surface.
|
|
November 20, 2012, 12:11 |
|
#9 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
So it can only be fixedValue or a zeroGradient, but not a gradient in any prescribed direction?
|
|
November 20, 2012, 12:35 |
|
#10 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
The only thing that I know of for changing direction is between normal and tangential direction changed via http://www.cfd-online.com/Forums/ope...tml#post316165
and further posts in that thread. If I think of anything on the subject...I'll post back. |
|
November 20, 2012, 12:39 |
|
#11 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Ok, thanks again for the quick reply! I'll check if the direction mixed BC could somehow work..
Thanks Dan! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implementation of boundary conditions for FVM | Tom | Main CFD Forum | 7 | August 26, 2014 06:58 |
[swak4Foam] Boundary condition with a non-uniform gradient - groovyBC? | STiss | OpenFOAM Community Contributions | 3 | October 11, 2013 03:04 |
help with velocity boundary condition potentialFoam | hfc | OpenFOAM Running, Solving & CFD | 2 | May 31, 2012 20:52 |
Calculated gradient boundary condition similar to gammaContactAngle | adona058 | OpenFOAM Running, Solving & CFD | 0 | September 26, 2007 16:23 |
Boundary conditions? | Tom | Main CFD Forum | 0 | November 5, 2002 02:54 |