Ansys Learning Forum › Forums › Discuss Simulation › Fluids › Error when trying to compile UDF › Reply To: Error when trying to compile UDF
April 25, 2024 at 3:07 pm
Tim LS
Subscriber
I have assigned them like this:
I then hooked the sources to their corresponding UDS in their correct phase in the "Cell zone conditions tab."
I access the threads like this:Â
Domain *water_domain;
Domain *bubble_domain;
w_domain = Get_Domain(2);
b_domain = Get_Domain(3);
int fluid_zone_ID = 322;
Thread *tg = Lookup_Thread(b_domain, fluid_zone_ID);
Thread *tw = Lookup_Thread(w_domain, fluid_zone_ID);
Â
Where the fluid_zone_ID is the ID found for the fluid under "Cell zone conditions". The threads seem to be correct, as when I print C_MU_L(c, t_i) I get the correct viscosity of phase i.
Â
Some weird behavior is that:Â
- When I initialize the UDS in the water phase as > 0, and UDS in the gas phase = 0, then UDS in the water phase doesn't change, but UDS in the gas phase grows
- When I initialize the UDS in the water phase as > 0, and UDS in the gas phase > 0, the UDS in water phase doesn't change, but the UDS in gas phase drops to 0 in the first step and stays there.
- When I initialize the UDS in the water phase as = 0 and UDS in the gas phase > 0, the UDS in the water phase doesn't change, but the UDS in the gas phase drops to 0 in the first step and stays there.
Â
Â
Â
Â
Â
Â