Fluids

Fluids

UDS Specified Flux BC

    • rkoomul
      Subscriber

      I am trying to solve the transport equation for a UDS (which is the number of particles, no units).  The medium is stagnant water, so the convective term is zero.  I have one boundary from where the particles are released, which is specified as number of particles released per unit area per unit time (which is the flux).  

      According to Chapter 8 of the Users manual, the boundary flux is specified as the diffusion coefficient multiplied by the normal component of the gradient of UDS.  When we consider the units (say SI system), diffusion coefficient is kg/(m s) and gradient is (number per m).  Therefore, the flux at the BC has the unit (number * kg/(m^2 s), not number/ (m^2 s).  

      What should be the units in which I need to specify the UDS flux at the boundary?  In my case UDS is the number of particle.

      Thank you in advance for your help.

    • jmccasli
      Ansys Employee

      Hi koomullil,


      I think the confusion here is for 2 reasons:


      1) The governing equation for a Fluent UDS is an advection-diffusion equation that is formulated with the fluid density multiplied throughout (see Equation 1.8 of the Fluent Theory Guide) . This is why Fluent's UDS diffusivity (let's call it gamma) has units of kg/(m s). Note that if you divide this by density, you get conventional diffusivity units of m^2/s.


      2) It is not physically correct to say that your UDS (let's call it phi) is the number of particles. Since this is a field quantity that is governed by Equation 1.8, it must be (number of particles)/(unit volume), so phi has units of np/m^3 (where np is the number of particles).


      It follows that the UDS flux, defined as -gamma*grad(phi).n (where n is a unit vector normal to the surface) must have units kg/(m s) * np/m^3 * m^(-1) , which you can rewrite as kg/m^3 * np/(m^2 s). Now you can see that the UDS flux value which Fluent expects from you is the number of particles per unit area per unit time, multiplied by the fluid density.


      So to summarize, input the specified flux value as rho*np/(m^2 s), where rho is the density of the fluid, and np/(m^2 s) is the number of particles released from the surface per second, divided by the area of the surface.


      I hope that answers your question.


      Regards,


      Jeremy

    • rkoomul
      Subscriber

      Thank you Jeremy for the response.  It makes sense now.  I tested it on a unit cube, with quiescent water and a specified rate of release of particles from one of the sides of the cube.  I did a transient simulation for 10 seconds.  After the simulation, I calculated the volume integral of Scalar-0 inside the cube and it is matching with the rate of release times the simulation time and the area.   


      The quantity that I am looking for is the number of particles that cross a given surface, say an interior boundary or a physical boundary.  I couldn't find an option to do this.  I tried surface integral of Scalar-0, but it gives a large number because Scalar-0 is the number of particle per unit volume.  How do I calculate the actual number of particle crossing a surface?


      Thank you,


      Roy

    • DrAmine
      Ansys Employee

      As now you are dealing with a number density instead of the number you can imagine that the results for the discrete number would be mesh dependent. An idea to get the actual number is to define a custom field function where you multiply the number density with the cell volume and use that variable for further post-processing.

    • rkoomul
      Subscriber

      Thank you for the replay.  Do you have any sample UDF which I can modify to calculate number of particles in each cell?  The function that I am looking for is to define a new variable for each cell which stores the number density (Scalar_0) multiplied by the volume.  Once I have this, I can calculate the average value of the variable on a surface.


      Thank you.

    • DrAmine
      Ansys Employee

      You do not require UDF. You can juste create a custom field function where you multiply your variable withe cell volume. 

    • Rob
      Ansys Employee

      There are some examples in the UDF manual, and you may find some relevant solutions on the Customer Portal (https://support.ansys.com/AnsysCustomerPortal/en_us/Knowledge%20Resources/Solutions/FLUENT/328  looks like it might be useful). 

    • rkoomul
      Subscriber

      Thank you abenhadj.  I created a custom field function and is working fine.  Thank you for your help.


      Roy

    • Karthik R
      Administrator

      Hello Roy,


      I'm glad you're able to move forward with your work and are finding this community useful.


      Just a small request: Students and other members of this community would benefit greatly if you could please mark the most useful response as a 'Reply' to your original question (once you are certain that your issue has been resolved). This makes it easier to search for solutions through these discussions. 


      Thank you.


      Best Regards,


      Karthik

    • Alvin
      Subscriber

      Hi may i know how did you input your value in the specified flux BC of UDS and how did you use the custom field function?? Thank you very much 

Viewing 9 reply threads
  • You must be logged in to reply to this topic.