Skip to content

Commit

Permalink
Catch up to changes in Jutul.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Sep 24, 2023
1 parent 1e64b59 commit 4f695d0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BattMo"
uuid = "6f0c0536-3c2c-4762-a987-c605a8a6f898"
authors = ["Olav Møyner <olav.moyner@gmail.com>"]
version = "0.1.3"
version = "0.1.4"

[deps]
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
Expand All @@ -19,7 +19,7 @@ JLD2 = "0.4.31"
JSON = "0.21.4"
Jutul = "0.2.10"
MAT = "0.10.4"
Polynomials = "3.2.11"
Polynomials = "3.2.11 - 4"
PrecompileTools = "1.1.1"
StaticArrays = "1.5.17"
Tullio = "0.3.5"
Expand Down
4 changes: 2 additions & 2 deletions src/models/convergence.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function Jutul.convergence_criterion(model::ElectroChemicalComponentModel, storage, eq::ConservationLaw{:Mass}, eq_s, r; dt = 1)
function Jutul.convergence_criterion(model::ElectroChemicalComponentModel, storage, eq::ConservationLaw{:Mass}, eq_s, r; dt = 1.0, update_report = missing)
n = number_of_equations_per_entity(model, eq)
V = storage.state.Volume
V_f = storage.state.VolumeFraction
Expand All @@ -14,7 +14,7 @@ function Jutul.convergence_criterion(model::ElectroChemicalComponentModel, stora
return R
end

function Jutul.convergence_criterion(model::ElectroChemicalComponentModel, storage, eq::ConservationLaw{:Charge}, eq_s, r; dt = 1)
function Jutul.convergence_criterion(model::ElectroChemicalComponentModel, storage, eq::ConservationLaw{:Charge}, eq_s, r; dt = 1.0, update_report = missing)
n = number_of_equations_per_entity(model, eq)
@tullio max e[i] := abs(r[i, j])
if n == 1
Expand Down
14 changes: 8 additions & 6 deletions src/models/current_and_voltage_boundary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,17 @@ function policy_to_control(p::CyclingCVPolicy, mode, state, model, dt, time, ctr

end

mutable struct ControllerCV

mutable struct ControllerCV{R}
policy::AbstractCVPolicy
time::Real
control_time::Real
target::Real
time::R
control_time::R
target::R
target_is_voltage::Bool
mode::OperationalMode

end

@inline function Jutul.numerical_type(x::ControllerCV{R}) where R
return R
end

function Jutul.update_values!(old::ControllerCV, new::ControllerCV)
Expand Down

0 comments on commit 4f695d0

Please sign in to comment.