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

Water flow, using multiphaseEulerFoam, problems with Boundary Condition

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By saddy
  • 1 Post By saddy

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2017, 16:14
Default Water flow, using multiphaseEulerFoam, problems with Boundary Condition
  #1
New Member
 
Cheng
Join Date: Nov 2015
Location: Germany
Posts: 18
Rep Power: 11
kanes is on a distinguished road
Hello,

I am trying to use multiphaseEulerFoam with my case. It looks like this:


What I want:
At t = 0, this area is full of air;
Water flows into this area from the top and then flows out of this area from the bottom.

However it does not work.
Water just stopped at the top (at t = 25s), shown in the picture :


I am using the following initial conditions:
alpha.water:
Code:
dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    outlet
    {
      type            zeroGradient;
    }
    inlet
    {
         type             fixedValue;
         value            uniform 0.5;
    }
    walls
    {
        type            zeroGradient;
    } 
}
alpha.air:
Code:
dimensions      [0 0 0 0 0 0 0];
internalField   uniform 1;
boundaryField
{
    outlet
    {
      type            zeroGradient;
    }
    inlet
    {
        type              fixedValue;
        value             uniform 0.5;
    }
    walls
    {
        type            zeroGradient;
    }
}
U.water:
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    outlet 
    {  
         type               pressureInletOutletVelocity;
           phi                  phi.water;
          value              uniform (0 0 0);
     }
    inlet
    {
          type               flowRateInletVelocity;
           massFlowRate        constant 0.027778;
           value             uniform (0 0 0);
     }
    walls
    {
        type               noSlip;
    }
}
U.air:
Code:
dimensions      [0 1 -1 0 0 0 0];
internalField   uniform (0 0 0);
boundaryField
{
   outlet 
    {
           type               pressureInletOutletVelocity;
            phi                  phi.air;
           value               $internalField;
    }
    inlet
    {
          type                 fixedValue;
          value              uniform (0 0 0);            
    }
    walls
    {
       type               noSlip;
    }
}
p_rgh:
Code:
dimensions          [1 -1 -2 0 0 0 0];
internalField       uniform 0;
boundaryField
{
    outlet 
    {
            type             fixedValue;
           value               $internalField;
    }
    inlet 
    {
        type            fixedFluxPressure;
        value           $internalField;
    }
    walls
    {
        type            fixedFluxPressure;
        value             $internalField;
    }
}
Can someone indicate me where I am wrong?

regards,
Cheng
kanes is offline   Reply With Quote

Old   July 11, 2017, 04:49
Default
  #2
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
try two things,
first try to give velocity for water instead of mass flow rate,
second plz check
whether your inlet is a patch or a wall, bcz if its a wall water cannot enter
hope that helps
kanes likes this.
saddy is offline   Reply With Quote

Old   July 11, 2017, 10:42
Default
  #3
New Member
 
Cheng
Join Date: Nov 2015
Location: Germany
Posts: 18
Rep Power: 11
kanes is on a distinguished road
Quote:
Originally Posted by saddy View Post
try two things,
first try to give velocity for water instead of mass flow rate,
second plz check
whether your inlet is a patch or a wall, bcz if its a wall water cannot enter
hope that helps
Hey Sandy,

thank you very much!
I set the inlet as 'patch', then it works.

But now new problem is, the Phase-sum volume fraction always increased.
I also use the velocity for water (inlet)

do you have any suggestions for this?

thanks
kanes is offline   Reply With Quote

Old   July 11, 2017, 13:36
Default
  #4
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
i m glad i could help
now what is your error?? can u copy paste it here?
and what about mass flow rate have u tried with ur old boundary conditions??
saddy is offline   Reply With Quote

Old   July 11, 2017, 14:02
Default
  #5
Member
 
Thomas Sprich
Join Date: Mar 2015
Posts: 76
Rep Power: 11
Swift is on a distinguished road
Do you mean the phase sum increased above 1?
What did you set the outlet to. Is it also patch?


Sent from my EVA-L19 using CFD Online Forum mobile app
Swift is offline   Reply With Quote

Old   July 17, 2017, 04:14
Default
  #6
New Member
 
Cheng
Join Date: Nov 2015
Location: Germany
Posts: 18
Rep Power: 11
kanes is on a distinguished road
Quote:
Originally Posted by saddy View Post
i m glad i could help
now what is your error?? can u copy paste it here?
and what about mass flow rate have u tried with ur old boundary conditions??
Hi Sandy,

thanks.

sorry for late reply.

yes, I've tried also the mass flow rate, but after some iterations the ' Phase- sum volme fraction' incresed abouve 1.
like this:

Phase-sum volume fraction, min, max = 1 0.999983 1.18336

do you have any suggestions for the boundary conditions?

thanks
kanes is offline   Reply With Quote

Old   July 17, 2017, 04:20
Default
  #7
New Member
 
Cheng
Join Date: Nov 2015
Location: Germany
Posts: 18
Rep Power: 11
kanes is on a distinguished road
Quote:
Originally Posted by Swift View Post
Do you mean the phase sum increased above 1?
What did you set the outlet to. Is it also patch?


Sent from my EVA-L19 using CFD Online Forum mobile app
hey Thomas,

yes, above 1.
I have set the outlet as patch.

do you have any suggestion?

thanks
kanes is offline   Reply With Quote

Old   July 17, 2017, 04:48
Default
  #8
New Member
 
Cheng
Join Date: Nov 2015
Location: Germany
Posts: 18
Rep Power: 11
kanes is on a distinguished road
Quote:
Originally Posted by saddy View Post
i m glad i could help
now what is your error?? can u copy paste it here?
and what about mass flow rate have u tried with ur old boundary conditions??
Hey Sandy,
I have also tried to define the Inlet (patch) for water and air separately, as follows:


Then I also changed the alpha file like this:
alpha.air:
Quote:
dimensions [0 0 0 0 0 0 0];

internalField uniform 1;

boundaryField
{
walls
{
type zeroGradient;
}

bottom
{
type zeroGradient;
}

top_water
{
type fixedValue;
value uniform 0;

}
top_air
{

type zeroGradient;
}
}
alpha.water
Quote:
dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
walls
{
type zeroGradient;
}

bottom
{
type zeroGradient;
}
top_water
{
type fixedValue;
value uniform 1;
}
top_air
{

type zeroGradient;
}

}
However after some time the 'Phase-sum volume fraction' still increased above 1.
I didnt figure out.
kanes is offline   Reply With Quote

Old   July 17, 2017, 19:08
Default
  #9
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
Quote:
Originally Posted by kanes View Post
Hey Sandy,
I have also tried to define the Inlet (patch) for water and air separately, as follows:


Then I also changed the alpha file like this:
alpha.air:


alpha.water


However after some time the 'Phase-sum volume fraction' still increased above 1.
I didnt figure out.
your alpha seems fine. i guess now problem is somewhere in p/u files
don't fix outlet pressure with internal field. use zero gradient b.c instead
saddy is offline   Reply With Quote

Old   July 18, 2017, 03:48
Default
  #10
New Member
 
Cheng
Join Date: Nov 2015
Location: Germany
Posts: 18
Rep Power: 11
kanes is on a distinguished road
Thanks.

the p_rgh and U.* file as follows:
p_rgh
Quote:
boundaryField
{
bottom //outlet
{

type fixedValue;
value uniform 0;


}
top_air
{
type fixedFluxPressure;
value $internalField;


}
top_water
{
type fixedFluxPressure;
value $internalField;


}
walls
{
type zeroGradient;
}
}
U.air
Quote:
dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{

bottom
{

type pressureInletOutletVelocity;
phi phi.air;
value $internalField;
}
walls
{
type fixedValue;
value uniform (0 0 0);
}

top_air
{
type fixedValue;
value uniform (0 0 0);

}
top_water
{

type fixedValue;
value uniform (0 0 0);
}
}
U.water
Quote:
dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
bottom
{

type pressureInletOutletVelocity;
phi phi.water;
value $internalField;

}
walls
{
type fixedValue;
value uniform (0 0 0);
}

top_air
{

type pressureInletOutletVelocity;
phi phi.water;
value $internalField;

}
top_water
{
type flowRateInletVelocity;
massFlowRate constant 0.1;
value uniform (0 0 0);
// type fixedValue;
// value uniform (0 0 -0.03368);

}
}
Water should flows out from the bottom.
If I use 'zeroGradient' for the outlet pressure, then there is the problem with Continuity.
kanes is offline   Reply With Quote

Old   July 18, 2017, 05:23
Default
  #11
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
hey look. i can't specifically give u all b.c. what i can give u is physical setup for b.c.
your phases are flowing counter-currently right??
so 1. you have to give separate inlets and outlets..ok
2. face 1 : inlet for air, oulet for water face 2: outlet for air inlet for water
now imagine if your surrounding four patches are "walls" and both 2 faces are allowing mass to accumulate. and rate of mass inlet is greater than rate of mass leaving. where will this mass go then??
so it will push back the lighter phase more, i.e. air from inlet, some of the water will also be pushed back because we are using incompressible flow, so this is referred to as backflow, openfoam allows tis condition to be modelled using "inletoutlet" and "outletinlet" boundary condition where backflow is specified using "value"
so try using inletoutlet bc. for alpha ,and see if error comes
basically we have try to adjust b.c. u can't just setup bc in one go. it takes time
keep trying you will eventually get it
good luck
kanes likes this.
saddy is offline   Reply With Quote

Old   July 19, 2017, 05:05
Default
  #12
New Member
 
Cheng
Join Date: Nov 2015
Location: Germany
Posts: 18
Rep Power: 11
kanes is on a distinguished road
Hey Sandy,

thanks a lot!
kanes 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
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
Setting the height of the stream in the free channel kevinmccartin CFX 12 October 13, 2022 22:43
Out File does not show Imbalance in % Mmaragann CFX 5 January 20, 2017 11:20
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32


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