|
[Sponsors] |
July 9, 2012, 07:39 |
inlet1 depend on inlet2
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi all together,
is it possible to make one inlet dependend on the other inlet. An example: Total Pressure of Inlet1 and Inlet2 (101325 Pa)... Outlet Pressure (101300 Pa) ... Now I wanna have that the mass flow of inlet1 = 0.4 * inlet2 Can I manage that with groovy or sth. like that? Thx. Tobi |
|
July 9, 2012, 08:33 |
|
#2 |
Member
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 93
Rep Power: 17 |
Yes, groovyBC will do that for you.
From the average-t-junction example: Code:
outlet1 { type groovyBC; valueExpression "0.5*(pInlet+pOutlet2)"; variables "pInlet{inlet}=sum(p*mag(Sf()))/sum(mag(Sf()));pOutlet2{outlet2}=p;"; value uniform 100010; } |
|
July 9, 2012, 11:25 |
|
#3 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
thanks for your replay. Then my code should look like this: Code:
inlet1 { type pressureInletVelocity; value $internalField; } inlet2 { type groovyBC; valueExpression "vector(dependend,0,0)"; variables "dependend{inlet}=0.4*mag(U);"; value $internalField; } |
|
July 9, 2012, 11:43 |
|
#4 |
Member
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 93
Rep Power: 17 |
That's not going to work, for (at least) 3 reasons:
1. Your are referencing inlet instead of inlet1 2. You are using the vector U for the (scalar) component of Ux (use something link U.x instead, see manual) 3. U@inlet1 is a field not a single value, so it is best to calculated its average first (see the example I send before) regards, Sylvester |
|
July 10, 2012, 04:23 |
|
#6 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi Sylvester,
just two questions to you. 1. see manual - you mean the groovy manual? Or which one? Well I think its the only logical thing 2. Sf() - is it the flux through a surface like "Sf = Surface flux"? Thanks in advanced Tobi |
|
July 10, 2012, 04:35 |
|
#7 | |
Member
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 93
Rep Power: 17 |
Quote:
IIRC Sf() is the cell normal vector with the cell surface area as its magnitude. |
||
July 10, 2012, 05:16 |
|
#9 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi Sylvester,
just at least one question. My BC looks like that: Code:
inlet { type zeroGradient; value uniform (0 0 0); } inlet2 { type groovyBC; valueExpression "vector(dependendx,dependendy,dependendz)" variables "dependendx=average(U.x);dependendy=average(U.y);dependendz=average(U.z);"; value $internalField; } Would you say that this BC I made is working correct? Well I have not much confidence. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
anybody know how to define latent heat depend on variable temperature? | alloveyou | CFX | 0 | July 22, 2011 00:19 |
compile errors of boundary condition "expDirectionMixed" | liying02ts | OpenFOAM Bugs | 2 | February 1, 2010 21:11 |
does physical property in fluent depend on P or just depend T only? | gsyuan | FLUENT | 0 | December 30, 2009 22:07 |
Morphing deforming surface mesh depend on some sensitivity field | sponiar | OpenFOAM Running, Solving & CFD | 3 | August 12, 2008 14:32 |
Time depend velocity inlet and outflow | Seizopha | FLUENT | 2 | January 14, 2005 22:01 |