# liquefaction.cycles_to_liquefaction()

Uniform cycles at `csr` needed to trigger liquefaction.

Usage

[Source](https://github.com/lornearnold/driven-pile/blob/main/src/driven_pile/liquefaction.py#L132-L163)

``` python
liquefaction.cycles_to_liquefaction(
    csr,
    crr15,
    b=0.34,
    n_ref=N_REF_CYCLES,
    nl_max=1000000000.0,
)
```

## Parameters

`csr: array_like`  
Applied cyclic stress ratio.

`crr15: array_like`  
Cyclic resistance ratio at `n_ref` cycles.

`b: float = 0.34`  
Exponent of the cyclic strength curve.

`n_ref: float = N_REF_CYCLES`  
Reference cycle count of `crr15`.

`nl_max: float = 1000000000.0`  
Cap returned where the result is not finite or `csr` is not positive.

## Returns

`ndarray`  
`n_ref * (crr15 / csr)**(1 / b)`, capped at `nl_max`.

## References

Idriss and Boulanger (2008).
