CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

inlet1 depend on inlet2

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 9, 2012, 06:39
Default inlet1 depend on inlet2
  #1
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,087
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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
Tobi is offline   Reply With Quote

Old   July 9, 2012, 07:33
Default
  #2
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 62
Rep Power: 8
sylvester is on a distinguished road
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;
    }
sylvester is offline   Reply With Quote

Old   July 9, 2012, 10:25
Default
  #3
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,087
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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;
}
Is that correct?
Tobi is offline   Reply With Quote

Old   July 9, 2012, 10:43
Default
  #4
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 62
Rep Power: 8
sylvester is on a distinguished road
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
sylvester is offline   Reply With Quote

Old   July 9, 2012, 17:46
Default
  #5
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,087
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Oh thx.
Well I had no time to check it. It was my first guess
Tomorrow I ll have a look at the BC ...

Thx
Tobi
Tobi is offline   Reply With Quote

Old   July 10, 2012, 03:23
Default
  #6
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,087
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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
Tobi is offline   Reply With Quote

Old   July 10, 2012, 03:35
Default
  #7
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 62
Rep Power: 8
sylvester is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi Sylvester,
1. see manual - you mean the groovy manual? Or which one? Well I think its the only logical thing
Yes, 'manual' is a bit confusing. Probably best is to look at the wiki, the examples provided with groovyBC, or the examples posted on this forum.

Quote:
Originally Posted by Tobi View Post
2. Sf() - is it the flux through a surface like "Sf = Surface flux"?
IIRC Sf() is the cell normal vector with the cell surface area as its magnitude.
sylvester is offline   Reply With Quote

Old   July 10, 2012, 04:06
Default
  #8
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,087
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by sylvester View Post
IIRC Sf() is the cell normal vector with the cell surface area as its magnitude.
Oh thanks. I get it now...
Now its working. Thats very nice. Hope that my simulation is more realistic as befor.

Tobi
Tobi is offline   Reply With Quote

Old   July 10, 2012, 04:16
Default
  #9
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,087
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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;
    }
And both inlets are in the same directory.
Would you say that this BC I made is working correct? Well I have not much confidence.
Tobi is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
anybody know how to define latent heat depend on variable temperature? alloveyou CFX 0 July 21, 2011 23: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 13:32
Time depend velocity inlet and outflow Seizopha FLUENT 2 January 14, 2005 22:01


All times are GMT -4. The time now is 06:26.