User defined function for Fluent