This is the current candle sim it has all the functionality needed right now. I am in the process of tweaking and refining the sim to look like an actual candle.
This is the candle model. I started with a line and UV’ed it top to bottom I can then use the UV attribute as the position of the ramp and the set value at that position is the “pscale”. I then used “polywire” to create the geometry.
This is the code for the wick it, creates high fuel and temperature attributes that travels down the length of the wick. It starts by dividing the total number of frames by the current frame number, thereby returning a value between 0-1 ( there is also a multiplier to slow down or speed up the growth). I then fit that 0-1 frame value to the total number of points on the line. I the explicitly cast this to a integer to drop the decimal value and this gives a point number that travels downward like a wick burning out.
This is the DOP network for the candle. The challenge of this sim was to get the flip fluid’s viscosity to be effected by the temperature field of the pyro sim. The “gas temperature update” node makes the temperature of the fluid particles to effect its viscosity and also allows the temperature to cool over time and diffuse through the fluid. To transfer the temperature field of the pyro to the flip object I use the fetch data node and then apply it to the flip object using the apply data node. this gives me the temperature field but i need it transferred on to the particles so I use the “gas field to particle” node to transfer it. That’s how to transfer the temperature data within the DOP network.