Top Banner
Advanced Training Ansoft HFSS Environment Variables and Preferences Ansoft Corporation Pittsburgh, PA
30

Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Mar 08, 2018

Download

Documents

doannhu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Advanced Training Ansoft HFSS

Environment Variablesand Preferences

Ansoft CorporationPittsburgh, PA

Page 2: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Environment Variables - 1

Environment Variables are used to give HFSS instructions that override default parameters built into the code.

Usually they are required to perform features that would be undesirable under normal usage, or are advanced features that should only be used by expert users--if used without discretion they could cause poor results or performance.

If others may use your copy of HFSS or need to work with your models, remember to tell them about your settings!

Page 3: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Environment Variables - 2

The implementation of Environment Variable are platform-dependent. The common ways of implementing environment variables in unix .ksh and .csh, and PC NT and Win95 will be presented.

Page 4: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Environment Variables - 3

HFSS has many environment variables--they often are created by developers for internal use.

When you find that HFSS doesn’t seem to be able to do something you want, it is important to contact an Applications Engineer. They may know how to do things that aren’t obvious, and if they don’t know, they can usually find out because they are in continuous communication with each other and can access developers also.

Page 5: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Environment Variables - 4

Environment variables consist of two parts: a variable and a value.

They can be set in such a way that they are the default for yoursystem, or such that they are only applied temporarily. When applied temporarily, they generally exist only as long as the Window they were applied in is used for launching the Maxwell Control Panel.

Set them before starting the Maxwell software.

Page 6: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Setting Environment Variables on PC’s

(Semi)-Permanent method:

Windows NT: Control Panel > System > Environment Tab > variable: HFSS_MAX_REFINE value: 3000

Windows 95: in autoexec.bat put the line: set HFSS_MAX_REFINE=3000

One-shot method:

Get out of Ansoft’s software completely, bring up a DOS window, go to the directorywhere the maxwell executables reside, and type:

set HFSS_MAX_REFINE=3000maxwell

A Maxwell Control Panel will be launched that uses the environment variables.

Page 7: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Setting Environment Variables on unix:

CSH: put this line in your .env-ans file, or else type it beforestarting Maxwell:

setenv HFSS_MAX_REFINE 3000maxwell

UNIX KSH:

export HFSS_MAX_REFINE=3000maxwell

Page 8: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Description of environment variables

The environment variables that are useful in HFSS are:

HFSS_MAX_REFINE

LAMBDA_REFINE_TARGET

ZERO_ORDER

OMIT_FS_ERROR_CALC

WAVE_MIN_TRIANGLESUSE_COLLOCATIONPML_EXISTSAMPLIF_FACTOR ASYMM_AMPLIF

Page 9: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

HFSS_MAX_REFINE

In the Setup solution Menu, you set a Percentage Tet Refinement (e.g. 20%).

The number of tetrahedra actually added per adaptive pass has an upper limit: the value of HFSS_MAX_REFINE. Default 2000-2500.

There is also a lower limit: HFSS_MIN_REFINE. Default 6.

HFSS_MAX_REFINE is a protection against explosive growth of yourRAM and CPU requirements, but you may want to increase its valuesometimes.

Page 10: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

LAMBDA_REFINE_TARGET

The default wavelength seeding is 0.25, which means that the structure will be filled with tetrahedra with edge lengths of at most 0.25 -0.25√3 free-space wavelength, depending on object shape.

Wavelength seeding ignores εr and µr.

For resonant cavities, a good value is often 0.10 - 0.15 or smaller, depending on the size of the cavity and the wavelength of the highest-order mode.

For structures filled with dielectric, you may want a smaller value than 0.25.For large antenna models, you may want to start with a larger value than 0.25.

Value: any real number

Page 11: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

ZERO_ORDER

Sometimes a structure is small compared to a wavelength and it is appropriate, or even necessary due to model complexity (# tets!), to set ZERO_ORDER.

Setting ZERO_ORDER means that HFSS will use linear rather than quadratic basis functions, which uses much less memory and runs much faster. Never use this unless the structure is small compared to a wavelength.

Sometimes, to make sure all the tetrahedra in the problem fit the description of <<lambda, it is useful to set LAMBDA_REFINE_TARGET to .05 or smaller:

Value: 1

Page 12: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

OMIT_FS_ERROR_CALC

In the Fast Frequency Sweep, the error calculation uses a lot of memory.Often, this leads to swapping, which will slow you down.This environment variable forces HFSS to skip the error calculation.You may want to enable it once you have obtained a good feeling forthe accuracy of the fast sweep for a typical simulation.

Value: 1

Page 13: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

WAVE_MIN_TRIANGLES

This is a leftover from the past.In older versions of HFSS, sometimes the 2-D port eigenmode solver “wave” kicks out too early, leaving a port with too few triangles to generate a good field excitation. Setting this environment variable will guarantee that the port solver "wave" will generate enough triangles in the port mesh to accurately calculate the port field pattern.

This can improve port solutions and it can prevent crashes in the port solver. This can also prevent crashes in the 3D solver (in particular when it fails in the third or fourth pass, or during the fast sweep).

Default value: 100-120

Page 14: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

USE_COLLOCATION

Although the default mesh refinement scheme works well for the vast majority of models, there are cases where convergence is not optimal. Setting this environment variable forces the mesh generator to refine more agressively in regions of strong field gradients (e.g sharp metal tips and edges).

Value: 1

Page 15: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

PML_EXISTS

When you have a model with a Perfectly-Matched Layer and want to calculate far fields, the Post-Processor will complain about the absence of a radiation boundary unless you set this environment variable.

Value: 1

Page 16: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

AMPLIF_FACTOR

Setting this environment variable to A in the presence of periodic boundaries will enforce

Eslave = A eiϕ Emaster , Hslave = (1/A) eiϕ Hmaster .

ϕ = phase shift you set in the interface.Power = E•H* is conserved.Application: ideal transformer. This is just a prototype feature!

Value: any real number

Page 17: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

ASYMM_AMPLIF

Setting this environment variable in conjunction with AMPLIF_FACTOR in the presence of periodic boundaries will enforce

Eslave = A eiϕ Emaster , Hslave = A eiϕ Hmaster .

Power = E•H* is multiplied by A2.Application: ideal amplifier.This is just a prototype feature!

Value: 1

Page 18: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Environment Variables in future versions

Information on Environment Variables is usually not included in the documentation, so keeping abreast of current and new ones one of many good reasons to stay in touch with your AE’s.

Remember, one of Ansoft’s products is customer support. Working closely with AE’s enables you to get better solutions faster, and your needs and suggestions also drive future HFSS enhancements.

Page 19: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Part II

Solver-relatedUser Preferences

Ansoft CorporationPittsburgh, PA

Page 20: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Optimal memory usage strategy

Necessary

Sufficient

In core Off core Swap

Log

(Mem

ory) MemLimitHard

MemLimitSoft

Log (Matrix Size)

Page 21: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Optimal memory usage strategy

The previous slide describes the solver’s memory and disk usage as a function of matrix size.

As long as there is sufficient memory available to do everything “in core”, the solver follows the line labeled “sufficient” and solves “in core”.

When it hits “MemLimitSoft”, it starts doing part of the work “off-core” toavoid Operating-System-directed swapping. The time penalty for this off-corework is very small!

When the matrix size becomes so large that the minimum RAM needed is larger than MemLimitSoft, swapping can no longer be avoided.

At MemLimitHard, swapping slows you down so much that it’s better to quit.

Page 22: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

User Preferences (1)

In addition to Environment Variables, there are User Preferences.

They are set by editing a preferences file prefs.ini (PC) or .prefs (UNIX).

User Preferences allow you to control memory and disk usage.

Page 23: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

User Preferences (2)

Solver-related User Preferences:

DIRECT_SOLVER MemLimitSoft <RAM in kB>DIRECT_SOLVER MemLimitHard <RAM in kB>

Maxwell ScratchDir /disk/i/got/by/bribing/sys/admin

DIRECT_SOLVER machinename:MemLimitSoft <RAM in kB>DIRECT_SOLVER machinename:MemLimitHard <RAM in kB>

Maxwell machinename:ScratchDir /disk/i/got/by/bribing/sys/admin

Page 24: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Usage of user preferences

DIRECT_SOLVER MemLimitSoft 235000

Default is 128000 kB. Set it to 80% or less of installed RAM. When the solver reaches this limit, it will start to use the disk in a smart way (“spill logic”) and avoid Operating-System-directed swapping.

DIRECT_SOLVER MemLimitHard 300000

Less important. Set it to installed RAM + fraction of swap space. When the simulation is so large that the solver needs more than this as a minimum, it will quit rather than wasting your time with too much swapping.

Page 25: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Example of user preferences

DIRECT_SOLVER MemLimitSoft 200000DIRECT_SOLVER orion:MemLimitSoft 400000DIRECT_SOLVER stellar:MemLimitSoft 800000DIRECT_SOLVER MemLimitHard 400000DIRECT_SOLVER orion:MemLimitHard 800000DIRECT_SOLVER stellar:MemLimitHard 1600000

orion and stellar are names of machines on which you may be running the software. They have 0.5 GB and 1 GB of RAM, respectively.

Page 26: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Maxwell ScratchDir

Maxwell orion:ScratchDir disk/i/got/by/bribing/sys/adminMaxwell stellar:ScratchDir /home/projectsMaxwell ScratchDir /my/small/disk

orion and stellar are names of machines on which you may be running the software. The directories point to file systems somewhere on the network. This allows you to direct the scratch files to a large disk, and make this action dependent on which machine you’re running on.

Page 27: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

Preferences file

UNIX: File .maxwellrc in your home directory defines location of aCONFIGDIR. That directory contains a file .prefs .

Windows: File maxwell.ini may define location of a CONFIGDIR.Default is <directory_where_executables_are>\configThat directory contains a file prefs.ini .

UNIX and Windows: Prefs files contain lines like the ones just described concerning

scratchdir and direct_solver memory settings.Prefs files do not contain environment variables.A prefs file in a project directory has local priority.

Page 28: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

More User Preferences

DIRECT_SOLVER NofProcessors 2Tells solver that you have two processors (PC only).

Hfss_Solver FSResidualError 1Creates file fs_resid.dat which contains error function after Fast Frequency Sweep. Can be plotted.

Page 29: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

专注于微波、射频、天线设计人才的培养 易迪拓培训 网址:http://www.edatop.com

H F S S 视 频 培 训 课 程 推 荐

HFSS 软件是当前最流行的微波无源器件和天线设计软件,易迪拓培训(www.edatop.com)是国内

最专业的微波、射频和天线设计培训机构。

为帮助工程师能够更好、更快地学习掌握 HFSS 的设计应用,易迪拓培训特邀李明洋老师主讲了

多套 HFSS 视频培训课程。李明洋老师具有丰富的工程设计经验,曾编著出版了《HFSS 电磁仿真设计

应用详解》、《HFSS 天线设计》等多本 HFSS 专业图书。视频课程,专家讲解,直观易学,是您学习

HFSS 的最佳选择。

HFSS 学习培训课程套装

该套课程套装包含了本站全部 HFSS 培训课程,是迄今国内最全面、最

专业的HFSS培训教程套装,可以帮助您从零开始,全面深入学习HFSS

的各项功能和在多个方面的工程应用。购买套装,更可超值赠送 3 个月

免费学习答疑,随时解答您学习过程中遇到的棘手问题,让您的 HFSS

学习更加轻松顺畅…

课程网址:http://www.edatop.com/peixun/hfss/11.html

HFSS 天线设计培训课程套装

套装包含 6 门视频课程和 1 本图书,课程从基础讲起,内容由浅入深,

理论介绍和实际操作讲解相结合,全面系统的讲解了 HFSS 天线设计

的全过程。是国内最全面、最专业的 HFSS 天线设计课程,可以帮助

您快速学习掌握如何使用 HFSS 设计天线,让天线设计不再难…

课程网址:http://www.edatop.com/peixun/hfss/122.html

更多 HFSS 视频培训课程:

两周学会 HFSS —— 中文视频培训课程

课程从零讲起,通过两周的课程学习,可以帮助您快速入门、自学掌握 HFSS,是 HFSS 初学者

的最好课程,网址:http://www.edatop.com/peixun/hfss/1.html

HFSS 微波器件仿真设计实例 —— 中文视频教程

HFSS 进阶培训课程,通过十个 HFSS 仿真设计实例,带您更深入学习 HFSS 的实际应用,掌握

HFSS 高级设置和应用技巧,网址:http://www.edatop.com/peixun/hfss/3.html

HFSS 天线设计入门 —— 中文视频教程

HFSS 是天线设计的王者,该教程全面解析了天线的基础知识、HFSS 天线设计流程和详细操作设

置,让 HFSS 天线设计不再难,网址:http://www.edatop.com/peixun/hfss/4.html

更多 HFSS 培训课程,敬请浏览:http://www.edatop.com/peixun/hfss

Page 30: Advanced Training Ansoft HFSS Environment …dl.edatop.com/mte/ansoft/edatop.com_Advanced Training Ansoft HFSS...Advanced Training Ansoft HFSS Environment Variables and Preferences

`

专注于微波、射频、天线设计人才的培养 易迪拓培训 网址:http://www.edatop.com

关于易迪拓培训:

易迪拓培训(www.edatop.com)由数名来自于研发第一线的资深工程师发起成立,一直致力和专注

于微波、射频、天线设计研发人才的培养;后于 2006 年整合合并微波 EDA 网(www.mweda.com),

现已发展成为国内最大的微波射频和天线设计人才培养基地,成功推出多套微波射频以及天线设计相

关培训课程和 ADS、HFSS 等专业软件使用培训课程,广受客户好评;并先后与人民邮电出版社、电

子工业出版社合作出版了多本专业图书,帮助数万名工程师提升了专业技术能力。客户遍布中兴通讯、

研通高频、埃威航电、国人通信等多家国内知名公司,以及台湾工业技术研究院、永业科技、全一电

子等多家台湾地区企业。

我们的课程优势:

※ 成立于 2004 年,10 多年丰富的行业经验

※ 一直专注于微波射频和天线设计工程师的培养,更了解该行业对人才的要求

※ 视频课程、既能达到现场培训的效果,又能免除您舟车劳顿的辛苦,学习工作两不误

※ 经验丰富的一线资深工程师讲授,结合实际工程案例,直观、实用、易学

联系我们:

※ 易迪拓培训官网:http://www.edatop.com

※ 微波 EDA 网:http://www.mweda.com

※ 官方淘宝店:http://shop36920890.taobao.com

专注于微波、射频、天线设计人才的培养

官方网址:http://www.edatop.com 易迪拓培训 淘宝网店:http://shop36920890.taobao.com