January 31, 2022 at 9:26 pmcmiucbsSubscriber
Hi I'm having problem writing a temperature dependent specific heat macro for my eulerian two phase boiling flow simulation.
I want to get the primary phase temperature from the cell and use it in the code but having problem to do so; I already did the other properties like density using DEFINE PROPERTY macro but since specific heat is kinda different I'm getting odd answers.
So here is my code and I narrow the problem down to the bold words:
DEFINE_SPECIFIC_HEAT(specficheat,T, Tref, h, yi)
Domain *mixture_domain = Get_Domain(1);
Thread *mixture_thread = Lookup_Thread(mixture_domain,8);
Thread *t_wa = THREAD_SUB_THREAD(mixture_thread,0);
Thread *t_va = THREAD_SUB_THREAD(mixture_thread,1);
real Tw = C_T(c,t_wa);
*h = cpf*(T-Tref);
Using the above code lead to wrong values for cp; what can i do to calculate the cp only with my primary phase temp? Can anybody help me on this?February 16, 2022 at 5:47 pmSurya DebAnsys EmployeeHello,
The thread allocations look fine to me.
I would recommend you to print out the primary phase temperature inside the UDF and then compare that to the Fluent GUI to check if everything is consistent or not.
I would also suggest you to use a simpler Cp value (say a linear function or even a constant) for testing if the code is doing what its supposed to do.
Viewing 1 reply thread
Ansys Innovation Space
- You must be logged in to reply to this topic.
Simulation World 2022
Earth Rescue – An Ansys Online Series
Ansys BlogTrending discussions
- Suppress Fluent to open with GUI while performing in journal file
- Heat transfer coefficient
- What are the differences between CFX and Fluent?
- Floating point exception in Fluent
- Time Step Size and Courant Number
- Difference between K-epsilon and K-omega Turbulence Model
- The solver failed with a non-zero exit code of : 2
- Floating point exception
- How to model free convection warming of liquid in a plastic bag
Top Rated Tags