В википедии есть формула для определения температуры кипения:
Для воды у меня получилось:
# include "udf.h"
DEFINE_PROPERTY(saturation_temperature, c, t)
{
return 1/(1/(273.15+100)-8.31*log(C_P(c,t)/101325)/40680);
}
График вполне допустимый (давление на нем в атмосферах)
Если задать зависимость таблицей в кусочно-линейном виде, то расчет идет, а по представленной формуле -- нет.
Выдает множество сообщений вида:
iter continuity x-velocity y-velocity z-velocity energy k epsilon vf-phase-2 time/iter
1 1.0000e+00 5.4653e-03 6.2700e-03 6.2487e-03 1.5195e-05 1.4033e+06 4.8634e+05 0.0000e+00 0:09:54 99
Stabilizing pressure coupled using GMRES to enhance linear solver robustness.
Experiencing convergence difficulties - temporarily relaxing and trying again...
Stabilizing pressure coupled using GMRES to enhance linear solver robustness.
Experiencing convergence difficulties - temporarily relaxing and trying again...
Stabilizing pressure coupled using GMRES to enhance linear solver robustness.
Experiencing convergence difficulties - temporarily relaxing and trying again...
Stabilizing pressure coupled using GMRES to enhance linear solver robustness.
Experiencing convergence difficulties - temporarily relaxing and trying again...
Stabilizing pressure coupled using GMRES to enhance linear solver robustness.
Experiencing convergence difficulties - temporarily relaxing and trying again...
Divergence detected in AMG solver: pressure coupled
Divergence detected in AMG solver: pressure coupled
Divergence detected in AMG solver: pressure coupled
Divergence detected in AMG solver: pressure coupled
Error at host: floating point exception
===============Message from the Cortex Process================================
Compute processes interrupted. Processing can be resumed.
==============================================================================
Error at Node 0: floating point exception
Error at Node 2: floating point exception
Error at Node 3: floating point exception
Error at Node 1: floating point exception
Error: floating point exception
Error Object: #f
В чем именно моя ошибка?
Согласно известному шоферскому анекдоту: "Дело было не в бобине..." Ошибка была в энтальпии жидкости и пара.
Теперь программный код нормально работает в автономном расчете, но при попытке включить его в System Coupling получаю ошибку вида: "error when making a remote call to participant fluent-2". Если температуру кипения задать линейной интерполяцией по точкам, то все работает.
Добавить комментарий