mesh morpher/optimizer
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. |
http://www.cfd-online.com/Forums/newreply.php?do=newreply&noquote=1&p=333824#
Execute following command before loading your own UDF.
Code:
/define/enable-mesh-morpher-optimizer? yes |
Quote:
Thank you so much but it still doesnt work!:confused: |
Thank you so much but it still doesnt work!:confused:
|
The rpvar name is wrong.
Code:
RP_Set_Real("morpher/objective-function",drag); |
Thank you so much for your help. It is working now!;)
|
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 |
Quote:
Could you tell us How many control points you have considered around the airfoil? Thanks |
All times are GMT -4. The time now is 06:04. |