Change Variable In File(win)

October 15, 2009 at 07:58:04
Specs: Windows XP
Hello everybody

Please help me in this problem.
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 repeat 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 contain the new value of the parameter and tmple file contain the code that use this variable for FLUENT


Thank you, for your reply before,
I am really in a hurry ,please please please help me as soon as possible


See More: Change Variable In File(win)

Report •


#1
October 15, 2009 at 08:32:50
Please post your EXACT text file.


=====================================
Helping others achieve escape felicity

M2


Report •

#2
October 15, 2009 at 10:45:43
It is 600 lines but only in two lines I have variable that is
VAR_UX_TMPL and VAR_UY_TMPL :

(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))


Report •

Related Solutions


Ask Question