Hi all!
I am trying to overwrite custom properties by using values retrieved from the GUI. No matter what I try, I cannot overwrite the initalized values in the getDetailsForProperty() method.
So, I want to be able to set the value for for example the custom property "Thermal Conductivity" using the GUI. Thermal conductivity has to be a custom property as other plugins should also be able to read its value. But we can assume, its value remains constant throughout the simulation, so it only has to be set once after a particle is created.
However, no matter what I try, the properties used in the calculateforce() function always use the initalized values from getDetailsForProperty. I cant succeed in setting the value to the GUI input.
My source code is attached. It is a small code. Can anyone help me how I can use the GUI values submitted per particle type, to actually set the custom property value to this GUI value once such that it is always used in calculateforce() as specified in the GUI, instead of using the default initalization. Resetcustomproperty does not work for me or I am using it wrong. I have been trying for 2 days but I am out of ideas.
My GUI Template (Geometry is not importnat. Only list_particles)
the resetcustomproperty does not work to overwrite the values initialised in getDetailsForProperty as seen below:
My whole source code is added as .txt!
An example: When I set thermal conductivity as "4" for "pellets" then in calculateforce still the value "2.0" is used.
Any suggestion or help is very much appreciated. I am quite stuck. THe goal is to allow me to set the custom properties in the GUI per particle type. But I cannot seem to get them to actually be used instead of the inital values. Particle Temperature and Heat Flux are not set in the GUI, as they are no constants and evolve during simulation.