Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3716 closed defect (fixed)

Wrong handling of two-dimensional arrays inside arrays of models

Reported by: Francesco Casella Owned by: Lennart Ochel
Priority: high Milestone: 1.9.4
Component: Backend Version: v1.9.4-dev-nightly
Keywords: Cc: antonio.froio@…

Description

Consider the attached test case. The model TestArrays.TubeArray instantiates an array of Tube models. Each Tube models contains a Flow1DFV model, which in turn contains a two dimensional array dddX.

The following error is generated:

Error: Model is structurally singular, error found sorting equations 

If dumpSimCode is switched on, the following variables show up:

56: tube[1].flow1DFV1.dddX[1,1,1] = 0.0;
60: tube[1].flow1DFV1.dddX[1,2,1] = 0.0;
64: tube[1].flow1DFV1.dddX[1,3,1] = 0.0;
68: tube[1].flow1DFV1.dddX[1,4,1] = 0.0;
130: tube[2].flow1DFV1.dddX[2,1,1] = 0.0;
134: tube[2].flow1DFV1.dddX[2,2,1] = 0.0;
138: tube[2].flow1DFV1.dddX[2,3,1] = 0.0;
142: tube[2].flow1DFV1.dddX[2,4,1] = 0.0;

The array dddX should be two-dimensional, not three-dimensional, and these equations should instead look like this:

56: tube[1].flow1DFV1.dddX[1,1] = 0.0;
60: tube[1].flow1DFV1.dddX[2,1] = 0.0;
64: tube[1].flow1DFV1.dddX[3,1] = 0.0;
68: tube[1].flow1DFV1.dddX[4,1] = 0.0;
130: tube[2].flow1DFV1.dddX[1,1] = 0.0;
134: tube[2].flow1DFV1.dddX[2,1] = 0.0;
138: tube[2].flow1DFV1.dddX[3,1] = 0.0;
142: tube[2].flow1DFV1.dddX[4,1] = 0.0;

I guess this gives a hint why the matching fails.

Attachments (1)

TestArrays.zip (359.7 KB ) - added by Francesco Casella 9 years ago.

Download all attachments as: .zip

Change History (9)

by Francesco Casella, 9 years ago

Attachment: TestArrays.zip added

comment:1 by Lennart Ochel, 9 years ago

This seems to be an issue in pre-optimization module inlineArrayEqn. Unfortunately, it cannot just get disabled, since other modules depend on this one.

comment:2 by Lennart Ochel, 9 years ago

Status: newaccepted

I think I've a fix for this issue. However, I will ask for feedback before merging it.

comment:3 by Lennart Ochel, 9 years ago

Resolution: fixed
Status: acceptedclosed

This is fixed. However, the model is still not working due to #3305.

comment:4 by Francesco Casella, 9 years ago

Resolution: fixed
Status: closedreopened

Please close this once the problem is actually solved.

in reply to:  4 comment:5 by Lennart Ochel, 9 years ago

Replying to casella:

Please close this once the problem is actually solved.

Well, actually this issue is already solved. Also #3305 is now solved. However, the attached test case does still not simulate:

Simulation execution failed for model: TestArrays.TubeArray
assert            | debug   | Solving non-linear system 1370 failed at time=0.
|                 | |       | For more information please use -lv LOG_NLS.
assert            | info    | simulation terminated by an assertion at initialization

Francesco, can you have a look for the new failure?

comment:6 by Francesco Casella, 9 years ago

Resolution: fixed
Status: reopenedclosed

This is a different story, we can take care of that. Thanks for the quick fix!

comment:7 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.