I'm trying to use homotopy to make the initialization of my pipeline model. It's very similar to example 3 in the Modelica reference here. But instead of m_flow = f(dP)
I'm doing dP=f(m_flow)
, which shouldn't matter, right?
Anyway, my homotopy code is
dp_fric = homotopy(actual = dPfriction(m_flow,density,eta,pipe),
simplified = someConstants * m_flow);
And then I have defined the derivative function of dPfriction with noDerivative={density, eta, pipe}
. When I run this, I get the error
Fatal failure: File: Backend/SimCodegen.ml, Function: generateHomotopyJacobian, Line: 4174, Msg: No Jacobian for continuous block which is main homotopy block
Can someone tell me what I'm doing wrong? Thanks.