Skip to content

Partial derivatives of density profiles#134

Merged
prehner merged 3 commits intomainfrom
density_profile_derivatives
Feb 24, 2023
Merged

Partial derivatives of density profiles#134
prehner merged 3 commits intomainfrom
density_profile_derivatives

Conversation

@prehner
Copy link
Copy Markdown
Contributor

@prehner prehner commented Feb 14, 2023

This PR introduces routines for the calculation of partial derivatives of density profiles with respect to chemical potential, pressure, and temperature. Since the calculation of the density profiles is implicit, a procedure similiar to that used in the Newton solver is used. The derivatives are calculated analytically using automatic differentiation. Therefore, the calculation is faster and more robust compared to approximating the profiles using numerical differentiation.

With the derivatives in place, enthalpies of adsorption should be readily available. In addition, the derivatives can be used to generate better initial values for the calculation of adsorption isotherms or surface tension diagrams.

While derivatives with respect to $p$ or $\mu$ are also available for heterosegmented functionals, temperature derivatives currently can not be implemented without breaking the interface.

@prehner prehner marked this pull request as ready for review February 15, 2023 09:18
@prehner prehner requested a review from g-bauer February 15, 2023 09:18
@prehner prehner mentioned this pull request Feb 20, 2023
@prehner prehner merged commit 0d7ea53 into main Feb 24, 2023
@prehner prehner deleted the density_profile_derivatives branch February 24, 2023 12:14
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.

2 participants