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

issue with algebraic loop (nonlinear) #168

Open
johhell opened this issue Oct 26, 2023 · 0 comments
Open

issue with algebraic loop (nonlinear) #168

johhell opened this issue Oct 26, 2023 · 0 comments

Comments

@johhell
Copy link
Contributor

johhell commented Oct 26, 2023

testing a simple control circuit with a nonlinear element and received wrong result.

circuit
OM circuit diagram

wrong result - Modia

Figure_1

correct result - Modia

  • additional PT1 element used, to open the algebraic loop
  • verified with OM simulation (attached)
    Figure_2

NoNlinear.zip

idea to avoid incorrect results (can be solved by opening the algebraic loop)

  • issue a Warning in module StateSelection function getSortedAndSolvedAST like this
                    if !isLinear
                        @warn "\n===>>> getSortedAndSolvedAST\n===>>> system -$j.$i- NOT linear \n===>>> isLinear: $(isLinear)\n===>>> hasConstCoeff: $(hasConstantCoefficients)\n"
                    end
  • reactivate showMessage2 - at the moment commented
                            if linearAssumption
                                isLinear = true
                                hasConstantCoefficients = false
                                #showMessage2("It is heuristically assumed that equation system is linear (although isLinearEquation returned isLinear=false).";
                                #             severity  = WARNING,
                                #             variables = vConstraints[i],
                                #             equations = eConstraints[i])
                            end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant