sbslab / BICEPS

Development and evaluation repository for the Biomimetic Integrated Community Energy and Power System (BICEPS)
Other
0 stars 1 forks source link

Singularities with source dominated building #10

Open khinkelman opened 2 years ago

khinkelman commented 2 years ago

Singularities under source dominated circumstances (high PV production). Problem likely lies in:

System simulation.nonlinear[1]:

The equation system depends on the following time varying variables:
bld.ele.dev.pv[1].pv.panel.load.Q
bld.mec.fcu.con.conPID.I.y
bld.mec.fcu.hex.flowRegime
bld.mec.fcu.hex.state_a2_inflow.T
bld.mec.fcu.hex.state_b2_inflow.T
bld.mec.fcu.port_b2.Xi_outflow[]
bld.mec.fcu.senTem.T
bld.mec.heaPum.conFloCon.booToRea.y
bld.mec.heaPum.conFloEva.booToRea.y
bld.mec.heaPum.conHeaPum.uEna
bld.mec.heaPum.dTHHW.y
bld.mec.heaPum.senTConEnt.T
bld.mec.zon.port_a.Xi_outflow[]
bld.mec.zon.spl.y
EBat.u
Epv.u

Iteration variables:
bld.ele.dev.terCon[1].v[]
bld.ele.dev.terCon[2].v[]
bld.ele.dev.terCon[3].v[]
bld.ele.dev.terPro[1].v[1](start = 208.0)
bld.ele.dev.terSto[1].v[]
bld.ele.linGri.line.Vc[1](start = 208.0)
bld.ele.linPro[1].line.Vc[2](start = 0.0)
bld.ele.P1.terCon[1].i[1](start = 0)
bld.ele.P1.terCon[2].i[1](start = 0)
bld.ele.P1.terCon[3].i[1](start = 0)
bld.ele.P1.terGri.i[2](start = 0)
bld.ele.P1.terPro[1].i[2](start = 0)
bld.mec.heaPum.heaPum.COP(start = 0.0)
bld.mec.heaPum.port_b1.h_outflow(start = 83680.0)
khinkelman commented 2 years ago

Changing the electrical line type to be steady rather than dynamic (by removing the capacitance), helped the simulation move past this error.

However, the same error now occurs later (rather than day 2, around day 50).

Iteration variables:
bld.ele.dev.terCon[1].v[]
bld.ele.dev.terCon[2].v[]
bld.ele.dev.terCon[3].v[]
bld.ele.dev.terPro[1].v[]
bld.ele.dev.terPro[2].v[]
bld.ele.dev.terSto[1].v[]
bld.mec.heaPum.heaPum.COP(start = 0.0)
bld.mec.heaPum.port_b1.h_outflow(start = 83680.0)

How can we break this algebraic loop with the electrical system?

khinkelman commented 2 years ago

Simulation error message:

ERROR: Failed to solve nonlinear system using Newton solver.
  Time: 4625192.296379665
  Tag: simulation.nonlinear[1]

  For debugging help refer to the first error message of this type.

  Jacobian inverse norm estimate: 255711
  Condition number estimate: 12186.4
  1-norm of the residual = 0.00381884

  Last value of the solution:
    bld.ele.dev.terSto[1].v[2] = 22.8133
    bld.ele.dev.terSto[1].v[1] = 216.467
    bld.ele.dev.terPro[2].v[1] = 216.637
    bld.ele.dev.terPro[2].v[2] = 22.9392
    bld.ele.dev.terCon[3].v[1] = 216.491
    bld.ele.dev.terCon[3].v[2] = 22.8549
    bld.ele.dev.terCon[2].v[1] = 216.546
    bld.ele.dev.terCon[2].v[2] = 22.8259
    bld.ele.dev.terCon[1].v[1] = 216.314
    bld.mec.heaPum.heaPum.COP = 3.34238
    bld.mec.heaPum.port_b1.h_outflow = 172030
    bld.ele.dev.terCon[1].v[2] = 22.949
    bld.ele.dev.terPro[1].v[2] = 23.1076
    bld.ele.dev.terPro[1].v[1] = 216.727
  Last value of the residual:
    { 0.000241692, 1.23133E-06, 0.000238549, 1.26469E-06, 0.000263134,
      -6.67862E-06, 0.00151943, 2.0769E-06, -0.000250542, 1.56584E-05,
      0.00112364, -1.32977E-06, -5.70489E-08, -0.000153556 }
khinkelman commented 2 years ago

This issue was partially fixed, and the proposed solution to break the nonlinear systems into smaller systems (or eliminate if possible) created other initialization errors.

This in-progress fix is stashed on branch issue10_singularities

The branch will be merged at this state, but kept open for potential fixes later.