Assign perfect E to an object in pyaedt

Options
Otty80
Otty80 Member Posts: 7
First Comment

Hi, i drew this stepped cone. After unites all parts how to assign a Perfect E Boundary condition to the cn1 object?

hfss.modeler.create_cone(cs_axis='Z', position=["-l", 0,"-ty/2+h2+h3+h4+h5"], bottom_radius="r1", top_radius=0, height="h1", name="cn1", matname="pec")

hfss.modeler.create_cone(cs_axis='Z', position=["-l", 0,"-ty/2+h3+h4+h5"], bottom_radius="r2+s2", top_radius="r2", height="h2", name="cn2", matname="pec")

hfss.modeler.create_cone(cs_axis='Z', position=["-l",0,"-ty/2+h4+h5"], bottom_radius="r3+s4", top_radius="r3", height="h3", name="cn3", matname="pec")

hfss.modeler.create_cone(cs_axis='Z', position=["-l",0 ,"-ty/2+h5"], bottom_radius="r4+s6", top_radius="r4", height="h4", name="cn4", matname="pec")

hfss.modeler.create_cone(cs_axis='Z', position=["-l",0,"-ty/2"], bottom_radius="r5+s8", top_radius="r5", height="h5", name="cn5", matname="pec")

hfss.modeler.unite(["cn1","cn2","cn3","cn4","cn5"])

Tagged:

Comments

  • Samuel Lopez
    Samuel Lopez Member, Employee Posts: 21
    First Anniversary Ansys Employee 5 Likes First Answer
    Options

    @Otty80


    You could use this method to assign Perfect E to an object.

    bound = app.assign_perfecte_to_sheets("Perfect E",  "cn1")
    

    The name could be confusing, but this method internally checks if the name passed is an Object or a sheet.

    Please let us know if it works and mark the solution as answered.