CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   journal files (https://www.cfd-online.com/Forums/fluent/35924-journal-files.html)

mary March 3, 2005 07:30

journal files
 
Hi fluent users! I'm using fluent to describe the motion of a heart valve.I'm considering it as a rigid body. can anyone give me some informations about journal files?I'd like write in this file commands that have to be executed. Moreover,I write an udf and I'd like the my udf can read the moment (due to pressure forces) calculated by fluent at every iteration of every time step:can anyone tell me if it's possible and the way to do this? I thank you all! Bye,mary

Evan Rosenbaum March 3, 2005 12:00

Re: journal files
 
I don't know about the UDF question, but the easiest way to do the journal file is as follows. First, start generating a journal file in FLUENT. Second, manually issue the first couple of commands you need to execute. Third, use the generated journal file as a template to get the subsequent commands correct. Fourth, have FLUENT execute your newly created journal file.

In step 2, try to use text commands instead of the GUI. This makes things much easier in step 3.

Chris Bailey March 3, 2005 13:22

Re: journal files
 
If you prefer writing code to picking your way along with a mouse (and trying to remember every step along the way), journal files are the way to go.

An alternative to Evan's approach is to approach it like any other programming environment. What the manual didn't make clear enough (in my opinion) is that there are practically two different languages in play.

One is Scheme, which is a dialect of Lisp. It's distinguished by lots of parentheses and by prefix notation. You can find several web references or buy books. The funny thing about Scheme and Fluent is that Fluent obviously wrote many functions and defined many variables in Scheme, but the only one you're supposed to know about is ti-menu-load-string, which passes a string to the Text Menu / Text Prompt system. But that should be enough.

The other is Fluent's Text Menu System and Text Prompt System. These are sort of text versions of the menu commands, that prompt you for whatever they need. There's a command reference in Fluent's docs that lists all the Text Menu System items and what they do, but it doesn't explain all the prompts that each item can elicit. AFAIK you just have to experiment to find these out so you can anticipate them and string all the answers together in your journal file. Warning - the prompts are often situation dependant. You can reduce the situational dependancy with /file/set-batch-options y y y y (or something like that).

You can mix the languages together on a line by line basis. Actually, Fluent wrote the Text Menu System and Text Prompt System in Scheme, so you're really only dealing with Scheme running their program. But the feel is like switching between two.

Generally getting Fluent to do anything involves a TM / TP system command, whereas complicated programming mechanics like running loops or using conditionals or assembling strings out of variables always involves Scheme. So you can write a Scheme loop that includes several ti-menu-load-string commands to feed Fluent the commands it needs, and for example you could test your heart valve at 10 different velocities.


All times are GMT -4. The time now is 18:32.