-
-
March 7, 2021 at 2:31 pm
Sowmiya
SubscriberI want to include additional species diffusion term through UDF in FLUENT as in formula below.
The first term on the right can be included in mass diffusivity using DEFINE_DIFFUSIVITY macro in species transport model having unit to be (m^2/s) but the next term have unit to be (kg/m.s) how and where to include it?
March 7, 2021 at 3:36 pmYasserSelima
SubscriberAdd it as a source. When the UDF calculates term and returns it to the solver, the solver assumes it is in SI units. So, you don't have to worry about your term units as long as you know it is physically correct. nMarch 7, 2021 at 6:56 pmSowmiya
SubscriberHi nThanks very much for the suggestions.nOn adding it as a source term in the unit of kg/m.s will that be converted to kg/m^3.s by the solver while getting added up in species conservation equation.nnBecause I expanded each term on the right hand side of the equation with respective to four species in the unit of kg/m.s and solving it in UDS source term will that be converted to Kg/m^3.s or I have to use NV_DOT operator while solving it in UDS source term.nPlease kindly give me few suggestions to carry out my work.nAlso please correct me if I am wrongnMany Thanks in advance n n
March 7, 2021 at 7:08 pmSowmiya
SubscribernMarch 7, 2021 at 7:28 pmYasserSelima
SubscriberNo, the solver will understand it as generation-rate/volume. nYou have to convert it.I am not a user of species, so I can't suggest specifics here. My suggestions are general to adding term to conservative equation. Probably tomorrow one of the Ansys Experts would give you more specific advice.nMarch 7, 2021 at 7:44 pmSowmiya
SubscriberThanks again.nIn order to convert we found to use NV_DOT operator. But unfortunately not with more examples in UDF user manual. nWill that be justifiable to get kg/m^3 s conversion using this operator directly in UDS source term.nPlease kindly give me few suggestions in this regard.nMany thanks in advance. nMarch 7, 2021 at 7:47 pmSowmiya
SubscriberNo, the solver will understand it as generation-rate/volume. You have to convert it. I am not a user of species, so I can't suggest specifics here. My suggestions are general to adding term to conservative equation. Probably tomorrow one of the Ansys Experts would give you more specific advice./forum/discussion/comment/109668#Comment_109668
Great and thanks for letting me know.nMarch 9, 2021 at 8:49 amSowmiya
SubscriberExperts please give me few suggestions to carry out my worknMarch 9, 2021 at 9:28 amYasserSelima
SubscribernMarch 9, 2021 at 10:51 amAmine Ben Hadj Ali
Ansys EmployeeSource Terms in to mass conservation equations have the dimenion of kg/m?snMarch 9, 2021 at 10:55 amAmine Ben Hadj Ali
Ansys EmployeeNV_DOT(x,y): it does just make a dot product of vector x and vector ynMarch 9, 2021 at 10:55 amAmine Ben Hadj Ali
Ansys EmployeePerhaps you have a look into DEFINE_DIFFUSIVITY Macro and check if it is helpful for your case.nMarch 9, 2021 at 6:09 pmSowmiya
SubscriberSource Terms in to mass conservation equations have the dimenion of kg/m³s/forum/discussion/comment/109994#Comment_109994
Thanks very much for the suggestionsnIf we include additional species diffusion term in the source terms of mass conservation equation having the same dimension of kg/m^3.sni.e., In my problem i need to include the terms highlighted below having unit to be kg/m.s. for four species n In case if I divide it with area (m^2) , I will get the unit to be kg/m^3.snif so by including it in source terms in mass conservation equation will it justify the inclusion of species diffusion term in species conservation equation highlighted belown
Please give me few suggestions and correct me if I am wrong.n
March 9, 2021 at 6:46 pmSowmiya
SubscriberPerhaps you have a look into DEFINE_DIFFUSIVITY Macro and check if it is helpful for your case./forum/discussion/comment/109996#Comment_109996
of course,the Ds term in equation below is calculated in DEFINE_DIFFUSIVITY macro having unit to be m^2/s and included in species transport model under mass diffusivity and FLUENT will include it in species conservation equation by multiplying with density and gradient of mass fraction.nBut in second term highlighted I need to multiply the individual species density in the form of PMs/RT (instead of total density) and mass fraction of 's' species in itnI don't know how and where to include itn
March 9, 2021 at 6:53 pmYasserSelima
SubscriberThe only option to add term to a transport equation without affecting how other terms being calculated is a source term.nSo, I don't think you have other options. I know in multiphase flow, to get all these properties for different phase, you need to recall different domains and threads for every cell which is difficult to program and more difficult to optimise. Also I am not sure if this applies to species model or not.nSearch the forum, I remember there was few posts by the same person and he was defining sources for species. And actually was helping him. That is why I tagged him. nMarch 9, 2021 at 7:00 pmSowmiya
SubscriberAgain Thanks for the reply and suggestionsMarch 9, 2021 at 7:01 pmYasserSelima
Subscriberhere is one of his posts. Go through the rest of them n/forum/discussion/23429/defining-membrane-property-through-udf#latestnMarch 9, 2021 at 7:03 pmYasserSelima
SubscriberYou are welcome!nMarch 9, 2021 at 9:03 pmSowmiya
SubscriberPerhaps you have a look into DEFINE_DIFFUSIVITY Macro and check if it is helpful for your case./forum/discussion/comment/109996#Comment_109996
If I use UDS diffusivity having unit to be kg/m-s in species transport model and add second term in DEFINE_DIFFUSIVITY macro and insert it in defined per uds as shown belownwill justify the addition of additional diffusion term in species conservation equation as,n
Please correct me if I am wrongnKindly let me know your thoughts on it.n
March 16, 2021 at 7:36 pmChandulaW
SubscriberHi there,nHow did you get the UDS diffusivity option in the change/edit materials dialog box? It isn't appearing for me when I try and set up a battery model.nThanks,nChan. nMarch 18, 2021 at 11:56 amSowmiya
SubscriberHi there,How did you get the UDS diffusivity option in the "change/edit" materials dialog box? It isn't appearing for me when I try and set up a battery model.Thanks,Chan./forum/discussion/comment/111105#Comment_111105
Hi, nAt first you have to include the number of UDS that you are going to solve in define -> user-defined-scalars with proper functions in UDS options.nThen fluent will automatically include UDS diffusivity option in the species transport model.nHope this helps younnMarch 18, 2021 at 11:59 amSowmiya
Subscriber/forum/discussion/comment/109996#Comment_109996If I use UDS diffusivity having unit to be kg/m-s in species transport model and add second term in DEFINE_DIFFUSIVITY macro and insert it in defined per uds as shown belowhttps://us.v-cdn.net/6032193/uploads/7RFE1JX7R4WN/df2-jpg.jpgwill justify the addition of additional diffusion term in species conservation equation as,https://us.v-cdn.net/6032193/uploads/TWANBRP7JZVA/diffusion-term.pnghttps://us.v-cdn.net/6032193/uploads/0DI447M9DPUR/diffusion3.pngPlease correct me if I am wrongKindly let me know your thoughts on it./forum/discussion/comment/110083#Comment_110083
Is the way of using UDS diffusivity option in species transport model will help in including additional diffusion term in species transport model ?nPlease experts correct me if I am wrongnMarch 22, 2021 at 4:54 pmRob
Forum ModeratorThe UDS diffusivity is for the UDS, and not the species. If there is an influence of one over the other you'll need to write a DEFINE_DIFFUSIVITY for the species too. nDone a bit of pruning in here too as has a separate thread. nMarch 23, 2021 at 10:58 amSowmiya
SubscriberHi Rob,nThanks a lot for your suggestions.nYes I have written DEFINE_DIFFUSIVITY for species too. Actually I want to add additional diffusion term which is highlighted in red below.nnThe first term will be included in mass diffusivity option by giving Ds using DEFINE_DIFFUSIVITY in species transport panel (m^2/s) where rho and gradient of mass fraction will be calculated by fluent automatically. But how and where to include the second term?nIs that using UDS DIFFUSIVITY can be used to include the additional term ? nwhere J used in species conservation equation is shown below. n
n Please correct me if I am wrong.nMany thanksnn
March 24, 2021 at 8:32 amAitor
SubscriberYou have two options: enable species diffusion or consider a UDS instead of species diffusion. Mass diffusivity/UDS diffusivity would be equal to D_s, and the term highlighted in red could be included by means of a source term in the species conservation equation/UDS equation.nBoth methods are essentially the same, but it is easier (and, in my opinion, more reliable) to consider species diffusion. nIn any case, I would like to mention that I have been recently dealing with a similar problem as this one (species diffusion with source terms proportional to gradients and/or laplacians) and it has been a nightmare. Source terms involving derivatives are delicate.nMarch 25, 2021 at 7:08 amAmine Ben Hadj Ali
Ansys EmployeeThanks Aitor for the feedback.nMarch 25, 2021 at 7:11 amAmine Ben Hadj Ali
Ansys EmployeeAS mentioned from the beginning you have two options:nn1/They was with SOURCE Terms: always conservative but delicaten2/DEFINE_DIFFUSIVITY for the Species.nApril 1, 2021 at 8:03 amSowmiya
SubscriberThanks a lot to Aitor and Dr Amine for your suggestionsnBut I am struck in including the second term as a source term, where it needs to be included as del dot diffusion term as highlighted belownAnd I could not any macro for del dot term in fluent UDF guide. Please suggest me some examples if any,nYou have two options: enable species diffusion or consider a UDS instead of species diffusion. Mass diffusivity/UDS diffusivity would be equal to D_s, and the term highlighted in red could be included by means of a source term in the species conservation equation/UDS equation.Both methods are essentially the same, but it is easier (and, in my opinion, more reliable) to consider species diffusion. In any case, I would like to mention that I have been recently dealing with a similar problem as this one (species diffusion with source terms proportional to gradients and/or laplacians) and it has been a nightmare. Source terms involving derivatives are delicate./forum/discussion/comment/112510#Comment_112510
n
April 1, 2021 at 10:14 amRob
Forum ModeratorThat's the gradient, there are examples of the the macro for certain variables in the manual. nViewing 28 reply threads- The topic ‘How to add additional species diffusion term in FLUENT’ is closed to new replies.
Ansys Innovation SpaceTrending discussionsTop Contributors-
3301
-
1036
-
1006
-
859
-
804
Top Rated Tags© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-

Ansys Assistant

Welcome to Ansys Assistant!
An AI-based virtual assistant for active Ansys Academic Customers. Please login using your university issued email address.

Hey there, you are quite inquisitive! You have hit your hourly question limit. Please retry after '10' minutes. For questions, please reach out to ansyslearn@ansys.com.
RETRY