-
Filter by Topic
Most Popular
All Topics
- List all discussions
Geometric Optimization (edge length) Problem
|
Thread index | Previous thread | Next thread | Start a new discussion |
July 30, 2010 6:30pm UTC
Geometric Optimization (edge length) Problem
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
Reply | Reply with Quote | Send private message | Report Abuse
July 31, 2010 10:24am UTC in response to Jeff Marquis
Re: Geometric Optimization (edge length) Problem
Hi
if you epsilon goes outside bounds you hacnge thetopology (or you ask for a rectangle with zero length edges) this is not allowed, then COMSOl looses it counts on boundary ID etc.
You should ensure for all optimisation that epsilon (or whatever variables you use) are defined within bounds that do not alter the topology or ask for non-physical solutions. There are different ways to achieve this, normally the optimisation module has boundary limits, but you can also make them with boleans, or bettr smoother functions (i.e heaviside steps) for hopefully better convergence
--
Good luck
Ivar
Reply | Reply with Quote | Send private message | Report Abuse
Rules and guidelines

