Fluent crushes when it create dynamic mesh

I'm trying to operate Fluent in non-graphical mode from MATLAB using aas and TUI code, but when MATLAB send a command which make Fluent create dynamic mesh (following command), Fluent display the error(following image) and crushes.

I attached Case file, UDF file and MATLAB code.

Any advice would be appreciated.




  • Hello,

    Ansys employees are not able to download any files from the learning forum as Ansys.

    Having said that, can you confirm if you are able to run your case correctly on standalone Fluent? Is your dynamic mesh set-up working correctly? Are you able to obtain a converged solution? I'd like to understand if this problem is with Matlab integration or with the dynamic mesh set-up.



  • shojishoji Member
    edited September 11

    Thank you for the comment Kremella.

    When I run Fluent standalone, mesh set-up work correctly and I can obtain a converged solution.

    That's why I think the problem is Matlab integration.

    In addition to above error, bellow error also occurred when Matlab send below command.


  • shojishoji Member
    edited September 11

    I can fix this error, and the cause was my programming mistake.

    However, I can't fix this error.

    This occur when MATLAB send following command.

    I calculate Fluent simulation repeatedly, and this command can work for first 8 times, but after MATLAB send this command 8 times, error occurred (9th time).

  • RobRob UKForum Coordinator

    How many cells have you got when it fails? If you're using Student or Teaching key you're limited to 512k cells.

  • The number of Total cells is 266k.

  • Hello,

    Are you saying that your Matlab Fluent connection worked in the last 8 attempts and this issue you are talking about appears the 9 time you send this command?

    Could you please clarify this so we can understand things better?



  • Sure.

    What I want to do is running fluent repeatedly (about 100 times). And the name of the program to run fluent is "Fluent_pitch" and I repeat it by using below matlab program.

    Of course I can run "Fluent_Pitch" correctly. However when I run "fluent_repeat", fluent pitch run correctly for the first several times, then program stops at following code.

    I said it can work 8 times, but this time it can work only 5 times.

    This is the video how the program work and stop.


  • Although I said I could fix this error, it was misunderstanding and I can't fix yet.

    If you have any idea, please tell me.


  • Hello,

    Please take a look at this blog post and make sure that your code is correct.

    Also, If you still looking to debug this issue, you might first want to isolate the issue. Here is what I'd do.

    1. First, I would type out each command that you have in your journal file and test them line by line by copying them into Fluent console. Fluent console asks a lot of questions and if one of these questions are missed or incorrectly answered, then the case would throw an error. This is because there are no exception in the journal file.
    2. Once you are sure of this, then I'd use the journal file and make sure that your case is running exactly as it should.
    3. Once all these tests work, then you will lastly try to run your case using Matlab commands.

    This will help you isolate where the issue and you can then take care of this.



  • Hello

    Thank you for the comment.

    I tried step1,2 and 3 , and Fluent worked without error. However when I run fluent repeatedly from MATLAB error occurred.

    Although Fluent works for the first several times, the error occurred at bellow program after Fluent run several times.

    Fluent run as follow program without error for the first several times.

    <program outline>

    connect fluent

    load UDF

    create dynamic mesh


    start calculation


  • RobRob UKForum Coordinator

    If the system works a few times and then fails, what is different about the command or starting point?

Sign In or Register to comment.