May I know more about tensor calculation?
Hello, everyone!
How do I calculate partial derivative dA/dx (= (dAxx/dx, dAxy/dx, dAxz/dx, dAyy/dx, dAyz/dx, dAzz/dx)) of a symmetric tensor A (= (Axx, Axy, Axz, Ayy, Ayz, Azz))? I tried to use "grad(A)" but failed. I am at a loss of what to do... If anyone has information concerning this, please let me know! Sincerely yours aki 
Hi Aki,
fvc::grad(A) should do the trick Best Kathrin 
Kathrin,
I don't think that would work... The gradient of a tensor would contain 27 components, which Foam doesn't cater for at the moment. It can be done, just that the templates need to be instantiated, but that wouldn't be trivial. Cheers, Sandeep 
Sandeep,
you are totally right. I overlooked A being a tensor. I feel a little embarrassed about it. Thank you for letting me know! Aki, for what do you need this? Do you just need the single components? Best Kathrin 
A simple workaround would be to store the gradient of each row of the tensor as another tensor, and manipulating that as necessary.

A not so simple way would be to use the VectorN library, which would make possible to have this huge tensor as a whole and add the fvc::grad for this special case. But for me it seems to be overengineered, as least as long as Aki doesn't need the complete tensor.
The question really is for what it is needed... 
All times are GMT 4. The time now is 10:30. 