UDF Parse Error - Initializing VOF for Multiphase Simulation
I'm having a hard time writing a UDF for patching the volume fraction for a phase in my domain at the start of a solution.
Big picture: I am running a 2-way coupled transient FSI simulation that has a transient frame motion angular velocity UDF. To make things more complex, the simulation is also multiphase (water & air). Ordinarily, I'd just patch the air region using by marking the cells; but this does not seem to save the initialization state for system coupling and I get errors. I've been looking into solving this problem that initializes the VOF from a UDF at the start of the solution process. But if somebody has a more elegant solution, I'm all ears. I have little experience in C (I prefer python) so I'm quite irritated by what I think is probably a very simple error. The following UDF is taken from: https://www.sharcnet.ca/Software/Flu...udf/node98.htm Code:
/***************************************************************** I found a thread: https://www.cfd-online.com/Forums/fl...egion-udf.html That claims to have a working UDF, but I've tested it and it does not work. It makes use of ND_SUM and sqrt, but the "if" statement doesn't seem to be evaluating anything (just a sqrt of a sum). I really don't know what to do; but I feel that it should be extremely simple to an experienced UDF programmer. Thanks |
All times are GMT -4. The time now is 01:39. |