CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

[groovyBC]Change alpha.water and velocities during Run in pipe

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 24, 2017, 03:34
Default [groovyBC]Change alpha.water and velocities during Run in pipe
  #1
New Member
 
Oliver K
Join Date: May 2017
Posts: 15
Rep Power: 8
silencebreak is on a distinguished road
Hey,

My Problem is as followed:
I've got a pipe with an inflowing fluid (water). I want to change with groovyBC the area of the inflow and the inflow velocity of the patch during the run on a time dependency.
Actually it's a "closing" of the inlet, so the area of my inflow is reduced over the time, but my flow rate needs to be constant so the velocity has to speed up.

I tried to make it more understandable with a drawing:


So my guess is to put the patches of the inflow in alpha.water and U with a groovyBC. Because of the circularity it's a bit difficult to do, but I think the definition in U could be right. My main problem is the definition of my alpha.water.
(actually I analyze the flow in both ways so my inflow is on patch outlet)

What I tried so far:
I made a dependency that on the patch outlet in alpha.water that every cell value between 0.5 and 1.1 should be used for my field U.

alpha.water
Code:
outlet
    {
        type            groovyBC;
        variables       "Oberkante=-1751.518895;Unterkante=-1765.558895;close=pos().z-0-(14.04*time()*1.0);";
valueExpression "(pos().z < close) ? 1 : 0";
        factionExpression "(pos().z < close) ? 1 : 0";
        value           uniform 1;
The Patch starts at the absolute coordinates on position "Oberkante" and ends on "Unterkante" on the z-achsis. So the movement is against the z-achsis down.

U
Code:
type            groovyBC;
        value           uniform (0 0 0);
        aliases         {alphaWater alpha.water;};
        variables       "alphaFromPatchOutlet{outlet}=alphaWater;neededPatchArea=alphaFromPatchOutlet*min(0.5,2);aHight=(0.001/((4/3)*14.04*time()*1.0*sqrt(2*7.02*14.04*time()*1.0-pow(14.04*time()*1.0,2))));";
        valueExpression "-normal()*aHight*alphaFromPatchOutlet";
I think I could ease the function in U it a little bit up with the integrate function?

For now the main problem is the definition of alpha.water for the patch outlet. Does anyone have a guess where the Problem in the definition could be?

Many thanks in advance,
Oli
silencebreak is offline   Reply With Quote

Old   November 28, 2022, 03:54
Default
  #2
New Member
 
HR
Join Date: Nov 2022
Posts: 17
Rep Power: 3
hr_nt is on a distinguished road
Quote:
Originally Posted by silencebreak View Post
Hey,

My Problem is as followed:
I've got a pipe with an inflowing fluid (water). I want to change with groovyBC the area of the inflow and the inflow velocity of the patch during the run on a time dependency.
Actually it's a "closing" of the inlet, so the area of my inflow is reduced over the time, but my flow rate needs to be constant so the velocity has to speed up.

I tried to make it more understandable with a drawing:


So my guess is to put the patches of the inflow in alpha.water and U with a groovyBC. Because of the circularity it's a bit difficult to do, but I think the definition in U could be right. My main problem is the definition of my alpha.water.
(actually I analyze the flow in both ways so my inflow is on patch outlet)

What I tried so far:
I made a dependency that on the patch outlet in alpha.water that every cell value between 0.5 and 1.1 should be used for my field U.

alpha.water
Code:
outlet
    {
        type            groovyBC;
        variables       "Oberkante=-1751.518895;Unterkante=-1765.558895;close=pos().z-0-(14.04*time()*1.0);";
valueExpression "(pos().z < close) ? 1 : 0";
        factionExpression "(pos().z < close) ? 1 : 0";
        value           uniform 1;
The Patch starts at the absolute coordinates on position "Oberkante" and ends on "Unterkante" on the z-achsis. So the movement is against the z-achsis down.

U
Code:
type            groovyBC;
        value           uniform (0 0 0);
        aliases         {alphaWater alpha.water;};
        variables       "alphaFromPatchOutlet{outlet}=alphaWater;neededPatchArea=alphaFromPatchOutlet*min(0.5,2);aHight=(0.001/((4/3)*14.04*time()*1.0*sqrt(2*7.02*14.04*time()*1.0-pow(14.04*time()*1.0,2))));";
        valueExpression "-normal()*aHight*alphaFromPatchOutlet";
I think I could ease the function in U it a little bit up with the integrate function?

For now the main problem is the definition of alpha.water for the patch outlet. Does anyone have a guess where the Problem in the definition could be?

Many thanks in advance,
Oli

Hi did you manage to run the simulation with this condition ? I am looking at a similar situation where I want my inlet patch to pulsate alpha where the inlet produces gases for sometime and then produces no gas.
hr_nt 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
interFoam two-phase pipe flow air phase behaviour katete OpenFOAM Running, Solving & CFD 11 February 3, 2021 03:14
LES of pipe flows: wall normal velocities not zero Dan1788 OpenFOAM Running, Solving & CFD 0 December 16, 2014 22:05
Water pipe - pressure inlet/outlet - unrealistic velocities erichu OpenFOAM Running, Solving & CFD 1 April 11, 2013 07:08
Strange Behavior of A Mesh Run at Two Dfferent Velocities Using Turbulence Model zachnap Main CFD Forum 0 May 11, 2011 15:22
Poiseuille flow (flow in a pipe) in SOLA-VOF. Parabolic distribution of velocities. Anton Main CFD Forum 9 April 29, 2009 10:31


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