🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to write POSTFEKO lua code to generate combined configurations of scattered near and far field

User: "Hamsalekha"
Altair Community Member
Updated by Hamsalekha

Hi,

I wish to write a postfeko code where it can generate only near field results (Electric field magnitude and phase for theta and phi) and far field results (Electric field magnitude and phase for theta and phi and backscattering cross section value) for 256 configurations in one single text file. (Combinations of all 256 configurations in a single text file and also 2D Cartesian graph)

I wrote this code (only for near field) but it is not working. The arrangement of the configurations are not in order and the results cannot be displayed in the Cartesian graph.

My code

-- To get started try the following script:
names = pf.NearField.GetNames()
printlist(names)
for i = 1,256,1 do
nearfieldi = pf.NearField.GetDataSet(names)

print(nearfieldi)


end
return nearfield

 

The output file has all the results of 256 configurations but there are other informations as well. So, it is impossible for me to extract the mentioned data one by one for 256 configurations and paste it in text file since its time consuming. The configurations are based on the theta and phi of incident and scattered field. I will attach the output file so that you can take a look on how the initializations are done and you can also refer to my previous forum discussion to understand the flow of the simulation. 

https://community.altair.com/community?id=community_question&sys_id=0d76443a1b2bd0908017dc61ec4bcb74

 

I hope anyone can assist me in this problem since it is an essential part of the investigation. 

 

Thank you

Unable to find an attachment - read this blog

Find more posts tagged with