CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   editing species flux (https://www.cfd-online.com/Forums/fluent-udf/148417-editing-species-flux.html)

tguozden February 11, 2015 13:53

editing species flux
 
Hello Everyone,

I study species separation produced by imposing a pressure gradient in gaseous mixtures. So I have to add a so called pressure diffusion term to the flux in order to take this effect into account.

I have been doing this using UDS: I have my own DEFINE_UDS_FLUX function in which I add the pressure diffusion term to the F_FLUX(f,t) macro.

So far it's been working good, but now species separation generates large mean molar weights variations, and I want to include this in the cfd problem.

I could do this by:

1. build my own UDRGM (user defined real gas models) and calculate tha gas constant as a function of the UDS's.
--- but I don't know how to call C_UDSI(c,t) inside UDRGM

2. Add the pressure diffusion term as sources using species
--- wouldn't be eloquent to derivate a flux term using the finite volume method

3. Editing the flux of each of the species as in UDS
--- ???

4. ...


Any ideas?

Thanks,

Tomás.-

ilfrance90 November 26, 2015 05:36

Hello tguozden
 
Hello tguozden,

Have you found a way to use C_UDSI(c,t) in your UDRGM?
I'm working on a UDRGM and I need to define some properties as a function of a User-defined-scalar, hence your reply would be very useful for my work.
Thank you very much!

tguozden November 26, 2015 09:16

Hello francesco! I was suggested to create a DEFINE_PROFILE and hook this with "fixed value" definition in cellzone conditions.

Didn't try, if you please let me know.

DEFINE_PROFILE(fixed_species, thread, i)
{
/*
* Prescribe species mass fraction value.
*/
cell_t cell;/* loop over the cells */
begin_c_loop(cell, thread)
{
C_YI(c,t,0) = C_UDSI(c,t,0);
}
end_c_loop(cell, thread)
}




Quote:

Originally Posted by ilfrance90 (Post 575060)
Hello tguozden,

Have you found a way to use C_UDSI(c,t) in your UDRGM?
I'm working on a UDRGM and I need to define some properties as a function of a User-defined-scalar, hence your reply would be very useful for my work.
Thank you very much!



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