Open joshuahansel opened 1 year ago
@GiudGiud
This would be cleaner than erroring on missing T_from_v_e
which is problematic because we (my fault mostly) have been adding many of these T_from_v_e, as long as it was analytically tractable to do so
This also suggests that maybe there's a problem with the design of SinglePhaseFluidProperties
. Maybe it should be something like
SinglePhaseFluidPropertiesBase->CompressibleSinglePhaseFluidProperties
SinglePhaseFluidPropertiesBase->IncompressibleSinglePhaseFluidProperties
could be SinglePhaseFluidPropertiesBase->CompressibleSinglePhaseFluidProperties->IncompressibleSinglePhaseFluidProperties
I think the compressible ones work in incompressible solvers as long as the mach number is not too high
Incompressible flow models always confuse me. So there, "incompressible" means more than actually being incompressible - it means constant density, right? But it doesn't require the equation of state to have a constant density?
yeah it depends who you talk to. In my mind now, incompressible means rho(T). not rho constant
as in you cannot compress it, with pressure, or maybe compressure it
I do agree that incompressible could be a sub-class of compressible
After more thought, I think the current design plus the method in the description is the right way to go.
The ideal solution is something like:
FluidBlah : public FlowModelACompatible, public FlowModelBCompatible
where FlowModelACompatible
would have pure virtual methods for all of the interfaces needed by the flow model A. I don't know off the top of my head the rules of multiple inheritance of virtual methods, since there's overlapping interface needs. If the overlapping works fine, it'd be a nice way to enforce compatibility.
There's definitely overlapping interface needs. diamond inheritance isnt well supported
Yeah, I thought as much. In any case, what we have now is fine. Just need to add isCompressible()
.
Reason
Some equations of state do not make sense to be used in certain flow models. For instance, incompressible equations of state do not make sense to be used with flow models where the density and specific internal energy are solved independently, like the Euler equations.
Design
This would add a method
isCompressible()
toSinglePhaseFluidProperties
. Then flow models can query this method if they need to.Impact
New virtual method in
SinglePhaseFluidProperties
.