CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

scheme variable

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sajjad

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 23, 2006, 09:03
Default scheme variable
  #1
Gimli
Guest
 
Posts: n/a
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
  Reply With Quote

Old   March 23, 2006, 10:15
Default Re: scheme variable
  #2
RoM
Guest
 
Posts: n/a
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
  Reply With Quote

Old   March 24, 2006, 04:10
Default Re: scheme variable
  #3
Gimli
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   March 24, 2006, 09:56
Default Re: scheme variable
  #4
RoM
Guest
 
Posts: n/a
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
  Reply With Quote

Old   March 24, 2006, 10:16
Default Re: scheme variable
  #5
Gimli
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   April 10, 2006, 05:58
Default Re: scheme variable
  #6
sajjad
Guest
 
Posts: n/a
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
safety likes this.
  Reply With Quote

Old   December 3, 2012, 05:44
Default
  #7
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
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.
syavash is offline   Reply With Quote

Old   December 21, 2012, 04:03
Default
  #8
New Member
 
hityangsir's Avatar
 
Y. Yang
Join Date: Mar 2010
Location: Miami, United States
Posts: 28
Rep Power: 16
hityangsir is on a distinguished road
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
hityangsir is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get a value from a data file bound to a variable in Scheme? Shirock Fluent UDF and Scheme Programming 2 August 31, 2011 07:04
emag beta feature: charge density charlotte CFX 4 March 22, 2011 10:14
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 05:35
Env variable not set gruber2 OpenFOAM Installation 5 December 30, 2005 05:27
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 20:02.