Массивы в пакетном режиме для OpenFoam - PullRequest
0 голосов
/ 24 июня 2019

при попытке установить массив в пакетном файле, чтобы по мере прохождения цикла for я изменял текст в соответствующем файле на значения в массиве.

Lots of googling and forum searching. no use thus far

what I want to do is this.

for i = 1 to 5

copy (some template file)
rename it some_template_file_i

set an array
velocity_x = (0 1 2 3 4)
velocity_y = (0 0 0 0 0)
velocity_z = (-1 -2 -3 -4 -5)

Look for the file called "U"
change the line in that file:
value (0 0 0) to..... value (velocity_x(i) velocity_y(i) velocity_z(i))

run simpleFoam

cd ..

i = i+1

end



Any thoughts on how to code this properly?
...