Error with openFoam

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

Error with openFoam

Leon Robers
When I'm using the feaTool Interface and try to solve a problem with openFoam I get the following error after pressing solve in the openForm GUI:

        Unable to perform assignment because the left and right sides have a different number of elements.
       
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool

I run everything as administrator and i also remember that quite a while ago, it worked.
Also, solving with openFoam in matlab itself works.
So before I uninstall and reinstall blueCFD, I'd like to check if there's another way of solving this problem
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Error with openFoam

Precise Simulation
Administrator
I am unfamiliar with this error but if you attach a model file I can have a look at it. If it worked berfore there must have been some changes made.


Leon Robers wrote
When I'm using the feaTool Interface and try to solve a problem with openFoam I get the following error after pressing solve in the openForm GUI:

        Unable to perform assignment because the left and right sides have a different number of elements.
       
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool
        Line 0 in featool

I run everything as administrator and i also remember that quite a while ago, it worked.
Also, solving with openFoam in matlab itself works.
So before I uninstall and reinstall blueCFD, I'd like to check if there's another way of solving this problem
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Error with openFoam

Leon Robers
here is the file I am using (Unit system is with mm and tons, fluid is air)
CFD_V5_2D.fea

interestingly, the example file with the flow over a backward facing edge (openFoam) works. But if I set up a perfectly simple pipe flow with one inlet and one outlet, openFoam gives again onother error:

Input must be a character vector or string scalar.
 
Line 35 in str2num
Line 0 in featool
Line 0 in featool
Line 0 in featool
Line 0 in featool
Line 0 in featool
Line 0 in featool

This is really confusing and I have no idea why the example file works and all others not.
Thanks a lot
Reply | Threaded
Open this post in threaded view
|

Re: Error with openFoam

Leon Robers
So the issue with the pipe flow was that I set the boundary condition of the outflow to "neutral outflow/stress boundary". By changing it to "Outflow/pressure", it works fine.

Making the same changes to the model I uploaded still leads to the same error
Reply | Threaded
Open this post in threaded view
|

Re: Error with openFoam

Precise Simulation
Administrator
This post was updated on .
Yes, you are right, for OpenFOAM simulation usually are more stable with prescribed pressue outflow conditions than the neutal/zeroGradient conditions.

Regarding the attached model, this was a bug in the mesh extrusion process affecting meshes with a large number of cells (OpenFOAM only supports 3D simulations so FEATool automatically extrudes 2D meshes to 3D). This issue has been fixed in the FEATool v1.12 release:

FEATool Multiphysics GitHub releases


Leon Robers wrote
So the issue with the pipe flow was that I set the boundary condition of the outflow to "neutral outflow/stress boundary". By changing it to "Outflow/pressure", it works fine.

Making the same changes to the model I uploaded still leads to the same error
Reply | Threaded
Open this post in threaded view
|

Re: Error with openFoam

Precise Simulation
Administrator
This post was updated on .
Please use the link below if the first one doesn't work (seems Google may have blocked and disallowed sharing)

https://github.com/precise-simulation/featool-multiphysics


Precise Simulation wrote
Yes, you are right, for OpenFOAM simulation usually are more stable with prescribed pressue outflow conditions than the neutal/zeroGradient conditions.

Regarding the attached model, this was a bug in the mesh extrusion process affecting meshes with a large number of cells (OpenFOAM only supports 3D simulations so FEATool automatically extrudes 2D meshes to 3D). There is a temporary fix for this in the updated build below:

[removed link due to release]

Leon Robers wrote
So the issue with the pipe flow was that I set the boundary condition of the outflow to "neutral outflow/stress boundary". By changing it to "Outflow/pressure", it works fine.

Making the same changes to the model I uploaded still leads to the same error
Reply | Threaded
Open this post in threaded view
|

Re: Error with openFoam

Leon Robers
perfect, thanks a lot. Now it works :)
it's amazing how fast and competent you're always answering!
Reply | Threaded
Open this post in threaded view
|

Re: Error with openFoam

Precise Simulation
Administrator
Thank you for the kind words, it means a lot to me. For better or worse, its easier to know how to help when also responsible for the code, as well as not having overhead bureaucracy as in larger organizations.


Leon Robers wrote
perfect, thanks a lot. Now it works :)
it's amazing how fast and competent you're always answering!
Reply | Threaded
Open this post in threaded view
|

Re: Error with openFoam

m.jankowski
Hello, it looks like I have the same problem.
Error while trying to solve case with openFOAM solver:
Index in position 2 exceeds array bounds.
Stack trace: Line 0 in \featool.p > featool
Stack trace: Line 0 in \featool.p > featool
Stack trace: Line 0 in \featool.p > featool
Stack trace: Line 0 in \featool.p > featool
Stack trace: Line 0 in \featool.p > featool
Stack trace: Line 0 in \featool.p > featool
Stack trace: Line 0 in \featool.p > featool

Some more details.
I have Windows 11, Featool v1.17.5 build number 25.08.217, OpenFOAM v2506. I made simple 2D geometry for compressible supersonic test purposes (two boundaries). Due to two boundaries I cannot use SU2 solver.
I already read posts above, I have newest versions of software. I was able to succesfully solve tutorial for supersonic flow past a prism. I changed boundaries few times. I am not running as an administrator (cannot on this pc).

File is 170MB, so here is the link:
https://wskpoznancompl759-my.sharepoint.com/:u:/g/personal/m_jankowski_wsk-poznan_com_pl/Efo6glpOEC5MgfE9yotqslwB-A1OfhBZYEwZFP7GgKwCoA?e=RmcQck

The most annoying part is that I cannot even understand the error. Therefore I do not now is it technical problem or my mistake.

Any tip would be helpful, thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Error with openFoam

Precise Simulation
Administrator
Thanks for the issue report. This specifically seems to be that the laminar turbulence model has been incorrectly identified. Two potential workarounds at the moment are:

1) Start a new model and redo/re-import geometry/mesh etc. while *not* setting/selecting the turbulence model.

2a) Switch to ke-turbulence model
2b) Assign at least one boundary as inlet.
2c) Open the OpenFOAM control panel and revert to laminar turbulence model.

This issue should be fixed in the next release/update.

Reply | Threaded
Open this post in threaded view
|

Re: Error with openFoam

m.jankowski
Thank you, both solutions work.