TAGGED: rocky-dem
-
-
January 7, 2025 at 5:04 pm
Saeed
SubscriberHello,Â
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 ?
-
January 7, 2025 at 5:07 pm
Rob
Forum ModeratorWhat does kco do in your model? Ie what is the impact of the value being so low?
-
January 7, 2025 at 5:12 pm
Saeed
Subscriberit is mass transfer rate constant. the low number is for most of materials in real world.Â
-
January 7, 2025 at 6:12 pm
Rob
Forum ModeratorAnd what does that do to any value that's calculated? A coefficient implies it's included in more maths....Â
-
January 7, 2025 at 7:03 pm
Saeed
Subscriberin line 159 of the code, kco is used to calculate the mass_change1 and mass_change is beeing for the rest of the parameters.Â
-
January 8, 2025 at 9:42 am
Rob
Forum ModeratorAnd what sort of values are you getting for the other parameters?Â
-
January 8, 2025 at 5:18 pm
Saeed
Subscriberfor example, for mass_change1 in line 159 , i get 0 value. same as mass and volume increment.Â
-
January 8, 2025 at 5:34 pm
Rob
Forum ModeratorI 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.Â
-
January 8, 2025 at 5:50 pm
Saeed
SubscriberThank 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.Â
-
January 9, 2025 at 11:02 am
Rob
Forum ModeratorThere's a good chance the 10^-23 part is returning zero or is adding to something and that's returning the original value.Â
-
January 9, 2025 at 5:21 pm
Saeed
Subscriberisnt 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 ?
-
January 10, 2025 at 1:48 pm
Rob
Forum ModeratorIt likely will, but potentially not everything you're using is double.Â
Â
-
January 10, 2025 at 3:00 pm
Saeed
Subscriberall 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
-
January 10, 2025 at 3:08 pm
Rob
Forum ModeratorWhich I will not be reviewing: we don't debug user code. The wider community are able to do that if they wish.Â
-
- You must be logged in to reply to this topic.
-
3241
-
1031
-
969
-
859
-
798
© 2025 Copyright ANSYS, Inc. All rights reserved.