CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   update initial conditions every 10 iterations (

lindner November 28, 2011 07:45

update initial conditions every 10 iterations
Hi all,
I'm testing the whole operation curve of a hydraulic turbine, but the net head is highly dependent of the mass flow.
I want to update the Total Pressure inlet condition every 10 timesteps, to match the new losses.
The inlet condition would be something like this:
Ptotal,in = 115000[Pa] - k*Q^2
where k is a constant for losses and Q the massflow.

is it possible to do with cel expressions to update the boundary every 10 or more iterations?

Thank you in advance,

Cluain November 28, 2011 10:06

Yes, you can. However, you will have to do an expression for the current P rather than the total.
Just set the input to an expression and define the expression for current pressure.

CEL is quite easy to learn and there are quite a few specific examples in the tutorials provided with CFX, just watch the units.
Hope this helps.

lindner November 28, 2011 11:41

Hi Martin,
Thanks for the quick answer! The cel expression is ok now, the only problem is to force the cfx to execute this expression every x timesteps (without fortran).
Im reading about user functions and user subroutine to find something about it.

Cluain November 28, 2011 12:25

Great, a simple iterative function should sort that. A bit of imagination and you will have it.

All times are GMT -4. The time now is 19:54.