We’re updating our badges platform. Badge issuance is temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

How to call parameter in APDL command ?

    • Md_Salem
      Subscriber

      Hello everyone,

      I am working on harmonic analysis in Workbench with coupled field element 226 

      I parametrized the thickness of the coupled field element in the Designmodeler using sympol (theck) this dimension was defined during Extrude process.

      I  inserted some APDL code inside this Workbench :

       

      ESEL,S,ENAME,,226
      NSEL,R,LOC,Z,0.001

      V=ARG1
      D,ALL,VOLT,V

      I need to use the parameter (theck) in the command (NSEL) instead of (0.001) in order to use it in the optimization process.

      Is it possible?

      Regards

    • mjmiddle
      Ansys Employee

      You can link at workbench level. First promote the input argument in the Details of the command snippet.

      In the "Parameter Set" in the project schematic, you can set the expression to the name of another parameter. The parameter from DM will have a length dimension. The parameter from the APDL snippet will be dimensionless. You have to make sure the dimensions work out. By setting the expression to P1/1[mm], it divides the mm unit in the P1 dimension by mm in this expression to arrive at an expressionless number:

      You will need to be knowledgeable about the dimensions set at project level every time you close and reopen workbench to make sure that the dimesions cancel out. And you also have to be consious of the unit setting in Mechanical, since it will write those dimensions to the APDL solver and the number value of the argument needs to imply the right units for this dimensionless argument.

      You will need to right click to refresh the Model cell:

      If you run solutions by updating design points, the refresh is automatic.

      You can use the argument in your script with this line:

      NSEL,R,LOC,Z,ARG1

      Using ARG1 in my case, maybe ARG2 in your script. By the way, there is no need to set:

      V=ARG1

      Just use:
      D,ALL,VOLT,ARG1

      • Md_Salem
        Subscriber

         

        Hi mjmiddle,

        I appreciated your concern.

        Will this script with ARG1 and ARG2, which are dimensionless, work? Also, I do parametrize this problem in order to use it in optimization. I am confused a little bit about which dimensions should be parametrized in the optimization  at your script (P1 (ARG1), P2, or both).

        Regards

         

Viewing 1 reply thread
  • The topic ‘How to call parameter in APDL command ?’ is closed to new replies.