I am facing a problem when computing the gradient of a scalar field with a variable physical property (conductivity) in the domain. Using the cs_field_gradient_scalar() I can compute the correct gradient in the domain, but in the cells in the interface between different properties, where a discontinuity in the gradient exists, I get an erroneous (an average) value. Then, when I use this gradient and the cell value of the physical propertie to compute, e.j
I am using harmonic face diffusion to compute the diffusive fluxes.
Is there any way (function) in CS to reconstruct the cell gradient based on the existing face fluxes without computing the face value based on that fluxes?
Regards,
Luciano