Batch Simulation in feko

Sra
Sra Altair Community Member
edited October 2020 in Community Q&A

Hello,

 

Could anyone please answer whether there is an option in FEKO for performing batch simulations. In case if such an option is available in FEKO, can anyone guide me.

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2017

    Hi Svaran321,

     

    Are you looking for a parameter sweep?  There is a plugin utility that you can use for this.  You should see it if you go to the Macro Library.  With this plugin, you can generate several models and run them from CADFEKO.  Something else that might be useful is that the plugin creates a *.bat and *.sh file.  This should give you a very good starting point if you want to batch launch models using command line scripts.

     

    You can also look at the 'grid search' optimisation option if you just want to investigate how a parameter influences the results.

     

    Finally, you can maybe look at something like HyperStudy - I'm assuming you have HyperWorks units and can access the application?  HyperStudy is a tool that can be used to drive a number of different applications, including FEKO.  This does require you to jump between applications a bit but there are examples for how to do this in the Examples Guide.

     

    Let me know if this helps; otherwise if you are looking for something more specific maybe you can explain what it is that you are trying to do and we can take it from there. :-)

     

    Regards,

    Andries

  • Sra
    Sra Altair Community Member
    edited May 2017

    Hi Andries,

     

    Thanks for the answer. But I am not looking for optimization of a parameter. 

     

    Actually what I mean is, For example, I have 3 different antenna models named '1',' 2', '3',which are different from each other. I would like to simulate an antenna model named as '1', Once this model '1' has completed the simulation, I would like to have feko to take antenna model '2' and then start simulation automatically. Once model '2' is finished then Feko needs to simulate model '3' automatically. So that I need not observe the simulation of every model and again start the simulation for other model.

     

    I would like feko to have an application where a script can be written saying that once the model '1' is finished in executing then it need to take model '2' and start simulation, which should be automatic.

    This is what I am looking for.

     

    Regards,

    Sravan

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2017

    Okay, I think I understand now.  It sounds like you're looking for a 'job scheduler' or 'run manager' which allows you to queue models so that they can be launched in sequence without you having to track them.

     

    The cleanest solution at the moment is probably a batch/shell script. 

     

    Another option is to switch on macro recording in CADFEKO and to run a small model.  This will generate a Lua script that you can modify to run a number of files.  Come to think of it - if you are willing to spend some time on it, you can make your own job scheduler this way.

  • Sra
    Sra Altair Community Member
    edited June 2017

    Thanks Andries.

     

    I will try to create a Job scheduler and will update you the process.

     

    Regards,

    Sravan

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    Hi Andries and Sravan,

     

    I have almost the same request as Sravan, but for antenna optimization. I would like to optimize (in using optfeko) an antenna model. Once the optimization for this antenna is completed, I would like to have FEKO taking the second antenna model and starting the optimization for this second model automatically.

    Do you know if a batch/shell script or a Job scheduler will work in this case?

     

    Regards,

    Yoanna

  • Mel
    Mel Altair Community Member
    edited November 2017

    You don't need a job scheduler.

    Open a FEKO terminal (Start, Programs, Altair, ...) and from there run myruns.bat where the contents of this file would be something like:

    optfeko mymodel1 -np x

    optfeko mymodel2 -np x

     

    In the above x would be the number of parallel processes.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2017

    Hi Mel,

    Thanks for your reply. I had no time to apply your advice until now as I was temporary assigned to another project. I have run myruns.bat today in following your advice. I will check the result in a couple of days.

     

    Thanks again!

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2018

    A batch files can be used to automate any number of simulation runs. If anyone requires how to create .bat files follow this simple steps

     

    1.Open notepad.

    2.Type whatever commands you need to run

    3.Save the files as Name_what_you_want.bat

    4.Double click the Name_what_you_want.bat.

     

    Whatever commands you've given, it'll start executing one by one.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2018

    Hello,

     

    Could anyone please answer whether there is an option in FEKO for performing batch simulations. In case if such an option is available in FEKO, can anyone guide me.

    You should look in the scripting section of FEKO Manual.

    You need basic LUA programming language skills.

    You can basically automatize anything that you can do in CADFEKO.