How to edit user function

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi,

 

When trying to create new geometric or I/O parameter using formula, there is the option of 'User function'. How do I create and use my own function 'func' such that I can use it like I use the function 'Sin'? (I tried 'Edit user function' but don't know what to do next...)

 

For example, I want to use such a function (just as an example, function can be something else and much more complicated):

 

func(para1, para2, para3)

    return(para1**(para3-para2))

 

Hope I made my question clear.

 

Kind regards,

 

Chen

image.png.27adb51910f20d7e3a565c1277857dfd.png

 

 

Tagged:

Answers

  • asoualmi
    asoualmi
    Altair Employee
    edited July 2018

    Hi,

    About your formula, in this case you don’t need to use the « user function ». You can create your parameter using the equation editor of Flux.

    About the function “User” in Flux, you can use it when you have some kind of algorithm or program. For example:

    If X>0

     Y=X^2-1

    Else

    Y=0

     

    Hope this will help.

    Best regards.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    Hi,

    About your formula, in this case you don’t need to use the « user function ». You can create your parameter using the equation editor of Flux.

    About the function “User” in Flux, you can use it when you have some kind of algorithm or program. For example:

    If X>0

     Y=X^2-1

    Else

    Y=0

     

    Hope this will help.

    Best regards.

    Thank you this it exactly what I wanted to do! So how can I realize this by 'User' in Flux?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    Hello qchen,

     

    I also want to create a function like this. Do you already know how to do this?

     

    Thank you in advance. 

     

    Best regards.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    Hello qchen,

     

    I also want to create a function like this. Do you already know how to do this?

     

    Thank you in advance. 

     

    Best regards.

    Not yet. The flux support pointed out what I exactly want to do but didn't give further details on how to realize it.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    Hi,

    About your formula, in this case you don’t need to use the « user function ». You can create your parameter using the equation editor of Flux.

    About the function “User” in Flux, you can use it when you have some kind of algorithm or program. For example:

    If X>0

     Y=X^2-1

    Else

    Y=0

     

    Hope this will help.

    Best regards.

    Hi could you please show how to do this in Flux? Thank you.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    Hello qchen, 

     

    if you didn't knew it, there is an email flux_support_emea@altair.com where you can ask your quesions also. Normally they respond quickly.

    About the User function I'm going to ask them. I will send you the answer here.

     

    Best regards.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2020

    Hello,

     

    Here is an example of a groovy function. 

     

    FYI, only customers under maintenance have access to the support. In this case Qchen seems to belong to a Chinese university so the correct mail to use for him should be flux_support_apac@altair.com.

     

    Best regards

    Unable to find an attachment - read this blog