# COMSOL: Setting up simple optimization problem

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 2, 2012, 07:01 COMSOL: Setting up simple optimization problem #1 New Member   Matt Join Date: Apr 2012 Posts: 2 Rep Power: 0 Hi all, i have some doubts about setting the COMSOL optimization module. My aim is quite simple, i should find the optimal value of a variable to minimize the objective equation. In particular i should set up the parameter C in this equation(which represents the outlet pressure of a laminar flow model): S=Q*C+po in order to minimize the following equation: abs(p-15000) Where p is the pressure coming out from linear flow model (spf) and 15000 is a reference pressure, both applied to domain. The algorithm is quite simple, comsol should: 1)assign a value to C 2)estimate the value of domain pressure( coming out from laminar flow model) 3)verify if optimality condition is satisfied, otherwise start again from 1 My doubt is about implementation: which kind of objective should i use (integral objective, probe objective...)? Should i use inequality constraints too? Best regards

May 23, 2012, 03:55
#2
New Member

Niklas Rom
Join Date: Dec 2010
Posts: 4
Rep Power: 8
Hi,
C is a control variable. Add the control variable item by right-clicking the Optimization node in the model builder tree on the left. Assuming now that C is a global parameter (and not a local point value or field variable) a Global control variable is should be added. Inequality constraints are only needed of you have other restrictions to the control variable.

abs(p-15000) should be used in an Objective function. Add that feature the same way as above. If p is a point value use Point-> Integral objective. If is field variable on space use boundary, edge etc and Integral constraint.

The best way to get a kick start is to look in the prepared model examples. Search for optimization in the Model Library window’s search field to find the models that use the Optimization Module in the products that your license includes.

Niklas Rom, COMSOL

Quote:
 Originally Posted by tdh89 Hi all, i have some doubts about setting the COMSOL optimization module. My aim is quite simple, i should find the optimal value of a variable to minimize the objective equation. In particular i should set up the parameter C in this equation(which represents the outlet pressure of a laminar flow model): S=Q*C+po in order to minimize the following equation: abs(p-15000) Where p is the pressure coming out from linear flow model (spf) and 15000 is a reference pressure, both applied to domain. The algorithm is quite simple, comsol should: 1)assign a value to C 2)estimate the value of domain pressure( coming out from laminar flow model) 3)verify if optimality condition is satisfied, otherwise start again from 1 My doubt is about implementation: which kind of objective should i use (integral objective, probe objective...)? Should i use inequality constraints too? Best regards

 Tags comsol 4, opimization

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Naseem FLUENT 17 December 15, 2015 11:12 Stubby OpenFOAM Installation 8 March 5, 2012 16:12 Tom FLUENT 0 February 5, 2005 02:20 Mikhail Main CFD Forum 40 September 9, 1999 09:11 Davy Main CFD Forum 0 August 21, 1998 06:19

All times are GMT -4. The time now is 23:43.