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.
Geometric Optimization (edge length) Problem
Posted Jul 30, 2010, 2:30 p.m. EDT Battery Design, LiveLink for MATLAB 2 Replies
Please login with a confirmed email address before reporting spam
Hi all,
So I am trying to use COMSOL with Matlab to find the optimum geometric parameters for a PEM fuel cell catalyst layer. My model is very simple, consisting of two adjoining rectangles of height H and widths epsilon and (1-epsilon) respectively.
The geometry is defined as follows:
g1=rect2(epsilon,H,'base','corner','pos',{'0','0'},'rot','0');
g1=rect2((1-epsilon),H,'base','corner','pos',{epsilon,'0'},'rot','0');
The design parameters that I wish to optimize are epsilon and H. Using the fmincon function in Matlab I constrain epsilon to be between 0.1 and 0.9, and H to be greater than 0.
When I attempt to run the simulation the solver will go though one or two iterations (changing the system geometry) and then the following error arises:
Exception:
com.femlab.util.FLException: Edge length has to be greater than zero
Messages:
Edge length has to be greater than zero
Error in ==>
g1=react2(....
I have narrowed the problem down to something with the epsilon value, somehow this parameter is becoming either negative or zero.
Has anyone seen an issue like this before or have any ideas on what might be going wrong?
Thanks you,
Jeff
So I am trying to use COMSOL with Matlab to find the optimum geometric parameters for a PEM fuel cell catalyst layer. My model is very simple, consisting of two adjoining rectangles of height H and widths epsilon and (1-epsilon) respectively.
The geometry is defined as follows:
g1=rect2(epsilon,H,'base','corner','pos',{'0','0'},'rot','0');
g1=rect2((1-epsilon),H,'base','corner','pos',{epsilon,'0'},'rot','0');
The design parameters that I wish to optimize are epsilon and H. Using the fmincon function in Matlab I constrain epsilon to be between 0.1 and 0.9, and H to be greater than 0.
When I attempt to run the simulation the solver will go though one or two iterations (changing the system geometry) and then the following error arises:
Exception:
com.femlab.util.FLException: Edge length has to be greater than zero
Messages:
Edge length has to be greater than zero
Error in ==>
g1=react2(....
I have narrowed the problem down to something with the epsilon value, somehow this parameter is becoming either negative or zero.
Has anyone seen an issue like this before or have any ideas on what might be going wrong?
Thanks you,
Jeff
2 Replies Last Post Jul 17, 2015, 6:25 a.m. EDT