We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.
ANSYS製品

ANSYS製品

Technical Support Inquiry: APDL /INPUT command executing incorrect script conten

タグ: 

    • 25rmm26
      Subscriber
      • I have an APDL script that was consistently failing during the geometry creation phase (/PREP7).
      • After extensive debugging with an AI coding partner, we identified and corrected all errors, creating a final, clean script saved as "run_this.txt".
      • I start a clean Ansys session, ensuring the working directory is empty, and then execute the script using the File > Read Input from... menu, selecting the correct "run_this.txt" file.
      • The output log confirms that "run_this.txt" is being read. However, immediately following the /INPUT log entry, the log shows that old commands (e.g., ROTATE LINES), which do not exist in my new script, are being executed. This results in old errors (e.g., Keypoint 60 not defined) that should have been fixed.
      • This behavior persists even when the script begins with /CLEAR,NOSTART to bypass any potential interference from a start.ans file.
      • What could cause such a discrepancy between the file content specified in the /INPUT command and the commands that are actually executed? Are there any other configuration files, environment variables, or session settings besides start.ans that could override or interfere with the input file stream in this manner?

      Thank you for your time and assistance. I look forward to your guidance on this matter.

    • mrife
      Ansys Employee

      "After extensive debugging with an AI coding partner...." I would not expect  any AI/LLM to give 100% correct APDL code at this point (aside from one command answers).  Can you show us the beginning of the corrected APDL script.

    • 25rmm26
      Subscriber

      Ansysサポートチーム様

      早急なご返信ありがとうございます。 

      /PREP7ご要望に応じて、 AI コーディング パートナーと徹底的にデバッグした後に開発された、修正された APDL スクリプト (ブロック) の冒頭を以下に示します。

      ! --- 修正されたスクリプトの始まり (/PREP7 ブロック) ---
      仕上げる
      /クリア、ノースタート
       
      /準備7
      ! --- パラメータ ---
      DDD=4e-3
      NNN=44
      THK=.08e-3
      THI=60
      GL=.001
      GW=.0002
      PPP=(2*1.4*((1.04**2)-1))/(1.4+1)
      MMM=1.04
      CCC=340
      DTT=(DDD/(MMM*CCC))/NNN
       
      ! --- 要素と材質 ---
      ET,1,シェル181
      R,1,THK
      MP、EX、1,200e9
      MP,PRXY,1,0.3
      MP、DENS、1、7.8e3
       
      ! --- ジオメトリ作成 ---
      エリアック,0,0,DDD/2
      CSYS,0
      長方形、-.5*GL、-.5*GW、GL、GW
      ASEL,S,エリア,,最後
      AROTAT、ALL、、、、、、THI
      アセル、オール
       
      長方形、-.5*GL、-.5*GW、GL、GW
      ASEL,S,エリア,,最後
      AROTAT、ALL、、、、、、、-THI
      アセル、オール
       
      *DO,I,1,NNN-1
          x_pos = -DDD/2 + (DDD/NNN)*I
          y_hgt = sqrt((DDD/2)**2 - x_pos**2)
          kp1 = 1000 + (I*2 - 1)
          kp2 = 1000 + (I*2)
          K, kp1, x_pos, -y_​​hgt
          K、kp2、x_pos、y_hgt
          L、kp1、kp2
      *エンドド
       
      ! --- 結合とクリーンアップ ---
      AOVLAP、すべて
      番号、すべて
       
      ! --- メッシュ ---
      サイズ、DDD/NNN*1.1
      アメシュ、オール
      番号、ノード
       
      仕上げる
       
    • 25rmm26
      Subscriber

      Our investigation concluded that even when we specify this correct script file with the /INPUT command, the output log shows that old commands, which do not exist in this file, are being executed. For example, our script uses AROTAT, but the log shows ROTATE LINES being executed, which then causes an error. This appears to be an environment-dependent issue.

      If you have any insight into this behavior, we would greatly appreciate your guidance.

      Thank you for your time and assistance.

      Best regards,

    • mrife
      Ansys Employee

      Can you post an english only version of the input file?  Google translate is either not doing a good job on some of the words, or the input file has unknown commands...or maybe uses APDL macros you created.  For example  エリアック gets translated as 'eliac'....no idea what eliac is.  

    • 25rmm26
      Subscriber

      ! --- Beginning of the corrected script (/PREP7 block) ---
      FINISH
      /CLEAR,NOSTART

      /PREP7
      ! --- Parameters ---
      DDD=4e-3
      NNN=44
      THK=.08e-3
      THI=60
      GL=.001
      GW=.0002
      PPP=(2*1.4*((1.04**2)-1))/(1.4+1)
      MMM=1.04
      CCC=340
      DTT=(DDD/(MMM*CCC))/NNN

      ! --- Element and Material ---
      ET,1,SHELL181
      R,1,THK
      MP,EX,1,200e9
      MP,PRXY,1,0.3
      MP,DENS,1,7.8e3

      ! --- Geometry Creation ---
      AREAC,0,0,DDD/2
      CSYS,0
      RECTNG,-.5*GL,-.5*GW,GL,GW
      ASEL,S,AREA,,LAST
      AROTAT,ALL,,,,,,THI
      ASEL,ALL

      RECTNG,-.5*GL,-.5*GW,GL,GW
      ASEL,S,AREA,,LAST
      AROTAT,ALL,,,,,,,-THI
      ASEL,ALL

      *DO,I,1,NNN-1
          x_pos = -DDD/2 + (DDD/NNN)*I
          y_hgt = sqrt((DDD/2)**2 - x_pos**2)
          kp1 = 1000 + (I*2 - 1)
          kp2 = 1000 + (I*2)
          K, kp1, x_pos, -y_hgt
          K, kp2, x_pos,  y_hgt
          L, kp1, kp2
      *ENDDO

      ! --- Combine and Cleanup ---
      AOVLAP,ALL
      NUMMRG,ALL

      ! --- Mesh ---
      ESIZE,DDD/NNN*1.1
      AMESH,ALL
      NUMMRG,NODE

      FINISH

    • mjmiddle
      Ansys Employee

      I tested by making an area in APDL. I entered the command AROTAT,ALL,,,,,,60

      I looked in the APDL shell, and it printed these lines for creating area and rotating:

       CREATE A RECTANGULAR AREA WITH
       X-DISTANCES FROM    -0.4000000000     TO    -0.5000000000E-01
       Y-DISTANCES FROM    -0.1000000000     TO     0.2500000000
            OUTPUT AREA =     1

       PLOT AREAS FROM     1  TO     1  BY      1

       ROTATE LINES      1,     2,     3,     4,
            ABOUT THE AXIS DEFINED BY COORDS
        0.78886E-30 0.78886E-30 0.78886E-30,  0.78886E-30 0.78886E-30 0.78886E-30,
           DEGREE OF ARC=   360.00   NUMBER OF SEGMENTS=   4

       *** ERROR ***                           CP =       1.188   TIME= 00:24:10
       Keypoint 60 not defined.

      So both the "ROTATE LINES" message and the error "Keypoint 60 not defined" are not coming from running any other file. The ROTATE LINES is typical for this command, and the keypoint 60 error is from the wrong format of the AROTAT command. Please refer to the help page on this command:

      https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v251/en/ans_cmd/Hlp_C_AROTAT.html

      The command says it "Generates cylindrical areas by rotating a line pattern about an axis" so the ROTATE LINES message seems justified. And your 60 value is in the place of the PAX1 argument, which is expected to be a keypoint. I think you meant tp specify 60 degrees for the ARC argument. But even if you do this, you will still get an error because the axis points are not defined. Therefore PAX1, PAX2 are required arguments.

Viewing 6 reply threads
  • このトピックに返信するには、ログインする必要があります。