How to set the medium and the thickness for one of my faces

CORENTIN Leroy
CORENTIN Leroy Altair Community Member
edited October 2022 in Community Q&A

Hello everybody!

I hope this is the correct place for this topic, otherwise can someone tell me where I can ask?

For my project, I am using Altair FEKO v2018.2 and I decided to automate the process to create my project but I have no clue how can I set the medium of one of my faces.

I tried several ways with the properties Medium and Thickness but all the time this happens :

Error 16628: Error in expression at position 0 for expression: Thickness = 

The problem is when I change the Medium, then I change the thickness (from nil to value) but it doesn't work.

I also know my Feko version is old but I cannot change right now. 

Thanks you by advance for your help!

Tagged:

Best Answer

  • Torben Voigt
    Torben Voigt
    Altair Employee
    edited October 2022 Answer ✓

    Hello Torben,

    I have already learned how to do it manually but here the problem is doing it with the script editor. I have a lua file and I create a lot of geometries, unions and substracts.

    Because I am not working with PEC Medium but with Aluminum, I have to set the properties of my faces (Medium,LocalMeshSize,Thickness...) 

    I can change the Medium of my Regions with this lign for example : 

    overall_enclosure.Regions[1].Medium = dielectric

    But for my faces this is not the same thing because we have to change the thickness also. 

     

    The documentation from 2018 doesn't help me for this part and I tried a lot of things but nothing works.

    Thank you by advance for your further respond.

     

    LEROY Corentin

    Hi @CORENTIN Leroy ,

    Please see this script which I just created using the Macro Recording. It creates a new model, add Aluminium, creates a rectangle and applies Aluminium with 1 mm thickness to it.

    Hope this helps!

    Best regards,
    Torben

Answers

  • Torben Voigt
    Torben Voigt
    Altair Employee
    edited October 2022

    Hi @CORENTIN Leroy ,

    Maybe I misunderstand you, but I would recommend that you use a variable for the thickness of the metallic surfaces, whose value you then simply change.image

    Does this help?

    Best regards,
    Torben

  • CORENTIN Leroy
    CORENTIN Leroy Altair Community Member
    edited October 2022

    Hello Torben,

    I have already learned how to do it manually but here the problem is doing it with the script editor. I have a lua file and I create a lot of geometries, unions and substracts.

    Because I am not working with PEC Medium but with Aluminum, I have to set the properties of my faces (Medium,LocalMeshSize,Thickness...) 

    I can change the Medium of my Regions with this lign for example : 

    overall_enclosure.Regions[1].Medium = dielectric

    But for my faces this is not the same thing because we have to change the thickness also. 

     

    The documentation from 2018 doesn't help me for this part and I tried a lot of things but nothing works.

    Thank you by advance for your further respond.

     

    LEROY Corentin

  • Torben Voigt
    Torben Voigt
    Altair Employee
    edited October 2022 Answer ✓

    Hello Torben,

    I have already learned how to do it manually but here the problem is doing it with the script editor. I have a lua file and I create a lot of geometries, unions and substracts.

    Because I am not working with PEC Medium but with Aluminum, I have to set the properties of my faces (Medium,LocalMeshSize,Thickness...) 

    I can change the Medium of my Regions with this lign for example : 

    overall_enclosure.Regions[1].Medium = dielectric

    But for my faces this is not the same thing because we have to change the thickness also. 

     

    The documentation from 2018 doesn't help me for this part and I tried a lot of things but nothing works.

    Thank you by advance for your further respond.

     

    LEROY Corentin

    Hi @CORENTIN Leroy ,

    Please see this script which I just created using the Macro Recording. It creates a new model, add Aluminium, creates a rectangle and applies Aluminium with 1 mm thickness to it.

    Hope this helps!

    Best regards,
    Torben

  • CORENTIN Leroy
    CORENTIN Leroy Altair Community Member
    edited October 2022

    Yes it is working. I had an issue with how I used my GetProperties and SetProperties. 

    Thanks a lot!