LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Old June 16th 07, 12:11 AM posted to rec.radio.amateur.antenna
external usenet poster
 
First recorded activity by RadioBanter: Jun 2007
Posts: 22
Default Antenna programming tool/language/compiler/preprocessor?

Hello everybody,

I am searching for an antenna programming tool/compiler/preprocessor/
language. To finilize my work with similar subject (based on NEC2/
NEC4, especially on 4NEC2 from Arie Voors), I want to catch some good
ideas for this. Are you knowing some good tools, that provide to model
your antenna with a program code?
It should look like a program source code (like Basic, C or else) with
mathematical equations, variables, etc. It should not a GUI-Program,
where antenna parameters can be given in edit windows. (I hate this.)

So far, I am able to create construction models of antenna, so antenna
parameters can be optimized via 4NEC2. The complete output NEC file
has symbolic parameters instead of hard coded numbers. It supports
many features, that makes antenna modeling easy for you and me.
Especially for old "C"-programmers like me. With this work, it will be
soon able to model very complex antennas.

Please help me, to make a new standard of antenna modeling tool/
language. You will be get an advantage of this soon.

Regards,
Aziz

Some cut of source code (from offset parabolic reflector generator):
....snipped..
//--- Intermediate Symbols ---
P_y0 = -P_W/2 // Starting y position

#if (P_Type==3)
P_z0 = -P_Tp // Starting z position for offset parabola
#else //--if (P_Type==3)
P_z0 = -P_Hp/2 // Starting z position for center parabola
#endif //--if (P_Type==3)

P_dy = P_W/P_nsegw // Step width (y)
P_dz = P_Hp/P_nsegh // Step height (z)

//--- Generate Surface Patches or wires ---
for (z=0; z P_nsegh; z=z+1)
{
for (y=0; y P_nsegw; y=y+1)
{
// Elliptischer Test, wenn aktiv
#if ( (P_Shape == 1) || (sq(%%z+0.5-P_nsegh/2)/sq(P_nsegh/2) +
sq(%%y+0.5-P_nsegw/2)/sq(P_nsegw/2) = 1) ) //-- y=%%y, z=%%z

// if model is constructed with wires, correct wire flags must
be set.
P_wrflags = %%(_P1P2|_P2P3)

#if ( (z == P_nsegh-1) || ( (P_Shape == 2) && (sq(%%(z+1)+0.5-
P_nsegh/2)/sq(P_nsegh/2) + sq(%%y+0.5-P_nsegw/2)/sq(P_nsegw/2)
1)) )
P_wrflags = %%(P_wrflags | _P3P4)
#endif

#if ( (y == 0) || ( (P_Shape == 2) && (sq(%%z+0.5-P_nsegh/2)/
sq(P_nsegh/2) + sq(%%(y-1)+0.5-P_nsegw/2)/sq(P_nsegw/2) 1)) )
P_wrflags = %%(P_wrflags | _P4P1)
#endif

#SP4 1 1 P_a*(P_y0+%%y*P_dy)*(P_y0+%%y*P_dy)+P_a*(P_z0+%
%z*P_dz)*(P_z0+%%z*P_dz) P_y0+%%y*P_dy P_z0+%%z*P_dz P_a*(P_y0+%%(y
+1)*P_dy)*(P_y0+%%(y+1)*P_dy)+P_a*(P_z0+%%z*P_dz)* (P_z0+%%z*P_dz) P_y0+
%%(y+1)*P_dy P_z0+%%z*P_dz P_a*(P_y0+%%(y+1)*P_dy)*(P_y0+%%(y+1)*P_dy)
+P_a*(P_z0+%%(z+1)*P_dz)*(P_z0+%%(z+1)*P_dz) P_y0+%%(y+1)*P_dy P_z0+%%
(z+1)*P_dz P_a*(P_y0+%%y*P_dy)*(P_y0+%%y*P_dy)+P_a*(P_z0+%%(z
+1)*P_dz)*(P_z0+%%(z+1)*P_dz) P_y0+%%y*P_dy P_z0+%%(z+1)*P_dz
P_wrflags

#endif

} // for y

} // for z

.........
This source code must be compiled and you get some output code like
below...
(note: _8 is not a number but an intermediate variable (symbol))

Some cut off output code of other example:
....snipped..
SY _8 = (0+(BQ_RW)/2-(0+(BQ_RW)/2))/8
SY _9 = (0+(BQ_RH)/2-(0-(BQ_RH)/2))/8
SP 0 3 0+0*_1-0*(_7+0*(_1+_4)/8) 0+(BQ_RW)/2+0*_2-0*(_8+0*(_2+_5)/8)
0+(BQ_RH)/2+0*_3-0*(_9+0*(_3+_6)/8) 0+1*_1-0*(_7+1*(_1+_4)/8) 0+
(BQ_RW)/2+1*_2-0*(_8+1*(_2+_5)/8) 0+(BQ_RH)/2+1*_3-0*(_9+1*(_3+_6)/8)
SC 0 3 0+1*_1-1*(_7+1*(_1+_4)/8) 0+(BQ_RW)/2+1*_2-1*(_8+1*(_2+_5)/8)
0+(BQ_RH)/2+1*_3-1*(_9+1*(_3+_6)/8) 0+0*_1-1*(_7+0*(_1+_4)/8) 0+
(BQ_RW)/2+0*_2-1*(_8+0*(_2+_5)/8) 0+(BQ_RH)/2+0*_3-1*(_9+0*(_3+_6)/8)
....
SP 0 3 P_a*(P_y0+29*P_dy)*(P_y0+29*P_dy)
+P_a*(P_z0+20*P_dz)*(P_z0+20*P_dz) P_y0+29*P_dy P_z0+20*P_dz
P_a*(P_y0+30*P_dy)*(P_y0+30*P_dy)+P_a*(P_z0+20*P_d z)*(P_z0+20*P_dz)
P_y0+30*P_dy P_z0+20*P_dz
SC 0 3 P_a*(P_y0+30*P_dy)*(P_y0+30*P_dy)
+P_a*(P_z0+21*P_dz)*(P_z0+21*P_dz) P_y0+30*P_dy P_z0+21*P_dz
P_a*(P_y0+29*P_dy)*(P_y0+29*P_dy)+P_a*(P_z0+21*P_d z)*(P_z0+21*P_dz)
P_y0+29*P_dy P_z0+21*P_dz
....
etc... generates very complex output NEC files...
I am still wondering, that 4NEC2 can handle such complex NEC files.
But it works well.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FA: 1-Day-Left: 3 Books: MICROPROCESSORS, ASSEMBLY LANGUAGE Programming, 8080, Z-80, Etc. David Equipment 0 April 19th 06 12:42 PM
PicBasic Pro Compiler Ver 2.43 tk Homebrew 0 October 12th 03 03:11 PM
PicBasic Pro Compiler Ver 2.43 tk Homebrew 0 October 12th 03 03:11 PM


All times are GMT +1. The time now is 02:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 RadioBanter.
The comments are property of their posters.
 

About Us

"It's about Radio"

 

Copyright © 2017