General Mechanical

General Mechanical

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

error during restart of a electrothermal analysis

    • Luiza Oltean
      Subscriber

      Hello everyone! I am doing a coupled transient electro-thermal simulation in the coupled field module in workbench r2023r1. I have automated the entire simulation with python scripting  and during restart I use apdl commands to change the rezistivity of certain elements at a certain step  then solve again. Unfortunately i encounter an error that only appears as a warning in the interface as seen in the image and it is not detailed in the err file or anywhere else. 

      Here is the code i am using to do the restart. command 2 is created before the restart to avoid creating it again and again. 
      Has anyone encontered this problem? I read some posts about the rst file that has to be disposed of before another solve or that it may be a bug. Any suggestions would be great. Thank you

      #SET THE ANALYSIS TO RESTART
      settings.RestartType=RestartType.Manual
      settings.CurrentRestartPoint=1
      step_index_list=list(range(1,settings.NumberOfRestartPoints+1))
      with Transaction():
          for step_index in step_index_list:
              settings.CurrentRestartPoint=step_index
              vartest=1
              while(vartest < 3):
                  vartest=vartest+1

                  #COMMAND INSERTION FOR RESISTIVITY
                  command_1=solution.AddCommandSnippet()
                  command_1.StepSelectionMode=SequenceSelectionType.ByNumber
                  command_1.Name="Det_resistivity"
                  command_1.Input="""
      /PREP7


      *DEL, transistor_model, , NOPR
      *DIM, transistor_model, TABLE, 161, 39, 69
      *TREAD, transistor_model, 'TableModel', 'table'

      /INQUIRE,numlines,LINES,'ELEM_T_VDS_VGS_file_multipleT_restart','txt'
      *DEL,mytable,,NOPR
      *DIM,mytable,TABLE,numlines-1,9,1 ! 

      *DEL, final_val, , nopr
      *DIM, final_val, ARRAY, numlines-1,7,1 

      *TREAD,mytable,'ELEM_T_VDS_VGS_file_multipleT_restart','txt','',,
      !*STATUS,mytable

      *DO,i,1,numlines-1
          *VITRP, final_val(i,2,), transistor_model, mytable(i,8,1), mytable(i,2,1), mytable(i,7,1)
          *VITRP, final_val(i,3,), transistor_model, mytable(i,8,1), mytable(i,3,1), mytable(i,7,1)
          *VITRP, final_val(i,4,), transistor_model, mytable(i,8,1), mytable(i,4,1), mytable(i,7,1)
          *VITRP, final_val(i,5,), transistor_model, mytable(i,8,1), mytable(i,5,1), mytable(i,7,1)
          *VITRP, final_val(i,6,), transistor_model, mytable(i,8,1), mytable(i,6,1), mytable(i,7,1)
          *VITRP, final_val(i,7,), transistor_model, mytable(i,8,1), mytable(i,7,1), mytable(i,7,1)
      *ENDDO

      *CFOPEN,'interpolated_val_restart','txt'
      *VWRITE,final_val(1,3,1),final_val(1,4,1),final_val(1,2,1),final_val(1,5,1),final_val(1,6,1),final_val(1,7,1)
      %G,%G,%G,%G,%G,%G
      *CFCLOS

      FINISH
      /SOLU"""
                  solution.ExecutePostCommands([command_1])
                  #Define the named sel from interface for substrate_elements
                  command_2.Name="MP_change_Command"
                  command_2.Input="""
      /PREP7

      *SET,maxelement,15355
      !Read material property txt data
      *DIM,cond,TABLE,maxelement,1,0, , ,  
      *TREAD,cond,'interpolated_val_restart','txt',' ', ,

      /INQUIRE,numlines,LINES,'ELEM_T_VDS_VGS_file_multipleT_restart','txt'
      *DEL,mytable,,NOPR
      *DIM,mytable,TABLE,numlines-1,9,1 ! 
      *TREAD,mytable,'ELEM_T_VDS_VGS_file_multipleT_restart','txt','',,
      *STATUS,mytable

      *DO ,i,13367,maxelement,1
      !ESEL,S,elem,,i
      EMODIF,i,MAT,i
      MP,KXX,i,280
      MP,DENS,i,2358
      MPTEMP
      MPTEMP,1,mytable(1,3,1),mytable(1,4,1),mytable(1,2,1),mytable(1,5,1),mytable(1,6,1),mytable(1,7,1)
      MPDATA,RSVZ,i,1,cond(i,0),cond(i,1),cond(i,2),cond(i,3),cond(i,4),cond(i,5)
      !EMODIF,i,MAT,i
      *ENDDO
      FINISH
      /SOLU"""
                  command_2.StepSelectionMode=SequenceSelectionType.ByNumber
                  command_2.StepNumber = step_index
                  command_1.Delete()
                  model.Solve()

    • Derrick Rogers
      Subscriber

       

       

       

      Hello,

      I think you should consider disposing of the .rst file. As you mentioned, it might be worth trying to dispose of the .rst file before performing another solve. You can use an APDL command like /INPUT, filename.rst to read the .rst file and then issue a /SOLU, PREP7 command to reset the solution environment. 

      fnaf 2

       

       

       

Viewing 1 reply thread
  • The topic ‘error during restart of a electrothermal analysis’ is closed to new replies.