-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hi,
I'm getting an OutOfMemoryError() in the Hankel matrix formation:
# Pre-Allocation for Hankel & SVD
PulsL = size(puls, 1)
𝐇 = Array{Float64}(undef, length(Cell.RA.H1) * PulsL, length(Cell.RA.H2)) # <--- HERE
U, S, V = fh!(𝐇, Cell.RA.H1, Cell.RA.H2, puls, Cell.RA.M, PulsL)the default values are:
H1::Array{Int64, 1} = [1:2500; 3000:3500] # Hankel Dimensions 1
H2::Array{Int64, 1} = [1:2500; 3000:3500] # Hankel Dimensions 2I've been trying to reduce its size without success (skipping values, jumps, etc.). My Fs=1sec and the model order is the default. I think I'm not getting something.
For example:
#---------- Example DegEx -----------------#
Sₑ = 4 # Spatial points in electrolyte
Sₛ = 4 # Spatial point in solid
Cell = Construct("LG M50")
Spatial!(Cell, Sₑ, Sₛ)
Cell.RA.Fs = 1.0 # Modify transfer function sampling frequency
Cell.RA.SamplingT = 1.0 # Modify final system sampling period
Cell.Const.T = 298.15 # Modify cell temperature
# Cell.RA.H1 = Cell.RA.H2 = [1:2500; 3000:3500; 4000:4500]
Cell.RA.H1 = Cell.RA.H2 = [1:5:2500; 3000:5:3500; 4000:5:4500] #<---- WHY DOESN'T THIS WORK?
Cell.RA.M = 5
Ŝ = collect(1.0:-1.0:0) # List of SOC points for model generation
SOC = 1.0 # Starting SOC
α = collect(0.95:-0.1:0.75)
function DegLp(α)
Results = tₑₜ = tuple()
for ψ in α
Cell.Neg.θ_100 = ψ
A, B, C, D = Realise(Cell, Ŝ)
Result, tₑ = CC(Cell, Ŝ, SOC, 2.0, 9600, A, B, C, D)
Results = flatten_(Results, Result)
tₑₜ = flatten_(tₑₜ, tₑ)
end
return Results, tₑₜ
end
Results, tₑₜ = DegLp(α)How can I reduce its size and still discretize around the same points?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels