temperature_gradient¶
petrophys.interpretation.temperature.temperature_gradient
- temperature_gradient(temp1, depth1, temp2, depth2, temp_unit='F', depth_unit='ft')[source]¶
Calculate temperature gradient between two points.
- Parameters:
temp1 (float) – Temperature at first point
depth1 (float) – Depth at first point
temp2 (float) – Temperature at second point
depth2 (float) – Depth at second point
temp_unit (str, optional) – Temperature unit: “F”, “C”, “K” or a label such as “degC” (see
petrophys.model.units.temperature_unit())depth_unit (str, optional) – Depth unit: “ft”, “m” or a label such as “metres”
- Returns:
Temperature gradient in °F/100ft
- Return type:
- Raises:
ValueError – If
temp_unitordepth_unitis not a recognized unit, or the two depths are equal.
Examples
>>> gradient = temperature_gradient( ... temp1=68, depth1=0, ... temp2=200, depth2=10000 ... ) >>> print(f"Gradient: {gradient:.2f} °F/100ft") Gradient: 1.32 °F/100ft