Skip to content

Commit

Permalink
move DynamicQuantities to extension
Browse files Browse the repository at this point in the history
  • Loading branch information
longemen3000 committed Oct 23, 2024
1 parent 9454dbd commit 4ff2006
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
8 changes: 7 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.1.0"
[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,6 +20,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
[compat]
BlackBoxOptim = "^0.6.2"
CommonSolve = "0.2.4"
DynamicQuantities = "1"
ForwardDiff = "^0.10"
Integrals = "4"
LinearAlgebra = "1"
Expand All @@ -33,6 +33,12 @@ 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
11 changes: 11 additions & 0 deletions ext/LangmuirDynamicQuantitiesExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module LangmuirDynamicQuantitiesExt

import Langmuir
import DynamicQuantities
using DynamicQuantities: @u_str

function Langmuir.Rgas(model::Langmuir.IsothermModel{<:DynamicQuantities.Quantity})
return 8.31446261815324u"J/mol/K"
end

end #module
4 changes: 0 additions & 4 deletions src/models/models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ end

Rgas(model) = 8.31446261815324 #J.mol⁻¹.K⁻¹

function Rgas(model::IsothermModel{<:Quantity})
return 8.31446261815324u"J/mol/K"
end

"""
model_length(model::IsothermModel)
Expand Down

0 comments on commit 4ff2006

Please sign in to comment.