How to create a custom objective function in Optistruct
Hi, I am currently trying to perform topology optimisation to create a morphing wing. Basically I want to morph one airfoil into another. My objective function is to get the distances between the coordinates of the initial and final airfoils, and minimise that distance. So that over each iteration, the distance gets smaller, and the initial airfoil gets closer to the final one. I already have an equation for the objective function, which is something in the form of a polynomial in (x,y) where x and y are coordinates of the airfoil. I want to create a custom objective function in optistruct to do this optimisation. Is there any way to do so? Or are there any existing responses that can be used to model this?
Answers
-
A DRESP2 allows you to reference a DEQATN which can be the equation you mentioned. DRESP2s have one output. See the help pages below for DRESP2 and DEQATN:
https://2023.help.altair.com/2023/hwsolvers/os/topics/solvers/os/dresp2_bulk_r.htm
https://2023.help.altair.com/2023/hwsolvers/os/topics/solvers/os/deqatn_bulk_r.htm
0 -
Yes I have tried this but sadly it’s not exactly what we want. Is there a way to create a custom objective function using C or Python codes and use it in OptiStruct?Ben Buchanan said:A DRESP2 allows you to reference a DEQATN which can be the equation you mentioned. DRESP2s have one output. See the help pages below for DRESP2 and DEQATN:
https://2023.help.altair.com/2023/hwsolvers/os/topics/solvers/os/dresp2_bulk_r.htm
https://2023.help.altair.com/2023/hwsolvers/os/topics/solvers/os/deqatn_bulk_r.htm
0 -
Shalmi Gurunathan said:
Yes I have tried this but sadly it’s not exactly what we want. Is there a way to create a custom objective function using C or Python codes and use it in OptiStruct?
That would be a DRESP3.
https://2023.help.altair.com/2023/hwsolvers/os/topics/solvers/os/dresp3_bulk_r.htm0