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

water injection

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By Yann
  • 1 Post By Yann
  • 1 Post By wjchoi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 19, 2022, 03:10
Default water injection
  #1
New Member
 
Join Date: Jan 2022
Posts: 27
Rep Power: 4
wjchoi is on a distinguished road
in weiroverflow example, i modified some parts from original codes.
the modified parts are below.

[code]

boundaryField
{
inlet
{

type flowRateInletVelocity;
volumetricFlowRate table
(
(0 0)
(100 0)
(100.01 0.008)
(200 0.008)
(200.01 0)
(300 0)
(300.01 0.008)
(400 0.008)
(400.01 0)
(500 0)
(500.01 0.008)
(600 0.008)
(600.01 0)
(700 0)
(700.01 0.008)
(800 0.008)
(800.01 0)
(900 0)
(900.01 0.008)
(1000 0.008)
);

}

originally, in the weirovercode example, water comes out constantly from inlet,
but i want to simulate the time varying water injection, so i modified this part as i mentioned above.

from the modified part, we can know the water injection exist only at 100~200s, 300~400s, 500~600s, 700~800s, 900 ~1000s as same flow rate (0.008m^3/s)


however, as time goes, the speed of water filling increased although i set the same flow rate (0.008)

in the simulation, the stop time and inject time work well. but in the inject time, the flow rate i set does not work well i think..

how can i solve this problem? ..
wjchoi is offline   Reply With Quote

Old   January 19, 2022, 03:56
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,080
Rep Power: 26
Yann will become famous soon enough
Hi,

The weirOverflow tutorial initially uses a specific inlet condition in order to simulate a variable height of water on the inlet patch. 2 boundary conditions are working together to achieve this:
  • U: variableHeightFlowRateInletVelocity
  • alpha.water: variableHeightFlowRate
Have you modified the BC on alpha.water? I don't think you can expect correct behavior if your using variableHeightFlowRate on alpha but flowRateInletVelocity on U.

That being said, the flowRate entry in variableHeightFlowRateInletVelocity is a Function1 entry so you should be able to define it as a table too.

Try something like this:

Code:
    inlet
    {
        type            variableHeightFlowRateInletVelocity;
        alpha           alpha.water;
        value           uniform (0 0 0);
        flowRate        table
                        (
                            (0 0)
                            (100 0)
                            (100.01 0.008)
                            (200 0.008)
                            (200.01 0)
                            (300 0)
                            (300.01 0.008)
                            (400 0.008)
                            (400.01 0)
                            (500 0)
                            (500.01 0.008)
                            (600 0.008)
                            (600.01 0)
                            (700 0)
                            (700.01 0.008)
                            (800 0.008)
                            (800.01 0)
                            (900 0)
                            (900.01 0.008)
                            (1000 0.008)
                        );
    }
Please note I did not try to run it, you may have to adjust the syntax to make it work.

Cheers,
Yann
wjchoi likes this.
Yann is offline   Reply With Quote

Old   January 19, 2022, 06:25
Default water injection
  #3
New Member
 
Join Date: Jan 2022
Posts: 27
Rep Power: 4
wjchoi is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hi,

The weirOverflow tutorial initially uses a specific inlet condition in order to simulate a variable height of water on the inlet patch. 2 boundary conditions are working together to achieve this:
  • U: variableHeightFlowRateInletVelocity
  • alpha.water: variableHeightFlowRate
Have you modified the BC on alpha.water? I don't think you can expect correct behavior if your using variableHeightFlowRate on alpha but flowRateInletVelocity on U.

That being said, the flowRate entry in variableHeightFlowRateInletVelocity is a Function1 entry so you should be able to define it as a table too.

Try something like this:

Code:
    inlet
    {
        type            variableHeightFlowRateInletVelocity;
        alpha           alpha.water;
        value           uniform (0 0 0);
        flowRate        table
                        (
                            (0 0)
                            (100 0)
                            (100.01 0.008)
                            (200 0.008)
                            (200.01 0)
                            (300 0)
                            (300.01 0.008)
                            (400 0.008)
                            (400.01 0)
                            (500 0)
                            (500.01 0.008)
                            (600 0.008)
                            (600.01 0)
                            (700 0)
                            (700.01 0.008)
                            (800 0.008)
                            (800.01 0)
                            (900 0)
                            (900.01 0.008)
                            (1000 0.008)
                        );
    }
Please note I did not try to run it, you may have to adjust the syntax to make it work.

Cheers,
Yann

thank you very much!
when i ran the example using your modified code, the velocity of water filling looks like same perfectly!!
thank you!


if you don't mind, can you ask three more quesions?

first, could you tell me differences between variableHeightFlowRateInletVelocity used in your code and flowRateInletVelocity used in my code,,? i read the boundary condition manual, but i didn't understand the differences between them..

second, so, could you tell me reason why the speed of water filling becomes faster as time goes although i set the same flow rate "0.008" in my code using FlowRateInletVelocity boundary condition?

i think this second question will be solved if i get to know the differences between them (related first question..)


third, in your code, "the value (0 0 0)" is inserted. what is meaning of this?
i set the inlet value for table format. but, why we need to insert the additional value (0 0 0)? when i searched about that, it is mentioned as placeholder. i didn't understand the meaning of placeholder
if the value is placeholder, can you tell me reason why you insert that in your code?


thank you very much for long reading!!
wjchoi is offline   Reply With Quote

Old   January 19, 2022, 09:37
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,080
Rep Power: 26
Yann will become famous soon enough
As stated in the variableHeightFlowRateInletVelocity documentation: the flow rate is made proportional to the phase fraction alpha at each face of the patch. This means you are prescribing the water flowrate. Combined with the variableHeightFlowRate boundary condition, this will allow to have a variable water height on the inlet, and adjust the velocity according to the water height to maintain the prescribed flowrate.

flowRateInletVelocity, on the other hand, will only compute a velocity corresponding to the prescribed flowrate on the whole inlet patch, irrelevantly to the phase fraction value. If you want to use this condition, you need to define a fixedValue boundary condition on the alpha.water variable to fix alpha.water=1 on the inlet patch. In this case, the whole inlet patch will be used for water injection, with a velocity corresponding to the flowrate specified by the flowRateInletVelocity BC in the U file. In you fix alpha.water=0 on the inlet patch, you will get an air inlet, with an inlet velocity corresponding to the specified flowrate.

About the placeholder, this is a recurrent topic so you should find answers on the forum, for instance here and here.

I hope this helps,
Yann
wjchoi likes this.
Yann is offline   Reply With Quote

Old   January 19, 2022, 20:43
Default water injection
  #5
New Member
 
Join Date: Jan 2022
Posts: 27
Rep Power: 4
wjchoi is on a distinguished road
Quote:
Originally Posted by Yann View Post
As stated in the variableHeightFlowRateInletVelocity documentation: the flow rate is made proportional to the phase fraction alpha at each face of the patch. This means you are prescribing the water flowrate. Combined with the variableHeightFlowRate boundary condition, this will allow to have a variable water height on the inlet, and adjust the velocity according to the water height to maintain the prescribed flowrate.

flowRateInletVelocity, on the other hand, will only compute a velocity corresponding to the prescribed flowrate on the whole inlet patch, irrelevantly to the phase fraction value. If you want to use this condition, you need to define a fixedValue boundary condition on the alpha.water variable to fix alpha.water=1 on the inlet patch. In this case, the whole inlet patch will be used for water injection, with a velocity corresponding to the flowrate specified by the flowRateInletVelocity BC in the U file. In you fix alpha.water=0 on the inlet patch, you will get an air inlet, with an inlet velocity corresponding to the specified flowrate.

About the placeholder, this is a recurrent topic so you should find answers on the forum, for instance here and here.

I hope this helps,
Yann


i got a lot of help thanks to your explanation
thank you very much !!
Yann likes this.
wjchoi 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
water injection time adjusting wjchoi OpenFOAM Running, Solving & CFD 2 January 13, 2022 07:44
Water Droplets injection from top of Pipe and Multiphase modelling kasimvhora40 STAR-CCM+ 2 December 5, 2021 07:18
No liquid water exist in my Fuel Cell simulation fatchang FLUENT 19 October 15, 2018 14:27
Time dependent water injection madfan123 OpenFOAM Running, Solving & CFD 0 September 15, 2016 07:00
Injection of water in vapor SimoneTecnoil FLUENT 0 November 9, 2009 11:29


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