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 StressTensor/Pressure/Energy observables #3718

Open
jngrad opened this issue May 15, 2020 · 2 comments
Open

Create StressTensor/Pressure/Energy observables #3718

jngrad opened this issue May 15, 2020 · 2 comments

Comments

@jngrad
Copy link
Member

jngrad commented May 15, 2020

Follow-up to #3712.

Next step is to convert the Observable_stat globals into Observable classes. Here is the plan:

  • StressTensorKinetic: NxN matrix
  • StressTensorVirtualSites: NxN matrix
  • StressTensorExternalFields: NxN matrix
  • StressTensorCoulomb: NxN matrix, there doesn't seem to be a need for 2 or 3 matrices
  • StressTensorDipolar: skip it: not implemented
  • for interactions, if we want to preserve the way they have always been output:
    • StressTensorBonded: NxN matrix
    • StressTensorNonBonded: NxN matrix
    • StressTensorBondedContributions: ZxZxNxN with Z the number of bonded IAs
    • StressTensorNonBondedContributions: ZxZxNxN? if Z is max_seen_particle_type, we'll have a large matrix with reaction ensemble algorithms (the core base class ReactionAlgorithm sets the non-interacting type to 100)
    • StressTensorNonBondedIntra: skip it: just get the diagonal terms of StressTensorNonBondedContributions
    • StressTensorNonBondedInter: skip it, just get the off-diagonal terms of StressTensorNonBondedContributions
  • simpler alternative for interactions:
    • StressTensorBonded(bonds=[bond1, bond2] or ['FENE', 'AngleCosine'] or 'all'): NxN matrix
    • StressTensorNonBonded(types1=[0, 1] or 'all', types2=[3, 5] or 'all', interactions=['wca', 'hertzian'] or 'all'): NxN matrix

Same strategy for Pressure* and Energy* observables. EnergyDipolar will be implemented.

That's going to be a lot of files. Should we create a new subfolder src/core/observables/impl to move those and all the already existing final classes, so that src/core/observables only contains virtual base classes, e.g. PidObservable, ProfileObservable, PidProfileObservable, etc.?

@jngrad jngrad added this to the Espresso 4.2 milestone May 15, 2020
@jngrad jngrad changed the title Create Tensor/Pressure/Energy observables Create StressTensor/Pressure/Energy observables May 15, 2020
@jngrad
Copy link
Member Author

jngrad commented May 18, 2020

offline discussion: rename StressTensor to PressureTensor, create Energy and Pressure for the total energy and total scalar pressure, remove state tracking from the global observables, leave the analysis module as it is now until a better solution is found (it's helpful to print all contributions when debugging simulations).

kodiakhq bot added a commit that referenced this issue May 25, 2020
…#3723)

Fixes #2200, partial fix for #3718

Description of changes:
- removed state tracking from `Observable_stat`
- created `Observables` classes `PressureTensor`, `Pressure`, `Energy`
- renamed Stress Tensor to Pressure Tensor everywhere
@jonaslandsgesell
Copy link
Member

the core base class ReactionAlgorithm sets the non-interacting type to 100

Particles of this type are non-physical (just for algorithmic reasons in the MC code) and exist only temporarily (i.e. at times where no observable can be called by the user). These temporary types should not be considered in any observable calculation.

@RudolfWeeber RudolfWeeber removed this from the Espresso 4.2 milestone Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants