CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Quick UDS question (http://www.cfd-online.com/Forums/fluent/92737-quick-uds-question.html)

 lholsen08 September 23, 2011 13:14

Quick UDS question

If I impose a constant value for a UDS at the inlet then the units are kM/m^3 ?

The UDS diffusivity is the diffusion coefficient* density of the material? Do I input the calculated value?

Thanks for the help!

 Amir September 23, 2011 15:18

Quote:
 Originally Posted by lholsen08 (Post 325397) If I impose a constant value for a UDS at the inlet then the units are kM/m^3 ? The UDS diffusivity is the diffusion coefficient* density of the material? Do I input the calculated value? Thanks for the help!
UDS is just a scalar, you can consider it as a non-dimension variable (normalizes parameter).
UDS diffusivity is equal to (fluid density*diffusion coefficient of scalar in that fluid); this parameter should be set in FLUENT.

 lholsen08 September 25, 2011 17:18

Thank you for your response. I am still slightly confused. When I go to the materials section and open the create/edit materials window. The option says UDS DIffusivity ( kg/m-s). When you click edit it says coefficient, which would be m^2/s correct? There are no units listed on that input window.

 Amir September 26, 2011 03:06

Quote:
 Originally Posted by lholsen08 (Post 325528) Thank you for your response. I am still slightly confused. When I go to the materials section and open the create/edit materials window. The option says UDS DIffusivity ( kg/m-s). When you click edit it says coefficient, which would be m^2/s correct? There are no units listed on that input window.
No, you have to set a parameter which its dimension is kg/m.s there. As I said before, this parameter is : (fluid density*diffusion coefficient of scalar in that fluid), which its dimension is kg/m.s !

Bests,

 lholsen08 September 26, 2011 08:16

OK, So then the scalar would be in kg/m^3 to maintain consistent units?

 Amir September 26, 2011 08:28

Quote:
 Originally Posted by lholsen08 (Post 325623) OK, So then the scalar would be in kg/m^3 to maintain consistent units?
No!!!

c can have any dimension. (you have to set )

Bests,

 lholsen08 September 26, 2011 08:31

OK, thank you for the quick response and all the help!

 lholsen08 September 26, 2011 10:18

Thank you Amir for all your help. You are actually the one who helped me last suggesting the interpolate function and seem to be the one who knows the most about UDS.

I am trying to replicate this equation as my source term: Conc NO = (Rnomax* Conc.Oxygen)/(Conc. Oxygen + KmeNOS)

I am getting numbers with my source code but they do not match up with some previous models.

Does this look correct to you?
#include "udf.h"
/************************************************** ****************************************
This UDF calculates Source Terms for the Lumen, Endothelium, Vascular Wall, and Tissue Layer
************************************************** ******************************************/
/*** Species numbers ***/
#define Oxygen 0
#define NO 1
/************************************************** ****************************************
Endothelium
Source Terms: NO Generation and O2 Consumption
************************************************** ******************************************/
/*** Define Variables for Calculation ***/
#define RNOmax 0.000054; /*Maximum eNOS Production Rate (54 uM/s )->(M/s)*/
#define KmeNOS 4.7; /*Michaelis-Menten reaction kinetics term (4.7 Torr)*/
DEFINE_SOURCE( Endothelium_NOGen, c, t, dS, eqn)
{
real con, concNO;
concNO=((RNOmax*C_UDSI(c,t,Oxygen))/(C_UDSI(c,t,Oxygen)+(KmeNOS)));
return concNO;
}

 Amir September 26, 2011 13:20

Quote:
 Originally Posted by lholsen08 (Post 325643) Conc NO = (Rnomax* Conc.Oxygen)/(Conc. Oxygen + KmeNOS)
Dear Luke,

I think there is a problem in your formula! The dimensions are not compatible; e.g., you've added Conc. Oxygen and KmeNOS which have different dimensions and also the whole dimension doesn't reduce to concentration! Maybe there are some unit multiplication factors which have dimension! (Conc. Oxygen + KmeNOS*1); check that.

Bests,

 lholsen08 September 26, 2011 14:10

Well it is a partial pressure, Henry's Law, using a Michaelis-Meneten reaction source term. So the "concentration" is really a pressure in Torr. I noted it wrong in the code and never fixed it. I really just wanted to know if the coding was correct because and would replicate the equation. I am new to C and this is my first code. Matlab is where the extent of my coding ability lies. Thank you very much for all your help! I truly appreciate it!

 Amir September 26, 2011 16:21

Quote:
 Originally Posted by lholsen08 (Post 325674) Well it is a partial pressure, Henry's Law, using a Michaelis-Meneten reaction source term. So the "concentration" is really a pressure in Torr. I noted it wrong in the code and never fixed it. I really just wanted to know if the coding was correct because and would replicate the equation. I am new to C and this is my first code. Matlab is where the extent of my coding ability lies. Thank you very much for all your help! I truly appreciate it!
Your UDF is correct but you will need something more than this justification! if the dimension of concentrations are Torr, the dimension of "Rnomax" should be Torr too!!! However, such convection-diffusion equation is not valid for pressure!

Bests,

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