You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
however, I get an initialization error when I do so. Previously, the model would run until act.port_a.p started to change abruptly.
Error & Stacktrace ⚠️
ERROR: DAE initialization failed: your u0 did not satisfy the initialization requirements,
normresid = 1167.6707587553653 > abstol = 1.0e-6. If you wish for the system to
automatically change the algebraic variables to satisfy the algebraic constraints,
please pass `initializealg = BrownBasicInit()` to solve (this option will require
`using OrdinaryDiffEqNonlinearSolve`). If you wish to perform an initialization on the
complete u0, please pass `initializealg = ShampineCollocationInit()` to solve. Note that
initialization can be a very difficult process for DAEs and in many cases can be
numerically intractable without symbolic manipulation of the system. For an automated
system that will generate numerically stable initializations, see ModelingToolkit.jl
structural simplification for more details.
Stacktrace:
get_initial_values(prob::ODEProblem{…}, integrator::OrdinaryDiffEqCore.ODEIntegrator{…}, f::Function, alg::CheckInit, isinplace::Val{…}; abstol::Float64, kwargs::Base.Pairs{…}) at [initialization.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
get_initial_values at [initialization.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
_initialize_dae! at [initialize_dae.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
initialize_dae! at [initialize_dae.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
reeval_internals_due_to_modification!(integrator::OrdinaryDiffEqCore.ODEIntegrator{…}, continuous_modification::Bool; callback_initializealg::CheckInit) at [integrator_interface.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
reeval_internals_due_to_modification! at [integrator_interface.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) (repeats 2 times)
_change_t_via_interpolation! at [integrator_interface.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
change_t_via_interpolation! at [integrator_interface.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
apply_callback!(integrator::OrdinaryDiffEqCore.ODEIntegrator{…}, callback::ContinuousCallback{…}, cb_time::Float64, prev_sign::Float64, event_idx::Int64) at [callbacks.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
macro expansion at [integrator_utils.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
apply_ith_callback! at [integrator_utils.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
handle_callbacks! at [integrator_utils.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
_loopfooter!(integrator::OrdinaryDiffEqCore.ODEIntegrator{…}) at [integrator_utils.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
loopfooter! at [integrator_utils.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
solve!(integrator::OrdinaryDiffEqCore.ODEIntegrator{…}) at [solve.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
__solve(::ODEProblem{…}, ::Rodas5P{…}; kwargs::Base.Pairs{…}) at [solve.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
__solve at [solve.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
#solve_call#44 at [solve.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
solve_call(_prob::ODEProblem{…}, args::Rodas5P{…}) at [solve.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
solve_up(prob::ODEProblem{…}, sensealg::Nothing, u0::Vector{…}, p::MTKParameters{…}, args::Rodas5P{…}; kwargs::Base.Pairs{…}) at [solve.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
solve_up at [solve.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
solve(prob::ODEProblem{…}, args::Rodas5P{…}; sensealg::Nothing, u0::Nothing, p::Nothing, wrap::Val{…}, kwargs::Base.Pairs{…}) at [solve.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
solve(prob::ODEProblem{…}, args::Rodas5P{…}) at [solve.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
top-level scope at [script.jl](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html)
Environment (please complete the following information):
I have a model that is unstable due to sharp change in its fluid density. I attempted to add a continuous callback in the ODEsystem
ODESystem(eqs, t, [], []; systems, name, initialization_eqs, continuous_events = [act.port_a.p ~ 101325])
however, I get an initialization error when I do so. Previously, the model would run until
act.port_a.p
started to change abruptly.Error & Stacktrace⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: