Giter VIP home page Giter VIP logo

pyhfss's Introduction

pyHFSS

HFSS scripting interface in python

Create a Design

from hfss import get_active_project
proj = get_active_project()
design = proj.insert_dm_design("Test")

Or Get an Existing Design

from hfss import get_active_design
design = get_active_design()

Creating Variables

bx = design.set_variable("Box_X", "3mm")
by = design.set_variable("Box_Y", "6mm")
bz = design.set_variable("Box_Z", "1mm")

3D Modeler

modeler = design.modeler
modeler.draw_box_center([0,0,0], [bx, by, bz], material="silicon")

Setup Analysis

setup = design.create_dm_setup(freq_ghz=5)
sweep = setup.insert_sweep(4, 10, count=1000)
setup.analyze()
freqs, (S12, Y11) = sweep.get_network_data("S12,Y11")

Fields Calculator

fields = setup.get_fields()
Mag_E_Sq = fields.Mag_E ** 2
Surface_E = Mag_E_Sq.integrate_surf("Object Name")
print Surface_E.evaluate()

Keyword Arguments for Drawing Commands

  • name: str
  • nonmodel: bool
  • color: (int, int, int) each in [0...255]
  • transparency: float in [0, 1]
  • material: str (matching existing material name)

HFSS refuses to close

If your script terminates improperly, this can happen. pyHFSS tries to catch termination events and handle them. Your safety should be guaranteed however, if you call hfss.release() when you have finished

pyhfss's People

Contributors

philreinhold avatar kschou avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.