๐ก๏ธ Condensation UDF
This UDF simulates vapor โ liquid transformation when the local temperature is below saturation. It handles mass transfer and energy release due to condensation in multiphase cells.
- ๐ง Phase Transition: Vapor โ Liquid
- ๐ง Condition: Triggers when
T < Tsat
- โก Energy Logic: Releases latent heat into the system
- ๐ Interface Detection: Based on volume fraction of each phase
- ๐ Reset: Clears memory at end of timestep

๐ฅ Evaporation UDF
This UDF models liquid โ vapor transition when temperatures rise above saturation. It simulates energy absorption and mass loss due to boiling or heating.
- ๐ฅ Phase Transition: Liquid โ Vapor
- ๐ก๏ธ Condition: Triggers when
T > Tsat
- โ๏ธ Energy Logic: Absorbs latent heat from fluid
- ๐ง Interface Check: Targets multiphase interface cells
- ๐งน Cleanup: Resets UDMs at each timestep

โป๏ธ Combined Phase Change UDF
A single UDF that handles both condensation and evaporation based on whether T
is above or below Tsat
.
- โป๏ธ Phase Transition: Vapor โ Liquid
- ๐ Condition: Dynamically switches logic based on temp
- ๐ Detection: Checks cell VOF + local temperature
- ๐ Use Case: Transient thermal simulations
- โ Bonus: Fully annotated and documented

๐งช Comparing UDF Types for Phase Change
Technical breakdown of each UDF and how they behave under various thermal conditions:
๐ง Condensation
Simulates vapor โ liquid when T < Tsat
.
- โ Applies latent heat release
- โ Simple and lightweight
- โ No evaporation logic
๐ฅ Evaporation
Models liquid โ vapor when T > Tsat
.
- โ Absorbs latent heat
- โ Focused on boiling/thermal rise
- โ No condensation behavior
โป๏ธ Combined
Switches between both modes depending on temperature.
- โ Fully dynamic (bi-directional)
- โ Ideal for full heat cycles
- ๐ง Slightly more complex logic