Export Time Domain results using lua script

Zakaria
Zakaria Altair Community Member
edited July 2021 in Community Q&A

Hi,

I have a  time-domain excitation pulse (generated using Matlab as a .txt file). this excitation needs to be imported to PostFeko, calculate the time domain voltage across the load (in postfeko), then export the TD voltage to .dat or .txt file. I need to run all of this through Lua script. If I can do so then instead of reopening postFEKo every time I change the excitation pulse I can run the script through Matlab.

I have attached a basic Lua script that reads the current across the load and exports the data to the .dat file. However, it exports the Frequency domain data, not the Time domain. I have a very very basic knowledge of LUA scripting. I would really appreciate it If anyone has an idea of how to modify the script to perform the above tasks.

attached the FEKo Files and the Lua script.

Tagged:

Answers

  • Mel
    Mel Altair Community Member
    edited July 2021

    You could use ExportTraces:

    graph=app.CartesianGraphs[1]
    graph:ExportTraces("mydata.txt",101)

  • Zakaria
    Zakaria Altair Community Member
    edited July 2021
    mel_21333 said:

    You could use ExportTraces:

    graph=app.CartesianGraphs[1]
    graph:ExportTraces("mydata.txt",101)

    Thanks for the replay. What command can I use to import the time domain signal file?
  • Mel
    Mel Altair Community Member
    edited July 2021

    Unfortunately automation and data set access for Time Analysis are not supported in POSTFEKO. 

    So you would not be able to automate everything that you are after.