Skip to content

Commit

Permalink
Merge pull request #24 from UNH-CORE/repro
Browse files Browse the repository at this point in the history
Improve reproducibility
  • Loading branch information
petebachant authored Dec 4, 2024
2 parents 1f06663 + 7beba7e commit 1b52bb0
Show file tree
Hide file tree
Showing 19 changed files with 2,196 additions and 609 deletions.
3 changes: 3 additions & 0 deletions .dvc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/config.local
/tmp
/cache
6 changes: 6 additions & 0 deletions .dvc/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[core]
remote = calkit
autostage = true
['remote "calkit"']
url = https://api.calkit.io/projects/unh-core/rvat-re-dep/dvc
auth = custom
3 changes: 3 additions & 0 deletions .dvcignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Add patterns of files dvc should ignore, which could improve
# the performance. Learn more at
# https://dvc.org/doc/user-guide/dvcignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ temp.py
*.gddoc
Data/Processed/Perf-tsr_0.csv
Tables
.DS_Store
6 changes: 6 additions & 0 deletions Data/Raw.dvc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
outs:
- md5: 970e0acbd8d7a5eb227fef633505d52c.dir
size: 138176361
nfiles: 42
hash: md5
path: Raw
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM continuumio/anaconda3:5.2.0

ENV MPLBACKEND=Agg

RUN pip install --no-cache-dir progressbar33 pxl>=0.0.10

RUN mkdir /work
WORKDIR /work
61 changes: 61 additions & 0 deletions Dockerfile-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[
{
"RepoTags": [
"rvat-re-dep:latest"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-12-04T12:28:34.649151169Z",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"LC_ALL=C.UTF-8",
"MPLBACKEND=Agg"
],
"Cmd": [
"/bin/bash"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": null,
"WorkingDir": "/work",
"Entrypoint": [
"/usr/bin/tini",
"--"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 1633662550,
"GraphDriver": {
"Data": null,
"Name": "overlayfs"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:0f3a12fef684003e8dc0dfdcea32789db2179c6f9ad1e1e89bc05754ac44c6c5",
"sha256:48768004f9f8c96cc87695694a8585815a4914d425f1c15671108d14c142a573",
"sha256:82ad0684c2340b474e3d47ccdf67dd6bc99af9f28d568fe744ee7641eb6ee46d",
"sha256:248c9669afaed92813e5e1000c6c40ad0b991b04a044d07c24ecc59b433f9441",
"sha256:515eb4e81f385b337cbdae95a45d667e54c06ce23ea089e6a444b31007702a08",
"sha256:6d52f5a81c9c316c88e9ff47d173d838e2a3999102249e704fd3c72ccd685520",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
]
},
"DockerfileMD5": "33f88aff8e870c342f15d9bbf9bbdc39"
}
]
72 changes: 43 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,76 @@ This repository contains the processing and plotting code, as well as the
derived dataset from the UNH-RVAT Reynolds number dependence experiment
performed in Spring 2014.

## Getting started

Getting started
---------------
You will need
[Calkit](https://github.com/calkit/calkit)
and its dependencies installed in order to run the pipeline that generates
all of the figures.
You will also need to have a
[token set in your config](https://github.com/calkit/calkit?tab=readme-ov-file#cloud-integration)
to be able to pull the raw data (necessary for one figure.)

Clone this repository with
Clone this repository with:

git clone https://github.com/UNH-CORE/RVAT-Re-dep.git
```sh
calkit clone https://github.com/UNH-CORE/RVAT-Re-dep.git
```

To run the processing/plotting code we recommend the
[Anaconda Python distribution](https://store.continuum.io/cshop/anaconda/)
(Python 3.5) since it includes most dependencies. The remaining
can be installed by executing
Alternatively, if you don't need to be able to pull the raw data
or figures, you can use `git clone` instead of `calkit clone`.

pip install progressbar33 pxl>=0.0.8
If you'd like to reuse some of the data loading and plotting functionality
in other Python code outside this project,
install the Python package in local mode with:

After installing all dependencies, execute `python plot.py` to generate
figures from the experiment.
```sh
pip install -e .
```

You'll then be able to run code like:

Contributing
------------
```python
import pyrvatrd

To contribute to this repository, please create a fork, add changes on a
descriptively-named branch, and submit a pull request.
perf_curve = pyrvatrd.load_perf_curve(tow_speed=1.0)
perf_curve.plotcp()
```

See `notebook.ipynb` for more examples.
Also see
[this repo](https://github.com/petebachant/reuse-rvat-re-dep)
for an example of how this data can be reused in your own project.

## Contributing

Documents and other resources
-----------------------------
To contribute to this repository, please create a fork, add changes on a
descriptively-named branch, and submit a pull request.

* [Uncertainty calculations](http://nbviewer.ipython.org/github/UNH-CORE/RVAT-Re-dep/blob/master/Documents/IPython%20notebooks/uncertainty.ipynb)
* [UNH-RVAT CAD models](http://figshare.com/articles/UNH_RVAT_CAD_models/1062009)
## Documents and other resources

- [Uncertainty calculations](http://nbviewer.ipython.org/github/UNH-CORE/RVAT-Re-dep/blob/master/Documents/IPython%20notebooks/uncertainty.ipynb)
- [UNH-RVAT CAD models](http://figshare.com/articles/UNH_RVAT_CAD_models/1062009)

How to cite
-----------
## How to cite

Please cite

Bachant, P. and Wosnik, M. (2016) UNH-RVAT Reynolds number dependence experiment: Reduced dataset and processing code. figshare.
DOI: [10.6084/m9.figshare.1286960.v5](https://dx.doi.org/10.6084/m9.figshare.1286960.v5)

## Publications

Publications
------------
These data were used in the following publications:

Bachant, P. and Wosnik, M. (2016) [Effects of Reynolds Number on the Energy Conversion and Near-Wake Dynamics of a High Solidity
Bachant, P. and Wosnik, M. (2016) [Effects of Reynolds Number on the Energy Conversion and Near-Wake Dynamics of a High Solidity
Vertical-Axis Cross-Flow Turbine](http://doi.org/10.3390/en9020073). _Energies_, 9

Bachant, P. and Wosnik, M. (2014) [Reynolds Number Dependence of Cross-Flow Turbine Performance and Near-Wake
Characteristics](http://hdl.handle.net/10919/49210). _In Proceedings of the 2nd Marine Energy Technology Symposium METS2014_, April
Bachant, P. and Wosnik, M. (2014) [Reynolds Number Dependence of Cross-Flow Turbine Performance and Near-Wake
Characteristics](http://hdl.handle.net/10919/49210). _In Proceedings of the 2nd Marine Energy Technology Symposium METS2014_, April
15--18, Seattle, WA


License
-------
## License

Code licensed under the MIT license. See `LICENSE` for details.
All other materials licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">
Expand Down
98 changes: 98 additions & 0 deletions calkit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
datasets:
- path: Data/Processed
title: Processed data
description: The processed/reduced dataset.
- path: Data/Raw
title: Raw data
description: The raw high frequency data.
environments:
main:
kind: docker
image: rvat-re-dep
wdir: /work
path: Dockerfile
stage: build-docker
platform: linux/amd64
description: A custom Python 3.6 environment
rvat-re-dep:
path: environment.yml
kind: conda
stage: check-conda-env
figures:
- path: Figures/perf_re_dep.pdf
title: Turbine performance Reynolds number dependence
description: >
Power and drag (or thrust) curves as a function of Reynolds number,
computed with both the turbine diameter and blade chord length.
stage: plot-perf-re-dep
- path: Figures/mean_u_k_profiles.pdf
title: Wake profiles
description: >
Mean streamwise velocity and turbulence kinetic energy.
stage: plot-wake-profiles
- path: Figures/K_trans_bar_graph.pdf
title: Mean kinetic energy transport
description: >
Terms in the mean kinetic energy transport equation.
stage: plot-k-bar-graph
- path: Figures/mom_bar_graph.pdf
title: Mean momentum transport
description: >
Terms in the mean streamwise momentum transport equation.
stage: plot-mom-bar-graph
- path: Figures/wake_spectra.pdf
title: Wake spectra
description: >
Power spectral density of wake velocity at various Reynolds numbers.
stage: plot-wake-spectra
- path: Figures/wake_trans_totals.pdf
title: Wake transport totals
description: >
Normalized transport contributions to the mean streamwise momentum
and kinetic energy.
stage: plot-wake-trans-totals
- path: Figures/cp_curves.pdf
title: Power coefficient curves
description: Power coefficient curves at multiple Reynolds numbers.
stage: plot-perf-curves
- path: Figures/cd_curves.pdf
title: Drag coefficient curves
description: >
Rotor drag (or thrust) coefficient curves at multiple Reynolds numbers.
stage: plot-perf-curves
- path: Figures/meancontquiv_04.pdf
title: Mean velocity at 0.4 m/s
description: >
Mean streamwise velocity contours and cross-stream/vertical
velocity vectors at a tow speed of 0.4 m/s.
stage: plot-mean-cont-quiv
- path: Figures/meancontquiv_06.pdf
title: Mean velocity at 0.6 m/s
description: >
Mean streamwise velocity contours and cross-stream/vertical
velocity vectors at a tow speed of 0.6 m/s.
stage: plot-mean-cont-quiv
- path: Figures/meancontquiv_08.pdf
title: Mean velocity at 0.8 m/s
description: >
Mean streamwise velocity contours and cross-stream/vertical
velocity vectors at a tow speed of 0.8 m/s.
stage: plot-mean-cont-quiv
- path: Figures/meancontquiv_10.pdf
title: Mean velocity at 1.0 m/s
description: >
Mean streamwise velocity contours and cross-stream/vertical
velocity vectors at a tow speed of 1.0 m/s.
stage: plot-mean-cont-quiv
- path: Figures/meancontquiv_12.pdf
title: Mean velocity at 1.2 m/s
description: >
Mean streamwise velocity contours and cross-stream/vertical
velocity vectors at a tow speed of 1.2 m/s.
stage: plot-mean-cont-quiv
notebooks:
- path: Documents/IPython notebooks/uncertainty.ipynb
title: Uncertainty analysis
description: >
Computing uncertainty for the various experimental quantities of
interest.
Loading

0 comments on commit 1b52bb0

Please sign in to comment.