Dear Helena,
if I understand you correctly, you want to calculate spatial gradients
of your primary variables?
This is not straight-forward for CCTPFA, at least if you have
heterogeneous data.
If you need the pressure gradient, you could recalculate it from the
darcy velocity and simply use the existing
velocity calculation in dumux
(https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/dumux/porousmediumflow/velocity.hh).
There is also a more generic way to calculate gradients by using for
example equation (39) in
https://ogst.ifpenergiesnouvelles.fr/articles/ogst/pdf/2018/01/ogst180050.pdf
There, K denotes the control volume (element) for which you want to
calculate the gradient of some primary variable u and u_\sigma is some
approximation of your solution on face \sigma (in Dumux denoted as scvf).
For CCTPFA u_\sigma can be calculated as the harmonic average of
neighboring solution values with corresponding transmissibilities. If
you have homogeneous data this would be simply some distance average.
We are currently working on a generic way to interpolate variables and
to calculate gradients, however, this is not yet available.
I hope this helps.
Best regards,
Martin
On 09.02.23 20:06, Helena Kschidock wrote:
Hi all,
I am currently implementing a cell problem in DuMuX and am using an
adapted 1p model/Darcy Problem with CCTPFA discretization to do so.
After obtaining the solution vector, I need to obtain the gradients of
the solution which I will then use to calculate my upscaled
conductivities through integration.
In the exchange with Dimitry Pavlov in the mailing list archive (see
2020q2 "How to implement MaterialLawParams that depend on pressure
gradient"), Timo suggested using the Jacobian to obtain the gradients
(which I could easily make available in my case, as the step is done
AFTER solving the cell problem). However I am slightly confused -
isn't the Jacobian the partial derivative of the residual with respect
to the solution (instead of the partial residual of the solution with
respect to the dimension)? At least this is what the handbook seems to
imply.
Thanks for any help,
Helena
_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux