iapws_kh

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLES
SEE ALSO

NAME

kh - compute the Henry constant in water or heavy water.

LIBRARY

iapws library (libiapws, -liapws)

SYNOPSIS

Fortran

pure subroutine kh(T,gas,heavywater,k)

real(dp), intent(in), contiguous :: T(:)

character(len=*), intent(in) :: gas

integer(int32), intent(in) :: heavywater

real(dp), intent(out), contiguous :: k(:)

C

void iapws_g704_kh(double *T,char *gas,int heavywater,double *k,int size_gas,size_t size_T);

Python

kh(T:np.ndarray,gas:str,heavywater:bool=False)->Union[np.ndarray,float]:

DESCRIPTION

Computes the Henry constant kH in MPa for a given temperature T in water or heavy water.

Arguments:

T(:)

Temperature in K.

gas

Gas.

heavywater

Flag if D2O (1) is used or H2O (0).

k(:)

Henry constant in MPa.

RETURN VALUE

k is filled with NaN if gas is not found.

EXAMPLES

Fortran:
use iapws
real(dp) :: T(1), k(1)
T(1) = 25.0_dp + 273.15_dp
call kh(T, "O2", 0, k)

C:
#include "iapws.h"
double T = 25.0 + 273.15;
char *gas = "O2";
double k;
iapws_g704_kh(&T, gas, 0, &k, strlen(gas), 1);

Python:
import numpy as np
import pyiapws
T = np.asarray([25.0])
k = pyiapws.kh(T+273.15, "O2", False)
print(k)

SEE ALSO

iapws(1) iapws_lib(3) iapws_psat(3) iapws_Tsat(3) iapws_kh(3) iapws_kd(3) iapws_kw(3) iapws_Tc(3) iapws_pc(3) ciaaw(3), codata(3),