CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   water injection error (modify the position of water injection) (https://www.cfd-online.com/Forums/main/240638-water-injection-error-modify-position-water-injection.html)

wjchoi January 17, 2022 07:17

water injection error (modify the position of water injection)
 
hello i am a beginner of openfoam!

when i ran the example code related to water injection from inlet (weiroverflow example), i wondered whether i can change the time and position of water coming out or not.

so, to solve this question, i have modified the original code step by step.

first, i modified water injection time of original code.
in original code, the water comes out from inlet constantly. so, after enough time, the region that i set always full. because, there is no time option (start time and duration etc..) but initial flow rate option.

No matter how I reduce the initial flow rate, it's just the difference between filling up late and filling up quickly, because I can't control the time the flow comes out. so in the end, the entire area was filled with water.

to solve this problem, i knew there was the time option in openfoam (time table). so, i modified original code (below).


(Code)

boundaryField
{
inlet
{

type flowRateInletVelocity;
volumetricFlowRate table
(
(0 0)
(50 0)
(50.01 100)
(100 100)
(100.01 0)
(150 0)
(150.01 100)
(200 100)
(200.01 0)
);

}
--> explanation : 0~50s : water injection stops / 50~100s : water injection by 100 flow rate / etc.. (water injection completely stops at 200s because after 200.01, the flow rate of water comes out is 0)



this modified 1 code was sucessful!

because i solved the problem related time option about water injection, in this time, i wanted to modify the position of water coming out..

the water injection position (inlet condition) of modified 1 code is set as the entire left wall (this is same as original code, because the modified 1 code does not change the position of water from original code, only change the time of water from original code) ),

but, i modified the modified 1 code . In modified 2 code, I tried to change the water injection position by setting only the upper part of the left wall as the inlet (for example, assume that left wall's height is 1, in oringinal code or modified 1 code, entire left wall "1" is inlet, but, in modified 2 code, i set the position of "0.5 ~ 0.7" is inlet. the rest are left "walls").

but, this modified 2 code has error.. only difference between modified 1 code and modified 2 code is inlet size and inlet position (boundary condition, water injection time(time table) etc.. are all same ! )

to summarize,

original code -- modify injection time --> modified 1 code (successful) -- modify injection position --> modified 2 code (error)

i want to know the reason error occurs.. error is below..


[error code] --> time step continuity error..?

MULES: Solving for alpha.water
Phase-1 volume fraction = 0.05 Min(alpha.water) = 0 Max(alpha.water) = 1
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.05 Min(alpha.water) = 0 Max(alpha.water) = 1
DICPCG: Solving for p_rgh, Initial residual = 0.998797, Final residual = 0.0299508, No Iterations 4
time step continuity errors : sum local = 0.221249, global = -4.95541e-18, cumulative = 2.16147e+08
DICPCG: Solving for p_rgh, Initial residual = 4.14032e-48, Final residual = 4.14032e-48, No Iterations 0
time step continuity errors : sum local = 6.39399e+11, global = 1.39636e-05, cumulative = 2.16147e+08
DICPCG: Solving for p_rgh, Initial residual = 4.44353e-48, Final residual = 4.44353e-48, No Iterations 0
time step continuity errors : sum local = 6.86224e+11, global = 2.15784e-05, cumulative = 2.16147e+08



thanks for long reading..!


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