|
[Sponsors] |
April 14, 2009, 02:04 |
directionMixed b.c
|
#1 |
New Member
Alessio Alexiadis
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 16
Rep Power: 17 |
Hi everybody,
I try to figure out the use of directionMixed b.c. I want a b.c. with the normal velocity =0 and the tangential velocity zeroGradient. The way I understood the directionMixed is something like this type directionMixed; refValue uniform (0 0 0); refGradient uniform (0 0 0); valueFraction 1; value uniform (0 0 0); the refValue=uniform (0 0 0) means that I want a 0 normal velocity the refGradient=uniform (0 0 0) means that I want a 0 gradient normal velocity the valueFraction=1 means that the way I mix the two previous b.c (in my case only the first apply, if it were valueFraction=0 would be only the second) The value=uniform (0 0 0) specify what to do with the gradient of the tangential component, no mixing this time only the gradient. Thus I have three points 1) Is it correct my understanding? 2) There is a mistake somewhere, because the solver complains about the valueFraction 1; "Expected a '(' while reading VectorSpace<Form, Cmpt, nCmpt>, found on line 51 the label 1" Line 51 is valueFraction 1. But I do not understand what it is happening;why is it expected a '(' valueFraction is not a scalar? 3) There is another way for forcing a 0 normal velocity plus a zeroGradient tangential velocity? Thanks in advance Alessio |
|
April 15, 2009, 12:43 |
same problem!
|
#2 |
New Member
remi de reynal
Join Date: Apr 2009
Location: ottawa
Posts: 8
Rep Power: 17 |
Hello sersunzo!
I am actually facing the exact same problem, with the very same answer from the compiler... In addition to the questions you just asked, could someone please tell if the refValue can be accessed and changed during runtime? Thank you very much in advance! |
|
April 16, 2009, 16:28 |
|
#3 |
New Member
remi de reynal
Join Date: Apr 2009
Location: ottawa
Posts: 8
Rep Power: 17 |
Hi everybody!
I just realized, after many tries, that the acceptable syntax for valueFraction in directionMixed b.c seems to be a symmetric tensor, ie six components between brackets. The question following this discovery is: why is it so, and what do the component stand for? My goal is to have a fixedValue bc on the normal component of velocity, and a zeroGradient on the tangential component. Thanks for any hint one may have! By the way, happy easter to all! |
|
April 17, 2009, 14:44 |
|
#4 |
New Member
Alessio Alexiadis
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 16
Rep Power: 17 |
Hi remi,
I believe that the following syntax would give a 0 normal velocity with 0 gradient in the tangential direction top { type directionMixed; refValue uniform (0 0 0); refGradient uniform (0 0 0); valueFraction (0 0 0 1 1 1); value uniform (0 0 0); } This is just an empirical observation. I still did not get the answers to my previous questions. Ciao Alessio |
|
April 17, 2009, 15:17 |
|
#5 |
New Member
remi de reynal
Join Date: Apr 2009
Location: ottawa
Posts: 8
Rep Power: 17 |
Thank you Alessio!
I managed to get the desired behaviour (fixedValue for normal component, zero gradient for the rest) by putting valueFraction=(1 0 0 0 0 0). Very empirical as well.... Struggling to modify the refValue during runtime, the syntax is opaque to me! Good luck for your simulation! cheers, remi |
|
April 17, 2009, 19:09 |
|
#6 |
New Member
Alessio Alexiadis
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 16
Rep Power: 17 |
Strange...
with your settings I get exactly the opposite. The tangential velocity is zero, the normal is not zero (and I suppose grad=0). In my case the normal velocity is Vx. I do not know if it makes any difference tough... Alessio |
|
April 21, 2009, 11:16 |
modify refValue for directionMixed?
|
#7 |
New Member
remi de reynal
Join Date: Apr 2009
Location: ottawa
Posts: 8
Rep Power: 17 |
Thank you Alessio for the fast answer!
however, there is a problem to modify the boundary value of Ux velocity on runtime. When doing U.boundaryField()[inletPatchID][faceI].component(0)= new value, you can check on the output file that the "value" part of directionMixed has been changed. Nevertheless, it's got no impact at all on the value Ueqn is gonna solve for... And i tried something like: directionMixedFvPatchField& buffer= refCast<directionMixedFvPatchField>(U.boundaryFiel d()[inletPatchID]); scalarField& Ux = buffer.refValue().component(0); but it doesn't compile.... good luck for you and thanks for your help! |
|
April 24, 2009, 11:43 |
modifying refValue for directionMixed
|
#8 |
New Member
remi de reynal
Join Date: Apr 2009
Location: ottawa
Posts: 8
Rep Power: 17 |
Hello all!
Finally the correct syntax to access the refValue of a directionMixed bc during runtime is through casting, by the following piece of code: directionMixedFvPatchVectorField& buffer= refCast<directionMixedFvPatchVectorField>(U.bounda ryField()[f_in]); vectorField& U_refValue = buffer.refValue(); then it seem to take a loop over the patch face to modify the values: forAll (directionMixedPatchID, faceI) {U_refValue[faceI]= whatever vector;} Goodbye! |
|
September 9, 2009, 08:56 |
|
#9 |
New Member
Wolfgang Betz
Join Date: Mar 2009
Posts: 6
Rep Power: 17 |
Hi,
if you want to set a fixed value for normal velocity and a fixed gradient in the tangential direction, the tensor of valueFraction is the outer product of the unit vector normal to the boundary with itself. |
|
Tags |
directionmixed |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Confusion between 'non-slip' and 'slip' B.C | jinwon park | Main CFD Forum | 7 | March 6, 2008 05:56 |
how to set such B.C. in Fluent? | Sherri | FLUENT | 1 | January 12, 2006 13:32 |
Urgent! Help on UDF to set B.C. of 3rd type | Ray Hong | FLUENT | 0 | December 28, 2005 20:35 |
How to set B.C. of the 2nd or 3rd type in UDS? | Ray Hong | FLUENT | 0 | December 28, 2005 07:03 |
Non-Reflecting B.C. in NSC2KE | Zou Chu | Main CFD Forum | 2 | May 27, 1999 22:26 |