|
[Sponsors] |
November 28, 2011, 12:08 |
mesh morpher/optimizer
|
#1 |
New Member
Ava
Join Date: Nov 2011
Posts: 4
Rep Power: 15 |
Hi every body.
I have a problem with my UDF for defining the objective function for design optimization of an airfoil. Here is my UDF: #include"udf.h" #include"dynamesh_tools.h" #include"morpher.h" # define ZONEID 3 DEFINE_ON_DEMAND(objective_function) { real x_cg[2]; real f_glob[2]; real m_glob[2]; real drag=0.0; Domain *domain; Thread *thread; domain=Get_Domain(1); thread = Lookup_Thread(domain,ZONEID); x_cg[0] = 0; Compute_Force_And_Moment(domain,thread,x_cg,f_glob ,m_glob,TRUE); drag=f_glob[0]*0.9962+f_glob[1]*0.08716; RP_Set_Real("morpher/objective_function",drag); } It is compiled successfully but when I check it through execute on demand or when I use it in the optimization, I receive this error message: Error: rp-var-value-local-set!: undefined variable Error Object: morpher/objective_function I use win 64 bit and Visual Stodio 2010 and Fluent 13. I would be happy if anybody can help me with this problem. |
|
November 29, 2011, 11:42 |
http://www.cfd-online.com/Forums/newreply.php?do=newreply&noquote=1&p=333824#
|
#2 |
Member
Join Date: Apr 2009
Posts: 46
Rep Power: 17 |
Execute following command before loading your own UDF.
Code:
/define/enable-mesh-morpher-optimizer? yes |
|
December 1, 2011, 11:51 |
|
#3 |
New Member
Ava
Join Date: Nov 2011
Posts: 4
Rep Power: 15 |
||
December 1, 2011, 12:02 |
|
#4 |
New Member
Ava
Join Date: Nov 2011
Posts: 4
Rep Power: 15 |
Thank you so much but it still doesnt work!
|
|
December 2, 2011, 06:52 |
|
#5 |
Member
Join Date: Apr 2009
Posts: 46
Rep Power: 17 |
The rpvar name is wrong.
Code:
RP_Set_Real("morpher/objective-function",drag); |
|
December 5, 2011, 06:33 |
|
#6 |
New Member
Ava
Join Date: Nov 2011
Posts: 4
Rep Power: 15 |
Thank you so much for your help. It is working now!
|
|
January 11, 2013, 12:01 |
|
#7 |
New Member
Join Date: Jan 2013
Posts: 1
Rep Power: 0 |
Hi all
I think you people are very good with optimization I am also trying to optimize the shape of chemical reactor. I have some basic questions 1) what is the meaning of parameters in the optimizer windows?? 2) how can we set their max and minimum values? 3) I am solving 2D axisymmetic flow through a pipe" with a chemical reaction taking place inside it" and i want to optimize the shape of that pipe"optimized shape would be something like combination of nozzle diffuser type" should I define the optimization region over the whole axisymmetric domain or just on the area close to the wall. 4) i leant from the blog that people are interfacing matlab with fluent to do geometric optimization, I want to know why they are not using these biult in optimizer. of course there are certain limitation can you please give a take of that?? 5) finally some idea of how to link matlab with fluent Thanks in advance for your rime and concern Ibrar |
|
August 31, 2014, 19:23 |
|
#8 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
Could you tell us How many control points you have considered around the airfoil? Thanks |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] surface mesh merging problem | everest | ANSYS Meshing & Geometry | 44 | April 14, 2016 07:41 |
[ICEM] Problem making structural mesh on a surface | froztbear | ANSYS Meshing & Geometry | 1 | November 10, 2011 09:52 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
Meshing aifoil in ICEM | student123a | ANSYS Meshing & Geometry | 13 | December 8, 2010 11:40 |
2d irregular grid | Remy | Main CFD Forum | 1 | December 22, 2008 05:49 |