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

Engine-pressure BC and velocity field (groovy)

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 23, 2014, 08:04
Default Engine-pressure BC and velocity field (groovy)
  #1
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,555
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Dear OpenFOAMer,

I am trying to apply a very simple BC on a 2D tube test case. This conditions should be able to apply a engine at the outlet. Therefor I have a pressure based velocity.
The pressure profil is shown in the attachment. I applied it with groovyBC which is working very fine. Unfortunately I have problems with the velocity field.

Case setup

  • pressure
Code:
wall --> zeroGradient
inlet --> fixedValue = 0;
outlet --> groovyBC;


    outlet
    {
        type            groovyBC;
        variables       "f=-15*sin(pi*2/0.03*time());";
        valueExpression "(f-mag(f))/2";
        value           uniform 0;
    }
  • velocity
Code:

wall --> fixedValue (0 0 0)
inlet --> zeroGradient
outlet --> zeroGradient
If I start this simulation everything is working fine BUT the velocity field is increasing every pressure pulse. After the pressure gradient in the field is zero again, the velocity field still exist or in other words it does not decrease. To solve that problem I can change the viscosity from 1e-5 to 1e-2 and then its okay, but that is not the aim. After the pressure gradient is gone the velocity should stop (maybe with some shock waves).


After that I decided to stop the outflow at the outlet with a groovyBC too.
While pressure gradient is available the outlet is zeroGradient, otherwise it is closed (fixedValue (0 0 0)). The BC for the velocity outlet is :


Code:
        type            groovyBC;
        variables       "f=-15*sin(2*pi/0.03*time());";
        valueExpression "vector(0,0,0)";
        gradientExpression "vector(0,0,0)";
        fractionExpression "(f) <= 0 ? 0 : 1";
        value           uniform (0 0 0);
With these settings the outlet is "closed" or better it seems to be closed but the air is still moving forward without stopping (see picture U-1 and U-2).

Can someone give me some hints to build a BC for such a situation?


Thanks in advance and I hope someone has some hints.

Kind regards
Tobi
Attached Images
File Type: jpg U-1.jpg (30.3 KB, 5 views)
File Type: jpg U-2.jpg (13.0 KB, 4 views)
File Type: jpg Pressure.jpg (24.0 KB, 3 views)
__________________
Best regards,
Tobias Holzmann

Some interesting OpenFOAM tutorials, publications and videos on www.Holzmann-cfd.de
OpenFOAM Beginners should check out the new wiki on wiki.openfoam.com
A list of some active OpenFOAM contributers can be found »here«
A book about the basics of »Mathematics, Numerics, Derivations and OpenFOAM« can be found on www.Holzmann-cfd.de
Tobi is online now   Reply With Quote

Old   July 23, 2014, 10:39
Default
  #2
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,555
Blog Entries: 6
Rep Power: 27
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

topic solved

I used a mixed bc for the pressure at the outlet so that I have gradient 0 when velocity is fixed and fixed pressure when velocity is zero.
__________________
Best regards,
Tobias Holzmann

Some interesting OpenFOAM tutorials, publications and videos on www.Holzmann-cfd.de
OpenFOAM Beginners should check out the new wiki on wiki.openfoam.com
A list of some active OpenFOAM contributers can be found »here«
A book about the basics of »Mathematics, Numerics, Derivations and OpenFOAM« can be found on www.Holzmann-cfd.de
Tobi is online now   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



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