Lec6 - Writing the field report

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 7

  • @engr.sherazabbas5953
    @engr.sherazabbas5953 9 месяцев назад

    I appreciated your all efforts, great job.

    • @abaquspython1
      @abaquspython1  8 месяцев назад

      Thank you. That means a lot.😊

  • @jonychen3370
    @jonychen3370 Год назад +1

    Great video

  • @captainvlog
    @captainvlog 9 месяцев назад +1

    Lets say that I want to add Stress 1 to Stress 2 for every frame at every element and put that new variable into the report. How could you do that?

    • @abaquspython1
      @abaquspython1  9 месяцев назад +1

      You can use following way to do it for a single frame:
      stress_tensor = odb.steps['Step-1'].frames[0].fieldOutputs['S']
      This is stress tensor (6 components) for while assembly.
      From stress tensor, get the components:
      s1 = stress_tensor.getScalarField(componentLabel='S11')
      s2 = stress_tensor.getScalarField(componentLabel='S22')
      Here, s1 and s2 are the stress components S11 and S22 for whole assembly.
      Now to add just do following:
      s1_s2 = s1 + s2
      Now access the data as array as,
      arr = s1_s2.bulkDataBlocks
      Now to write the data to text file,
      fout = open( 'out_file.csv', 'w')
      fout.close()
      fout = open( 'out_file.csv', 'a')
      import numpy
      for data in arr:
      numpy.savetxt(fout, data)
      fout.close()
      Then you can use for loop to create a report for all the steps and frames.
      For more details, please write an email. You find it in the "About" section.

  • @dineshchejarla1012
    @dineshchejarla1012 Год назад

    Hello sir, The explaination is really amazing and thanks for making it easy.
    My doubt is, Could we loop over the index for frame in order to write report for all the frames, for eg, like basic for loop?

    • @abaquspython1
      @abaquspython1  Год назад

      YES. We can. As it is iterable, we can iterate it.