CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   water injection time adjusting (https://www.cfd-online.com/Forums/openfoam-solving/240567-water-injection-time-adjusting.html)

wjchoi January 13, 2022 01:44

water injection time adjusting
 
Hello i am beginner of openfoam

when i run the example related water injection from inlet, i wonder that wether the injection of water can stop or not. clearly, i think that there may be an option to stop the water injection by time in openfoam. for example, if i set the time of water injection to 0s ~50s, the time of water injection is only 0s ~50s. in other words, after 50s from starting simulation, water injection will stop.

but, i did't find the option to set the water injection time.

i only found the option to set the "bubble" injection time in water (constant/fvOption/points --> timeStart, duration __ i wrote the code related this in the below)

[code]
options
{
massSource
{
type semiImplicitSource;

timeStart 0.1;
duration 5;

selectionMode points;
points
(
(0.075 0.2 0.05)
);

volumeMode absolute;
~~~


and i found that if i want to inject the water from inlet to some domain, i can adjust the boundary condition of alpha.water file and U file in "0" folder. but, when i saw these files, there is not an option to adjust the water injection time unlike bubble injection in fvOption as i mentioned above. so if the time of simulation is enough long, the water always full in the domain..
(i wrote the code related this in the below )

[code]

boundaryField
{
inlet
{
type flowRateInletVelocity;
volumetricFlowRate constant 5;
}

~~~ (there is no option like timeStart, duration)

Yann January 13, 2022 03:39

Hi,

You should be able to define the flowrate in a table function of time.

For instance, in the example below, the flowrate will ramp from 0 to 5m3/s during the first 10s of simulation, then maintain a constant flowrate of 5m3/s from 10 to 50s and then decrease the flowrate up to 0 between 50 and 60s.

I did not test this, you might have to adjust the syntax.

Code:

inlet
{
    type flowRateInletVelocity;
    volumetricFlowRate table ((0 0)(10 5)(50 5)(60 0));
 }

Cheers,
Yann

wjchoi January 13, 2022 07:44

Quote:

Originally Posted by Yann (Post 820100)
Hi,

You should be able to define the flowrate in a table function of time.

For instance, in the example below, the flowrate will ramp from 0 to 5m3/s during the first 10s of simulation, then maintain a constant flowrate of 5m3/s from 10 to 50s and then decrease the flowrate up to 0 between 50 and 60s.

I did not test this, you might have to adjust the syntax.

Code:

inlet
{
    type flowRateInletVelocity;
    volumetricFlowRate table ((0 0)(10 5)(50 5)(60 0));
 }

Cheers,
Yann


oh
the code you wrote worked well as i intended,, thank you very much!


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