#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)
Change History (9)
by , 9 years ago
Attachment: | TestArrays.zip added |
---|
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Status: | new → accepted |
---|
I think I've a fix for this issue. However, I will ask for feedback before merging it.
comment:3 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
This is fixed. However, the model is still not working due to #3305.
follow-up: 5 comment:4 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Please close this once the problem is actually solved.
comment:5 by , 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 , 9 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
This is a different story, we can take care of that. Thanks for the quick fix!
This seems to be an issue in pre-optimization module inlineArrayEqn. Unfortunately, it cannot just get disabled, since other modules depend on this one.