CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   STAR-CCM+ (http://www.cfd-online.com/Forums/star-ccm/)
-   -   Using Variables from multiple Physics Continua in Field Function (http://www.cfd-online.com/Forums/star-ccm/125775-using-variables-multiple-physics-continua-field-function.html)

cwl October 30, 2013 17:21

Using Variables from multiple Physics Continua in Field Function
 
Good day, enginners

If there are two Physics Continua (say, Water and Air) in my simulation - which are related to different Regions (so Continua/Variables are not coupled at all) - is there a way to use Variables (say, "Air.Velocity", "Air.Temperature" etc) from one Physics Continua in Field function that is used in another?

For example - i would like to have something like this [written in pseudo-code]:

$$Air.Velocity[0] < 300.0 ? $Water.Temperature*0.5 : pow($Water.Temperature, 2)*0.01

Any ideas?

ryancoe November 4, 2013 10:55

The only way that I know to do this is to use field functions to define the physics continua parameters. For example, you could create a field function named airVelocity
airVelocity = [1, 0, 0.1]
then define physics continua with that field function.
set initial velocity in Continua1 to '$$airVelocity'
This way you can use airVelocity in other field functions and other continua.

Hope this helps.

cwl November 4, 2013 11:17

thanx a lot for your answer - but unfortunately that won't work in case that variable is not constant :<

ryancoe November 4, 2013 17:23

The variable does not need to be constant. You can set the field function variable (airVelocity in my example above) dynamically (e.g., as a function of time or any monitor value that you like).

Am I not understanding your problem correctly?


All times are GMT -4. The time now is 03:29.