Change Variable In File

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
ali_me84
Posts: 1
Joined: 14 Oct 2009 22:35
Contact:

Change Variable In File

#1 Post by ali_me84 » 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 :cry: ,please please please help me as soon as possible.

jaffamuffin
Posts: 40
Joined: 25 Jan 2008 14:05

#2 Post by jaffamuffin » 17 Oct 2009 09:38

install vim and write a batch with the command you already use?

Post Reply