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

Add unit class to FlowerMD and allow using real units in Simulation runs #137

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

marjanalbooyeh
Copy link
Collaborator

@marjanalbooyeh marjanalbooyeh commented May 2, 2024

This PR introduces a new Unit class to FlowerMD, which contains commonly used units from unyt package.

With this change, all values with units in FlowerMD are formatted as value * flower.Units.<unit>. For example, a temperature in Kelvin is 300 * flowermd.Units.K.

This PR also makes the following changes to the interface of run functions in Simulation class:

  • The variable kT is now temperature , which can handle both kT values (unitless) and temperature values with units.
  • The n_steps variable is now called duration, which can be both a number (number of steps) or time length with units.

ToDo:

  • Make same changes for pressure and add pressure units

@marjanalbooyeh marjanalbooyeh linked an issue May 2, 2024 that may be closed by this pull request
Copy link
Member

Choose a reason for hiding this comment

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

Should we add some ready-to-go density units as well for the sake of convenience?

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.

Add units to FlowerMD
2 participants