Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Opening ICEM with MATLAB

    • Luke Driver
      Subscriber

      Hi,

      So as the title describes, I'm using MATLAB to open up ansys ICEM. In MATLAB im doing this using:

      ICEM_Path = 'C:\Program Files\ANSYS Inc\v221\icemcfd\win64_amd\bin\icemcfd';ICEM_Script = [currentFolder, '\ICEM_Script.tcl'];system(['"' ICEM_Path '" -script "' ICEM_Script '"'])

      The file path is correct for both, and it is opening up ansys ICEM. I have also tried opening up the icem.bat file and the same error persists. The problem is the script is not working. Its giving me the error of:

      ERROR:

      plPartMgr ->AttatchAssembley() failed!

      Now the weird thing is, when I open up ansys ICEM using the windows start bar (i.e. typing in ICEM and opening it up that way) the script runs fine and generates my mesh as expected. Is there some problem with the MATLAB version, or do I need some additional environment variables or something? I'm pretty stuck to why this is happening so any help would be appreciated. 

      I will say that I do not exactly have ansys ICEM downloaded, I'm using AppsAnywhere, but all the files do show up on my computer so i can access them. I can open up fluent with a script and spaceclaim with a script using the same MATLAB code. 

    • Essence
      Ansys Employee

      Hello,

      Which version of Matlab and ICEM are you using? Could you please check the CAD configuration? Seems like installation issue to me.

    • Luke Driver
      Subscriber

      Hi, 

      Im using Ansys 2022 R1 and MATLAB R2020a. I could use a future version of MATLAB and see if that works?

      The geometry that I am using is fine because the script works when I dont use MATLAB (i.e. importing the geometry and mesh creation works in the script)

    • Luke Driver
      Subscriber

      The MATLAB version doesnt make any difference. 


      When I open up ICEM through normally i.e. through the windows star bar, or going into the folder and opening the batch file, a command window opens. When I open up ICEM through MATLAB, it doesnt open up this terminal. I would suppose this terminal is what ICEM uses to perform commands. Maybe this is the issue?

    • Luke Driver
      Subscriber


      This is the error message that I get, is it something to do with an environment?

    • Essence
      Ansys Employee

      Hello,

      "I would suppose this terminal is what ICEM uses to perform commands." This might be the issue because, while importing the geometry, the working lines and points get selected when starting the ICEM.

      Could you try to select them using Matlab?

    • Luke Driver
      Subscriber

      What do you mean by "try to select them using MATLAB"?

      When i run my scritpt im importing a .x_t file that (exported from spaceclaim). Should I try another file type?

    • Essence
      Ansys Employee

      I was referring to select the working points and lines using Matlab. Is it possible?

      Yes, please try using .step or .iges files.

Viewing 7 reply threads
  • The topic ‘Opening ICEM with MATLAB’ is closed to new replies.