# "Design of Experiments" in Flux

## Recommended Posts

Hello,

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

• 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

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

##### Share on other sites

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.

##### Share on other sites

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:

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.

Rory

##### Share on other sites

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

##### Share on other sites

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

you are welcome

*Post Deleted*

##### Share on other sites

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

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

##### Share on other sites

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.

##### Share on other sites

Thank you Abdessamed,

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

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...

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

##### Share on other sites

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.

##### Share on other sites

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

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×

×
×
• Create New...