Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Develop #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions examples/skripsie/bow_tie_array_DGFM.pre
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
** Author: DJ Ludick
** Date: 15.10.2011
** A planar array built with the TG card and also the FA card
** respectively. Triangle data is written to the *.out file
** The numbering should be identical in both cases.
**
** Update used by NL Kunene for 2022 Skripsie
** Date : 2022-07

*******************************
** General Variables **
*******************************
#lam = 1
#freq = #c0/#lam
#freq_start = 0.8*#freq
#freq_stop = 1.2*#freq

*******************************
** Element Variables **
*******************************
#a = #lam ** square edge length
#L = 0.45*#lam
#w = 0.02

#ell_xoff = 0*#lam ** element offset, with regards to global co-ordinate X-axis
#ell_yoff = 0*#lam ** element offset, with regards to global co-ordinate Y-axis
#ell_zoff = 0*#lam ** element offset, with regards to global co-ordinate Z-axis

*******************************
** Meshing **
*******************************
** Mesh size
#t_edge = #lam/15 ** #lam/15 creates 15 basis-functions per element
** #lam/30 creates 28 basis-functions per element
#s_rad = 4E-6
#s_len = #lam/15
IP #s_rad #t_edge #s_len
*******************************
** The Aray element **
*******************************
** Import mesh model
** IN 8 31 "strip_dipole.cfm"
**
** ** Change labels
** CB: Union1.Face6_1 : 1
** CB: Union1.Face6_2_1 : 2

#b = 6*#w

** Side 1
DP A -#b 0 0
DP B #w+#b 0 0
DP C #w #L/2 0
DP D 0 #L/2 0
LA 1
BQ A B C D

** Side 2
DP E 0 #L/2 0
DP F #w #L/2 0
DP G #w+#b #L 0
DP H -#b #L 0
LA 2
BQ E F G H

**********************************************************************************
** Functionality of the 'FA' card, presented by using TG cards **
**********************************************************************************

#tg_inc = 100 ** Used to ensure that only the base-element is copied when using
** the 'TG' card

*******************************
** Array Variables **
*******************************

** Array dimensions
#arr_N = 10 ** Number of elements along X-axis
#arr_M = 1 ** Number of elements along Y-axis

** offsetts/spacings
#arr_Noff = #L **0.4*#lam ** Offset of elements along X-axis
#arr_Moff = 1.25*#L **0.4*#lam ** Offset of elements along Y-axis

** Some preparation so that we can identify the base elementa
CB: 1 : s1
CB: 2 : s2

*******************************
** The Aray **
*******************************
!!print "FA card construction"

FA: 1 : 3 : #arr_N : #arr_M : : #arr_Noff : #arr_Moff : : : 0

**SU 408 0

** End of geometry
EG 0 0 0

*******************************
** Simulation settings **
******************************* 0
** Control efficient/non-efficient fill of [A], requires the SU card
PS: 0 : 1 : 1 : 0 : 0

** Frequency
FR: 5 : 0 : : : : #freq_start : : #freq_stop

** Data output
DA 0 0 0 0 0 0 0 0 0 0

** Control preconditioning
CG -1 -1

*******************************
** The Excitation **
*******************************

** Excited by AE source
** AE: 0 : internal_1 : internal_2 : 0 : 1 : 1 : 0
AE: 0 : s1 : s2 : 0 : 1 : 1 : 0

*******************************
** The Results **
*******************************
** Request Currents
OS 1 1

** ** Calculate far-fields along a theta cut
FF 1 181 1 0 0 90 0.5 0
FF: 1 : 181 : 1 : 0 : 0 : 0 : 0 : 0.5 : 0 : : : 0

** ** Near fields that we defined
#max_arr_dim =CEIL ((#a/2)*#arr_M)
!!print #max_arr_dim
#num_points =300
FE: 1 : 1 : #num_points : 1 : 0 : (#arr_Noff*#arr_N)/2-0.15 : -0.15 : #lam/15 : : #max_arr_dim/(#num_points+#lam/4)

FE: 1 : #num_points : 1 : 1 : 0 : -0.15 : (#arr_Moff*#arr_M)/2-0.11 : #lam/15 : 0.0055 : 0 : 0

** End of file
EN

146 changes: 146 additions & 0 deletions examples/skripsie/bow_tie_array_MoM.pre
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
** Author: DJ Ludick
** Date: 15.10.2011
** A planar array built with the TG card and also the FA card
** respectively. Triangle data is written to the *.out file
** The numbering should be identical in both cases.
**
** Update used by NL Kunene for 2022 Skripsie
** Date : 2022-07

*******************************
** General Variables **
*******************************
#lam = 1
#freq = #c0/#lam
#freq_start = 0.8*#freq
#freq_stop = 1.2*#freq

*******************************
** Element Variables **
*******************************
#a = #lam ** square edge length

#L = 0.45*#lam
#w = 0.02

#ell_xoff = 0*#lam ** element offset, with regards to global co-ordinate X-axis
#ell_yoff = 0*#lam ** element offset, with regards to global co-ordinate Y-axis
#ell_zoff = 0*#lam ** element offset, with regards to global co-ordinate Z-axis

*******************************
** Meshing **
*******************************
** Mesh size
#t_edge = #lam/15 ** #lam/15 creates 15 basis-functions per element
** #lam/30 creates 28 basis-functions per element
#s_rad = 4E-6
#s_len = #lam/15
IP #s_rad #t_edge #s_len


*******************************
** The Aray element **
*******************************
** Import mesh model
** IN 8 31 "strip_dipole.cfm"
**
** ** Change labels
** CB: Union1.Face6_1 : 1
** CB: Union1.Face6_2_1 : 2

#b = 6*#w

** Side 1
DP A -#b 0 0
DP B #w+#b 0 0
DP C #w #L/2 0
DP D 0 #L/2 0
LA 1
BQ A B C D

** Side 2
DP E 0 #L/2 0
DP F #w #L/2 0
DP G #w+#b #L 0
DP H -#b #L 0
LA 2
BQ E F G H

**********************************************************************************
** Functionality of the 'FA' card, presented by using TG cards **
**********************************************************************************

#tg_inc = 100 ** Used to ensure that only the base-element is copied when using
** the 'TG' card

*******************************
** Array Variables **
*******************************

** Array dimensions
#arr_N = 10 ** Number of elements along X-axis
#arr_M = 1 ** Number of elements along Y-axis

** offsetts/spacings
#arr_Noff = #L **0.4*#lam ** Offset of elements along X-axis
#arr_Moff = 1.25*#L **0.4*#lam ** Offset of elements along Y-axis

** Some preparation so that we can identify the base elementa
CB: 1 : s1
CB: 2 : s2

*******************************
** The Aray **
*******************************
!!print "FA card construction"

FA: 0 : 3 : #arr_N : #arr_M : : #arr_Noff : #arr_Moff

**SU 408 0

** End of geometry
EG 0 0 0 0

*******************************
** Simulation settings **
*******************************
** Control efficient/non-efficient fill of [A], requires the SU card
PS: 0 : 1 : 1 : 0 : 0

** Frequency
FR: 5 : 0 : : : : #freq_start : : #freq_stop

** Data output
DA 0 0 0 0 0 0 0 0 0 0

** Control preconditioning
CG -1 -1

*******************************
** The Excitation **
*******************************

** Excited by AE source
** AE: 0 : internal_1 : internal_2 : 0 : 1 : 1 : 0
AE: 0 : s1 : s2 : 0 : 1 : 1 : 0

*******************************
** The Results **
*******************************

** Request Currents
OS: 1 : : 1

** ** Calculate far-fields along a theta cut
FF 1 181 1 0 0 90 0.5 0
FF: 1 : 181 : 1 : 0 : 0 : 0 : 0 : 0.5 : 0 : : : 0

** Near fields that we defined
#max_arr_dim =CEIL ((#a/2)*#arr_M)
!!print #max_arr_dim
#num_points =300
FE: 1 : 1 : #num_points : 1 : 0 : (#arr_Noff*#arr_N)/2-0.15 : -0.15 : #lam/15 : : #max_arr_dim/(#num_points+#lam/4)
FE: 1 : #num_points : 1 : 1 : 0 : -0.15 : (#arr_Moff*#arr_M)/2-0.11 : #lam/15 : 0.0055 : 0 : 0
** End of file
EN

68 changes: 68 additions & 0 deletions examples/skripsie/bow_tie_array_driver.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
% Author: Danie Ludick (dludick@sun.ac.za)
% Project: Bowtie array simulation using MoM and DGFM
%
% Note: Each project directory / example directory needs to have a sunem_initialise.m
% script, that is used to setup the correct environment for that example.
%
% Refer to the /doc folder for more information

% --------------------------------------------------------------------------------------------------
% Initialise the environment
% --------------------------------------------------------------------------------------------------
% Project output directory: './dipoles/'
% Debug: True/False
Const = sunem_initialise('bow_tie_array',false);

% --------------------------------------------------------------------------------------------------
% Program flow settings
% --------------------------------------------------------------------------------------------------

% Choose the solvers that will be executed
Const.runMoMsolver = true;
Const.runDGFMsolver = false;



% --------------------------------------------------------------------------------------------------
% Define input files for extracting FEKO data
% --------------------------------------------------------------------------------------------------
Const.FEKOmatfilename = 'bow_tie_array_MoM.mat';
Const.FEKOstrfilename = 'bow_tie_array_MoM.str';
Const.FEKOrhsfilename = 'bow_tie_array_MoM.rhs';
Const.FEKOoutfilename = 'bow_tie_array_MoM.out';


% --------------------------------------------------------------------------------------------------
% Define output files for transferring expansion coefficients back to FEKO data
% --------------------------------------------------------------------------------------------------
Const.SUNEMmomstrfilename = ''; %'sunem_mom_bow_tie_array.str';
Const.SUNEMdgfmstrfilename = '';%'sunem_dgfm_bow_tie_array.str';

% --------------------------------------------------------------------------------------------------
% Define additional program flow constants
% --------------------------------------------------------------------------------------------------
% TO-DO: Setup some documentation for this
% Defined explicitely
%Const.no_mutual_coupling_array = false; % Deactivate coupling between domains.

% --------------------------------------------------------------------------------------------------
% Read the MoM matrix equation from the file
% --------------------------------------------------------------------------------------------------
[Const, zMatrices, yVectors, xVectors] = extractFEKOMoMmatrixEq(Const);

% --------------------------------------------------------------------------------------------------
% Parse the setup files to extract the frequency sweep, the geometry and basis function setup
% --------------------------------------------------------------------------------------------------
% TO-DO: At a later stage we can also add other meshing / geometry
% preprocessxing, e.g. Gmsh or GiD. For now the solver setup is read from FEKO.
[Const, Solver_setup] = parseFEKOoutfile(Const, yVectors);

% --------------------------------------------------------------------------------------------------
% Run the EM solver
% --------------------------------------------------------------------------------------------------
% (Note: We either pass our own (internal) matrices, or those read from FEKO). For this particular
% array configuration, we are not yet supporting radiating elements. But as we are consistent with the
% FEKO mesh, we can just use the FEKO RHS vector.
[Solution] = runEMsolvers(Const, Solver_setup, zMatrices, yVectors, xVectors);

%Solution.mom has all the solver settings
Loading