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

Freeze some of the additional variables with transport scalers

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 14, 2020, 09:17
Default Freeze some of the additional variables with transport scalers
  #1
New Member
 
Join Date: Apr 2018
Posts: 12
Rep Power: 8
longderson is on a distinguished road
Dear all,

Is there any way to freeze some of the additional variables while solving the rest? All the additional variables are defined as transport scalers. Some of them are initialised with external files and actually act as data stacks, thus, they are preferred to be frozen.

I know the expert parameter might help when the model is overridden as "solve scalar = t/f". But the question is how could I disable the scaler equation selectively?

Maybe someone has an idea?
longderson is offline   Reply With Quote

Old   April 14, 2020, 16:47
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,815
Rep Power: 32
Opaque will become famous soon enough
Under the additional variable definition, i.e.

ADDITIONAL VARIABLE: MyAV
Option = Definition
...
Update Loop = None
...
END

You can do that by a right-click on the icon in the outline for that variable, and use Edit in Command Editor
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   April 14, 2020, 22:08
Default
  #3
New Member
 
Join Date: Apr 2018
Posts: 12
Rep Power: 8
longderson is on a distinguished road
Quote:
Originally Posted by Opaque View Post
Under the additional variable definition, i.e.

ADDITIONAL VARIABLE: MyAV
Option = Definition
...
Update Loop = None
...
END

You can do that by a right-click on the icon in the outline for that variable, and use Edit in Command Editor
Thanks for your remarks. May I ask what version of CFX do you use? I tried exactly as your suggestion with CFX 17.1, but it shows little difference.
longderson is offline   Reply With Quote

Old   April 14, 2020, 22:36
Default
  #4
Senior Member
 
Join Date: Jun 2009
Posts: 1,815
Rep Power: 32
Opaque will become famous soon enough
May I ask why you are using transported variables for stack variables, when you have algebraic variables already for that exact purpose?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   April 14, 2020, 22:42
Default
  #5
New Member
 
Join Date: Apr 2018
Posts: 12
Rep Power: 8
longderson is on a distinguished road
Quote:
Originally Posted by Opaque View Post
May I ask why you are using transported variables for stack variables, when you have algebraic variables already for that exact purpose?
Yes, you are right. The algebraic variables work perfectly for data stacks. However, these variables are intended to be updated during the calculation with a user-defined function. If algebraic variables are used, the updated value will be automatically overridden by the specific expressions.
longderson is offline   Reply With Quote

Old   April 14, 2020, 23:37
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,729
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Then don't you make the expression setting the algebraic variable point to your user function?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   April 15, 2020, 00:06
Default
  #7
New Member
 
Join Date: Apr 2018
Posts: 12
Rep Power: 8
longderson is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
Then don't you make the expression setting the algebraic variable point to your user function?
Yes, I did. I use the GETVAR command to update the variables. The initial value of the algebraic variables setting by the expressions is supposed to be overridden.
longderson is offline   Reply With Quote

Old   April 15, 2020, 00:14
Default
  #8
New Member
 
Join Date: Apr 2018
Posts: 12
Rep Power: 8
longderson is on a distinguished road
My problem has been solved by setting the variable type with the algebraic equations and disabling the loop updating by the command line "Update Loop = None" as suggested by Opaque.
Quote:
Under the additional variable definition, i.e.

ADDITIONAL VARIABLE: MyAV
Option = Definition
...
Update Loop = None
...
END

You can do that by a right-click on the icon in the outline for that variable, and use Edit in Command Editor
BTW, for transport scalers, this command seems invalid. Thus, the question is still open for how to disable the transport scaler equations selectively.
longderson is offline   Reply With Quote

Old   April 15, 2020, 00:25
Default
  #9
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,729
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
No, what I meant was that you set the algebraic variable to UserFortran() where UserFortran is a CEL link into your user fortran routine. Then you set it to whatever you like in your user fortran expression. Should be no need to use GETVAR. Have a look in the CFX documentation on user fortran expressions for CEL.

There should be no need to use undocumented features like Update Loop for this. But at the end of the day you have to use whatever works.....
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   April 15, 2020, 00:30
Default
  #10
New Member
 
Join Date: Apr 2018
Posts: 12
Rep Power: 8
longderson is on a distinguished road
Quote:
No, what I meant was that you set the algebraic variable to UserFortran() where UserFortran is a CEL link into your user fortran routine. Then you set it to whatever you like in your user fortran expression. Should be no need to use GETVAR. Have a look in the CFX documentation on user fortran expressions for CEL.

There should be no need to use undocumented features like Update Loop for this. But at the end of the day you have to use whatever works.....
Sorry for the misleading information, I use the junction box to read data from external files other than using CEL functions to define the variables.
longderson is offline   Reply With Quote

Old   April 15, 2020, 01:33
Default
  #11
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,729
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
That is what I am saying. If you use a user CEL function and not a junction box then you won't get this problem. User CEL functions are much easier to get working, as well.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Reply

Tags
additional variables, user fortran


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
Access additional variable in TRN file rebholzp CFX 4 May 27, 2016 08:08
Q on additional variables in CFX5 bobbob CFX 0 April 29, 2003 09:25
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 20:09
Additional variables in CFX5 Cath Noakes CFX 1 May 13, 2002 10:18
additional equation for heat transport Sascha Becker CFX 2 December 20, 1999 02:58


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