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

time-dependent inletOutlet with groovyBC?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 29, 2013, 09:44
Default time-dependent inletOutlet with groovyBC?
  #1
Member
 
Marcus Letzel
Join Date: Sep 2012
Location: Aurich
Posts: 35
Rep Power: 4
letzel is on a distinguished road
Dear Foamers,

given a measured time series of patch-normal velocity Un, is it possible with groovyBC and timelines or lookuptables to set time-dependent inletOutlet boundary conditions on that patch?
I want to set up the following scenario:
  • in case of inflow (say Un >= 0), set inflow boundary condition (value of Un uniform over patch),
  • in case of outflow (say Un < 0), set zeroGradient pressure boundary condition.
Regards,
Marcus
letzel is offline   Reply With Quote

Old   October 29, 2013, 12:08
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by letzel View Post
Dear Foamers,

given a measured time series of patch-normal velocity Un, is it possible with groovyBC and timelines or lookuptables to set time-dependent inletOutlet boundary conditions on that patch?
I want to set up the following scenario:
  • in case of inflow (say Un >= 0), set inflow boundary condition (value of Un uniform over patch),
  • in case of outflow (say Un < 0), set zeroGradient pressure boundary condition.
Regards,
Marcus
Yep. Assuming you have a timeline Un defined
Code:
valueExpression "-normal()*Un";
fractionExpression "Un<0 ? 0 : 1";
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 30, 2013, 03:37
Default
  #3
Member
 
Marcus Letzel
Join Date: Sep 2012
Location: Aurich
Posts: 35
Rep Power: 4
letzel is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Yep. Assuming you have a timeline Un defined
Code:
valueExpression "-normal()*Un";
fractionExpression "Un<0 ? 0 : 1";
Excellent. That means the U boundary condition on that patch is done.

Follow-up question: How do I have to set the corresponding pressure boundary condition on that patch? I would expect that a similar case distinction depending on the sign of Un needs to be implemented for p.
letzel is offline   Reply With Quote

Old   October 30, 2013, 06:18
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by letzel View Post
Excellent. That means the U boundary condition on that patch is done.

Follow-up question: How do I have to set the corresponding pressure boundary condition on that patch? I would expect that a similar case distinction depending on the sign of Un needs to be implemented for p.
That depends on your physics. But any switching here can be done in a similar fashion (of course you can use Un inside a pressure condition as well)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   November 4, 2013, 12:43
Default
  #5
Member
 
Marcus Letzel
Join Date: Sep 2012
Location: Aurich
Posts: 35
Rep Power: 4
letzel is on a distinguished road
Sorry, the description of my scenario given above was not precise. Let me try to clarify. Basically I am planning to mimick "inletOutlet", the patch field type derived from mixed (table 5.4 in OF 2.2.2 user guide) using the patch-normal velocity component Un:
  • in case of inflow (Un >= 0),
    • for pressure use zeroGradient, and
    • for U use valueExpression "-normal()*Un"
  • in case of outflow (Un < 0),
    • for pressure use fixedValue, and
    • for U use zeroGradient.
My question is how to implement this pressure boundary condition with the help of fractionExpression "Un<0 ? 0 : 1" or
fractionExpression "Un<0 ? 1 : 0".

Whether or not this pressure boundary condition will work well in this case, this will be the next question...
letzel is offline   Reply With Quote

Old   November 4, 2013, 20:08
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by letzel View Post
Sorry, the description of my scenario given above was not precise. Let me try to clarify. Basically I am planning to mimick "inletOutlet", the patch field type derived from mixed (table 5.4 in OF 2.2.2 user guide) using the patch-normal velocity component Un:
  • in case of inflow (Un >= 0),
    • for pressure use zeroGradient, and
    • for U use valueExpression "-normal()*Un"
  • in case of outflow (Un < 0),
    • for pressure use fixedValue, and
    • for U use zeroGradient.
My question is how to implement this pressure boundary condition with the help of fractionExpression "Un<0 ? 0 : 1" or
fractionExpression "Un<0 ? 1 : 0".

Whether or not this pressure boundary condition will work well in this case, this will be the next question...
I'd say the second one. I'm not quite sure what your problem is: the meaning of the ?:-operator or fractionExpression. Because if you understand these two it should be quite clear
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 10, 2013, 09:47
Default
  #7
Member
 
Marcus Letzel
Join Date: Sep 2012
Location: Aurich
Posts: 35
Rep Power: 4
letzel is on a distinguished road
Thank you, Bernhard, the second one worked out fine.

As a follow-up question, I should now compare this with a conditional totalPressure boundary condition in case of outflow as follows:
  • in case of inflow (Un >= 0),
    • for pressure use zeroGradient, and
    • for U use valueExpression "-normal()*Un"
  • in case of outflow (Un < 0),
    • for pressure use totalPressure, and
    • for U use zeroGradient.
Does the groovyBC syntax allow for this? If so, how?
letzel is offline   Reply With Quote

Old   December 11, 2013, 16:08
Default
  #8
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by letzel View Post
Thank you, Bernhard, the second one worked out fine.

As a follow-up question, I should now compare this with a conditional totalPressure boundary condition in case of outflow as follows:
  • in case of inflow (Un >= 0),
    • for pressure use zeroGradient, and
    • for U use valueExpression "-normal()*Un"
  • in case of outflow (Un < 0),
    • for pressure use totalPressure, and
    • for U use zeroGradient.
Does the groovyBC syntax allow for this? If so, how?
U we've already got covered I think.

p shouldn't be a big problem either. The catch is that you've got to specify the total pressure as an expression. You can't use the readymade BC
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider 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
Unstabil Simulation with chtMultiRegionFoam mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 14:12
AMI speed performance danny123 OpenFOAM 19 October 24, 2012 07:44
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM 6 April 12, 2011 11:24
Modeling in micron scale using icoFoam m9819348 OpenFOAM Running, Solving & CFD 7 October 27, 2007 00:36
time dependent curve faiz rauf FLUENT 0 August 31, 2004 13:02


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