CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   scheme variable (https://www.cfd-online.com/Forums/fluent/40281-scheme-variable.html)

Gimli March 23, 2006 08:03

scheme variable
 
Hi,

I spent some time on the Fluent 6.1 doc and I couldn't figure out this one:

In the TUI, when you want to access the current flow time, you can type (rpgetvar 'flow-time).

What do you type if you want the previous flow time (right before you made a time step)?

By the way, if anyone has a list of other scheme variables, feel free to email me.

Regards,

Gimli

RoM March 23, 2006 09:15

Re: scheme variable
 
Mae govannen mellon,

all scheme variables are stored in the case file in the "variables" section. I did not find anything that looked like "previous time step", maybe have more luck. A short introduction to scheme programming in fluent can be found here:

http://fluid.jku.at/personen/javurek/pdf/scheme.pdf

RoM

Gimli March 24, 2006 03:10

Re: scheme variable
 
Hi RoM,

You've been fast, thanks.

Unfortunately, I got no luck either. The scheme programing book seems to list some interesting variables and functions but there is no description of their results. Plus it's written in German, makes me regret not to have learnt it in highschool (although I heard some people are trying to get it translated).

Guess it only leaves me 2 possibilities:

- (- (rpgetvar 'flow-time) (rpgetvar 'physical-time-step)) might be the same as previous flow time

- define a variable that keeps the value of the flow time for the next time step

If you have any other idea, you're welcome (when it comes to programing, you never know, my ideas could not work).

Thanks again.

RoM March 24, 2006 08:56

Re: scheme variable
 
Until now i have not used scheme because is very time consuming to learn and fluent suport is not very helpful if you ask them about scheme.

Here are some observations that might be helpful for you.

If you use the PREVIOUS_TIME macro in udf fluent will caluculate it from "flow-time"-"physical-time-step", exactly as you stated above.

There are macros to access scheme variables in udf (like RP_Get_Real), please read udf manual chapter 6.7 and 6.8 for more informations. For each RP_Get function there is a (not documented) RP_Set function which will set the scheme variable from the udf.

So it should be possible to define a new scheme variable for the previous time and update it with an udf.

RoM

Gimli March 24, 2006 09:16

Re: scheme variable
 
It seems the first idea works well. I'll go through UDF if I have any trouble and follow your advices (even though I'd really prefer to keep dealing with journals and macros).

Thanks a lot, see ya.

sajjad April 10, 2006 04:58

Re: scheme variable
 
Gimli!

I cant tell u exaclty what u want but I have worked with scheme...not advanced ...Actually the fluent gui interface is based on scheme but the type of scheme is developed by FLUENT ..itself..and supporting everything in that may not b a good thing for them ..;-)

RP_GET_VAR..is the macro that makes fluent solver understand ..which variable in the scheme gui is connected with a specific variable in UDF code...the RP_GET_VAR should be initialed by DEFINE INIT and also in EXECUTE ON LOADING....just try ..if get some problem then ..i will send u a simple udf code with a scheme code ....in a few days ..coz I have to make my GUI panel today ..

bye

syavash December 3, 2012 04:44

Quote:

Originally Posted by sajjad
;131099
Gimli!

I cant tell u exaclty what u want but I have worked with scheme...not advanced ...Actually the fluent gui interface is based on scheme but the type of scheme is developed by FLUENT ..itself..and supporting everything in that may not b a good thing for them ..;-)

RP_GET_VAR..is the macro that makes fluent solver understand ..which variable in the scheme gui is connected with a specific variable in UDF code...the RP_GET_VAR should be initialed by DEFINE INIT and also in EXECUTE ON LOADING....just try ..if get some problem then ..i will send u a simple udf code with a scheme code ....in a few days ..coz I have to make my GUI panel today ..

bye

Dear Sajjad,

Would you be so kind to share your udf file including scheme variable with me?! My E-mail is syavash_azna@yahoo.com.
tnx.

hityangsir December 21, 2012 03:03

Dear Sajjad,
Would you be so kind to share your udf fille you mentioned? And I am new to the fluent-sheme, could you suggest some materials for me to study fluent-scheme programming?
Thank you so much
Richard


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