CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Explicit CEL variables (https://www.cfd-online.com/Forums/cfx/246159-explicit-cel-variables.html)

juanluisfb November 16, 2022 08:25

Explicit CEL variables
 
Hi everybody,

Anyone knows how can you use explicit variables in CEL? Or, is it possible to access variables or properties of previous time steps?

Thank you.

ghorrocks November 16, 2022 16:28

What do you mean by explicit variables? Example = 10[m/s]+2*Velocity is an explicit variable.

Can you access variables from previous time steps? This is not supported, but there is a unsupported method of doing it: see
https://www.cfd-online.com/Forums/cf...rans_loop.html
https://www.cfd-online.com/Forums/cf...-obtained.html

Note it is pretty unreliable and does not work in every case (that is why it is unsupported)

Alternately you can write some user fortran to do it.

Opaque November 16, 2022 16:38

adding to Glenn's question:

what are you trying to achieve that needs variables at previous timesteps?

juanluisfb November 17, 2022 09:17

I have a CEL expression that have to be evaluated with variables at the previous step. An example of this could be a temperature ON/OFF control.

ghorrocks November 17, 2022 17:15

It would be good if you described what you are actually trying to do because there usually is a better way of doing it.

But to answer your question: You cannot do temperature on/off control in a steady state simulation as it will never converge. If you want to do it in a transient simulation you can try the TRANS_LOOP approach or a user fortran routine, as previously suggested.


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