Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
as_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
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Böhmländer
as_tools
Commits
ba7a0647
Commit
ba7a0647
authored
1 month ago
by
Alexander Böhmländer
Browse files
Options
Downloads
Patches
Plain Diff
Added new function to calculate freezing point depression for different aqueous solutions.
parent
4ed06a24
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Calculations/formulas.py
+47
-0
47 additions, 0 deletions
Calculations/formulas.py
with
47 additions
and
0 deletions
Calculations/formulas.py
+
47
−
0
View file @
ba7a0647
...
...
@@ -1903,3 +1903,50 @@ def find_half_collection_efficiency(efficiency: npt.ArrayLike) -> tuple[int, int
first_half_point
=
np
.
abs
(
lower_array
-
0.5
).
argmin
()
second_half_point
=
np
.
abs
(
upper_array
-
0.5
).
argmin
()
return
(
first_half_point
,
second_half_point
+
max_value
)
def
freezing_point_depression
(
molatility_of_salt
:
float
,
salt
:
str
=
'
NaCl
'
)
->
float
:
"""
Function to calculate the freezing point depression of aqueous solutions
containing four different salts (NaCl, KCl, LiCl, MgCl2) using fit parameters
from _[1]
Parameters
----------
molatility_of_salt : float
DESCRIPTION.
salt : str, optional
Salt. The default is
'
NaCl
'
.
Returns
-------
float
Freezing point depression in K.
References
----------
[1] Cintia P. Lamas, Carlos Vega, Eva G. Noya; Freezing point depression
of salt aqueous solutions using the Madrid-2019 model. J. Chem. Phys.
7 April 2022; 156 (13): 134503. https://doi.org/10.1063/5.0085051
"""
m
=
molatility_of_salt
# mol/kg
match
salt
:
case
'
NaCl
'
:
v
=
2
b
=
-
1.639
c
=
0.683
case
'
KCl
'
:
v
=
2
b
=
-
1.565
c
=
0.665
case
'
LiCl
'
:
v
=
2
b
=
-
2.315
c
=
1.605
case
'
MgCl2
'
:
v
=
3
b
=
-
6.859
c
=
5.676
delta_T
=
-
v
*
1.998
*
m
-
b
*
m
**
(
3
/
2
)
-
c
*
m
**
2
return
delta_T
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