Parameter sweep from a txt file

Adam_22211
Adam_22211 Altair Community Member
edited April 2021 in Community Q&A

Hi everyone,

I am using parameter sweep in FEKO.

I would like to know that how I can import a text file for parameter sweep. My parameters are randomly varied, I can manually give my data to the FEKO parameter sweep tool, and run it. But, Is there any shortway for giving the data from a text file? 

thanks in advance

Tagged:

Answers

  • Mel
    Mel Altair Community Member
    edited April 2021

    This is not possible directly by just reading a text file, but it would be nice extension for the script.

    In a more indirect way I could suggest the following:

    If you create a parameter sweep and cancel the running of the Feko solver you will find a folder "parameter_sweep" in your current folder.
    There you will notice the script created a number cfx files, equal to the number of possibilities, e.g. if you specified 2 variables with 3 different values each, there would be 6 cfx files created in total. Note the naming convention of these.
    These cfx files are created with cadfeko_batch from the command line where the variables are modified and the mesh created with e.g
    cadfeko_batch <mycadfekofilename> -#feed_dist=10 -#height=0.2
    Just search for cadfeko_batch in the Altair_Feko_User_Guide.pdf

    You would need to create manually these cadfeko files with your own command line script and follow the same naming convention/sequencing as the script with these files.

    Thereafter you would need to run each cfx file, also with a command line script.
    This uses runfeko from the command line. In the Feko Utilities chapter in the Altair_Feko_User_Guide.pdf there you will find info on running Feko through the command line with runfeko. E.g. to run the first cadfeko file, you would use:

    runfeko <mycadfekofilename>_01.cfx -np 4

    where the -np 4 would specify 4 parallel processes if you want to use parallel solving.

    After running each cfx file you can run the Postfeko part of the parameter sweep script.

  • Adam_22211
    Adam_22211 Altair Community Member
    edited April 2021

    Dear mel,

    Thanks for your response.

    The thing that I avoid is to create the cadfeko files manually. I understand now there is no direct way to read a text file.

    Thanks for your valuable suggestions.