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

Iterative evaluation of expression in CFX-pre

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By ghorrocks
  • 2 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 20, 2014, 07:19
Default Iterative evaluation of expression in CFX-pre
  #1
New Member
 
Vasilis
Join Date: May 2014
Posts: 2
Rep Power: 0
vzooz is on a distinguished road
Hello,

I'm wondering if there is a function (or anything else) which enables me to use the calculated value of an expression at the previous timestep in order to evaluate the value at the current timestep.

To make it more clear, the concept is that a coefficient "k" derives from a "Temperature" (among others) and is used at next for a new estimation of the "Temperature". The "Temperature" is an opening temp. at a specific boundary.

Thanks in advance!
vzooz is offline   Reply With Quote

Old   May 20, 2014, 07:35
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
No there is no CEL expression to do this. I wish there was as it would make things much easier.

You can do it using user fortran of course. You can also use some undocumented features to make additional variables carry over from last time step.

And a final thing is that the CEL functions areaAve, massflow, count etc are all calculated based on the values from the previous iteration. In a steady state run that is the previous iteration, in a transient simulation it is the previous coefficient loop. Sometimes that can be useful.
mvoss likes this.
ghorrocks is offline   Reply With Quote

Old   March 24, 2017, 04:32
Default
  #3
rae
New Member
 
Join Date: May 2011
Posts: 21
Rep Power: 0
rae is on a distinguished road
I have been struggling with variable definitions to keep the value of the previous timestep, e.g. if(mod(atstep,2)==0, <recalculate>, <keep>) but I don't know how to keep the variable unchanged, or to store its original value in another variable without cyclic issues. Is there an undocummented means like suggested or otherwise to do this? You also mention Fortran for the solver to do this but I am lost on that. Thanks.
rae is offline   Reply With Quote

Old   March 24, 2017, 07:15
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Search the forum for "trans_loop", that is the undocumented feature to do this. The alternate way of doing it is using fortran.
rae and lostking18 like this.
ghorrocks is offline   Reply With Quote

Reply

Tags
cfx, cyclic dependency, evaluation, expression, iterative


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
CFX Pre not importing Mesh ajhunte CFX 10 October 31, 2022 17:52
only 1 of many named selections not showing up in cfx pre mihirbhagat CFX 2 April 26, 2019 05:56
Setting Pressure Boundary Conditions in ANSYS CFX Pre saisanthoshm88 CFX 21 February 22, 2017 17:50
logical expression for cfx interrupt control wjy-c CFX 0 November 29, 2013 05:30
Defining a domain in CFX Pre ashtonJ CFX 1 June 13, 2011 03:34


All times are GMT -4. The time now is 08:37.