


{"id":363896,"date":"2024-04-24T08:40:38","date_gmt":"2024-04-24T08:40:38","guid":{"rendered":"\/forum\/forums\/topic\/setting-refractive-index-for-an-anisotropic-material-does-not-work\/"},"modified":"2024-04-24T17:25:10","modified_gmt":"2024-04-24T17:25:10","slug":"setting-refractive-index-for-an-anisotropic-material-does-not-work","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/setting-refractive-index-for-an-anisotropic-material-does-not-work\/","title":{"rendered":"Setting refractive index for an anisotropic material does not work"},"content":{"rendered":"<p>When I want to set an anistropic (n,k) material the new material does not take the refractive index values, but has only the values of 1, 1, 1. Also, I get the error &#8220;The material property, Refractive Index was not set. The property value must be a string or a matrix.&#8221;<\/p>\n<p>I use the following python script to set the material:<\/p>\n<div>\n<div style=\"padding-left: 40px\">n_GaN = [2.4869, 2.3, 2.4869]<\/div>\n<div style=\"padding-left: 40px\">material = &#8220;GaN&#8221;<\/div>\n<div style=\"padding-left: 40px\">mode.setmaterial(mode.addmaterial(&#8220;(n,k) Material&#8221;), &#8220;name&#8221;, material)<\/div>\n<div>\n<div>\n<div style=\"padding-left: 40px\">mode.setmaterial(material, &#8220;Anisotropy&#8221;, 1)<\/div>\n<div style=\"padding-left: 40px\">mode.setmaterial(material, {&#8220;Refractive Index&#8221;: n_GaN, &#8220;Imaginary Refractive Index&#8221;: [0, 0, 0]})<\/div>\n<div>&nbsp;<\/div>\n<div>Here, &#8220;mode&#8221; is defined as:&nbsp;<\/p>\n<div>\n<div style=\"padding-left: 40px\">mode = lumapi.MODE()<\/div>\n<div style=\"padding-left: 40px\">&nbsp;<\/div>\n<div>Do I have to define the values in anbother way?<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"template":"","class_list":["post-363896","topic","type-topic","status-closed","hentry","topic-tag-anisotropy-2"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["143292","30281"],"_bbp_author_ip":["23.52.43.16"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["314"],"_bbp_topic_status":["answered"],"_bbp_topic_id":["363896"],"_bbp_forum_id":["27833"],"_bbp_engagement":["30281","143292"],"_bbp_voice_count":["2"],"_bbp_last_reply_id":["364090"],"_bbp_last_active_id":["364090"],"_bbp_last_active_time":["2024-04-25 05:57:41"]},"test":"m-hoormanntu-braunschweig-de"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/363896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/363896\/revisions"}],"predecessor-version":[{"id":364029,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/363896\/revisions\/364029"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=363896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}