|
[Sponsors] |
April 20, 2010, 03:35 |
Boundary condition
|
#1 |
New Member
Jennifer
Join Date: Aug 2009
Location: Germany
Posts: 28
Rep Power: 16 |
Hi all,
For my computations I need to specify a special boundary condition for U at the inner wall, so that I can set Ux and Uy to fixedValue and Uz to zeroGradient. But a I don't have experience in creating new boundary conditions, so at the moment I don't know how to realize this. I found something to read about creating new boundary conditions but nothing about boundary conditions which allow to specify a value for each of the three components of U. Can somebody help me? Or is there already such a boundary condition in OF 1.6? Thanks, Jennifer |
|
April 21, 2010, 11:10 |
|
#2 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17 |
Hi Jennifer,
I think the directionMixedBC should be able to do this job. Good luck Stefan |
|
April 22, 2010, 09:46 |
|
#3 |
New Member
Jennifer
Join Date: Aug 2009
Location: Germany
Posts: 28
Rep Power: 16 |
Hi Stefan,
thanks for your answer. I had a look on directionMixed BCs, but now I don't understand how to use them Can you perhaps give me an example or explain me how to use this boundary condition? Jennifer |
|
April 22, 2010, 10:18 |
|
#4 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 17 |
Hi Jennifer,
this boundary condition is a blending between fixedValue and fixedGradient. The syntax is as follows Code:
type directionMixed; refValue uniform (ux uy uz); refGradient uniform (dUx dUy dUz); valueFraction uniform (XX XY XZ YY YZ ZZ); refValue: components of U needed for fixedValue refGradient: components of gradient needed for fixedGradient valueFraction: symmetric tensor which indicates if BC for a component is fixedValue (1) or fixedGradient (0) An easy example: Think about an outlet where you want the normal component of U (e.g. z-Direction) to be zeroGradient but the other components to be zero. Then the syntax is: Code:
type directionMixed; refValue uniform (0 0 0); refGradient uniform (0 0 0); valueFraction uniform (1 0 0 1 0 0); Good luck Stefan |
|
July 15, 2010, 10:30 |
directionMixed for symmTensor
|
#5 |
New Member
Michael B Martell Jr
Join Date: Feb 2010
Location: Amherst, MA
Posts: 18
Rep Power: 16 |
Stefan,
Thank you for this concise explanation of directionMixed. I am having some difficulty understanding how this boundary condition might be applied to a symmetric tensor. I'd like to be able set certain components of the tensor to be zeroGradient in the normal direction (Y, in my case), while setting the rest of the components to be fixedValue. I've tried several different variations and searched the forums with little success. Say I want the XY, YY, and YZ components of my symmTensor to have a fixedValue of 7, while the XX, XZ, and ZZ be zeroGradient. Supposing my tensor started as Code:
[1 1 1 1 1 1] Code:
type directionMixed; refValue uniform ( 7 7 7 7 7 7 ); refGradient uniform ( 0 0 0 0 0 0 ); valueFraction uniform ( 0 1 0 1 1 0 ); Code:
[7 21 7 67 21 7] Code:
[1 7 1 7 7 1] Is this even possible to do in the current implementation of directionMixed? Thank you in advance, Mike P.S. - I tried this with a vector and it worked brilliantly: Code:
type directionMixed; refValue uniform ( 7 7 7 ); refGradient uniform ( 0 0 0 ); valueFraction uniform ( 1 0 0 0 0 1 ); Last edited by theory37; July 15, 2010 at 11:18. Reason: Added steps taken and info about vector |
|
July 15, 2010, 13:23 |
Answered my own question, sort of
|
#6 |
New Member
Michael B Martell Jr
Join Date: Feb 2010
Location: Amherst, MA
Posts: 18
Rep Power: 16 |
After digging in to /src/OpenFOAM/primitives/transform/symmTransform.H I discovered that, when operating on a symmTensor, this boundary condition does the following:
For given symmTensors valueFraction, refValue, and refGradient along with the value of the symmTensorField at this patch ( this->patchInternalField(), which I'll call R for short ), directionMixed will return Code:
R(at the boundary patch) = [ valueFraction & refValue & valueFraction.T() ] + [ (I - valueFraction) & gradValue & (I - valueFraction).T() ] Code:
gradValue = R(internalField) - refGradient / dx So, this explains the unexpected results above, but still leaves me wondering if it is possible to achieve the BC I need without writing my own. Any suggestions? |
|
June 27, 2011, 11:53 |
|
#7 |
New Member
Michael B Martell Jr
Join Date: Feb 2010
Location: Amherst, MA
Posts: 18
Rep Power: 16 |
UPDATE: It turns out that it is not possible (to my knowledge) to achieve the desired BC using mixedDirection. I am now working on "groovifying" this BC to extend its functionality.
Mike |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Boundary Conditions | Thomas P. Abraham | Main CFD Forum | 20 | July 7, 2013 05:05 |
How exactly the "pressure outlet" bdry condition compute properties on the boundary? | yating9901 | FLUENT | 3 | June 28, 2010 12:26 |
Transient outlet boundary condition problem | jwillie2000 | CFX | 1 | December 7, 2009 17:07 |
How to set boundary condition in Fluent for the fo | Peiyong | FLUENT | 1 | November 10, 2006 11:44 |
How to resolve boundary condition problem? | sam | FLUENT | 2 | July 20, 2003 02:19 |