How to control the boiling zone
I am modelling a gas-liquid two-phase model with a boiling process(VOF model for now),and I want to keep the boiling process in a fixed area.
I set the overheat temperature to 374K, and I hope to get a steady boiling height. I have tried to define the relationship between saturation pressure and boiling point in a table or UDF. But in this way, I still cannot control the boiling height precisely. Then I am wondering if I can defining the relationship between property and position. The original udf is shown below: #include "udf.h" DEFINE_PROPERTY(saturation_temp,c,t) { real sat_t; real vapor_p; real static_p; real operating_p; static_p=C_P(c,t); operating_p = RP_Get_Float("operating-pressure"); vapor_p = static_p + operating_p; sat_t = 1723.6425/(8.05573-log(vapor_p/133.322))-233.08+273.15; return sat_t; } Then I want to define the property changing with height in order to control the bioing zone(represented by height Y), so I changed the UDF then it comes to a failure: #include "udf.h" DEFINE_PROPERTY(saturation_temp,c,t) { cell_t c; Thread *t; real xc[ND_ND]; real x; real y; real sat_t; real vapor_p; real static_p; real operating_p; thread_loop_c(t,d) { begin_c_loop_all(c,t) { x=xc[0]; y=yc[1]; if (y<0.6||y>0.8) sat_t = 500 else static_p=C_P(c,t); operating_p = RP_Get_Float("operating-pressure"); vapor_p = static_p + operating_p; sat_t = 1723.6425/(8.05573-log(vapor_p/133.322))-233.08+273.15; return sat_t; } end_f_loop(c,t); } } So, if it possible to define the property, saturation temp, changing with location?And if there's any other way to control the boiling height exactly? |
i recommend you to compile your code always, so you would see where the problem is
xc is not defined in your code Code:
C_CENTROID(xc,c,t); Code:
{static_p=C_P(c,t); |
All times are GMT -4. The time now is 04:33. |