Fluids

Fluids

Topics relate to Fluent, CFX, Turbogrid and more

AAS commands for writing Input/Output Parameters is not working

    • evabe235
      Subscriber

      Good evening,


      Im using AAS- to couple Matlab and Fluent and use it as a Server. I have followed the steps in the official Ansys Youtube tutorial for the connection, and have read the users guide: "Fluent as a Server".


      Most of functions seem to work such as: tui.doMenuCommandToString(), fluent. getNrInputParameters(); fluent.getInputParameterNameByIndex(in long lInputParameterIndex);


      Nevertheless, the most important functions that I need do not work: (WRITE AND READ PARAMETERS of Fluent)


       


      fluent.getOutputParameterValueByName(string('q_rad_thorax'))


       


      fluent.setInputParameterValueByName(string('T_head'), 200)


       


      I write an example of what Im coding: 


      %%%%%%%%%%%%%%% CODE %%%%%%%%%%%%%%%%%%


      %% Basic Connection %%%% RUN THIS SECTION - Once per matlab session 


       


      orb=initialize_orb();


      load_ansys_aas();


      fluent=actfluentserver(orb,'aaS_FluentId.txt');


      tui=fluent.getSchemeControllerInstance();


       


      tui.doMenuCommandToString('report summary')


      %tui.doMenuCommandToString('define operating-conditions gravity yes 9.8 0.0 0.0');


       


      fluent.getOutputParameterValueByName(string('q_rad_thorax'))


      fluent.setInputParameterValueByName(string('T_head'), 200)


      %%%%


       


      MATLAB OUTPUT ERRORS:


       


      >> fluent.setInputParameterValueByName(string('T_head'),200)


      Java exception occurred:


      AAS_CORBA.EFluentGenericError: IDL:AAS_CORBA/EFluentGenericError:1.0


       


      at AAS_CORBA.EFluentGenericErrorHelper.read(EFluentGenericErrorHelper.java:80)


       


      at AAS_CORBA._ICoFluentUnitStub.setInputParameterValueByName(_ICoFluentUnitStub.java:456)


       


      >> fluent.getOutputParameterValueByName(string('q_rad_thorax'))


      Java exception occurred:


      AAS_CORBA.EFluentGenericError: IDL:AAS_CORBA/EFluentGenericError:1.0


       


      at AAS_CORBA.EFluentGenericErrorHelper.read(EFluentGenericErrorHelper.java:80)


       


      at AAS_CORBA._ICoFluentUnitStub.getOutputParameterValueByName(_ICoFluentUnitStub.java:579)


       


      PD: I have already written in my Fluent case these parameters previously, so they exist. I have also tried writing fluent.getOutputParameterValueByName('q_rad_thorax') and neither works. Here below I attach the error that I get from at FLUENT command window: unbound-variable, set-parameter-data


       


      Thank you very much, 


      Any help would be really welcome.


       


    • KR
      Administrator

      Hello,


      I'm trying to find you the right person to answer your question. Thank you for your patience.


      Karthik

    • jannav
      Subscriber
      Hello,nI have similar problem. I'm using Matlab 2017b and Fluent 2019 R1. When I try to run Fluent calculation by command: n>> iFluentTuiInterpreter.doMenuCommandToString('solve iterate 100')nIt starts calculation but immediately Matlab gives an error and calculation stops:nJava exception occurred:nAAS_CORBA.EFluentGenericError: IDL:AAS_CORBA/EFluentGenericError:1.0n at AAS_CORBA.EFluentGenericErrorHelper.read(EFluentGenericErrorHelper.java:80)n at AAS_CORBA._ICoFluentSchemeControllerStub.doMenuCommandToString(_ICoFluentSchemeControllerStub.java:126)nnIs there any solution?nThank younJann
    • Steve
      Ansys Employee
      Is this the video you're looking at?
      Do you have access to the customer portal to download the example files? I'm not sure what the issue could be at this stage
Viewing 3 reply threads
  • You must be logged in to reply to this topic.