Closed snschune closed 1 year ago
Any update on this issue? I saw https://github.com/idaholab/moose/pull/20102 had problems which is a bummer. Any way a community member could help here if there is a vision for this that's not represented in the issue / pr?
If you can guarantee that v(p,T)
and e(p,t)
are both monotonic, then you can invert them and for any p,T
get v,e
. The current implementation uses splines which I don't think guarantee monotonicity of the interpolation. You could replace the splines with linear interpolation which is monotonic if the interpolation points are monotonic. You can make linear interpolation be quite efficient even with a lot of x,y
pairs if you resample x
onto a uniform grid. Then you have to find a good way to invert v,e(p,T)
and you're essentially done.
All in all, it seems like difficult task for limited benefit to me. If we really want to support tabulated material properties from v,e
, then it might be better to implement a bespoke fluid properties to do that.
Yup, I think this line of thinking eventually leads you to something like https://inldigitallibrary.inl.gov/sites/sti/sti/Sort_1213.pdf which have inversion built into the spline, but looks like a lot of work ha.
tabular v,e
does sound nicer, though it's harder to get a nice rectangular grid with it, for example CO2 PT and rhou show in http://www.coolprop.org/fluid_properties/fluids/CarbonDioxide.html#consistency-plots
Closed by #22060
Reason
TabulatedFluidProperties
is a flexible class to provide custom fluid properties. However, it does not work with THM because it only implements (p, T) lookups.Design
Implement a reverse interpolation
p(v,e), T(v,e), p(v,h),T(v,h)
and then reuse(p,T)
implementation.Impact
new capability