Presentation is loading. Please wait.

Presentation is loading. Please wait.

Curve Fitting using the Optimization Module in COMSOL

Similar presentations


Presentation on theme: "Curve Fitting using the Optimization Module in COMSOL"— Presentation transcript:

1 Curve Fitting using the Optimization Module in COMSOL

2 It is often desirable to fit a material model curve to a set of experimental data
For example: The hyperelastic Mooney-Rivlin material model implemented in COMSOL requires, as input, C01 and C10, which must be determined from experimental data Strain, ε Stress, P 0.075 4.90E+05 0.103 8.67E+05 0.15 1.36E+06 0.174 1.55E+06 0.2004 1.71E+06 0.25 1.95E+06 0.305 2.10E+06 0.351 2.17E+06 0.37 2.21E+06

3 Start with the Model Wizard
Select Space Dimension as 1D Click Next

4 Add Physics Select Mathematics > Optimization and Sensitivity > Optimization (opt) and click on the Next icon Next icon

5 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 COMSOL 1D Graphical User Interface

7 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 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 Define an integration coupling operator on Domain 1 (the specified interval)
Model 1 > Definitions > Model Couplings > Integration

10 Create these variables
Name Expression L 1+x[1/m] P 2*(L-1/L^2)*(C10+C01/L) SquaredDiff intop1((RawData(x[1/m])-P)^2) 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. The tabular data “RawData” is a function of position, x The subdomain expression “P” is an explicit function of x

11 Create these variables
Model 1 > Definitions > Variables

12 Set the Objective Function
Model 1 > Optimization (opt) > Global Objective

13 Specify the variables to be optimized
Model 1 > Optimization (opt) > Global Control Variables

14 Mesh Model 1 > Mesh 1 > Edge
Select Mesh 1 > Size and choose Extremely Fine

15 Study steps Right-click on Study 1 and select Show Default Solver
Expand the Solver Configurations branch as shown below

16 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 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 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 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 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 Results – Raw Data vs. Fit

22 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 "Curve Fitting using the Optimization Module in COMSOL"

Similar presentations


Ads by Google