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.
Consistently optimizing to wrong value
Posted Jul 6, 2015, 3:59 p.m. EDT Version 5.1 1 Reply
Please login with a confirmed email address before reporting spam
TL;DR: 'self-benchmark' for optimization module is giving a wrong final answer, even though the benchmark was generated with the exact same model.
Hello, and thank you in advance!
I'm trying to use Comsol optimization to find a diffusion coefficient, so I made a simple self-benchmark case to make sure I'm using the software correctly. I defined a simple 2d geometry and used the coefficient form PDE solver to generate a 'baseline' where I diffuse a species for 1 day with an interdiffusion coefficient of 1e-13. I export this to excel, save it as a CSV, and then use it as an objective for a least squares function optimization over an area.
I'll review the settings below, but essentially optimization gives a diffusion coefficient of 1.7e-13, not 1e-13 (or if the baseline is changed, 2.7e-13 instead of 2e-13). It seems very consistent; I can't get the solution to change with different solvers, settings, meshes or geometries. Since the baseline was generated by the exact same model, I see no reason why it should not get within 0.1% or so of the real solution.
Assume defaults unless specified
-1 parameter, Dcoeff, 1e-13 baseline value. This is the only optimization variable.
-Tried starting values of 1e-12, 1e-14 and scales of 1e-13 and 1e-14. Upper limit 1e-8, lower 1e-17. All eventually converge on 1.7e-13
-Nedler-Mead and BOBYQA tried, both converge on 1.7e-13
-Remeshing changes things a little - all previous are on 'fine' quads, switching to 'fine' triangles gives 2.74e-13 instead of 2e-13.
-Turning up the optimality tolerance had no effect
-Objective function is only evaluated at t=86400 s (1 day)
-Geometry is 3 rectangles; two 200x200 um on top and a 400x200 one on bottom, to make a big square. Top left has starting concentration value of 0.5; others start at 0. Zero flux on outer boundaries.
Let me know if any other details or an upload of the model would explain further, thank you!!!
Hello, and thank you in advance!
I'm trying to use Comsol optimization to find a diffusion coefficient, so I made a simple self-benchmark case to make sure I'm using the software correctly. I defined a simple 2d geometry and used the coefficient form PDE solver to generate a 'baseline' where I diffuse a species for 1 day with an interdiffusion coefficient of 1e-13. I export this to excel, save it as a CSV, and then use it as an objective for a least squares function optimization over an area.
I'll review the settings below, but essentially optimization gives a diffusion coefficient of 1.7e-13, not 1e-13 (or if the baseline is changed, 2.7e-13 instead of 2e-13). It seems very consistent; I can't get the solution to change with different solvers, settings, meshes or geometries. Since the baseline was generated by the exact same model, I see no reason why it should not get within 0.1% or so of the real solution.
Assume defaults unless specified
-1 parameter, Dcoeff, 1e-13 baseline value. This is the only optimization variable.
-Tried starting values of 1e-12, 1e-14 and scales of 1e-13 and 1e-14. Upper limit 1e-8, lower 1e-17. All eventually converge on 1.7e-13
-Nedler-Mead and BOBYQA tried, both converge on 1.7e-13
-Remeshing changes things a little - all previous are on 'fine' quads, switching to 'fine' triangles gives 2.74e-13 instead of 2e-13.
-Turning up the optimality tolerance had no effect
-Objective function is only evaluated at t=86400 s (1 day)
-Geometry is 3 rectangles; two 200x200 um on top and a 400x200 one on bottom, to make a big square. Top left has starting concentration value of 0.5; others start at 0. Zero flux on outer boundaries.
Let me know if any other details or an upload of the model would explain further, thank you!!!
1 Reply Last Post Jul 27, 2015, 8:28 p.m. EDT