pyCBD.loopsolvers.sympysolver module

This module provides a Sympy solver to solve the algebraic loops efficiently. It should be able to handle non-linear equations as well.

Warning

This module requires sympy to be installed.

pyCBD.loopsolvers.sympysolver.reduce(fnc, lst)[source]
class pyCBD.loopsolvers.sympysolver.SympySolver(logger=None)[source]

Bases: pyCBD.loopsolvers.solver.Solver

checkValidity(path, component)[source]

Checks the validity of an algebraic loop.

Parameters
  • path (str) – The path of the top-level block.

  • component (list) – The blocks in the algebraic loop.

getComponentCache(component)[source]
constructInput(component, curIt)[source]

Constructs input for the solver.

Parameters
  • component (list) – The blocks in the algebraic loop.

  • curIt (int) – The current iteration of the simulation.

See also

solve()

solve(solverInput)[source]

Solves the algebraic loop.

Parameters

solverInput – The constructed input.

See also

constructInput()