|
[Sponsors] |
April 27, 2020, 14:33 |
Loop Journal Routine
|
#1 |
Member
j
Join Date: Apr 2020
Posts: 34
Rep Power: 0 |
I got some useful help yesterday automating some operations in Fluent. The journal attached does what I need, but I want to loop it to run "x" times. If I add a do loop and put this existing code inside, can I simply read the journal file and it will execute x number of times? Also, line 30 exports the cas and data file. Instead of saving "Eff_150-2.cas", I want to replace the 2 with "x" where x is the current iteration in the loop. What's the correct code to make this happen?
|
|
April 27, 2020, 19:37 |
|
#2 | |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Quote:
Code:
(do ((i 1 (+ i 1)))((> i x)) ;;; change x to number of times, you want code to be executed ***PUT YOUR CODE HERE line 1 to 28 "including" *** (ti-menu-load-string (format #f "file write-case-data "Eff_150-~a.cas" \n" i)) )
__________________
best regards ****************************** press LIKE if this message was helpful |
||
April 27, 2020, 21:41 |
Issue
|
#3 |
Member
j
Join Date: Apr 2020
Posts: 34
Rep Power: 0 |
I put that together and I get an error at the save file part. I attached a picture. Is there a certain way I need to save my cas and data beforehand or is a separate problem?
|
|
April 27, 2020, 22:27 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
this is issue with forum messages, command is:
Code:
(ti-menu-load-string (format #f "file write-case-data \"Eff_150-~a.cas\" \n" i))
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need help setting up chtMultiRegion | OskarT | OpenFOAM Pre-Processing | 1 | September 25, 2019 15:51 |
[Gmsh] Problem with Gmsh | nishant_hull | OpenFOAM Meshing & Mesh Conversion | 23 | August 5, 2015 02:09 |
NACA0012 geometry/design software needed | Franny | Main CFD Forum | 13 | July 7, 2007 15:57 |
user subroutine error | CFDUSER | CFX | 2 | December 9, 2006 06:31 |
user defined function | cfduser | CFX | 0 | April 29, 2006 10:58 |