Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid issue with symbolic differentiation #3

Open
avinashresearch1 opened this issue Jan 30, 2024 · 0 comments
Open

Avoid issue with symbolic differentiation #3

avinashresearch1 opened this issue Jan 30, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@avinashresearch1
Copy link
Collaborator

avinashresearch1 commented Jan 30, 2024

ERROR: Differentiation with array expressions is not yet supported
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] occursin_info
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:59 [inlined]
  [3] (::Symbolics.var"#225#227"{…})(a::Symbolics.ArrayOp{…})
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:92
  [4] iterate
    @ Base ./generator.jl:47 [inlined]
  [5] collect_to!(dest::Vector{Bool}, itr::Base.Generator{Vector{…}, Symbolics.var"#225#227"{…}}, offs::Int64, st::Int64)
    @ Base ./array.jl:892
  [6] collect_to_with_first!(dest::Vector{…}, v1::Bool, itr::Base.Generator{…}, st::Int64)
    @ Base ./array.jl:870
  [7] _collect(c::Vector{…}, itr::Base.Generator{…}, ::Base.EltypeUnknown, isz::Base.HasShape{…})
    @ Base ./array.jl:864
  [8] collect_similar
    @ Base ./array.jl:763 [inlined]
  [9] map
    @ Base ./abstractarray.jl:3282 [inlined]
 [10] occursin_info(x::SymbolicUtils.BasicSymbolic{Real}, expr::SymbolicUtils.BasicSymbolic{Real}, fail::Bool)
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:92
--- the last 8 lines are repeated 2 more times ---
 [27] (::Symbolics.var"#225#227"{…})(a::SymbolicUtils.BasicSymbolic{…})
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:92
 [28] iterate
    @ Base ./generator.jl:47 [inlined]
 [29] _collect(c::Vector{…}, itr::Base.Generator{…}, ::Base.EltypeUnknown, isz::Base.HasShape{…})
    @ Base ./array.jl:854
 [30] collect_similar
    @ Base ./array.jl:763 [inlined]
 [31] map
    @ Base ./abstractarray.jl:3282 [inlined]
 [32] occursin_info(x::SymbolicUtils.BasicSymbolic{Real}, expr::SymbolicUtils.BasicSymbolic{Real}, fail::Bool)
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:92
 [33] (::Symbolics.var"#225#227"{…})(a::SymbolicUtils.BasicSymbolic{…})
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:92
 [34] iterate
    @ Base ./generator.jl:47 [inlined]
 [35] collect_to!(dest::Vector{Bool}, itr::Base.Generator{Vector{…}, Symbolics.var"#225#227"{…}}, offs::Int64, st::Int64)
    @ Base ./array.jl:892
 [36] collect_to_with_first!(dest::Vector{…}, v1::Bool, itr::Base.Generator{…}, st::Int64)
    @ Base ./array.jl:870
 [37] _collect(c::Vector{…}, itr::Base.Generator{…}, ::Base.EltypeUnknown, isz::Base.HasShape{…})
    @ Base ./array.jl:864
 [38] collect_similar
    @ Base ./array.jl:763 [inlined]
 [39] map
    @ Base ./abstractarray.jl:3282 [inlined]
 [40] occursin_info(x::SymbolicUtils.BasicSymbolic{Real}, expr::SymbolicUtils.BasicSymbolic{Real}, fail::Bool)
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:92
--- the last 14 lines are repeated 1 more time ---
 [55] occursin_info(x::SymbolicUtils.BasicSymbolic{Real}, expr::SymbolicUtils.BasicSymbolic{Real})
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:57
 [56] expand_derivatives(O::SymbolicUtils.BasicSymbolic{Real}, simplify::Bool; occurrences::Nothing)
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:169
 [57] expand_derivatives(O::SymbolicUtils.BasicSymbolic{Real}, simplify::Bool)
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:163
 [58] derivative(O::Num, v::Num; simplify::Bool)
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:424
 [59] derivative(O::Num, v::Num)
    @ Symbolics ~/.julia/packages/Symbolics/B3bDY/src/diff.jl:420
 [60] ∂f∂T(model::ShomateIdeal, V::Num, T::Num, z::Symbolics.Arr{Num, 1})
    @ ClapeyronSymbolicsExt ~/.julia/packages/Clapeyron/VMkvl/ext/ClapeyronSymbolicsExt.jl:70
 [61] VT_entropy(model::ShomateIdeal, V::Num, T::Num, z::Symbolics.Arr{Num, 1})
    @ Clapeyron ~/.julia/packages/Clapeyron/VMkvl/src/models/ideal/ideal.jl:24
 [62] entropy(model::ShomateIdeal, p::Num, T::Num, z::Symbolics.Arr{Num, 1}; phase::Symbol, threaded::Bool, vol0::Nothing)
    @ Clapeyron ~/.julia/packages/Clapeyron/VMkvl/src/methods/pT.jl:17
 [63] entropy(model::ShomateIdeal, p::Num, T::Num, z::Symbolics.Arr{Num, 1})
    @ Clapeyron ~/.julia/packages/Clapeyron/VMkvl/src/methods/pT.jl:15
 [64] Entropy_TP(T::Num, P::Num, H₀_S₀::Matrix{…}, ξ::Symbolics.Arr{…}, ν::Matrix{…}, model::ShomateIdeal, f_feed::Symbolics.Arr{…})
    @ Main ~/Desktop/PROCESS_SIMULATOR/ProcessSimulator.jl/src/Reactors/Gibbs_Reactor/GibbsReactor_symbolic.jl:56
Some type information was truncated. Use `show(err)` to see complete types.

This happens even if the Gibbs reactor is registered symbolically.

Reference: ClapeyronThermo/Clapeyron.jl#186

@avinashresearch1 avinashresearch1 added the bug Something isn't working label Jan 30, 2024
@avinashresearch1 avinashresearch1 self-assigned this Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant