When to use User-defined Scalar (UDS) for concentration?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 30, 2015, 09:35 When to use User-defined Scalar (UDS) for concentration? #1 New Member   THC Join Date: Dec 2012 Posts: 3 Rep Power: 12 I have a salt solution whereby the density (rho) of the solution is a function of salt concentration (mA). The process is a membrane separation, whereby as time goes by, the salt concentration in the feed will change as water permeate through the membrane, thus the density will also change. What I have done was create a UDF for the density and using "Macros for Cell Variables" for species mass fraction, C_YI(c,t,i) as defined in FLUENT UDF Manual Release 14, Table 3.8. mA = C_YI(c,t,i); /*concentration of NaCl. i had been declared as species NaCl*/ rho = 997.1*(1.0 + 0.696*mA); I had managed to compile and run the simulation. However, all the references I found did not use this method; instead they used a UDS (user-defined scalar) function for NaCl concentration. An example: The UDS represent solute concentration and was solved simultaneously with governing equations. My question: 1) Is the method I used above (using C_YI) correct? and will it give the same solution as using UDS for concentration? (I cannot check the solution myself as I don't know how to use UDS). 2) What is the difference between UDS and UDF? Under what conditions (or when) do we need to use UDS? Thank you. Last edited by THC; October 30, 2015 at 10:54.

 May 30, 2019, 09:04 #2 Member   zobekenobe Join Date: Mar 2009 Location: Dublin, Ireland Posts: 72 Rep Power: 16 The UDF or the USER DEFINED FUNCTION is the macros for dealing or specifying conditions at boundaries or in the domain. the UDS or USER DEFINED SCALAR is when you want to write transport equations for a scalar of your own, which is solved along with transport equations for flow. Hence in your case of membrane separation, a transport equation for concentration would be solved. Mars35 likes this.

 Tags uds