Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create plotting functions for viscosity function and running viscosity #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xhgchen
Copy link
Member

@xhgchen xhgchen commented Aug 15, 2023

Fixes #28

Changes made in this Pull Request:

  • Add function to plot result of class ViscosityHelfand
  • Add function to plot running viscosity in class ViscosityHelfand
  • Write tests for both plotting functions

@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Merging #29 (43f7424) into main (c6e196f) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files

* Plots result of class `ViscosityHelfand`
* Write tests for plotting function
* Write tests for running viscosity plotting function
* Improve variable name in `plot_viscosity_function()`
@xhgchen xhgchen marked this pull request as ready for review August 16, 2023 21:40
@xhgchen xhgchen changed the title Create plotting function for viscosity function Create plotting functions for viscosity function and running viscosity Aug 16, 2023
@@ -211,3 +217,86 @@ def _conclude(self):
)
# average over # particles and update results array
self.results.timeseries = self.results.visc_by_particle.mean(axis=1)
self._run_called = True

def plot_viscosity_function(self, start=0, stop=0, step=1):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is meant by function in the name here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was referring to eq. 5 of E M Kirova and G E Norman 2015 J. Phys.: Conf. Ser. 653 012106

It is actually the product of viscosity and time as a function of time. You take the slope of it to obtain viscosity. Here is a direct link to the article: https://iopscience.iop.org/article/10.1088/1742-6596/653/1/012106

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay you should add this info to the docs and also to the docstring.

Copy link
Member

@hmacdope hmacdope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create plotting functions for Einstein-Helfand viscosity
2 participants