• 大小: 98KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-19
  • 语言: Matlab
  • 标签: HFSS  MATLAB  SCRIPTING  API  

资源简介

HFSS-MATLAB-API is a library toolbox to control Ansoft HFSS from MATLAB using the HFSS Scripting Interface. This tool provides a set of MATLAB functions to create 3D objects in HFSS by generating the required HFSS Scripts. Basically, anything that can be done in HFSS user interface and the 3D Modeler can be done with this library of functions. Once a script is generated in this manner, it can be run in HFSS to generate the 3D model, solve it and export the data. You create your entire design in MATLAB and basically use HFSS to solve it.

资源截图

代码片段和文件信息

% ----------------------------------------------------------------------------
% function hfssAssignMaterial(fid object Material)

% Description :
% -------------
% Creates the VB script necessary to assign a material selection to an 
% existing HFSS object.
%
% Parameters :
% ------------
% fid      - file identifier of the HFSS script file.
% object   - name of the object to which the material is to assigned.
% Material - the material to be assigned to the object. This is a string that
%            should either be predefined in HFSS or defined using 
%            hfssAddMaterial(...)

% Note :
% ------
%
% Example :
% ---------
% fid = fopen(‘myantenna.vbs‘ ‘wt‘);
% ... 
% hfssAssignMaterial(fid ‘FR4Mount‘ ‘FR4epoxy‘); 
% ----------------------------------------------------------------------------

% ----------------------------------------------------------------------------
% This file is part of HFSS-MATLAB-API.
%
% HFSS-MATLAB-API is free software; you can redistribute it and/or modify it 
% under the terms of the GNU General Public License as published by the Free 
% Software Foundation; either version 2 of the License or (at your option) 
% any later version.
%
% HFSS-MATLAB-API is distributed in the hope that it will be useful but 
% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
% or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License 
% for more details.
%
% You should have received a copy of the GNU General Public License along with
% Foobar; if not write to the Free Software Foundation Inc. 59 Temple 
% Place Suite 330 Boston MA  02111-1307  USA
%
% Copyright 2004 Vijay Ramasami (rvc@ku.edu)
% ----------------------------------------------------------------------------
function hfssAssignMaterial(fid Name Material)

fprintf(fid ‘\n‘);
fprintf(fid ‘oEditor.AssignMaterial _\n‘);
fprintf(fid ‘\tArray(“NAME:Selections“ _\n‘);
fprintf(fid ‘\t\t“Selections:=“ “%s“) _\n‘ Name);  
fprintf(fid ‘\tArray(“NAME:Attributes“ _\n‘);
fprintf(fid ‘\t\t“MaterialName:=“ “%s“ _\n‘ Material);

% if the material is copper or pec we should set solve inside to be false and for
% other materials (in general) is should be true.
if (strcmp(Material ‘copper‘))
fprintf(fid ‘\t\t“SolveInside:=“ false)\n‘);
elseif (strcmp(Material ‘pec‘))
    fprintf(fid ‘\t\t“SolveInside:=“ false)\n‘); % added by yueliang
else
fprintf(fid ‘\t\t“SolveInside:=“ true)\n‘);
end;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      15141  2005-02-01 11:58  hfssapi\COPYING

     文件       1269  2005-02-01 13:11  hfssapi\README

     文件       4405  2007-12-26 10:49  hfssapi\examples\dipole_example.m

     文件       3718  2005-03-17 01:13  hfssapi\examples\folded_dipole.m

     文件       9718  2005-01-21 02:42  hfssapi\doc\dipole_balun.jpg

     文件      10841  2005-03-17 00:59  hfssapi\doc\hfss-matlab-api.html

     文件       3084  2005-01-21 02:54  hfssapi\doc\style.css

     文件       3988  2005-01-15 05:27  hfssapi\boundary\hfssAssignLumpedPort.m

     文件       2702  2007-12-27 11:01  hfssapi\boundary\hfssAssignPE.m

     文件       2113  2005-01-15 05:44  hfssapi\boundary\hfssAssignRadiation.m

     文件       4367  2005-01-15 05:45  hfssapi\boundary\hfssAssignWavePort.m

     文件       2447  2005-01-15 05:50  hfssapi\boundary\hfssCircularPort.m

     文件       4181  2007-12-29 20:15  hfssapi\boundary\hfssAssignWaveport_face.m

     文件       2676  2007-12-29 20:53  hfssapi\boundary\hfssAssignPE_face.m

     文件       2815  2008-04-25 10:25  hfssapi\boundary\hfssEditSources.m

     文件       2473  2008-07-22 13:57  hfssapi\boundary\hfssAssignRadiation_face.m

     文件       2376  2008-07-22 13:54  hfssapi\boundary\hfssAssignRadiation_face.asv

     文件       3515  2005-01-15 03:39  hfssapi\analysis\hfssExportNetworkData.m

     文件       3222  2005-01-15 05:31  hfssapi\analysis\hfssInsertSolution.m

     文件       3574  2005-01-15 03:37  hfssapi\analysis\hfssInterpolatingSweep.m

     文件       1655  2005-01-15 03:45  hfssapi\analysis\hfssSolveSetup.m

     文件       2511  2007-12-29 22:02  hfssapi\analysis\hfssFarFieldSphere.m

     文件       2593  2007-12-30 13:19  hfssapi\analysis\hfssExportRadiationParameters.m

     文件       1987  2007-12-30 14:28  hfssapi\analysis\hfssExportReport.m

     文件       4163  2008-04-28 10:30  hfssapi\analysis\hfssCreateReport.m

     文件       1941  2008-04-28 10:51  hfssapi\analysis\hfssExportToFile.m

     文件       2477  2007-12-27 15:38  hfssapi\3dmodeler\hfssAssignMaterial.m

     文件       4421  2005-01-15 05:49  hfssapi\3dmodeler\hfssBox.m

     文件       2817  2005-05-27 20:39  hfssapi\3dmodeler\hfssCircle.m

     文件       2793  2005-01-15 05:51  hfssapi\3dmodeler\hfssCoaxialCable.m

............此处省略50个文件信息

评论

共有 条评论