Electrostatic Decay UDF
Replace the decay function (272) of the electrostatic charges with your own decay function. Select it on the Particles - Electrostatic Effects tab.
A electrostatic decay UDF contains three functions.
udf_entryMessage
This function is called when the UDF is attached and can be used to print a message to the console.
Input: none
Return value: none
Example:
|
udf_exitMessage
This function is called when the UDF is detached and can be used to print a message to the console.
Input: none
Return value: none
Example:
|
udf_decayFactor
Input:
- surfaceChargeData_UDF strcut
Return value: decay factor that describes the current fraction of the electrostatic charge. A value of 1.0 means complete charge, a value of 0.0 means no charges.
Example: The file SurfaceChargeDecayUDF.cpp shows an example:
|
GeoDict passes the relevant data to this function with help of the struct surfaceChargeData_UDF. The struct is defined in the SurfaceChargeDecayStructs.h header file which can be found in the include folder.
surfaceChargeData_UDF