Please attempt all aspects of the assessment within a notebook environment, and save your notebooks. For submission of the assessments, you should output all three of your completed notebooks as PDFs (for example, in Google Colab, go to file>print>save as PDF) and combine them into one PDF for submission. You can merge multiple PDFs into one via this Adobe website. In addition, as some of the lines of code might extend beyond the printed area, we also ask that you upload your notebooks as .ipynb files and submit them.
Instruction: For the python workshops you are expected to submit three sections for assessment, based on the tutorials given. For this, you will need to open the notebooks given in the data section above. You will also need to install OpenPNM with either pip or conda and can find instructions on how to do this via the OpenPNM webpage or github. All plots or widgets should be combined as images in a single PDF file, including the text of the code you used (tip: highlighting the text you have altered is useful).
Question 1: 35 Marks
Using the ‘dist fitting’ notebook, find the best fitting distribution for the ‘volume’ data. Plot the data and the probability density function on the same graph in the clearest and most visually appealing way you can. Hints:
• Read the documentation about the scipy stats distributions.
• Read the documentation about the matplotlib histogram function.
• Think about whether your data is normalized or not.
• Think about how best to present multiple different types of plot (histogram + line?).
Question 2: 30 Marks
Using the OpenPNM notebook, make a 2D invasion sequence plot using a different colour map to that in the notebook. Create a widget tick box to invert the sequence. You should show a screenshot of both the ‘regular’ inversion map (with new colour scheme) and the inverted map, as well as the tick box.
to use OpenPNM and porespy, you will need the following steps(although you already knew how to do it, please still follow these steps):
1)Open the Command Prompt. The anaconda must be installed in advance. (Use the cd command to change the directory to where your files are downloaded in Command Prompt, if you want to cd to a different drive, enter the drive letter followed by a colon ( : ) first, e.g., prompt> d: // Change the current drive to D)
2)Create a new environment named ‘tutorial’ by entering: ‘conda create -n tutorial python=3.7’, enter ‘y’ when you see “Proceed ([y]/n)?”
3)Activate the environment named ‘tutorial’ by entering: ‘activate tutorial’
4)Install some important packages in the environment named ‘tutorial’ in the following order:
pip install jupyter
pip install ipykernel
pip install porespy==1.3.1
pip install scikit-image==0.18.2
pip install scipy==1.6.1
5)Check all packages have been installed by entering “”conda list”
6)Create a Jupyter environment by entering this comment: “python -m ipykernel install –user –name=jupyter_tutorial”
7)open jupyer (entring: jupyter notebook) in the Command Prompt with the correct directory (where your files are located in).
8) changing the Jupyter kernel by: Kernel-Change kernel- jupyter_tutorial
Question 3: 35 Marks
A typical analysis that is performed when looking at percolation data is to plot the level of saturation vs. capillary pressure. Saturation is defined as the fraction of the pore space occupied by the water phase. Capillary pressure would be the maximum threshold that has been reached up to a certain point in the invasion sequence. Using the pore volume and the invasion sequence and by keeping a running tally of highest capillary pressure, produce a plot of saturation vs capillary pressure. Hint the net and alg_ip objects contain all the data you need and behave like dictionaries.
This assessment is extremely important to me, I promise I’ll tip you when the order is finished. Please message me if you have any questions. Thank you so much!!!
Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount