FEKO - MATLAB communication by DOS commands

NikolasNA
NikolasNA Altair Community Member
edited 2020 04 in Community Q&A

Hello guys,

 

I found some commands on FEKO User Guide to run PREFEKO, make mesh ans run FEKO solver. The commands are (cadfeko_batch; runfeko) and I can run them from DOS (prompt command window  on Windows). These commands are interesting because I do not have to open FEKO GUI (Graphical user interface)  to make mesh and run the solver, and I can call them from MATLAB.

 

But I am having problems to export from the simulation  only Data I want without open POSTFEKO GUI, for example : Transmission and Reflection coefficients and range of frequencies.

Does someone have a clue?

 

If I open POSTFEKO and load the simulated file I can export the information as (*.tr) extension, a file with what I want, but I cannot find any information on how to call this kind of 'exporting flag' on command line... I do not want to open GUI at all.

image.png.149f5741851a24d59e5a58321cb60cec.png

 

The image below has one option [--data-export-format n], but on the function description do not have any information about extension (*.tr)

image.png.090de649e44dc093de2a31ce2d5965b6.png

 

Does anyone have an example of a FEKO problem when FEKO did not have GUI? Or some examples of all DOS commands to manipulate FEKO?

 

Thank you in advance.

 

Best Regards,

Nikolas Nascimento Aguilar

Tagged:

Answers

  • robertavarela
    robertavarela New Altair Community Member
    edited 2019 22

    Nikolas,

     

    What could be done in this case to use FEKO + Compose would be to run a Lua script while calling POSTFEKO in batch. This Lua script would have not more than a few lines which would be standard for any model whose results you'd like to extract afterwards.

     

    The workflow I'd suggest in this case would be:

    1) To do everything in batch in Compose

    2) To ask Compose to write the Lua script which will be called along with POSTFEKO (passing the output file name at the same time, so POSTFEKO will understand which file it will refer to)

    3) To create a while loop in Compose to keep searching for the .tr file that will be exported from this Lua script. Once the .tr file is found in the folder, your Compose function may carry on doing what it needs to do and accessing this .tr file to fetch the results.

     

    Regards,

     

    Roberta

  • NikolasNA
    NikolasNA Altair Community Member
    edited 2019 24

    Thank you Roberta!

     

    I am going to try to figure out how to write all these functions in Compose. I saw that Compose language is similar to Matlab language, but I have to take a look on their system functions to see how I would call the  Command Line entities from Compose.

     

    Regards,

     

    Nikolas

  • robertavarela
    robertavarela New Altair Community Member
    edited 2019 25

    Nikolas,

     

    You would use either dos or system function in order to call .bat scripts.

     

    Please find attached a sample Compose script that I wrote as a part of a bigger workflow that calls CADFEKO in batch.

     

    Regards,

     

    Roberta

    Unable to find an attachment - read this blog

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited 2019 02

    Hi Nikolas, 

     

    Could you help me with interfacing Matlab and Feko? When trying to run cadfeko from matlab, I get the error: ' 'cadfeko_batch' is not recognized as an internal or external command, operable program or batch file. '

     

    It works from the Feko Terminal, but not from the Windows terminal. 

     

    Regards,

    Aurelien