|
[Sponsors] |
[swak4Foam] Engine-pressure BC and velocity field (groovy) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 23, 2014, 08:04 |
Engine-pressure BC and velocity field (groovy)
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
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
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; }
Code:
wall --> fixedValue (0 0 0) inlet --> zeroGradient outlet --> zeroGradient 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); 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
__________________
Keep foaming, Tobias Holzmann |
|
July 23, 2014, 10:39 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
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 |
|
October 14, 2018, 10:43 |
|
#3 |
Member
Ashish Magar
Join Date: Jul 2016
Location: Mumbai, India
Posts: 81
Rep Power: 9 |
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. |
|
October 15, 2018, 14:09 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
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 |
|
|
|