Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

TAGGED: 

    • Saeed
      Subscriber

      Hello, 

      I am trying to write a udf function for Rocky which particle size reduces over time based an equation. kco and Csat are the inputs of the model. if i add kco value 0.01 it works without any problem. But if i choose a very small value like 1e-14 for kco. all the parameters i wan calculate are either zero or without anychange and therfore there is no mass or volume change. I wrote the code based on the transient szie scale module which is one of the ready to use ones. 

      Can you please help me with it ?

    • Rob
      Forum Moderator

      What does kco do in your model? Ie what is the impact of the value being so low?

    • Saeed
      Subscriber

      it is mass transfer rate constant. the low number is for most of materials in real world. 

    • Rob
      Forum Moderator

      And what does that do to any value that's calculated? A coefficient implies it's included in more maths.... 

    • Saeed
      Subscriber

      in line 159 of the code, kco is used to calculate the mass_change1 and mass_change is beeing for the rest of the parameters. 

    • Rob
      Forum Moderator

      And what sort of values are you getting for the other parameters? 

    • Saeed
      Subscriber

      for example, for mass_change1 in line 159 , i get 0 value. same as mass and volume increment. 

    • Rob
      Forum Moderator

      I meant the other values in that equation. If you're multiplying 1e-14 by "something" the product could be very very small if "something" is also a small number. 

    • Saeed
      Subscriber

      Thank you for your clarification. 

       i am multiplying by particle surface area and DEM time step. for example, in the first time step : 4pi*0.01*0.01*1e-14*1e-6 = 1.256637... e-23

      which I get 0 for this value. 

    • Rob
      Forum Moderator

      There's a good chance the 10^-23 part is returning zero or is adding to something and that's returning the original value. 

    • Saeed
      Subscriber

      isnt double supposed to hold the value even that small ? 

      Also, when I run the simulation a text file is generated called debug.log with the following line inside : [0109/120309.241:WARNING:resource_bundle_qt.cpp(116)] locale_file_path.empty() for locale 

      can you please help me with them ?

    • Rob
      Forum Moderator

      It likely will, but potentially not everything you're using is double. 

       

    • Saeed
      Subscriber

      all parameters are double. 

      I also noticed another issue. in line 155 , cdiss1=cdissolved1/group.volume. I have added cdiss1 and cdissolved1 as an output and realized that cdissolved1/cdiss1 is not the value of volume which was added as an input and mathematically is not working correctly. 

      Do you have any suggestions about that ? I can copy and past the whole code here if it can help you.

      Thanks

    • Rob
      Forum Moderator

      Which I will not be reviewing: we don't debug user code. The wider community are able to do that if they wish. 

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