Skip to content

Commit

Permalink
Merge branch 'main' into vini/thermolangmuirmodel
Browse files Browse the repository at this point in the history
  • Loading branch information
viniviena authored Dec 6, 2024
2 parents a6e2b31 + 4d48887 commit ff6fc0c
Show file tree
Hide file tree
Showing 11 changed files with 315 additions and 21 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
name: CI
on:
push:
branches:
- main
tags: ['*']
pull_request:
workflow_dispatch:
branches:
- master
paths-ignore:
- 'docs/**'
#- 'examples/**'
push:
paths-ignore:
- 'docs/**'
#- 'examples/**'
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
# Cancel intermediate builds: always.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
cancel-in-progress: true
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
timeout-minutes: 30
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: read
Expand All @@ -39,3 +47,8 @@ jobs:
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Documentation
on:
push:
branches:
- main
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: always.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 longemen3000 <[email protected]> and contributors
Copyright (c) 2024 Andrés Riedemann, Vinicius Viena, Pierre Walker, and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 9 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.1.1"
[deps]
BlackBoxOptim = "a134a8b2-14d6-55f6-9291-3336d3ab0209"
CommonSolve = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2"
DynamicQuantities = "06fc5a27-2a28-4c7c-a15d-362465fb6821"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Integrals = "de52edbc-65ea-441a-8357-d3a637375a31"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -21,7 +20,9 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

[compat]
SciMLBase = "^2.65"
BlackBoxOptim = "^0.6.2"
CommonSolve = "0.2.4"
DynamicQuantities = "1"
ForwardDiff = "^0.10"
Integrals = "4"
LinearAlgebra = "1"
Expand All @@ -30,9 +31,16 @@ NLSolvers = "0.5"
PolyLog = "^2.5.0"
Roots = "2.1"
StaticArrays = "1"
TableOperations = "1"
Tables = "^1.8"
julia = "1.9"

[weakdeps]
DynamicQuantities = "06fc5a27-2a28-4c7c-a15d-362465fb6821"

[extensions]
LangmuirDynamicQuantitiesExt = "DynamicQuantities"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

Expand Down
60 changes: 55 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,59 @@
# AdsorbedSolutionTheory.jl

[![Build Status](https://github.com/ClapeyronThermo/AdsorbedSolutionTheory.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/ClapeyronThermo/AdsorbedSolutionTheory.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Build Status](https://github.com/ClapeyronThermo/Langmuir.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/ClapeyronThermo/Langmuir.jl/actions/workflows/CI.yml?query=branch%3Amain) [![codecov](https://codecov.io/gh/ClapeyronThermo/Langmuir.jl/branch/main/graph/badge.svg?token=ZVGGR4AAFB)](https://codecov.io/gh/ClapeyronThermo/Langmuir.jl) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://clapeyronthermo.github.io/Langmuir.jl/dev)

![logo](/docs/Langmuir_logo.svg)

This package implements single adsorption and multicomponent adsorption through Ideal Absorbed Solution Theory (IAST). Some major features are:

- Explicit single component adsorption properties: loading, bulk phase properties
- Multicomponent adsorption
- Explicit single component adsorption properties: loading, bulk phase properties
- Multicomponent adsorption

## Examples:

```julia
using Langmuir

#example from doi.org/10.1002/aic.14684

v = @MultiSite{LangmuirS1,LangmuirS1} #we create a multisite model, consisting

x1 = [1.468
0.024
0
7.891
0.001645
0]

x2 = [2.847
0.028
0.
2.223
1.228
0.]

x3 = [2.581
0.84
0.0
2.901
0.021
0.0]

#creation of isotherms from vectors or other iterables.
#you can also use Langmuir.from_vec! or Langmuir.from_vec
#to create (or fill) vectors from isotherm models
m1,m2,m3 = Langmuir.from_vec(v,x1),Langmuir.from_vec(v,x2),AST.from_vec(v,x3)
models = (m1,m2,m3)

#calculate loading of a single isotherm
#there are also functions to calculate the reduced spreading pressure, and inverse algorithms
l1 = loading(m1,p,T)
kh1 = henry_coefficient(m1,T)
lmax = saturated_loading(m1,T)

y = [0.5,0.25,0.25]
T = 300
p = 1000


#total adsorbed amount, fractions of adsorbed components.
q_tot,x,status = iast(models,p,T,y)
```
Loading

0 comments on commit ff6fc0c

Please sign in to comment.