Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docs and Readme #18

Merged
merged 12 commits into from
Dec 19, 2024
57 changes: 27 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,22 @@
[![Dev][docs-stable-img]][docs-stable-url] [![Dev][docs-dev-img]][docs-dev-url] [![Build Status][build-img]][build-url]

<p align="center">
<img width="150px" src="docs/src/assets/logo.svg">
</p>

# EntropyScaling.jl

Transport property modeling based on entropy scaling and equations of state (EOS).

This package provides methods to model
This package provides models for
- the viscosity,
- the thermal conductivity, and
- diffusion coefficients

in a physically sound way. For the EOS calculations, additional packages need to be imported.
Alternatively, custom EOS functions can be defined. Implementations of EOS models are *not*
included in this package.

Entropy scaling makes use of the fact that transport properies can be scaled such that the
scaled transport property $Y^{\rm s}$ is a univariate function of the configurational (or
residual) entropy $s_{\rm conf}$, i.e.

$$Y^{\rm s} = Y^{\rm s}\left(s_{\rm conf}\right).$$
- diffusion coefficients.

Entropy scaling enables the prediction of transport porperties in all fluid phases based on
few experimental data.
The documentation of the package can be found [here][docs-dev-url].

The following entropy scaling methods are implemented:
- [Entropy Scaling Framework](https://doi.org/10.1016/j.molliq.2023.123811)

All methods are based on empirical parameters fitted to experimental data of the respective
transport property. If no parameters are given for a specific substance, the workflow for
most methods is the following:
1. **Creating the entropy scaling model**: Fitting of empirical parameters to experimental
data.
2. **Calculating transport properties**: Evaluating the entropy scaling model at any fluid
state point.
In general, parameters are not transferable between different EOS models, i.e. for they
should only be used (in step 2) in combination with the EOS which was also used for fitting
the parameters (in step 1).

The documentation of the package can be found [here][docs-stable-url].
For the EOS calculations, additional packages need to be imported. Alternatively, custom EOS
functions might be defined. Implementations of EOS models are *not* included in this package.

## Installation

Expand All @@ -50,7 +30,24 @@ Then, the module can be loaded by
using EntropyScaling
```

## Example
## Examples

**Chapman-Enskog viscosity of methane**

```julia
using EntropyScaling

# Parameters from Poling et al. (2001)
σ = 3.758e-10 # size parameter ([σ] = m)
ε = 148.6*EntropyScaling.kB # energy parameter ([ε] = J)
Mw = 16.0425e-3 # molar mass ([Mw] = kg/mol)

# Calculate gas viscosity of methane at 300 K
T = 300.
η = viscosity_CE(T, Mw, σ, ε)
```

**Fitting a new entropy scaling model**

```julia
using EntropyScaling, Clapeyron
Expand Down
86 changes: 86 additions & 0 deletions docs/src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@ $$Y^{\rm s} = Y^{\rm s}\left(s_{\rm conf}\right).$$
Entropy scaling enables the prediction of transport porperties in all fluid phases based on
few experimental data.

## Installation

## Available Transport Property Models

## Compatible EOS Model Packages

...
43 changes: 38 additions & 5 deletions docs/src/models.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,45 @@
# Models

...
```@index
Pages = ["models.md"]
```

## Entropy Scaling Framework
## Chapman-Enskog Models

### Overview
Chapman-Enskog models for transport properties at the zero-density limit based on the kinetic gas theory.

### Examples
"""@docs
EntropyScaling.ChapmanEnskogModel
"""

### References
## Entropy Scaling Models

Entropy scaling makes use of the fact that transport properies can be scaled such that the
scaled transport property $Y^{\rm s}$ is a univariate function of the configurational (or
residual) entropy $s_{\rm conf}$, i.e.

$$Y^{\rm s} = Y^{\rm s}\left(s_{\rm conf}\right).$$

Entropy scaling enables the prediction of transport porperties in all fluid phases.

### Available Models

"""@docs
EntropyScaling.FrameworkModel
EntropyScaling.RefpropRESModel
"""

### Fitting Entropy Scaling Parameters

*[Work in progress]*

Some entropy scaling models allow the fitting of substance-specific parameters to experimental data.
Therefore, a unified interface is provided including the handling of the data and the fit options.

**Fitting Procedure**

1. Loading experimental data
2. Fitting
3. Plotting results and saving the parameters

**Example**
9 changes: 8 additions & 1 deletion docs/src/transport_properties.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# Transport Properties
# Transport Properties

"""@docs
EntropyScaling.viscosity
EntropyScaling.thermal_conductivity
EntropyScaling.self_diffusion_coefficient
EntropyScaling.MS_diffusion_coefficient
"""
4 changes: 4 additions & 0 deletions src/general/chapman_enskog.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ function ChapmanEnskogModel(comps::String, σ::Float64,ε::Float64,Mw::Float64;c
end
Base.length(model::AbstractChapmanEnskogModel) = length(model.Mw)

# TODO add references (LTD style)
# TODO make CE also a models and use default functions `viscosity(...)` etc.
# TODO add LJ parameters from Poling to database

"""
viscosity_CE(model::ChapmanEnskogModel, T, z=[1.])

Expand Down
Loading