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

[swak4Foam] Engine-pressure BC and velocity field (groovy)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 23, 2014, 08:04
Default Engine-pressure BC and velocity field (groovy)
  #1
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
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, 16 views)
File Type: jpg U-2.jpg (13.0 KB, 14 views)
File Type: jpg Pressure.jpg (24.0 KB, 11 views)
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 23, 2014, 10:39
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
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.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 14, 2018, 10:43
Default
  #3
Member
 
Ashish Magar
Join Date: Jul 2016
Location: Mumbai, India
Posts: 81
Rep Power: 9
ashishmagar600 is on a distinguished road
Hello Tobi.

Can you show a short guide on what/how BCs to apply at the inlet/outlet of an engine (expressions for variables)?

Just as a trial case I am using kivaTest tutorial, and I have extracted valve patches. But I don't know what BCs to apply.

Thanks a lot.

Last edited by ashishmagar600; October 15, 2018 at 06:37.
ashishmagar600 is offline   Reply With Quote

Old   October 15, 2018, 14:09
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,


depending on your case, you have to apply your appropriate BC. In general, 2T-engines are pressure driven. Thus, I had a pressure based inlet and outlet (groovyBC) while the velocity field was a pressure based inlet-outlet velocity. However, nowadays, I prefer the codedMixed or codedFixed boundary conditions for such purpose.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On



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