Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Optimize deformation

Please login with a confirmed email address before reporting spam

Hi

I have a static simulation where I deform a 3D structure. I would like to use the optimization module to find out how much I need to pull in the edge of the structure so that a certain point inside has a certain displacement.
Simplified lets say I clamp a rubber band in one end, draw a dot somewhere on it and pull in the other end. Then I would like to know how much I should pull so that the point displaces fx 20 mm.

In the long run I want to find out how to displace and rotate one of the boundaries of my structure so that a grid of points gets as close to a reference grid as possible.

My problem is I don't know how to set up the objective function. I can import the reference grid with Cut Point 3D and get the displacement field for all the points, but I dont know how to use it in the optimization.

Br Rasmus

4 Replies Last Post May 26, 2016, 8:53 a.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 9 years ago May 25, 2016, 2:27 p.m. EDT
Hi

for such a simple case you do not need to use the optimization module, you can get around by a simpler way by adding a global equation to your current model:
1) define the force as "my_F" as a boundary condition (ideally, as a point load will make a singularity), then
2) define an average operator "aveop1()" to get the average displacement of your reference measurement boundary (or integrate a single point to get the point displacement). Then
3) add a global equation to define the variable "my_F" and write as equation "(aveop1(u)-Udesired)" Where "Udesired" is a parameter with the desired displacement along U (or adapt to your vector direction)
4) then solve

COMSOL will add a new dependent variable "my_F" to the equation set and solve as a mean-square search for the optimum "my_F" to get "(aveop1(u)-Udesired)=0".
You may even define a Parametric Sweep (or stationary continuation) with the parameter "Udesired" to plot the evolution as Udesired changes

There are a few examples in the Application Library, this is typically how one would apply a moment load to a structure (the equations are somewhat longer to write out but it works beautifully :)

If you have several variables to optimize simultaneously, then the optimization module is of great help

--
Good luck
Ivar
Hi for such a simple case you do not need to use the optimization module, you can get around by a simpler way by adding a global equation to your current model: 1) define the force as "my_F" as a boundary condition (ideally, as a point load will make a singularity), then 2) define an average operator "aveop1()" to get the average displacement of your reference measurement boundary (or integrate a single point to get the point displacement). Then 3) add a global equation to define the variable "my_F" and write as equation "(aveop1(u)-Udesired)" Where "Udesired" is a parameter with the desired displacement along U (or adapt to your vector direction) 4) then solve COMSOL will add a new dependent variable "my_F" to the equation set and solve as a mean-square search for the optimum "my_F" to get "(aveop1(u)-Udesired)=0". You may even define a Parametric Sweep (or stationary continuation) with the parameter "Udesired" to plot the evolution as Udesired changes There are a few examples in the Application Library, this is typically how one would apply a moment load to a structure (the equations are somewhat longer to write out but it works beautifully :) If you have several variables to optimize simultaneously, then the optimization module is of great help -- Good luck Ivar

Walter Frei COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago May 25, 2016, 2:59 p.m. EDT
The example which Ivar is referring to here is:
www.comsol.com/model/loaded-spring-using-global-equations-to-satisfy-constraints-9999
The example which Ivar is referring to here is: https://www.comsol.com/model/loaded-spring-using-global-equations-to-satisfy-constraints-9999

Please login with a confirmed email address before reporting spam

Posted: 9 years ago May 26, 2016, 2:02 a.m. EDT
Hi Ivar

Thanks for the answer. The rubber band example was just to give an example. I really need to use the optimization module because i want to be able to change the rotation and displacement (6 variables) of the boundary and optimize the displacement of a grid of points (~ 30 points) so i dont see how to get around that with your solution.

Br Rasmus
Hi Ivar Thanks for the answer. The rubber band example was just to give an example. I really need to use the optimization module because i want to be able to change the rotation and displacement (6 variables) of the boundary and optimize the displacement of a grid of points (~ 30 points) so i dont see how to get around that with your solution. Br Rasmus

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago May 26, 2016, 8:53 a.m. EDT
Hello Rasmus,
Does your license include the Optimization Module? You can check on that under File > Licensed and Used Products. If it does, you could define as your objective function (to be minimized) the sum of the square of the differences between experimental and simulated displacements.
Best,
Jeff

PS1: Since you have both displacements and rotations, you may need to pick some form of scaling between the two in your objective function, i.e. the C coefficient in Objective_Function=Sum (u_model-u_exp)^2 + C*Sum (theta_model-theta_exp)^2

PS2: If instead of a few discrete point values you had a continuous field of experimental data for your displacements, you would minimize the integral of the square of the difference, i.e. the L^2 norm of the "error".
Hello Rasmus, Does your license include the Optimization Module? You can check on that under File > Licensed and Used Products. If it does, you could define as your objective function (to be minimized) the sum of the square of the differences between experimental and simulated displacements. Best, Jeff PS1: Since you have both displacements and rotations, you may need to pick some form of scaling between the two in your objective function, i.e. the C coefficient in Objective_Function=Sum (u_model-u_exp)^2 + C*Sum (theta_model-theta_exp)^2 PS2: If instead of a few discrete point values you had a continuous field of experimental data for your displacements, you would minimize the integral of the square of the difference, i.e. the L^2 norm of the "error".

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.