CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Fluent scripting question (https://www.cfd-online.com/Forums/fluent/101560-fluent-scripting-question.html)

me3840 May 7, 2012 13:33

Fluent scripting question
 
I'm trying to get fluent to output a projected area into the terminal window, but without user intervention. The problem is the projected area function requires you to enter in wall zones you want and hit enter when you're done defining them. Is there some command I can put in the input script that will do this? I couldn't find anything about it in the TUI manual.

olybeast May 10, 2012 11:12

start recording journal

do all that manual stuff you just mentioned

stop recording journal



there you have a file with all the code you need in it to write your own journals

LuckyTran May 10, 2012 23:37

Quote:

Originally Posted by me3840 (Post 359782)
I'm trying to get fluent to output a projected area into the terminal window, but without user intervention. The problem is the projected area function requires you to enter in wall zones you want and hit enter when you're done defining them. Is there some command I can put in the input script that will do this? I couldn't find anything about it in the TUI manual.

Make a journal file. It is just a text file that lists all your TUI commands. Fluent will read the file and then enter the commands exactly as you enter them.

me3840 May 11, 2012 01:18

When I do that it fills the journal file with text commands which include GUI parameters - will that still work if you run the script on a cluster with no GUI?

LuckyTran May 11, 2012 01:21

Quote:

Originally Posted by me3840 (Post 360466)
When I do that it fills the journal file with text commands which include GUI parameters - will that still work if you run the script on a cluster with no GUI?

without a GUI the GUI commands will not work at all.

you need to make the same journal file using only TUI commands and that will work anywhere.

me3840 May 11, 2012 11:19

Yes..that's the problem...I don't know what the TUI command is for "enter"

LuckyTran May 11, 2012 13:25

Quote:

Originally Posted by me3840 (Post 360618)
Yes..that's the problem...I don't know what the TUI command is for "enter"

oh sorry.

If you press the enter/return key into the TUI window, a list of all available commands will be printed on the screen. You can use this to learn to navigate your way to get to the right place. Follow all the prompts and enter all the appropriate inputs.

Then write down all your inputs into a separate text file and save it as a journal .jou file. Fluent will read the file exactly as is so anything you put in the journal file will be inputted exactly into the TUI the same way. So an easy to check if your journal is setup properly.

The Fluent manual also contains a list of the TUI commands to get you started but you still need to do it a few times to get all the input strings.

me3840 May 11, 2012 13:39

Yes, I know this already. But when you choose to do something like projected areas in the TUI, it will eventually ask you for a list of wall zones to project. The only way to get it to stop asking for the list is to hit enter with nothing typed in as a zone. My question is how to "hit enter" while giving no actual name in the script. There has to be some sort of "OK" command.

LuckyTran May 11, 2012 13:48

Quote:

Originally Posted by me3840 (Post 360630)
Yes, I know this already. But when you choose to do something like projected areas in the TUI, it will eventually ask you for a list of wall zones to project. The only way to get it to stop asking for the list is to hit enter with nothing typed in as a zone. My question is how to "hit enter" while giving no actual name in the script. There has to be some sort of "OK" command.

remember that it is a simple text file and will be able to interpret special characters. the enter key is simply a special character. any enters/return characters that are in the script will be interpreted (even if they are at the end of the line).

you therefore need to be careful, because if you accidentally leave a blank line, it will be interpreted as a return command, which may lead to errors afterwards such as when it is in the middle of a list of prompts.

me3840 May 11, 2012 13:50

I've tried leaving a blank line, but it doesn't do anything. I want it to be interpreted as a return command. Is there some other way to end a list of prompts?

LuckyTran May 11, 2012 13:57

Quote:

Originally Posted by me3840 (Post 360632)
I've tried leaving a blank line, but it doesn't do anything. I want it to be interpreted as a return command. Is there some other way to end a list of prompts?

I think you are looking for () to signify the end of a list

()

me3840 May 15, 2012 22:50

Yup, that's the one. Thanks.

Jeeloong August 18, 2017 13:36

Quote:

Originally Posted by luckytran (Post 360634)
i think you are looking for () to signify the end of a list

()


very important

YorkshireTea September 23, 2019 13:49

I believe a comma , also works for 'enter'?


All times are GMT -4. The time now is 17:22.