From 19d5b6649767a678de58242a235c040eb1c819b3 Mon Sep 17 00:00:00 2001 From: vcantarella Date: Fri, 26 Jan 2024 15:35:15 +0100 Subject: [PATCH] starting the basic usage notebook --- .../basic_usage-checkpoint.ipynb | 86 +++++++++++++++++++ docs/basic_usage.ipynb | 78 +++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 docs/.ipynb_checkpoints/basic_usage-checkpoint.ipynb create mode 100644 docs/basic_usage.ipynb diff --git a/docs/.ipynb_checkpoints/basic_usage-checkpoint.ipynb b/docs/.ipynb_checkpoints/basic_usage-checkpoint.ipynb new file mode 100644 index 0000000..60ea60a --- /dev/null +++ b/docs/.ipynb_checkpoints/basic_usage-checkpoint.ipynb @@ -0,0 +1,86 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "source": [ + "# Basic Usage\n", + "\n", + "HyVR constructs sedimentary facies models from a hierarchy of geobodies assigned to a grid.\n", + "\n", + "In this simple example, we will demonstrate how to create a geobody (object) and how it works. Then we will expand our creativity and create sedimentological virtual realities using these geobodies as building blocks." + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "## Libraries to run this example\n", + "You do not need these to run HyVR. HyVR needs just numpy, numba and scipy. However to visualize it is desirable to use pyvista for its great functionality in handling 3D meshes and plotting." + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": 3, + "outputs": [ + { + "ename": "ModuleNotFoundError", + "evalue": "No module named 'pyvista'", + "output_type": "error", + "traceback": [ + "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m", + "\u001B[1;31mModuleNotFoundError\u001B[0m Traceback (most recent call last)", + "Cell \u001B[1;32mIn[3], line 1\u001B[0m\n\u001B[1;32m----> 1\u001B[0m \u001B[38;5;28;01mimport\u001B[39;00m \u001B[38;5;21;01mpyvista\u001B[39;00m\n\u001B[0;32m 2\u001B[0m \u001B[38;5;28;01mimport\u001B[39;00m \u001B[38;5;21;01mhyvr\u001B[39;00m\n\u001B[0;32m 3\u001B[0m \u001B[38;5;28;01mimport\u001B[39;00m \u001B[38;5;21;01mnumpy\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m \u001B[38;5;21;01mnp\u001B[39;00m\n", + "\u001B[1;31mModuleNotFoundError\u001B[0m: No module named 'pyvista'" + ] + } + ], + "source": [ + "import pyvista\n", + "import hyvr\n", + "import numpy as np" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2024-01-26T14:25:49.113611300Z", + "start_time": "2024-01-26T14:25:49.104164500Z" + } + } + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [], + "metadata": { + "collapsed": false + } + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/docs/basic_usage.ipynb b/docs/basic_usage.ipynb new file mode 100644 index 0000000..e6f8963 --- /dev/null +++ b/docs/basic_usage.ipynb @@ -0,0 +1,78 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "source": [ + "# Basic Usage\n", + "\n", + "HyVR constructs sedimentary facies models from a hierarchy of geobodies assigned to a grid.\n", + "\n", + "In this simple example, we will demonstrate how to create a geobody (object) and how it works. Then we will expand our creativity and create sedimentological virtual realities using these geobodies as building blocks." + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "## Libraries to run this example\n", + "HyVR needs just numpy, numba and scipy. Additionally, to visualize it is desirable to use pyvista for its great functionality in handling 3D meshes and plotting." + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "code", + "execution_count": 1, + "outputs": [], + "source": [ + "import pyvista\n", + "import hyvr\n", + "import numpy as np" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2024-01-26T14:28:10.043494600Z", + "start_time": "2024-01-26T14:28:09.300931500Z" + } + } + }, + { + "cell_type": "markdown", + "source": [ + "## What is a geobody\n", + "\n", + "From Bennet et al. (2019): \"Architectural elements (Miall 1985) are threedimensional sedimentary features (e.g., channels) that are formed by autocyclic processes that occur within depositional systems (Beerbower 1964). They are often superimposed on allocyclic sequences by higher-frequency events that occur over periods of tens to thousands of years (Miall 2013). Different fluvial systems will have their own characteristic architectural elements, and these may range from 101 to 102 m in lateral extent (Miall 1985). Architectural elements are recognized by their outer bounding surfaces, which are often erosional, as well as by their internal facies assemblages (Allen 1983).\"\n", + "\n", + "These architectural elements can be simplified as geobodies, which are 3D geometries that represent some architectural element. Currently, HyVR implements 3 different geobodies." + ], + "metadata": { + "collapsed": false + } + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +}