Working with auxi's Slag Physical Property Models

Purpose

The purpose of this example is to introduce and demonstrate the slags model classes in auxi's material physical property tools package.

Background

The slags models provides you with the tools to calculate physical property values of liquid slags as a function of temperature and composition. The module currently contains only viscosity models, specifically those developed by Riboud and Urbain.

Items Covered

The following items in auxi are discussed and demonstrated in this example:

  • auxi.tools.materialphysicalproperties.slags.UrbainViscosityTx
  • auxi.tools.materialphysicalproperties.slags.UrbainViscosityTy
  • auxi.tools.materialphysicalproperties.slags.RiboudViscosityTx
  • auxi.tools.materialphysicalproperties.slags.RiboudViscosityTy

Example Scope

In this example we will address the following aspects:

  1. Using the UrbainViscosityTx model
  2. Using the UrbainViscosityTy model
  3. Using the RiboudViscosityTx model
  4. Using the RiboudViscosityTy model
  5. Comparing results from these models with experimental data

Demonstrations

Using the UrbainViscosityTx Model

This model calculates viscosity from temperature and composition expressed as mole fractions.


In [ ]:
from auxi.tools.materialphysicalproperties.slags import UrbainViscosityTx

# create an instance of the model
urbainTx = UrbainViscosityTx()

# define the material state
T = 1873.15  # [K]
x = {'SiO2': 0.25, 'P2O5': 0.25, 'CaO': 0.25, 'MgO':0.25}  # [mole fraction]

# calculate the viscosity
mu = urbainTx(T=T, x=x)
print(urbainTx.symbol, mu, urbainTx.units)

Using the UrbainViscosityTy Model

This model calculates viscosity from temperature and composition expressed as mass fractions.


In [ ]:
from auxi.tools.materialphysicalproperties.slags import UrbainViscosityTy

# create an instance of the model
urbainTy = UrbainViscosityTy()

# define the material state
T = 1873.15  # [K]
y = {'SiO2': 0.25, 'P2O5': 0.25, 'CaO': 0.25, 'MgO':0.25}  # [mass fraction]

# calculate the viscosity
mu = urbainTy(T=T, y=y)
print(urbainTy.symbol, mu, urbainTy.units)

Using the RiboudViscosityTx Model

This model calculates viscosity from temperature and composition expressed as mole fractions.


In [ ]:
from auxi.tools.materialphysicalproperties.slags import RiboudViscosityTx

# create an instance of the model
riboudTx = RiboudViscosityTx()

# define the material state
T = 1873.15  # [K]
x = {'SiO2': 0.25, 'P2O5': 0.25, 'CaO': 0.25, 'MgO':0.25}  # [mole fraction]

# calculate the viscosity
mu = riboudTx(T=T, x=x)
print(riboudTx.symbol, mu, riboudTx.units)

Using the RiboudViscosityTy Model

This model calculates viscosity from temperature and composition expressed as mass fractions.


In [ ]:
from auxi.tools.materialphysicalproperties.slags import RiboudViscosityTy

# create an instance of the model
riboudTy = RiboudViscosityTy()

# define the material state
T = 1873.15  # [K]
y = {'SiO2': 0.25, 'P2O5': 0.25, 'CaO': 0.25, 'MgO':0.25}  # [mass fraction]

# calculate the viscosity
mu = riboudTy(T=T, y=y)
print(riboudTy.symbol, mu, riboudTy.units)

Comparing with Experimental Data

Let's compare the calculation results of the Urbain and Riboud models with experimental results from literature. First, let's import a data set, and see what it looks like.


In [ ]:
# import an experimental dataset from auxi
from auxi.tools.materialphysicalproperties.slags import ds1
print(ds1)

Now let's use the data set to test the viscosity models.


In [ ]:
# create lists to contain the calculation results
measured = []
urbain = []
riboud = []

# calculate viscosities for the conditions in the data set
for index, row in ds1.data.iterrows():
    T = row['T']
    y = {'FeO': row['FeO'], 'P2O5': row['P2O5'], 'MnO': row['MnO'], 'SiO2': row['SiO2']}
    measured.append(row['mu'])
    urbain.append(urbainTy(T=T, y=y))
    riboud.append(riboudTy(T=T, y=y))

# import matplotlib so that we can plot with it
import matplotlib.pyplot as plt
%matplotlib inline

# do the plot
plt.plot(measured, urbain, "bo", alpha=0.7, label='Urbain')
plt.plot(measured, riboud, "ro", alpha=0.7, label='Riboud')
plt.xlabel('Experimental $\mu$ [Pa.s]')
plt.ylabel('Model $\mu$ [Pa.s]')
plt.legend()
plt.show()