"Design of Experiments" in Flux

rorythornton
rorythornton Altair Community Member
edited October 2020 in Community Q&A

Hello,

 

I have modelled the following arrangement of permanent magnets in Flux:

 

<?xml version="1.0" encoding="UTF-8"?>image.thumb.png.8fbfb02c6d1ba5e2f5591c2aa0353a47.png

 

  • The four smaller disc magnets (with white lines) are stationary
  • The two larger ones (with black lines) rotate together about the centreline shown
  • From this simulation, I have plotted a torque deflection curve for the different position of the rotating magnets
  • A fitting curve is then applied to this and the equation of that line gives me the stiffness coefficients produced from the magnetic interaction

 

I am looking to optimise the design of this to give me specific stiffness characteristics. I have read about something called 'Design of Experiments' that allows you to input a range of values for multiple variables into a model, define the output variable that you want and then run a simulation that finds the permutation of inputs that yield the required output (or the closest achievable).

 

My question is: Does Altair Flux have any Design of Experiments tools in it that can allow me to do this?

 

The input variables for my model are:

  • Disc magnets size
  • Disc magnets material
  • Radius of magnets rotation from centreline
  • Max angle that the rotating magnets can deflect 

 

My required output is:

  • A Torque deflection curve with a 3rd order line of best fit that has the largest x^3 coefficient while having lowest x coefficient
  • Aka, a torque deflection curve that is as close to a y=x^3 graph as possible
  • image.png.ec5429f1a6ba92d7d2118b92a5079b94.png

 

Any advice on this would be greatly appreciated, even if it's just ways to run a single simulation with as many different input variables as possible to reduce the total number of simulation I need to do to optimise the design.

 

Many Thanks


Rory

Tagged:

Answers

  • asoualmi
    asoualmi
    Altair Employee
    edited April 2020

    Hi,

    In Flux there is no dedicated tool to make design of experiments.   But you can use HyperStudy to do it. There is a connection between Flux (generate coupling component in Flux) and HyperStudy. There is an example in Flux 2D supervisor example (multiphysics >> contactor geometry optimization using HyperStudy) explain different steps you need to follow to create this coupling.

     

    Best regards.

  • rorythornton
    rorythornton Altair Community Member
    edited April 2020

    Hi,

     

    Thank you for this, very helpful.

     

    I  have set up a model of my magnets using a Geometric parameter for each of the inputs I described above to drive all the dimensions in the model so they can be adjusted during the DoE.

     

    However, when I adjust the variable that controls the distance from the centreline the magnets rotate from (Indicated with red arrow in diagram below), from 30 (current value) to 60 for example, Altair Flux freezes and I have to reopen the simulation:

     

    image.png.06849dba1c4d09f4194a509a96d076bc.png

     

    This variable (Called RD in the project) is linked to all the sketches used to create the magnets and compressible region. I have played around with all the other variables and they work fine, it's just this one that causes a problem.

     

    I have attached the project folder. I would really appreciate it if you could have a look at it to see what the cause of the problem is, as I am unable continue until I have resolved this.

     

    Thank you in Advance

     

    Rory

    Unable to find an attachment - read this blog

  • asoualmi
    asoualmi
    Altair Employee
    edited April 2020

    Hi,

    I reached to reproduce the same behavior as you. On the other hand, I tried another value of the parameter (RD=31) Flux display an error message:

     

    This modification is not allowed because distances between

    the centre and the two extremities are not identical.

    Failed to modify an instance.

    Can not execute the following command :

    startMacroTransaction()

    ParameterGeom['RD'].expression='32'

     

    endMacroTransaction()

     

     

    Can you check how the arcs of the cylinders are constructed according to the parameter RD?

     

    Best regards

  • rorythornton
    rorythornton Altair Community Member
    edited April 2020

    Hi,

     

    I have just checked these. I had used the parameters to define 2/3 points required for each circle. I have changed it so that all 3 were defined using the geometric parameters and now the model works properly. Thank you for spotting this!

     

    Kindest regards

     

    Rory

  • asoualmi
    asoualmi
    Altair Employee
    edited April 2020

    you are welcome

  • rorythornton
    rorythornton Altair Community Member
    edited April 2020

    *Post Deleted*

  • rorythornton
    rorythornton Altair Community Member
    edited April 2020

    Hello

     

    I have generated the GOT-It coupling file and I have used it to define the model. But when I click on 'import variables' (step 3 from 'HyperStudy Project' table in tutorial), I get the following error

     

    image.png.d17f94930b7c35e70fce30ce93cd4181.png

     

    I have tried putting the coupling file and creating the study in different locations on my computer, but I keep getting the same error

     

    Do you know how I can fix this?

     

    Many Thanks

     

    Rory

  • asoualmi
    asoualmi
    Altair Employee
    edited April 2020

    Hi,

    Can you check the path that use in the solver script. To do it:

    • Open HyperStudy

    • In the top left >> select edit

    • Select register solver script

    • See if there is a Flux solver

    • If there is no Flux solver, you need to add

    • Select add solver script (see attached document)

     

    Best regards.

    Unable to find an attachment - read this blog

  • rorythornton
    rorythornton Altair Community Member
    edited April 2020

    Thank you Abdessamed,

     

    I am trying to evaluate a nominal run, but I am now getting these errors:

     

    image.png.5816a80347da01a5b0ad30e7d15b3b91.png

    image.png.75dd60cbffe8414ee4b55a5ddbfb8bb3.png

     

    I believe this is because I am using a sensor (Called Torque) as my coupling file output, as opposed to an I/O parameter that the tutorial tells me to do.

     

    However, I did this because I am not sure how to turn the Torque sensor output into an I/O parameter. When I try to do it, it wont work unless I do something with the table highlighted below...

     

    image.png.78ea48bc22da13239172e6079326bd3f.png

     

    I don't know how I am suppose to fill out this table if I want all the values of the torque/deflection curve to be used The tutorial example only creates this to save only the y component of the sensor, but I what the whole output to be used.

     

    Is the error im getting above to do with what I am defining as my simulation output? If so, how do I fill out this I/O parameter table?

     

    Many Thanks

     

    Rory

  • asoualmi
    asoualmi
    Altair Employee
    edited April 2020

    Hi,

    To get the mean (max/min) value of the torque, you can draw the curve after solving and use the macro “Analyse2DCurve.PFM” (available in Flux). This curve allows to get the mean, max and min value of the torque as I/O parameter.

    Keep me informed if this solve the problem.

    Best regards.

  • rorythornton
    rorythornton Altair Community Member
    edited April 2020

    Hi Abdessamed,

     

    I don't quite get you mean by this.

     

    I am looking to compare the Torque deflection curve of different versions of the magnet arrangement, created by varying the different inputs (Diameters, positions, angles etc):

    • How do I apply this macro to my solving scenario in fux so that it can be exported to hyperstudy to do DoE on it to get the optimum shape curve?
    • Is it possible to apply a 5th order line of best fit to the curve using this macro?

    Thank you for your continued help with this

     

    Rory