Open bangerth opened 8 years ago
Specifically, MaterialModelInputs
also has them. I don't think it should be in there.
And for reference, @tjhei 's #710 already takes care of some of these locations.
We need the pressure gradients in some of the heating plugins, for example in the adiabatic heating. I think that's why we added them to the MaterialModelInputs.
@jdannberg -- that's awkward. How are you going to deal with the case of someone using a discontinuous pressure element (the "conservative" option)? Can you state what term it is you need this in?
There is an option to use density * gravity instead of the pressure gradient (it is called Use simplified adiabatic heating
), but at the moment we do not make sure that if the discontinuous pressure element is used one can only use the simplified adiabatic heating. So that is something to improve.
The term we need that in is the RHS term of the adiabatic heating: _velocity * pressure_gradient * thermal_expansioncoefficient * temperature
and the latent heat: _temperature * density * entropy_derivative_pressure * velocity * pressuregradient.
So we could use density * gravity everywhere, but the pressure gradient is more exact.
I don't know if the numerical gradient of the pressure is actually more exact. But in either case, we should probably add an assertion about which element is used in all of the places where the gradient is used.
Pressure gradients are not useful quantities, yet they are computed all over the place in the code:
I think we should look at which of these terms are in fact used and ensure that in all of the other places, we don't compute them at all.