|
[Sponsors] |
March 20, 2003, 11:27 |
Two questions on Fluent UDF
|
#1 |
Guest
Posts: n/a
|
Hi, everyone,
I have two questions about Fluent UDF when I was using it. I would like to share them with you, and hopefully someone can help me out. The first question is about the diffusivity (diffusion coefficient) of UDF. As you know, Fluent UDF can let you define diffusivities for user defined scalar equations. My question is: how to activate these user defined diffusivities properly and let Fluent know which one applies to which UDS equation. In Fluent, define->materials->diffusivity you will see two options: 'UDS' and 'user defined'. If you choose UDS, it looks that you may assign a constant value or polynomial as the diffusivity for each user defined scalar. But how to apply user defined diffusivities to UDS? If you select 'user defined', you can only pick one of those user defined diffusivities.my understanding is Fluent will then use this one for all the conservation equations and user defined scalars. I am confused here, and could not figure out how Fluent actually handle the diffusivities. The other question is related to species transfer. If you are going to implement a species transfer problem, but do not want to use the Fluent default species transfer model, because the reaction in your case has ions involved that Fluent cannot handle. So you have to define the concentration of each species as UDS to solve for concentration distribution over the whole region. Then there come a few problems. 1. How to make sure materials balance in Fluent? 2. How to model species transfer under this circumstance? If you do not select species transfer, you can only define one material in that region, instead of all the species that actually exist in that region. My solution is using a material that can approximate the properties of the actual mixture for conservation equations. Is it a proper way for this problem? Any suggestion or comment is welcome and will be greatly appreciated. Steven |
|
March 21, 2003, 14:50 |
Re: Two questions on Fluent UDF
|
#2 |
Guest
Posts: n/a
|
<font face = "courier new">
Hi steven, I infer that you are trying to model electrochemical systems where you will encounter all such problems. This is something I have been fighting for a long time. When you are confronted with the problem of solving for ions, I know you would want to use a "special flux-equation" with the migration term implemented too. This extra migration term can be implemented, as you would have inferred, only through the "J" - user defines flux term for the scalars in FLUENT 6. but believe me, inspite of using that J term in F6, you will NOT be able to model electrochemical migration using user-defined scalars. The reason is simply that, the user-defined scalars, atleast from my knowledge, are not solved the way the species equations are solved in FLUENT 6. For example, suppose there is a parallel plate electrochemical reactor which sports two reactions at the the two electrodes and the electrolyte flows through it. Since ions are involved in the reactions, you would normally be tempted to use UDS equations instead of the species equations for modelign the species, but as far as my experience goes, it does not work that way. When you model the species equations, the concentration at the outlet is determined by the "shooting-correcting" method of FLUENT. Refer to the modeling of species examples in FLUENT 6 manuals. It is evident from the F6 manuals that there is "no - need" to mention "any" boundary condition for the species at the outlet. But for the UDS, you are required to mention the boundary conditions and this "forces" a wrong solution for the problem. An example of how various diffucivity values could be assigned to different scalars is given below: /**************** DIFFUSIVITY *****************/ DEFINE_DIFFUSIVITY(scalar_diff, c, t, i) { real D; // Define all scalars real phi,C1,C2,C3,C4; switch (i) { case 0: C1 = C_UDSI(c,t,1) ; C2 = C_UDSI(c,t,2) ; C3 = C_UDSI(c,t,3) ; C4 = C_UDSI(c,t,4) ; D = F*F/(R*T)*(z1*z1*C1 + z2*z2*C2 + z3*z3*C3 + z4*z4*C4); break; case 1: D = D1; break; case 2: D = D2; break; case 3: D = D3; break; case 4: D = D4; break; } return D; } *********************************** In the above code the "case 0" corresponds to potential equation and all the others are species equations. D1..D4 are globally defined constants. Hope this helps. Murali</font> |
|
March 27, 2003, 13:00 |
Re: Two questions on Fluent UDF
|
#3 |
Guest
Posts: n/a
|
Thank you, Murali, Your information is really helpful.
Actually, I am working on the modeling of a PEM fuel cell. I think I did not really understand the exact meaning of the index "i", which corresponds to each UDS. Now things become clear to me. As you mentioned, it seems infeasible to model the ion transport by UDS, then do you have any idea if there is any other way to do that? Also, my understanding of how Fluent calculate conservation equations and UDSs is that: first, it will solve continuity and momentum (no energy analysis involved) with the properties of materials you have specified for each zone. then, it will calculate UDS based on used-defined diffusivity and source term,etc. Because you are not using species transfer model, instead, you define each species you're interested with UDS; you cannot define the material in each zone with any mixture, you can only approximate it with a single substance. Therefore, your solution seems to be an approximate one, and the mass balance is not garanteed here. How to solve this problem? Thank you. Steven |
|
September 20, 2013, 06:14 |
UDS concentration
|
#4 |
New Member
bouabidi abdallah
Join Date: Sep 2013
Posts: 1
Rep Power: 0 |
hi
how i can defined the concentration as uds in fluent. my problem that the density depend of concentration so i will use uds for the concentration and udf for the density. plz help me |
|
September 20, 2013, 17:30 |
|
#5 |
Senior Member
A-A Azarafza
Join Date: Jan 2013
Posts: 226
Rep Power: 14 |
@ bouabidi abdallah
You can define mass fraction transport equation of species using UDS and then whenever you need them, just convert it to concentration.
__________________
Regard yours |
|
March 22, 2018, 14:40 |
|
#6 | |
Member
Join Date: Oct 2017
Posts: 52
Rep Power: 9 |
Quote:
can you tell me where might be the problem? |
||
March 22, 2018, 21:30 |
|
#7 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
looks like your udms are not changing
best regards |
|
March 23, 2018, 04:22 |
|
#8 |
Member
Join Date: Oct 2017
Posts: 52
Rep Power: 9 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A Problem of Fluent Interpreted UDF: parse error | knight | Fluent UDF and Scheme Programming | 25 | August 16, 2018 11:26 |
Please, Help with linking UDF precompiled outside fluent to fluent!!! | gracerlima | Fluent UDF and Scheme Programming | 1 | May 4, 2010 08:19 |
Fluent 6.1/6.2 UDF compatability | Allan Walsh | FLUENT | 1 | April 29, 2005 12:49 |
UDF of Zimont model in fluent | Z | Main CFD Forum | 0 | February 17, 2005 04:07 |
UDF in parallel version of fluent | yobee | FLUENT | 2 | August 5, 2004 01:36 |