CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Looping through Cell Zones in a Journal File (https://www.cfd-online.com/Forums/fluent-udf/121637-looping-through-cell-zones-journal-file.html)

adam.vaccaro August 1, 2013 22:45

Looping through Cell Zones in a Journal File
 
I have a model with 546 cell zones, therefore it isn't reasonable to set the cell zone parameters like material and 'participates in radiation' by hand. The cell zones are named in a systematic way, so I'd like to set the parameters based on the name of the cell zone. Using the TUI, I know the commands to set the parameters on one individual cell zone. What I don't understand is how I would write a journal file to loop through all of the fluid cell zone names.

My thought is that I need to call '/define/b-c/fluid' which returns a list of all of the fluid zone names and then requests the name of the zone you want to modify. Specifically the thing I don't know how to do in Scheme is to use the list returned by the above command as an input to the rest of my journal file. Can I assign that list to a variable? How? If that's possible, then I think I can figure out how to use 'car' and 'cdr' calls to loop through the list of names and parse the text of the name to determine how parameters should be set.

Thanks in advance for the help.

Adam


All times are GMT -4. The time now is 19:21.