|
[Sponsors] |
March 2, 2018, 14:35 |
Scheme macros inside journal files
|
#1 |
Member
Michal
Join Date: May 2017
Posts: 35
Rep Power: 9 |
Hello everybody!
I have got a problem with scheme commands and unfortunatelly I haven't found any solution here. I need to set a few scheme variables for my UDF. I have already solved my problems with UDF and defining a variables with couple commands: (rp-var-define 'NAME1 0.0 'real #f) (rp-var-define 'NAME2 0.0 'real #f) When I type them in TUI everything is OK, but when I put those lines in my journal (with another "common" commands) I've got an error: Error: A journal or macro has already been started. Error Object: #f It appers while fluent executes first journal command after defining all scheme variables using: (rp-var...). Anyone knows a solution? Best regards, Michal.s |
|
March 5, 2018, 00:23 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
what is your next line?
best regards |
|
March 5, 2018, 04:00 |
|
#3 |
Member
Michal
Join Date: May 2017
Posts: 35
Rep Power: 9 |
My next line:
Code:
/define/boundary-conditions/wall wall-sphere 0 no 0 no yes temperature no 20 no no no no 0.0025 no 0.5 no 1 |
|
March 5, 2018, 07:27 |
|
#4 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
Hi Michal.s
I do not think that these lines are the (only) cause of that error message. (And I think this is where AlexanderZ's question was leading as well.) You cannot read a journal while you are writing a journal. You cannot necessarily run a read-journal command inside a journal -- this may have changed in recent versions, but it certainly used to be forbidden. By the way, it is generally discouraged to rp-var-define the same RP-variable twice. I'm not sure how serious the consequences are. The UDF manual used to contain a nice little Scheme function to guard against this -- see for example https://www.sharcnet.ca/Software/Flu...df/node107.htm. I'm not sure why this disappeared from the documentation. Good luck, Ed |
|
March 6, 2018, 00:47 |
|
#5 | |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Quote:
Change format of your file from journal(mixed with scheme) to scheme. And run scheme file not journal. to make new format you should change the way, how your execute TUI commands Was Code:
/define/boundary-conditions/wall wall-sphere 0 no 0 no yes temperature no 20 no no no no 0.0025 no 0.5 no 1 Code:
(ti-menu-load-string (format #f "define boundary-conditions wall wall-sphere 0 no 0 no yes temperature no 20 no no no no 0.0025 no 0.5 no 1 \n" )) Best regards |
||
March 6, 2018, 06:41 |
|
#6 |
Member
Michal
Join Date: May 2017
Posts: 35
Rep Power: 9 |
Hello Again,
I tried to simply rewrite my journal. I don't know what could be the the problem, but currently everything is OK. Hope that nothing will crash. Thank you for all suggestions. I will try them if the problem will appear again. Best regards, Michal |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to run a series of Fluent journal files in order? | jyoung79 | FLUENT | 2 | September 22, 2014 09:52 |
How to define macros in Dictionary files? | keepfit | OpenFOAM | 3 | December 16, 2013 16:13 |
Two conditions in Fluent journal files | bobmalaria | FLUENT | 5 | November 10, 2011 06:31 |
error reading journal files | Wenbin | FLUENT | 2 | February 22, 2005 05:43 |
Experimental Repository for UDFs, Journal Files and Scheme Scripts | Jonas Larsson | FLUENT | 0 | March 5, 2000 16:36 |