Error:Index exceeds the number of array elements

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error:Index exceeds the number of array elements

jaydeep
This post was updated on .
Hi all, I purchased FEA for a hobby project along with reading a turbulent flow book.

 The OpenFoam solver using k-epsilon and k-omega worked well for a 3d pipe geometry as well as for a T-junction with square cross section. However, when using a vortex geometry I am consistently getting the mentioned error after solving the flow fields using turbulence openfoam models. I believe this error occurs when you call a value that exceeds the matrix length and thus I think this a technical error and not an issue of an NaN value.

 When I relaxed the stopping criteria to 2e-3 and I could also get a message in the log that the SIMPLE solver converged, but I was still getting the error. Error message after solution converged(check the attached image).

Edit: solution when implemented with cfd tool trial version (k-w model)Surprisingly when I use CFDtool trial version, the Openfoam solver is working very well (check attached image). However, since I have purchased FEAtool I really need a solution for this.

I am attaching the model file for your reference. You can solve the openfoam solver for turbulent flow to reproduce the error(any kepsilon/komega model is ok)

https://drive.google.com/file/d/15TlF39HyIl7iZmayv05ggEB1hYvq_8gN/view?usp=sharing
Reply | Threaded
Open this post in threaded view
|

Re: Error:Index exceeds the number of array elements

Precise Simulation
Administrator
Thank you for finding and reporting the issue. It does seem to be something to do with the OpenFOAM solution import functionality.

Have to investigate a bit more in detail, and will report back later next week if there is a workaround.
Reply | Threaded
Open this post in threaded view
|

Re: Error:Index exceeds the number of array elements

jaydeep
I have found a workaround for now: (1) setup geometry, mesh, boundary conditions and do the full solution in cfdtool trial version (2) save this file as .fea model file (3) close cfdtool and reopen the file in featool. Now this model file works as expected and you can freely play around with k-epsilon, k-omega models.

Sharing this file with you in case its of any use in debugging:
https://drive.google.com/file/d/1C76BYa2G6vL1TDyfPQi8UXBHvpA47IdH/view?usp=sharing
Reply | Threaded
Open this post in threaded view
|

Re: Error:Index exceeds the number of array elements

Precise Simulation
Administrator
In reply to this post by jaydeep
To update, there was an issue with handling integral constraints. It seems you model had a pressure = 0 subdomain integral constraint, and removing this will allow it to solve and import the solution as expected.

The integral constraint could have been added automatically if you try to solve a Navier-stokes flow model without any outflow boundaries. These constraints are required by the built-in solver, but are ignored/not used by the external OpenFOAM and SU2 solvers anyway.

In any case, the next update will include a fix for this, but for now remove the constraint from "Equation" menu > "Integral constraint" (set the all edit fields empty).