functions¶
-
stin.functions.BC_v_G(α_L, v_L, α_G)¶ The only purpose of this function is to make sure that two-phase flow boundary condition for v_G is consistent with the mathematical model. I.e., by the moment an influx occurs I know liquid phase velocity as a result of the single-phase model solution. Hence, at the boundary of two-phase flow I specify v_L and calculate v_G. Hence, I need a function to find v_G.
-
stin.functions.cond(v_G)¶ Verifies that liquid velocity is positive (based on the condition obtained from the sixth equation of the system).
-
stin.functions.derivative_p(α_L, α_G, ρ_G, v_L, v_G)¶ Calculates pressure spatial derivative to be pluged into the expression for pressure at the next spatial step (see first equation of the model). It returns the value of pressure spatial derivative at the current time step and, hence, takes as arguments volume fractions, velocities, and gas density at the current spatial step.
-
stin.functions.derivative_v_G(v_G, α_G, ρ_G, derivative_p)¶ Calculates gaseous phase spatial velocity derivative at the current spatial step, therefore all the arguments assume their values at the current spatial step. Is used in the third equation of the system.
-
stin.functions.derivative_v_L(v_L, α_L, derivative_α_G)¶ Calculates spatial derivative of liquid phase velocity at the current spatial step. Hence, all the arguments it takes assume their values at the current spatial step. It is used in the second version of the sixth equation of the system.
-
stin.functions.derivative_α_G(α_G, ρ_G, derivative_p, v_G, derivative_v_G)¶ Calculates spatial derivative of gaseous volume fraction at the current spatial step. Hence, all the arguments it takes assume their values at the current spatial step. It is used in the fourth equation of the system.
- Parameters
- Returns
the return value (gaseous phase velocity). Can assume any value.
- Return type
-
stin.functions.single_p(v_L, L, p_0)¶ Calculates pressure at the given point in a single-phase flow. See the second equation of the system.
-
stin.functions.single_v_L(v_L0, L)¶ Calculates velocity of a single-phase flow at the given position L along the wellbore. See the first equation of the system.
-
stin.functions.α_L(α_G)¶ Calculates liquid phase volume fraction at the next spatial step. Hence, the argument it takes assumes its value at the next spatial step also.
- Parameters
α_G (float) – from 0 to 1.
- Returns
- the return value (liquid phase volume fraction). Can assume
any value in the range 0 to 1.
- Return type
Example
α_L(0.3) = 0.7 - both entities are dimensionless
-
stin.functions.ρ_G(p)¶ Calculates gas phase density at the next spatial step based on the pressure value at the next spatial step (see second equation of the model).
- Parameters
p (float) –
- Returns
- the return value (gaseous phase density). Can assume any
positive value.
- Return type
Example
ρ_G(50000000Pa) = 260kg/m^3