Change Variable In File
Posted: 15 Oct 2009 02:56
Hello everybody
Please help me in this prblem.
I am working on optimization technique,In my project ,I must to change the value of the parameter in the txt file that is used in FLUENT.
I want to have a batch file which change the amount of this variable in repeart able process.
for example :
I have this variable in first iteration:
VAR_UX_TMPL=9.9
VAR_UY_TMPL=0.9
and this variable in txt file is contained like this:
(cx-gui-do cx-set-real-entry-list "velocity-inlet-5-1*Frame4*Frame1(Momentum)*Table1*Table6*RealEntry2(X-Velocity)" '( VAR_UX_TMPL))
(cx-gui-do cx-set-real-entry-list "velocity-inlet-5-1*Frame4*Frame1(Momentum)*Table1*Table7*RealEntry2(Y-Velocity)" '( VAR_UY_TMPL))
--------------------------------------------------------------
In shell I think do like this for this problem :
vim -e -s airfoil_fluent.jou.tmpl < data_for_fluent.vim
that tmple vim file coontain the new value of the parameter and tmple file contain the code that use this variable for FLUENT
Thank you,for your reply befor,
I am realy in a hurry ,please please please help me as soon as possible.
Please help me in this prblem.
I am working on optimization technique,In my project ,I must to change the value of the parameter in the txt file that is used in FLUENT.
I want to have a batch file which change the amount of this variable in repeart able process.
for example :
I have this variable in first iteration:
VAR_UX_TMPL=9.9
VAR_UY_TMPL=0.9
and this variable in txt file is contained like this:
(cx-gui-do cx-set-real-entry-list "velocity-inlet-5-1*Frame4*Frame1(Momentum)*Table1*Table6*RealEntry2(X-Velocity)" '( VAR_UX_TMPL))
(cx-gui-do cx-set-real-entry-list "velocity-inlet-5-1*Frame4*Frame1(Momentum)*Table1*Table7*RealEntry2(Y-Velocity)" '( VAR_UY_TMPL))
--------------------------------------------------------------
In shell I think do like this for this problem :
vim -e -s airfoil_fluent.jou.tmpl < data_for_fluent.vim
that tmple vim file coontain the new value of the parameter and tmple file contain the code that use this variable for FLUENT
Thank you,for your reply befor,
I am realy in a hurry ,please please please help me as soon as possible.