Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2011 COMSOL Inc. All rights reserved Curve Fitting using the Optimization Module in COMSOL.

Similar presentations


Presentation on theme: "© 2011 COMSOL Inc. All rights reserved Curve Fitting using the Optimization Module in COMSOL."— Presentation transcript:

1 © 2011 COMSOL Inc. All rights reserved Curve Fitting using the Optimization Module in COMSOL

2 © 2011 COMSOL Inc. All rights reserved It is often desirable to fit a material model curve to a set of experimental data www.instron.com Strain, ε Stress, P 00 0.0754.90E+05 0.1038.67E+05 0.151.36E+06 0.1741.55E+06 0.20041.71E+06 0.251.95E+06 0.3052.10E+06 0.3512.17E+06 0.372.21E+06 For example: The hyperelastic Mooney-Rivlin material model implemented in COMSOL requires, as input, C 01 and C 10, which must be determined from experimental data

3 © 2011 COMSOL Inc. All rights reserved Start with the Model Wizard Select Space Dimension as 1D Click Next

4 © 2011 COMSOL Inc. All rights reserved Add Physics Select Mathematics > Optimization and Sensitivity > Optimization (opt) and click on the Next icon Next icon

5 © 2011 COMSOL Inc. All rights reserved Select Study Type Select Stationary Click the Finish flag after selecting the study type The next slide shows how the COMSOL Desktop should look like after clicking the Finish icon

6 © 2011 COMSOL Inc. All rights reserved COMSOL 1D Graphical User Interface

7 © 2011 COMSOL Inc. All rights reserved Define the data set Model 1 > Definitions > Functions > Interpolation We can either type in these values in the table or upload from a text file

8 © 2011 COMSOL Inc. All rights reserved Create a geometric interval Model 1 > Geometry 1 > Interval The coordinates specified for the endpoints should be the numbers corresponding to the first and last values in the left column of the data set. Go back to the previous slide and verify that the first value was 0 and the last value was 0.37.

9 © 2011 COMSOL Inc. All rights reserved Define an integration coupling operator on Domain 1 (the specified interval) Model 1 > Definitions > Model Couplings > Integration

10 © 2011 COMSOL Inc. All rights reserved Create these variables C01 and C10 are not yet defined, these are the variables to be optimized for later. For now, we just need to define the expression, P, across the entire domain. NameExpression L1+x[1/m] P2*(L-1/L^2)*(C10+C01/L) SquaredDiffintop1((RawData(x[1/m])-P)^2) The tabular data RawData is a function of position, x The subdomain expression P is an explicit function of x

11 © 2011 COMSOL Inc. All rights reserved Create these variables Model 1 > Definitions > Variables

12 © 2011 COMSOL Inc. All rights reserved Set the Objective Function Model 1 > Optimization (opt) > Global Objective

13 © 2011 COMSOL Inc. All rights reserved Specify the variables to be optimized Model 1 > Optimization (opt) > Global Control Variables

14 © 2011 COMSOL Inc. All rights reserved Mesh Model 1 > Mesh 1 > Edge Select Mesh 1 > Size and choose Extremely Fine

15 © 2011 COMSOL Inc. All rights reserved Study steps Right-click on Study 1 and select Show Default Solver Expand the Solver Configurations branch as shown below

16 © 2011 COMSOL Inc. All rights reserved Introduce the optimization solver Right-click on Study 1 > Solver Configurations > Solver 1 and select Solver Settings > Optimization Solver Right-click on Study 1 > Solver Configurations > Solver 1 > Stationary Solver 1 and select Disable The study step should now look as shown below

17 © 2011 COMSOL Inc. All rights reserved Setup the optimization solver Right-click on Study 1 > Solver Configurations > Solver 1 > Optimization Solver and select Stationary Right-click on Study 1 and select Compute

18 © 2011 COMSOL Inc. All rights reserved Results – Optimized Variables Expand Results > Derived Values Click on the Global control variable C01 branch and click on the Evaluate icon in the Settings window. Repeat the same steps to evaluate the other global control variable C10

19 © 2011 COMSOL Inc. All rights reserved Results – Line Graph 1 Right-click on Results and select 1D Plot Group Right-click on Results > 1D Plot Group 1 and select Line Graph Assign the line interval (Domain 1) to the Selection section in the Line Graph settings In the corresponding Settings Window, use the expression RawData(x) for y-Axis Data

20 © 2011 COMSOL Inc. All rights reserved Results – Line Graph 2 Right-click on Results > 1D Plot Group 1 > Line Graph 1 and select Duplicate In the Settings Window, type P for y-Axis Data expression

21 © 2011 COMSOL Inc. All rights reserved Results – Raw Data vs. Fit

22 © 2011 COMSOL Inc. All rights reserved Summary This tutorial showed how to use the Optimization Module of COMSOL to obtain curve fitting parameters. The specific example shown here could be useful for Structural Mechanics modeling using hyperelastic materials. The concept demonstrated here can always be extended to multivariate optimization as long as a suitable objective function is available.


Download ppt "© 2011 COMSOL Inc. All rights reserved Curve Fitting using the Optimization Module in COMSOL."

Similar presentations


Ads by Google