Could not unroll graph!

Hi @cpe.sk

Thanks for your interest in Modulus.
Let me see if I can help you better understand this error:

####################################
could not unroll graph!
This is probably because you are asking to compute a value that is not an output of any node
####################################
invar: [x, y, sdf, area, t]
requested var: [wave_PDE]
computable var: [x, y, sdf, area, t, u]
####################################

The symbolic graph failed to unroll (for PointwiseInteriorConstraint as we see right under this print out); this tells you high level info here. What the input variables are, the ones that need to be computed, and the intermediate ones that can currently be computed…

So we know that we want wave_PDE but we only have the quantities x, y, sdf, area, t, u (u is from your NN which is revealed below:

Nodes in graph:
node: Sympy Node: wave_PDE
evaluate: SympyToTorch
inputs: [S, c]
derivatives: [u__t__t, u__x__x, u__y__y]
outputs: [wave_PDE]
optimize: False
node: Arch Node: wave_network
evaluate: FullyConnectedArch
inputs: [x, y, t]
derivatives:
outputs: [u]
optimize: True
####################################

Here we see 2 nodes: wave_PDE and wave_network. The wave PDE we want to execute to get output residual but can’t, so we take a look at the inputs / derivatives:
inputs: [S, c]
derivatives: [u__t__t, u__x__x, u__y__y]

Okay, so we can likely compute those derivatives because we have u from wave_network with inputs t,x,y. The problem here is that S,c don’t exist, so the computation isn’t possible.

Now that we know what the issue is, we can work on a solution. In your PointwiseInteriorConstraint the geometry is providing x and y. And the parameterization=time_range, is providing the t. So what you should do is add the missing variables S, c to your parameterization dictionary. E.g.
parameterization={Symbol("t"): (0.0,1.0), Symbol("S"): 1.0, Symbol("c"):1.0}

For more info, a good example of this is in the 3 fin example where complex parameterization are defined in the geometry file then used in the constraint.

1 Like