Skip to content

Commit

Permalink
Adding carbon dioxide fluid properties (doco)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrsd committed May 23, 2023
1 parent cd14193 commit d55d10a
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 1 deletion.
26 changes: 25 additions & 1 deletion docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ if(DOXYGEN_FOUND)
air_err_u.png
air_err_w.png
)
file(GLOB_RECURSE RST_FILES ${PROJECT_SOURCE_DIR}/docs/*.rst)
set(HE_ERR_IMGS
he_err_c_p.png
he_err_c_v.png
Expand All @@ -46,6 +45,17 @@ if(DOXYGEN_FOUND)
he_err_u.png
he_err_w.png
)
set(CO2_ERR_IMGS
co2_err_c_p.png
co2_err_c_v.png
co2_err_h.png
co2_err_k.png
co2_err_mu.png
co2_err_rho.png
co2_err_s.png
co2_err_u.png
co2_err_w.png
)

add_custom_command(
OUTPUT
Expand All @@ -59,6 +69,7 @@ if(DOXYGEN_FOUND)
${N2_ERR_IMGS}
${AIR_ERR_IMGS}
${HE_ERR_IMGS}
${CO2_ERR_IMGS}
)

add_custom_command(
Expand Down Expand Up @@ -110,6 +121,19 @@ if(DOXYGEN_FOUND)
${PROJECT_SOURCE_DIR}/docs/pyplots/he.yml
)

add_custom_command(
OUTPUT
${CO2_ERR_IMGS}
COMMAND
${CMAKE_COMMAND} -E env "PYTHONPATH=${PROJECT_BINARY_DIR}/python/src:$ENV{PYTHONPATH}"
python3 plot_err.py co2.yml
WORKING_DIRECTORY
${PROJECT_SOURCE_DIR}/docs/pyplots
DEPENDS
${PROJECT_SOURCE_DIR}/docs/pyplots/plot_err.py
${PROJECT_SOURCE_DIR}/docs/pyplots/co2.yml
)

add_custom_command(
TARGET doc
POST_BUILD
Expand Down
5 changes: 5 additions & 0 deletions docs/classes/carbon-dioxide.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Carbon Dioxide
==============

.. doxygenclass:: fprops::CarbonDioxide
:members:
32 changes: 32 additions & 0 deletions docs/fluids/carbon-dioxide.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Carbon Dioxide
==============

Range of validity:

- Temperature: `216.592 - 1100 K`
- Pressure: to `800 MPa`

Computation of thermodynamic properties is based on :cite:t:`10.1063/1.555991`.
Viscosity is based on :cite:t:`10.1063/1.556013` and
thermal conductivity is based on :cite:t:`10.1063/1.2213631`.

Verification against CoolProp package
-------------------------------------

.. image:: ../pyplots/co2_err_rho.png

.. image:: ../pyplots/co2_err_u.png

.. image:: ../pyplots/co2_err_h.png

.. image:: ../pyplots/co2_err_s.png

.. image:: ../pyplots/co2_err_w.png

.. image:: ../pyplots/co2_err_c_p.png

.. image:: ../pyplots/co2_err_c_v.png

.. image:: ../pyplots/co2_err_mu.png

.. image:: ../pyplots/co2_err_k.png
17 changes: 17 additions & 0 deletions docs/pyplots/co2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
fprops:
name: co2
coolprop: CO2
fprops: CarbonDioxide
p: [
0.1, 0.2,
0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4,
5, 6, 8,
10, 15, 20, 25,
50, 75, 100,
200, 400, 600, 800
]
T: [
220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350,
400, 450, 500, 550,
600, 700, 800, 900, 1000, 1100
]
40 changes: 40 additions & 0 deletions docs/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,43 @@ @techreport{arp1989thermophysical
year={1989},
institution={}
}

@article{10.1063/1.555991,
year = {1996},
keywords = {CO2},
title = {{A New Equation of State for Carbon Dioxide Covering the Fluid Region from the Triple‐Point Temperature to 1100 K at Pressures up to 800 MPa}},
author = {Span, Roland and Wagner, Wolfgang},
journal = {Journal of Physical and Chemical Reference Data},
issn = {0047-2689},
doi = {10.1063/1.555991},
pages = {1509--1596},
number = {6},
volume = {25},
}

@article{10.1063/1.556013,
year = {1998},
keywords = {CO2},
title = {{The Viscosity of Carbon Dioxide}},
author = {Fenghour, A and Wakeham, William A and Vesovic, V},
journal = {Journal of Physical and Chemical Reference Data},
issn = {0047-2689},
doi = {10.1063/1.556013},
pages = {31--44},
number = {1},
volume = {27},
}

@article{10.1063/1.2213631,
year = {2006},
keywords = {CO2},
title = {{A Reference Multiparameter Thermal Conductivity Equation for Carbon Dioxide with an Optimized Functional Form}},
author = {Scalabrin, G. and Marchi, P. and Finezzo, F. and Span, R.},
journal = {Journal of Physical and Chemical Reference Data},
issn = {0047-2689},
doi = {10.1063/1.2213631},
abstract = {{A new thermal conductivity equation λ=λ(T,ρ) in a multiparameter format was developed for carbon dioxide through the application of an optimization technique of the functional form. The proposed equation is valid for temperatures from the triple point (Tt=216.592K; Pt=0.51795MPa) to 1000K and pressures up to 200MPa. The calculation of density, which is an independent variable of the equation, from the experimental (T,P) conditions is performed with a high accuracy equation of state for the fluid. The thermal conductivity equation shows an average absolute deviation of 1.19\% on the selected 1407 primary data points. Its performances are slightly better than those of the corresponding conventional model by Vesovic et al. [J. Phys. Chem. Ref. Data 19, 763 (1990)] available from the literature; moreover the new equation is simpler to use in particular for the near-critical region. Tables of generated values of carbon dioxide thermal conductivity are provided for check of the code implementations and for quick evaluations.}},
pages = {1549--1575},
number = {4},
volume = {35},
}

0 comments on commit d55d10a

Please sign in to comment.