René's URL Explorer Experiment


Title: Odd errors in helix geometry · Issue #27 · tmolteno/python-necpp · GitHub

Open Graph Title: Odd errors in helix geometry · Issue #27 · tmolteno/python-necpp

X Title: Odd errors in helix geometry · Issue #27 · tmolteno/python-necpp

Description: Long story short, I'm trying to build a helical antenna based on physical parameters. What I mean by this is that the user should be able to specify a desired frequency [MHz] which is then converted to wavelength [m] and used to build th...

Open Graph Description: Long story short, I'm trying to build a helical antenna based on physical parameters. What I mean by this is that the user should be able to specify a desired frequency [MHz] which is then converte...

X Description: Long story short, I'm trying to build a helical antenna based on physical parameters. What I mean by this is that the user should be able to specify a desired frequency [MHz] which is then conv...

Opengraph URL: https://github.com/tmolteno/python-necpp/issues/27

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Odd errors in helix geometry","articleBody":"Long story short, I'm trying to build a helical antenna based on physical parameters. What I mean by this is that the user should be able to specify a desired frequency [MHz] which is then converted to wavelength [m] and used to build the antenna. For instance, the relationship between [the distance between each turn of the helix and wavelength](https://ham.stackexchange.com/questions/10127/what-is-the-turn-spacing-on-a-helix-antenna#:~:text=Add%20a%20comment-,1%20Answer,-Sorted%20by%3A).\r\n\r\nI wrote a function to specify this in more user-friendly terms:\r\n\r\n```\r\ndef create_helix(s=1, hl=3, a1=1.0, b1=1.0, a2=1.0, b2=1.0, rad=0.001, tagid=0,\r\n              segcnt=36):\r\n    '''\r\n    Generates a helix or spiral of wire segments.\r\n\r\n            Parameters:\r\n                    s: Spacing between helix turns\r\n                    hl: Total length of the helix\r\n                    a1: Helical radius (X) at z = 0 \r\n                    b1: Helical radius (Y) at z = 0\r\n                    a2: Helical radius (X) at z = hl\r\n                    b2: Helical radius (Y) at z = hl\r\n                    rad: Radius of the wire\r\n                    seg_cnt: Number of segments comprising the helix\r\n                    tag_id: Tag number assigned to all segments of the helix\r\n            Returns:\r\n                    object: \u003cPyNEC geometry object\u003e\r\n                    \r\n    NOTES:\r\n        * The segments generated by GA form a section of polygons inscribed within\r\n    the arc\r\n    \r\n    - If an arc in a different position or orientation is desired, the segements\r\n    may be moved within a GM card.\r\n \r\n    * Use of GA to form a circle will not result in symmetry  being used in the\r\n    calculation. It is a good way to form the beginning of the circle, to be\r\n    completed by GR, however.\r\n    '''\r\n    return context, geo.helix(s, hl, a1, b1, a2, b2, rad, tagid, segcnt)\r\n```\r\n\r\nOf course, this calls the `helix` function from PyNEC:\r\n\r\n```\r\n def helix(self, s, hl, a1, b1, a2, b2, rad, segment_count, tag_id):\r\n        return _PyNEC.c_geometry_helix(self, s, hl, a1, b1, a2, b2, rad, segment_count, tag_id)\r\n```\r\n\r\nAs a base use case, ```create_helix(s=1, hl=3, a1=1.0, b1=1.0, a2=1.0, b2=1.0, rad=0.001, tagid=0, segcnt=36)``` works fine. \r\n\r\n\r\n\r\n____**ISSUE 1**____\r\nIf I use a desired frequency of 400 MHz, this is equivalent to a wavelength of 0.749 meters and results in a vertical separation between turns for the helical antenna (S = 0.225*wavelength) of 0.225 * 0.749 = 0.1685. Plugging `S = 0.1685` into the previous use case:\r\n\r\ncreate_helix(s=0.1685, hl=3, a1=1.0, b1=1.0, a2=1.0, b2=1.0, rad=0.001, tagid=0, segcnt=36)\r\n\r\nresults in an error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/apung/Documents/Repositories/antenna-modeling/src/radPattern_3d.py\", line 139, in \u003cmodule\u003e\r\n    geometry_module.define_excitation()\r\n  File \"/Users/apung/Documents/Repositories/antenna-modeling/src/geometry_module.py\", line 463, in define_excitation\r\n    return context.ex_card(extype, tagTheta, rnkPhi, pntRa, chkimp, vltTheta,\r\n  File \"/Users/apung/anaconda3/lib/python3.10/site-packages/PyNEC.py\", line 151, in ex_card\r\n    return _PyNEC.nec_context_ex_card(self, *args)\r\nRuntimeError: NO SEGMENT HAS AN ITAG OF 1\r\n```\r\nIn fact, I get the same error for a value of `S = 0.99`, but the simulation run fine with `S = 1.0`.\r\n\r\nWhat's causing this? I read through the NEC documentation and the PyNEC documentation, but nothing seems to explain the units well.\r\n\r\nAdditionally, is there a way I can extract the (X,Y,Z) points of the 36 components that comprise the helix within the `context` geometry?\r\n\r\n\r\n\r\n____**ISSUE 2**____\r\nFor a moment, let's accept that `S` simply needs to be greater than 1 to get a working helix. The documentation also states that the helix can be made into a spiral by setting the height (`hl`) equal to zero. However, this also seems to be broken, because\r\n\r\n`geometry_module.create_helix(s=1.5, hl=0, a1=a1, b1=b1, a2=a2, b2=b2, rad=0.001, tagid=0, segcnt=36)`\r\n\r\nresults in the following error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/apung/Documents/Repositories/antenna-modeling/src/radPattern_3d.py\", line 134, in \u003cmodule\u003e\r\n    context.geometry_complete(0)\r\n  File \"/Users/apung/anaconda3/lib/python3.10/site-packages/PyNEC.py\", line 148, in geometry_complete\r\n    return _PyNEC.nec_context_geometry_complete(self, *args)\r\nRuntimeError: Geometry has no wires or patches.\r\n```\r\n\r\nI would really appreciate any work-arounds and explanations on either of these issues, because I'm at a loss and I cannot seem to find anything in the documentation .","author":{"url":"https://github.com/aeropung","@type":"Person","name":"aeropung"},"datePublished":"2023-06-21T18:58:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/27/python-necpp/issues/27"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7c9d8e96-c506-84a1-2c13-b81cc7a734e4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA53C:63765:45E8A84:5F1C12E:69709AE6
html-safe-noncecc5483bd46dd72ae49fd989e6f4cbc01a183d0f644f25dd16b23344c6ad31e52
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTNDOjYzNzY1OjQ1RThBODQ6NUYxQzEyRTo2OTcwOUFFNiIsInZpc2l0b3JfaWQiOiI0NzI0NDU1MzI0NTA2MjYyNzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9e8b043542a5a59862c0a0cb8e081859345b57d1b8fdf7759713078d31ca88fb
hovercard-subject-tagissue:1768227031
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/tmolteno/python-necpp/27/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a5cf1ff547ed7b2a10c1da79c582132897a2f5a63e89341a999e55e074a00038/tmolteno/python-necpp/issues/27
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a5cf1ff547ed7b2a10c1da79c582132897a2f5a63e89341a999e55e074a00038/tmolteno/python-necpp/issues/27
og:image:altLong story short, I'm trying to build a helical antenna based on physical parameters. What I mean by this is that the user should be able to specify a desired frequency [MHz] which is then converte...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameaeropung
hostnamegithub.com
expected-hostnamegithub.com
None9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2
turbo-cache-controlno-preview
go-importgithub.com/tmolteno/python-necpp git https://github.com/tmolteno/python-necpp.git
octolytics-dimension-user_id85630
octolytics-dimension-user_logintmolteno
octolytics-dimension-repository_id33094484
octolytics-dimension-repository_nwotmolteno/python-necpp
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id33094484
octolytics-dimension-repository_network_root_nwotmolteno/python-necpp
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7d6181066430cc06553c8396ca201e194ae33cb9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/tmolteno/python-necpp/issues/27#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftmolteno%2Fpython-necpp%2Fissues%2F27
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftmolteno%2Fpython-necpp%2Fissues%2F27
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=tmolteno%2Fpython-necpp
Reloadhttps://patch-diff.githubusercontent.com/tmolteno/python-necpp/issues/27
Reloadhttps://patch-diff.githubusercontent.com/tmolteno/python-necpp/issues/27
Reloadhttps://patch-diff.githubusercontent.com/tmolteno/python-necpp/issues/27
tmolteno https://patch-diff.githubusercontent.com/tmolteno
python-necpphttps://patch-diff.githubusercontent.com/tmolteno/python-necpp
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Ftmolteno%2Fpython-necpp
Fork 28 https://patch-diff.githubusercontent.com/login?return_to=%2Ftmolteno%2Fpython-necpp
Star 78 https://patch-diff.githubusercontent.com/login?return_to=%2Ftmolteno%2Fpython-necpp
Code https://patch-diff.githubusercontent.com/tmolteno/python-necpp
Issues 16 https://patch-diff.githubusercontent.com/tmolteno/python-necpp/issues
Pull requests 0 https://patch-diff.githubusercontent.com/tmolteno/python-necpp/pulls
Actions https://patch-diff.githubusercontent.com/tmolteno/python-necpp/actions
Projects 0 https://patch-diff.githubusercontent.com/tmolteno/python-necpp/projects
Wiki https://patch-diff.githubusercontent.com/tmolteno/python-necpp/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/tmolteno/python-necpp/security
Please reload this pagehttps://patch-diff.githubusercontent.com/tmolteno/python-necpp/issues/27
Insights https://patch-diff.githubusercontent.com/tmolteno/python-necpp/pulse
Code https://patch-diff.githubusercontent.com/tmolteno/python-necpp
Issues https://patch-diff.githubusercontent.com/tmolteno/python-necpp/issues
Pull requests https://patch-diff.githubusercontent.com/tmolteno/python-necpp/pulls
Actions https://patch-diff.githubusercontent.com/tmolteno/python-necpp/actions
Projects https://patch-diff.githubusercontent.com/tmolteno/python-necpp/projects
Wiki https://patch-diff.githubusercontent.com/tmolteno/python-necpp/wiki
Security https://patch-diff.githubusercontent.com/tmolteno/python-necpp/security
Insights https://patch-diff.githubusercontent.com/tmolteno/python-necpp/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/tmolteno/python-necpp/issues/27
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/tmolteno/python-necpp/issues/27
Odd errors in helix geometryhttps://patch-diff.githubusercontent.com/tmolteno/python-necpp/issues/27#top
https://github.com/aeropung
https://github.com/aeropung
aeropunghttps://github.com/aeropung
on Jun 21, 2023https://github.com/tmolteno/python-necpp/issues/27#issue-1768227031
the distance between each turn of the helix and wavelengthhttps://ham.stackexchange.com/questions/10127/what-is-the-turn-spacing-on-a-helix-antenna#:~:text=Add%20a%20comment-,1%20Answer,-Sorted%20by%3A
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.