SinglePhase#
- class reservoirflow.fluids.SinglePhase(mu: float = None, B: float = None, rho: float = None, comp: float = None, unit: str = 'field', dtype='double', verbose: bool = False)#
Bases:
Fluid
SinglePhase fluid class.
- Returns:
SinglePhase fluid object.
- Return type:
Create SinglePhase Fluid.
- Parameters:
mu (float, optional) – fluid viscosity.
B (float, optional) – fluid formation volume factor.
rho (float, optional) – fluid density.
comp (float, optional) – fluid compressibility.
unit (str ('field', 'metric', 'lab'), optional) – unit used in input and output. Both units and factors attributes will be updated based on the selected unit and can be accessed directly from this class.
dtype (str or np.dtype, optional) – data type used in all arrays. Numpy dtype such as np.single or np.double can be used.
verbose (bool, optional) – print information for debugging.
Notes
Note
Both attributes units and factors are defined based on unit argument, for more details, check Units & Factors. For definitions, check Glossary.
Examples
>>> import reservoirflow as rf >>> fluid = rf.fluids.SinglePhase( ... mu=0.5, ... B=1, ... rho=50, ... comp=1e-5, ... unit="field", ... ) >>> print(fluid)
1import reservoirflow as rf 2fluid = rf.fluids.SinglePhase( 3 mu=0.5, 4 B=1, 5 rho=50, 6 comp=1e-5, 7 unit="field", 8 ) 9print(fluid)
Attributes
Returns class factors.
Returns class name.
Returns class unit.
Returns class units.
Methods
Allow full descriptions.
report
([prop, showindex, ifmt])Print class report.
set_B
(B)Set fluid formation volume factor (FVF).
set_comp
(comp)Set fluid compressibility.
set_mu
(mu)Set fluid viscosity.
set_props
([mu, B, rho, comp])Set fluid properties.
set_rho
(rho)Set fluid density.
set_units
([unit])Set object units.
Comments 💬#
Feel free to make a comment, ask a question, or share your opinion about this specific content. Please keep in mind the Commenting Guidelines ⚖.