Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OTHgroup
Tools
Commits
44cbe615
Commit
44cbe615
authored
2 months ago
by
Wachter, Christoph
Browse files
Options
Downloads
Patches
Plain Diff
(CW) AbInitioThermodynamics: Added option for diatomic molecules
parent
cb1350c9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
AIMSTools/aimstools/AbInitioThermodynamics.py
+12
-2
12 additions, 2 deletions
AIMSTools/aimstools/AbInitioThermodynamics.py
with
12 additions
and
2 deletions
AIMSTools/aimstools/AbInitioThermodynamics.py
+
12
−
2
View file @
44cbe615
...
...
@@ -268,6 +268,7 @@ class PhaseDiagram:
colors
=
None
,
vibrational_data
=
None
,
pressure_unit
=
"
Pa
"
,
diatomic
=
False
,
):
"""
The energy is assumed to be given per area.
"""
# adsorption energy and coverage are reshape into column vectors
...
...
@@ -307,6 +308,8 @@ class PhaseDiagram:
assert
self
.
n_phases
==
len
(
colors
),
"
Number of colors does not match number of phases
"
self
.
colors
=
colors
self
.
diatomic
=
diatomic
self
.
grid_data
=
{
"
t_min
"
:
None
,
"
t_max
"
:
None
,
...
...
@@ -328,7 +331,11 @@ class PhaseDiagram:
self
.
f_vib
=
[
lambda
x
:
0
]
*
self
.
n_phases
# always return zero
def
getDeltaMu
(
self
,
temperature
,
pressure
):
return
calculateDeltaMu
(
temperature
,
pressure
,
*
self
.
molecule_data
)
if
self
.
diatomic
is
False
:
delta_mu
=
calculateDeltaMu
(
temperature
,
pressure
,
*
self
.
molecule_data
)
else
:
delta_mu
=
calculateDeltaMu
(
temperature
,
pressure
,
*
self
.
molecule_data
)
/
2
return
delta_mu
def
getGammaVsMu
(
self
,
mu
):
"""
Calculate the Gibbs free energy of adsorption for each
...
...
@@ -404,7 +411,10 @@ class PhaseDiagram:
mu_rot
=
calculateMuRot
(
temperature
,
*
self
.
molecule_data
)
# need exception for T=0
if
self
.
diatomic
is
False
:
pressure
=
c
*
np
.
exp
((
delta
-
mu_rot
)
/
units
.
kB
/
temperature
)
else
:
pressure
=
c
*
np
.
exp
((
2
*
delta
-
mu_rot
)
/
units
.
kB
/
temperature
)
return
pressure
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment