CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Phoenics (http://www.cfd-online.com/Forums/phoenics/)
-   -   USER DEFINED SCALARS (http://www.cfd-online.com/Forums/phoenics/51646-user-defined-scalars.html)

 yann July 30, 2003 14:35

USER DEFINED SCALARS

hi,

i would want to know how to defined user scalar for which transport equation may be solved or not, by the way of pil command.

for instance if i want to define the mach number as u/sqrt(gamma*r*T) , so i dont want to define a transport equation for it, how can i define that user scalar as a function of solved and existing flow variables...

thanks

in addition i saw in some Q1 that there exist some variable that phoenics recognize such as MACH PTOT (total pressure) but i cannnot find any list of such variables in POLIS or whatever... where can i find the complete list??

 Rami July 31, 2003 01:48

Re: USER DEFINED SCALARS

yann,

If you wish to add a transport equation for an additional variable, say var1, you should add the pill command solve(var1). You should then add BC and IC for this variable, and also define its diffusion coefficients by PRNDTL(var1)=... and PRT(var1)=... (the latter applies only for turbulent flow). You may also need to define relaxation for this variable. If only the standard transient, convection, diffusion and source available in PHOENICS are needed - then that's it. On the other hand, if you wish to have a non-standard term, e.g., a source term that depends on other variables, you should add some coding in ground either directly or by the newer methods (PLANT and INFORM).

For variables not having a conservation equation associated with, but that are rather derived from the other variables (such as the Mach number in your example), you should use store(var2) for a variable named var2.

More details may be found in POLIS (e.g., SOLVE and STORE).

I cannot help further in regards to the MACH and PTOT you mentioned. Hopefully CHAM will enlighten us in this respect.

Rami

 yann July 31, 2003 10:31

thanks but...

thanks for your tips... but if i define a non-solved variable with STORE(var2) and i want this variable to be var2 = 0.5*U1 **2

where can i define var2 as this function, in Q1 or in ground?? thanks regards

 xqy July 31, 2003 22:34

Re: thanks but...

in plant, you can handle it very easyly

 STK February 7, 2004 09:52

Re: thanks but...

I HAVE THE SAME PROBLEM HOW I CAN DEFINE A VARIABLE VAR1=0.5*U1**2 AND IN PRINT-OUT TAKING THE RESULTS AS THE ABOVE FUNCTION OF THE U1 (CONVERGENCED- LAST SWEEP) 1.IF YOU KNOW A SIMPLE CODE IN GROUND AND THE CORRESPONDING COMMANDS IN Q1

2. IN PLANT MENU

 Niru November 13, 2013 15:23

transient user defined variable

I am facing a similar problem
I have variable which need not be solved for transport equations.
Var 1=areAve(liquid)@wall*Time step Size is my variable.
This is a transient simulation where areaAve changes with respect to time.
I want the values for var 1 at different times.
How to do define this variable in CFX Pre.

 Wikie November 14, 2013 09:46

Hi Nuri,

you should place your question in the CFX forum instead of the Phoenics forum. You might have a better change to get a sufficient answer there.

cheers
wikie

 All times are GMT -4. The time now is 17:04.