Question about EDIT FEKO

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi,

I'm having a model where I have to import the field into that model at different frequencies, so each frequency I have to import a different file since FEKO cannot read multiple loop data file. So is there anyway to run multiple loops of EDIT FEKO (the whole file) ? I know that we can use batch mode in Matlab to run FEKO solver and change pre-defined parameters in a geometric model.

Thank you,

Tuan Nguyen,

Tagged:

Answers

  • Johan_Huysamen
    Johan_Huysamen
    Altair Employee
    edited May 2016

    Hi Tuan

     

    Yes, this is possible through EDITFEKO.

     

    In EDITFEKO you should be able to define a FOR loop that loops over the individual frequency solutions with each iteration importing the required field data from your file.

     

    Below you will see a section of such an EDITFEKO PRE file that imports (far) field data from a FEKO FFE file and uses this as a radiation pattern source.

     

    The trick is to define the correct 'Start from point number' or 'Start from line number' for reading the field data for the specific frequency.

     

    Please see the additional comments in the code below.

     

    Regards,

    Johan H
     

     EG: 1 : 0 : 0 :  :  :  :  :  :  :  :  :  : 1  ** Define start and end frequencies #start_frequency = 1e9 #end_frequency = 5e9  ** Define number of frequency points #frequency_points = 9  ** Define the number of theta and phi points in the input file #theta_points = 37 #phi_points = 73  ** Loop over the frequency points !!for #i = 1 to #frequency_points step 1  ** Calculate the frequency for this loop iteration #this_frequency = #start_frequency + (#i-1)*(#end_frequency-#start_frequency)/(#frequency_points-1)  ** Set a single frequency using this loop frequency FR:  :  :  :  :  : #this_frequency  ** Calculate the correct line in the input file to read #point_to_read = (#i-1)*(#theta_points*#phi_points)+1  ** Import the (far) field data using the required point number AR: 0 : 1 : #point_to_read : #theta_points : #phi_points : 1 : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 'dipole_FarField1.ffe'   ** Dipole_pattern  ** Request far fields to confirm correct import FF: 1 : 37 : 73 : 0 : 0 : 0 : 0 : 5 : 5 :  :  : 0   ** Test_farfields DA: 0 : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 0  ** End of FOR loop !!next  EN

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Thank you Mr Johan for a very helpful response. I'm able the apply your method to solve some advanced cases. However I cannot using the loop for the create different geometry setup. For example, I want to solve for near field at the surface of a sphere at three different positions. I tried to loop the TG or KU card but it did not work. So I think each EDIT FEKO file can solve for one geometry setup only. Could you confirm that ?

    Thanks again,

    Tuan Nguyen.

  • sumithra
    sumithra Altair Community Member
    edited March 2018

    Hi,

    I would like to implement in Editfeko the above said procedure to read the impedance matrices (  generated from multiple .pre files) for a loop of frequency (say 1.35e9,1.5e9,20). Suggest me the modifications needed  to achieve the objective.

     

    I tried but i cant pick the points to read. please find the steps below for your vetting. pl do the needful.

     

    ** End of geometry

    EG: 1 : 0 : 0 :  :  : 1e-06 :  :  :  :  :  :  : 1

     

    ** Define start and end frequencies

    #start_frequency = 1.35e9

    #end_frequency = 1.5e9

     

    ** Define number of frequency points

    #frequency_points = 20

     

    ** Define the number of impedances  requested in the input file

    #impedance =1

     

    ** Loop over the frequency points

    !!for #i = 1 to #frequency_points step 1

     

    ** Calculate the frequency for this loop iteration

    #this_frequency = #start_frequency + (#i-1)*(#end_frequency-#start_frequency)/(#frequency_points-1)

     

    ** Set a single frequency using this loop frequency

    FR:  :  :  :  :  : #this_frequency

     

    ** Calculate the correct line in the input file to read

    #point_to_read = (#i-1)*(impedance)+1

     

    ** Sources

     

    AE: 0 :  : Union1.Face2 : -2 : 1 : 1 : 0 : 50   ** VoltageSource1

     

    ** Import the impedance data using the required point number

    AE: 0 : 1 : #point_to_read : #impedance : 1 : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 'dipole_FarField1.out'  

     

    ** Request impedance to confirm correct import

    AE: 0 :  : Union1.Face2 : -2 : 1 : 1 : 0 : 50   **Test  VoltageSource1

    DA: 0 : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 0

     

    ** End of FOR loop

    !!next