Message Boards Message Boards

0
|
6561 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Avoid homotopy error: "No Jacobian for continuous block"

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.

POSTED BY: Eric Smith
2 Replies
Posted 6 years ago

Making sure that the function dPfriction is differentiable is good. You also have to consider other equations that need to be solved simultaneously with your homotopy equation, these also need to be differentiable. Do you have other equations that include m_flow and dp_fric? Do they have function calls, and if so, are those functions differentiable?

POSTED BY: Carl Jönsson

Thanks Carl. I was able to get it to work somewhat, but it didn't improve my speed or initialization convergence; I'll have to revisit it soon. There are derivative functions for dPfriction and the rest of the equations involving m_flow and dp_fric are linear.

POSTED BY: Eric Smith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract